flutter_restorablez 0.0.9
flutter_restorablez: ^0.0.9 copied to clipboard
Restorable Flutter widgets. Including scroll, tab bar and navigation bar.
Flutter Restorablez #
Restorable Flutter widgets that automatically save and restore positions for widgets such as scrollables, tab bar and navigation bar.
Documentation #
The generated documentation has a great overview of all that is available.
Features #
RestorableScroll #
RestorableScroll(
id: 'example-scroll',
builder: (BuildContext context, ScrollController controller) {
return ListView.builder(
controller: controller,
itemCount: 200,
itemBuilder: (BuildContext context, int index) {
return ListTile(
title: Text('Item $index'),
);
},
);
},
);
RestorableTabBar #
DefaultTabController(
length: 3,
child: Scaffold(
appBar: AppBar(
title: 'Example Tab Bar',
),
bottom: RestorableTabBar(
id: 'example-tab-bar',
tabs: <Widget>[
Tab(text: 'Tab 1'),
Tab(text: 'Tab 2'),
Tab(text: 'Tab 3'),
],
),
body: TabBarView(
children: <Widget>[
Text('Child 1'),
Text('Child 2'),
Text('Child 3'),
],
),
),
);