Add a handler for the filters on evolutions.
This commit is contained in:
parent
3f4462435b
commit
670c23d264
6 changed files with 94 additions and 52 deletions
|
@ -47,7 +47,7 @@ class _HomeState extends State<Home> {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('PokeDex'),
|
||||
title: Text("PokeDex - ${SessionData.highestGenID()} Entries"),
|
||||
backgroundColor:
|
||||
SessionData.darkMode
|
||||
? LibACFlutterConstants.TITLEBAR_COLOR
|
||||
|
@ -69,7 +69,10 @@ class _HomeState extends State<Home> {
|
|||
DrawerHeader(
|
||||
child: Column(
|
||||
children: [
|
||||
Text("PokeDex", style: TextStyle(fontSize: 24)),
|
||||
Text(
|
||||
"PokeDex - ${SessionData.highestGenID()} Entries",
|
||||
style: TextStyle(fontSize: 24),
|
||||
),
|
||||
Text(
|
||||
"Version: ${Constants.VERSION}",
|
||||
style: TextStyle(fontSize: 24),
|
||||
|
@ -81,8 +84,9 @@ class _HomeState extends State<Home> {
|
|||
title: Text("Filters"),
|
||||
leading: Icon(Icons.filter),
|
||||
subtitle: Text("Opens the PokeDex filters"),
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, "/filters");
|
||||
onTap: () async {
|
||||
await Navigator.pushNamed(context, "/filters");
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
],
|
||||
|
@ -96,8 +100,9 @@ class _HomeState extends State<Home> {
|
|||
elevation: 50,
|
||||
color: Color.fromARGB(255, 194, 94, 0),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, "/dex", arguments: index);
|
||||
onTap: () async {
|
||||
await Navigator.pushNamed(context, "/dex", arguments: index);
|
||||
setState(() {});
|
||||
},
|
||||
child: SizedBox(
|
||||
width: 300,
|
||||
|
@ -129,7 +134,7 @@ class _HomeState extends State<Home> {
|
|||
),
|
||||
);
|
||||
},
|
||||
itemCount: Pokemon.values.length,
|
||||
itemCount: SessionData.highestGenID(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: Constants.isMobile ? 3 : 4,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue