분류, 패키지 및 저장소 검색

GitHub 저장소amjadjamali06/intrinsic_grid_view

intrinsic_grid_view

사용자 정의 GridView로, IntrinsicGridView는 내재된 너비와 높이를 가진 2차원 배열의 자식을 제공합니다.

intrinsic_grid_view 프로젝트 이미지
스타
8
포크
1
최근 푸시(UTC)
2021. 8. 6.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 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 작성자

Amjad Jamali ↗

Android Native And Flutter Developer...

SapphireJamshoro
언어DartSwiftKotlinObjective-C

분류

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 2 개

  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

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

GitHub Docs — About repositories ↗