responsive_grid_list 1.2.0
responsive_grid_list: ^1.2.0 copied to clipboard

A Flutter plugin to create responsive grid lists using ListView.builder() or SliverList with a SliverChildBuilderDelegate.

example/main.dart

import 'package:flutter/material.dart';
import 'package:responsive_grid_list/responsive_grid_list.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Responsive Grid List Demo',
      debugShowCheckedModeBanner: false,
      home: DemoPage(),
    );
  }
}

class DemoPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // Generate a list of 100 cards containing a text widget with it's index
    // and render it using a ResponsiveGridList

    return Scaffold(
      appBar: AppBar(title: Text('Demo')),
      body: ResponsiveGridList(
        horizontalGridSpacing: 16,
        verticalGridSpacing: 16,
        horizontalGridMargin: 50,
        verticalGridMargin: 50,
        minItemWidth: 100,
        children: List.generate(
          100,
          (index) => Container(
            color: Colors.lightBlue,
            child: Padding(
              padding: EdgeInsets.all(32),
              child: Text(
                '$index',
                textAlign: TextAlign.center,
              ),
            ),
          ),
        ),
      ),
    );
  }
}
4
likes
130
pub points
70%
popularity

Publisher

htoenjes.de

A Flutter plugin to create responsive grid lists using ListView.builder() or SliverList with a SliverChildBuilderDelegate.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD (LICENSE)

Dependencies

flutter, quiver

More

Packages that depend on responsive_grid_list