intrinsic_grid_view

Last updated:

0 purchases

intrinsic_grid_view Image
intrinsic_grid_view Images
Add to Cart

Description:

intrinsic grid view

intrinsic_grid_view #






A Custom GridView, IntrinsicGridView provides 2D array of children with Intrinsic width and height.
Having two named Constructors
IntrinsicGridView.vertical scrolls in vertical direction.
IntrinsicGridView.horizontal scrolls in horizontal direction.
GridView vs IntrinsicGridView #



Properties
GridView
IntrinsicGridView




contents overflow
Yes
No


children width vary with item width
No
Yes


children height vary with item height
No
Yes


if any children's height vary,the adjacent child set new height
No
Yes



Usage #

Add dependency.

Run this command with Flutter:
$ flutter pub add intrinsic_grid_view
copied to clipboard
or add following package in your pubspec.yaml file inside the dependencies: section.
dependencies:
intrinsic_grid_view: ^0.0.2
copied to clipboard

Importing the library:

import 'package:intrinsic_grid_view/intrinsic_grid_view.dart';
copied to clipboard

Examples:

IntrinsicGridView.vertical example

code
IntrinsicGridView.vertical(
padding: EdgeInsets.only(top: 16, bottom: 12, left: 12, right: 12),
// columnCount: 3,
verticalSpace: 10,
horizontalSpace: 10,
children: [
for (var scientist in scientists)
_buildWidget(scientist),
]
), // IntrinsicGridView.vertical
copied to clipboard
IntrinsicGridView.horizontal example

code
IntrinsicGridView.horizontal(
padding: EdgeInsets.only(top: 16, bottom: 12, left: 12, right: 12),
// rowCount: 1,
verticalSpace: 10,
horizontalSpace: 10,
children: [
for (var scientist in scientists)
_buildHorizontalWidget(scientist),
]
), // IntrinsicGridView.horizontal
copied to clipboard
IntrinsicGridView.vertical + IntrinsicGridView.horizontal example

code
Column(
children: [
Expanded(
flex: 3,
child: Row(
children: [
Expanded(
child: IntrinsicGridView.vertical(
padding: EdgeInsets.only(top: 16, bottom: 12, left: 12, right: 12),
columnCount: 1,
verticalSpace: 10,
horizontalSpace: 10,
children: [
for (var scientist in scientists)
_buildWidget(scientist),
]
), // IntrinsicGridView.vertical
),

Expanded(
child: IntrinsicGridView.vertical(
padding: EdgeInsets.only(top: 16, bottom: 12, left: 12, right: 12),
// columnCount: 3,
verticalSpace: 10,
horizontalSpace: 10,
children: [
for (var scientist in scientists)
_buildWidget(scientist),
]
), // IntrinsicGridView.vertical
),


],
),
),

Expanded(
child: IntrinsicGridView.horizontal(
padding: EdgeInsets.only(top: 16, bottom: 12, left: 12, right: 12),
// rowCount: 1,
verticalSpace: 10,
horizontalSpace: 10,
children: [
for (var scientist in scientists)
_buildHorizontalWidget(scientist),
]
), // IntrinsicGridView.horizontal
),
],
),
copied to clipboard
Contributing #
Suggestions and Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Developer Team: #
Amjad Jamali & Kamran Khan
License #
Apache 2.0

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.