Coder Social home page Coder Social logo

bharathraj-e / responsive_ui Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 7.0 9.26 MB

Flutter Responsive widget - Works on all flutter platform

Home Page: https://pub.dev/packages/responsive_ui

License: MIT License

Dart 26.90% Swift 2.04% Objective-C 0.06% HTML 2.92% Ruby 2.17% Kotlin 0.20% CMake 29.17% C++ 34.26% C 2.29%
dart flutter responsive widget widgets

responsive_ui's People

Contributors

bharathraj-e avatar chappie74 avatar julien-deudon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

responsive_ui's Issues

[Advice] - Building Angular FlexLayout for Flutter

Hi, I am pretty impressed by what you did with responsive_ui. Someone who is coming from bootstrap will find it right at home using your library.

I am looking to build Angular FlexLayout for Flutter I think the API is a lot more flexible than bootstrap.

Responsive API - https://github.com/angular/flex-layout/wiki/Responsive-API

I appreciate it if you have any advice/ideas on how to accomplish the example shown below, or if you want to collaborate. I would be more than happy to be a part of it.

Psuedo Code

FxLayout (
 layout: FxLayout.row,
 mainAxisAlign: FxLayoutAlign.center,
 crossAxisAlign: FxLayoutAlign.center,
 gap: FxSize(size: 10, unit: FxUnit.dp /*default*/)
  children: [
    FxFlex (
      fill: true
       order: 0,
       align: FxFlexAlign.start,
       child: Text('1st Child'),
     ),
    FxFlex (
       order: 1,
       align: FxFlexAlign.center,
       size: FxSize(size: 90, unit: FxUnit.percentage ),
       child: Text('2nd Child'),
     )
  ]
)

Cheers!

runSpacing is not working

I runSpacing is not getting applied.
Responsive( runSpacing: 50, children: [ Div( colL: 4, child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( height: 200, color: Colors.red, ) ], ), ), Div( colL: 4, child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( height: 200, color: Colors.green, ) ], ), ), Div( colL: 4, child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( height: 200, color: Colors.blue, ) ], ), ), ], ), ![Screenshot_20210308_154830](https://user-images.githubusercontent.com/17794380/110308213-dcb61d80-8025-11eb-949e-7f59e9c54fbc.png)

Add horizontal spacing

Hi thankyou for amazing library, if it possible to add horizontal spacing because this is wrap for container ?

Issue with calculations causing glitches

Description of issue

I have two responsive containers that I am displaying, defined below:

Responsive(
              children: [
                Div(
                  divison: const Division(colS: 3, colM: 3, colL: 1, colXL: 1),
                  child: Container(
                    padding: EdgeInsets.zero,
                    margin: EdgeInsets.zero,
                    height: 100,
                    color: Colors.black,
                  ),
                ),
                Div(
                    divison:
                        const Division(colS: 9, colM: 9, colL: 11, colXL: 11),
                    child: Container(
                      height: 100,
                      padding: EdgeInsets.zero,
                      margin: EdgeInsets.zero,
                      color: Colors.red,
                    )),
              ],
            ),

It appears as though, when all of the divisions add up to 12 perfectly, the calculations that occurs to determine the width of each widget causes glitches.

Upon further investigation, it seems to be an issue with the calculations of the childWidth
There are some cases (due to the division/multiplication of floating point numbers) that the child width ends up being a few 10ths of a pixels wider than it should be causing the wrap to put it into the bottom section. This causes the sum of all the box widths to end up being a bit larger than the total available width (provided by layout builder)

I have a working solution and will open a pull request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.