Kategorien, Pakete und Repositories suchen

GitHub-Repositoryamjadjamali06/intrinsic_grid_view

intrinsic_grid_view

Ein benutzerdefinierter GridView, IntrinsicGridView bietet ein 2D-Array von Kindern mit intrinsischer Breite und Höhe.

Projektcover von intrinsic_grid_view
Sterne
8
Forks
1
Letzter Push (UTC)
06.08.2021
Projektstatus
Aktiv

Original-README

Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.

intrinsic_grid_view

pub package Likes popularity pub points Platform License GitHub code size in bytes GitHub stars

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

  1. Add dependency.

Run this command with Flutter:

$ flutter pub add intrinsic_grid_view

or add following package in your pubspec.yaml file inside the dependencies: section.

dependencies:
  intrinsic_grid_view: ^0.0.2
  1. Importing the library:
import 'package:intrinsic_grid_view/intrinsic_grid_view.dart';
  1. 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

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

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
            ),
          ],
        ),

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

Amjad Jamali GitHub avatar
GitHub-Autor

Amjad Jamali ↗

Android Native And Flutter Developer...

SapphireJamshoro
SprachenDartSwiftKotlinObjective-C

Kategorien

Von diesem Repository veröffentlichte Pakete

Verwendete Abhängigkeiten

Abhängigkeiten 2 Einträge

  • flutter{"sdk":"flutter"}
  • flutter_testEntwicklung{"sdk":"flutter"}

Wie wähle ich ein passendes Repository?

Nach Anwendungsfall filtern, Aktivität vergleichen und vor der Nutzung das Originalprojekt prüfen.

  1. Nach Name, Autor oder Beschreibung suchen und nach Thema eingrenzen.
  2. Sterne, Forks und letzte Pushes vergleichen. Sterne zeigen Interesse, garantieren aber keine Qualität.
  3. Vor der Nutzung README, Lizenz und Issues auf GitHub prüfen.

Quellen und Pflege

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

GitHub Docs — About repositories ↗