FLUTTER ECOSYSTEM

ali2236/smart_grid_view

एक प्रतिक्रियाशील ग्रिड दृश्य जो उपलब्ध क्षैतिज आकार के आधार पर अपने अक्षीय बच्चों की संख्या बदलता है।

smart_grid_view प्रोजेक्ट कवर
Stars
3
Forks
2
अंतिम पुश (UTC)
21 मई 2020
प्रोजेक्ट स्थिति
सक्रिय
Ali Qanbari GitHub avatar
GITHUB User

Ali Qanbari ↗

Flutter Developer/Software Engineer

भाषाएँDartHTMLSwiftKotlinObjective-C

तकनीकी विषय

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 1 आइटम
  • flutter{"sdk":"flutter"}

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

README खोलें / बंद करें

smart_grid_view

A responsive grid view that changes it's cross axis child count based on the available horizontal size.

This widget is great for creating responsive designs as the sized of tiles stays about the same across different screen sizes.

How does it work

Using the width of tiles, SmartGridview will calculate the crossAxisCount for the underlying GridView with maxWidth ~/ tileWidth.

The tileHeight is used with tileWidth to calculate gridChildRatio.

Example

class MyApp extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('Example')),
        body: SmartGridView(
          tileWidth: 128,
          tileHeight: 168,
          children: List.generate(80, (index) => Card(
            child: GridTile(
              child: Text('tile #$index'),
            ),
          )),
        ),
      ),
    );
  }
}
Result

https://raw.githubusercontent.com/ali2236/smart_grid_view/HEAD/pictures/1.jpg https://raw.githubusercontent.com/ali2236/smart_grid_view/HEAD/pictures/2.jpg