Add in a update checker
This commit is contained in:
parent
3d2226947c
commit
31c4b62c14
6 changed files with 116 additions and 2 deletions
|
@ -1,7 +1,10 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:libacflutter/Constants.dart';
|
||||
import 'package:pokedex/Consts.dart';
|
||||
import 'package:pokedex/Session.dart';
|
||||
import 'package:pokedex/UpdateCheck.dart';
|
||||
import 'package:pokedex/filters.dart';
|
||||
import 'package:pokedex/pokemon.dart';
|
||||
import 'package:pokedex/pokemonHelpers.dart';
|
||||
|
@ -29,6 +32,7 @@ class _MainAppState extends State<MainApp> {
|
|||
"/": (context) => Home(toggleTheme: toggleTheme),
|
||||
"/dex": (context) => DexEntry(),
|
||||
"/filters": (context) => FilterPage(),
|
||||
"/update": (context) => UpdateCheck(),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -90,6 +94,16 @@ class _HomeState extends State<Home> {
|
|||
setState(() {});
|
||||
},
|
||||
),
|
||||
if (Platform.isIOS || Platform.isAndroid)
|
||||
ListTile(
|
||||
title: Text("U P D A T E"),
|
||||
subtitle: Text("Opens the update checker"),
|
||||
leading: Icon(Icons.update),
|
||||
onTap: () async {
|
||||
await Navigator.pushNamed(context, "/update");
|
||||
setState(() {});
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue