Skip to content

Commit

Permalink
Improving content page (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszpolanski authored Dec 25, 2019
1 parent 629f185 commit 11a656d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Flutter Animations Cheat Sheet
[![Codemagic build status](https://api.codemagic.io/apps/5d360a1b3b905a001cfaa874/5d360a1b3b905a001cfaa873/status_badge.svg)](https://codemagic.io/apps/5d360a1b3b905a001cfaa874/5d360a1b3b905a001cfaa873/latest_build)

*WIP*

List of animations and transitions that you can used in Flutter.

Available as a [webpage](https://flutter-animations-cheat-sheet.codemagic.app/#/).
The content of the page is [searchable](https://flutter-animations-cheat-sheet.codemagic.app/#/content).

# Building
Last tested version of Flutter that works with this repo is `v1.12.13+hotfix.5`:
Expand Down
22 changes: 12 additions & 10 deletions lib/content_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@ class _ContentPageState extends State<ContentPage> {
appBar: SearchBar(
onChanged: (String value) => setState(() => _searchQuery = value),
),
body: ListView(
children: <Widget>[
for (final route in AnimationCheatSheet.routes()
.keys
.where((route) => route.containsIgnoreCase(_searchQuery)))
ListTile(
title: Text(route),
onTap: () => Navigator.of(context).pushNamed(route),
)
],
body: Scrollbar(
child: ListView(
children: <Widget>[
for (final route in AnimationCheatSheet.routes()
.keys
.where((route) => route.containsIgnoreCase(_searchQuery)))
ListTile(
title: Text(route, maxLines: 1),
onTap: () => Navigator.of(context).pushNamed(route),
)
],
),
),
);
}
Expand Down

0 comments on commit 11a656d

Please sign in to comment.