Pub

gs_flutter_package

A Flutter Package to create reusable widget for list. Simple and easy to use.

Usage

Add the ListView in your screen. Then add GSFlutterWidget inside children attribute. <br/> Full example


  @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          title: Text('GS Flutter Widget'),
        ),
        body: ListView(
          children: <Widget>[
            GSFlutterWidget.circleImageWithText(
              context,
              headerTitle: 'Circle Image With Text',
              headerShowIcon: false,
              itemCount: 4,
              itemTitle: (index) {
                return items[index].title;
              },
              itemImage: (index) {
                return items[index].image;
              },
              onItemClicked: (index) {
                print(items[index].title);
              },
            ),
            GSFlutterWidget.roundedSquareImage(
              context,
              headerTitle: 'Rounded Square Image',
              headerShowIcon: true,
              itemCount: items.length,
              itemImage: (index) {
                return items[index].image;
              },
              onItemClicked: (index) {
                print(items[index].title);
              },
            ),
          ],
        ),
      );
    }

Libraries

circle_image_with_text_widget
gs_flutter_widget
rounded_square_image_widget
section_header_widget