feat(增加历史记录列表):

This commit is contained in:
sanfan.hx
2019-02-18 17:06:31 +08:00
parent d9221a55ff
commit 619c1bd04e
7 changed files with 239 additions and 55 deletions

View File

@ -6,6 +6,7 @@ import 'routers/application.dart';
import 'package:flutter_go/utils/provider.dart';
import 'package:flutter_go/utils/shared_preferences.dart';
import 'package:flutter_go/views/first_page/home.dart';
import 'package:flutter_go/model/search_history.dart';
import 'views/welcome_page/index.dart';
const int ThemeColor = 0xFFC91B3A;
@ -19,7 +20,7 @@ class MyApp extends StatelessWidget {
Application.router = router;
}
showWelcomePage() {
bool showWelcome = sp.getBool(sharedPreferencesKeys.showWelcome);
bool showWelcome = sp.getBool(SharedPreferencesKeys.showWelcome);
if (showWelcome == null || showWelcome == true) {
return WelcomePage();
} else {
@ -57,6 +58,7 @@ void main() async {
final provider = new Provider();
await provider.init(true);
sp = await SpUtil.getInstance();
new SearchHistoryList(sp);
db = Provider.db;
runApp(new MyApp());
}