FLUTTER ECOSYSTEM

ihorbokov/constrained_scrollable_views

Eine Reihe nützlicher scrollbarer Ansichten umfasst ConstrainedScrollView, ScrollableColumn und ScrollableRow.

Projektcover von eingeschränkte Scrollansichten
Stars
1
Forks
1
Letzter Push (UTC)
03.10.2024
Projektstatus
Aktiv
Ihor Bokov GitHub avatar
GITHUB User

Ihor Bokov ↗

Crazy Flutter Developer

Ukraine
SprachenDartSwiftKotlinObjective-C

Von diesem Repository veröffentlichte Pakete

Verwendete Abhängigkeiten

Abhängigkeiten 3 Einträge
  • flutter{"sdk":"flutter"}
  • flutter_testEntwicklung{"sdk":"flutter"}
  • very_good_analysisEntwicklung^6.0.0

Original-README

Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.

Projekt-README ein-/ausklappen

Constrained Scrollable Views

Pub style: very good analysis License: MIT

Set of useful scrollable views includes ConstrainedScrollView, ScrollableColumn, and ScrollableRow.

  • ConstrainedScrollView is a combination of LayoutBuilder and SingleChildScrollView.
  • ScrollableColumn is Column wrapped by ConstrainedScrollView.
  • ScrollableRow is Row wrapped by ConstrainedScrollView.

Usage

Example of using ConstrainedScrollView:

ConstrainedScrollView(
  padding: const EdgeInsets.all(8),
  physics: const BouncingScrollPhysics(),
  constraintsBuilder: (constraints) => BoxConstraints(
    minWidth: constraints.maxWidth,
    minHeight: constraints.maxHeight,
  ),
  child: const Center(
    child: Text('ScrollView value'),
  ),
)

Example of using ScrollableColumn:

ScrollableColumn(
  padding: const EdgeInsets.all(8),
  physics: const BouncingScrollPhysics(),
  constraintsBuilder: (constraints) => BoxConstraints(
    minHeight: constraints.maxHeight,
  ),
  children: [
    for (var i = 0; i <= 100; i++)
      Padding(
        padding: const EdgeInsets.all(4),
        child: Text('Column value: $i'),
      ),
  ],
)

Example of using ScrollableRow:

ScrollableRow(
  padding: const EdgeInsets.all(8),
  physics: const BouncingScrollPhysics(),
  constraintsBuilder: (constraints) => BoxConstraints(
    minWidth: constraints.maxWidth,
  ),
  children: [
    for (var i = 0; i <= 100; i++)
      Padding(
        padding: const EdgeInsets.all(4),
        child: Text('Row value: $i'),
      ),
  ],
)