responsive_gridview 1.0.4 copy "responsive_gridview: ^1.0.4" to clipboard
responsive_gridview: ^1.0.4 copied to clipboard

Responsive GridViw For All Platform, Configure custom columns count, Adjust Child and Overall Padding

Responsive GridView #

A Flutter package that provides a customizable and responsive GridView widget with flexible child count configuration.

Features #

  • Customizable number of columns
  • Responsive layout that adapts to different screen sizes
  • Configurable spacing between items
  • Custom padding support
  • Easy to implement and use

Installation #

Add the following dependency to your pubspec.yaml file:

dependencies:
  responsive_gridview: ^latest_version

Usage #

Import the package in your Dart file:

import 'package:responsive_gridview/responsive_gridview.dart';

Basic Implementation #

Here's a simple example of how to use the ResponsiveGridView:

ResponsiveGridView(
  column: 2, // Number of items per row (configurable from 1 to many)
  verticalSpacing: 20, // Vertical spacing between items (default: 12)
  horizontalSpacing: 20, // Horizontal spacing between items (default: 12)
  padding: const EdgeInsets.all(8), // Outer padding (default: 12)
  children: [
    Text("Hello"),
    Text("Flutter"),
    Image.network("www.google.com/nj65372g"),
    Text("Thank You!"),
  ],
)

Parameters #

Parameter Type Description Default
column int Number of items per row Required
verticalSpacing double Vertical spacing between items 12
horizontalSpacing double Horizontal spacing between items 12
padding EdgeInsets Outer padding around the grid EdgeInsets.all(12)
children List List of widgets to display in the grid Required

Contributing #

Contributions are welcome! Please feel free to submit a Pull Request.

License #

This project is licensed under the MIT License - see the LICENSE file for details.

ResponsiveGridView(
  column: 2, // 2 items per row, we can configure 1 to many
  verticalSpacing: 20, // Vertical spacing between 2 items, default is 12
  horizontalSpacing: 20, // Horizontal spacing between 2 items, default is 12
  padding: const EdgeInsets.all(8), // Overall outer padding, default is 12
  children: [
    Text("Hello"),
    Text("Flutter"),
    Image.network("www.google.com/nj65372g"),
    Text("Thank You!"),
  ]
)
11
likes
150
points
30
downloads

Publisher

verified publishertherohitsoni.in

Weekly Downloads

Responsive GridViw For All Platform, Configure custom columns count, Adjust Child and Overall Padding

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

cupertino_icons, flutter

More

Packages that depend on responsive_gridview