Search categories, packages and repositories

GitHub repositoryali2236/smart_grid_view

smart_grid_view

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

smart_grid_view project cover
Stars
3
Forks
2
Last push (UTC)
May 21, 2020
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

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

Ali Qanbari GitHub avatar
GitHub author

Ali Qanbari ↗

Flutter Developer/Software Engineer

Iran, Bushehr, Bandar BushehrOfficial website ↗
LanguagesDartHTMLSwiftKotlinObjective-C

Categories

Packages published by this repository

Dependencies used

Dependency list 1 items

  • flutter{"sdk":"flutter"}

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗