diff --git a/lib/new_models/home/home_message_list_model.dart b/lib/saas_models/home/home_message_list_model.dart similarity index 100% rename from lib/new_models/home/home_message_list_model.dart rename to lib/saas_models/home/home_message_list_model.dart diff --git a/lib/new_models/home/home_message_list_model.g.dart b/lib/saas_models/home/home_message_list_model.g.dart similarity index 100% rename from lib/new_models/home/home_message_list_model.g.dart rename to lib/saas_models/home/home_message_list_model.g.dart diff --git a/lib/style/apptheme.dart b/lib/style/apptheme.dart index e07b603..617bdd2 100644 --- a/lib/style/apptheme.dart +++ b/lib/style/apptheme.dart @@ -1,47 +1,58 @@ // Flutter imports: import 'package:flutter/material.dart'; - +import 'package:flutter/services.dart'; // Package imports: import 'package:flutter_screenutil/flutter_screenutil.dart'; class AppTheme { static ThemeData get themeData { return ThemeData(primarySwatch: Colors.blue).copyWith( + progressIndicatorTheme: + ProgressIndicatorThemeData(color: Color(0xFFFFD000)), primaryColor: Color(0xFFFFD000), - accentColor: Color(0xFFFFD000), - textTheme: TextTheme().copyWith( - headline3: TextStyle( - fontSize: 40.sp, - color: Color(0xFF333333), - fontWeight: FontWeight.bold, - ), - subtitle1: TextStyle( - fontSize: 32.sp, - color: Color(0xFF333333), - ), - subtitle2: TextStyle( - fontSize: 28.sp, - color: Color(0xFF333333), - ), - bodyText1: TextStyle( - fontSize: 24.sp, - color: Color(0xFF333333), - ), - ), + textTheme: ThemeData.light().textTheme.copyWith( + headline3: TextStyle( + fontSize: 40.sp, + color: Color(0xFF333333), + fontWeight: FontWeight.bold, + ), + subtitle1: TextStyle( + fontSize: 32.sp, + color: Color(0xFF333333), + ), + subtitle2: TextStyle( + fontSize: 28.sp, + color: Color(0xFF333333), + ), + bodyText1: TextStyle( + fontSize: 24.sp, + color: Color(0xFF333333), + ), + ), floatingActionButtonTheme: FloatingActionButtonThemeData().copyWith( backgroundColor: Color(0xFFFFD000), ), appBarTheme: AppBarTheme( elevation: 0, centerTitle: true, - brightness: Brightness.light, - textTheme: TextTheme( + iconTheme: IconThemeData( + color: Color(0xFF333333), + ), + systemOverlayStyle: SystemUiOverlayStyle.dark, + toolbarTextStyle: TextTheme( headline6: TextStyle( color: Color(0xFF333333), fontSize: 36.sp, fontWeight: FontWeight.bold, ), - ), + ).bodyText2, + titleTextStyle: TextTheme( + headline6: TextStyle( + color: Color(0xFF333333), + fontSize: 36.sp, + fontWeight: FontWeight.bold, + ), + ).headline6, ), tabBarTheme: TabBarTheme( labelColor: Color(0xFF333333), @@ -107,6 +118,8 @@ class AppTheme { ), materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, dividerColor: Color(0xFFE8E8E8), + colorScheme: + ColorScheme.fromSwatch().copyWith(secondary: Color(0xFFFFD000)), ); } } diff --git a/lib/ui/home/new_home/home_swiper.dart b/lib/ui/home/new_home/home_swiper.dart index 8d64873..e6fc270 100644 --- a/lib/ui/home/new_home/home_swiper.dart +++ b/lib/ui/home/new_home/home_swiper.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:aku_new_community_manager/gen/assets.gen.dart'; -import 'package:aku_new_community_manager/new_models/home/home_message_list_model.dart'; +import 'package:aku_new_community_manager/saas_models/home/home_message_list_model.dart'; import 'package:aku_new_community_manager/utils/bee_date_util.dart'; import 'package:common_utils/common_utils.dart'; import 'package:flutter/material.dart'; diff --git a/lib/ui/home/new_home/new_home_page.dart b/lib/ui/home/new_home/new_home_page.dart index de0852d..3031cb4 100644 --- a/lib/ui/home/new_home/new_home_page.dart +++ b/lib/ui/home/new_home/new_home_page.dart @@ -1,6 +1,6 @@ import 'package:aku_new_community_manager/const/saas_api.dart'; import 'package:aku_new_community_manager/gen/assets.gen.dart'; -import 'package:aku_new_community_manager/new_models/home/home_message_list_model.dart'; +import 'package:aku_new_community_manager/saas_models/home/home_message_list_model.dart'; import 'package:aku_new_community_manager/tools/user_tool.dart'; import 'package:aku_new_community_manager/ui/home/new_home/application_util.dart'; import 'package:aku_new_community_manager/ui/home/new_home/home_swiper.dart'; diff --git a/lib/utils/hive_store.dart b/lib/utils/hive_store.dart index 400ca66..2cc295e 100644 --- a/lib/utils/hive_store.dart +++ b/lib/utils/hive_store.dart @@ -1,4 +1,7 @@ // Package imports: +import 'package:aku_new_community_manager/saas_models/login/china_region_model.dart'; +import 'package:aku_new_community_manager/saas_models/login/history_login_model.dart'; +import 'package:aku_new_community_manager/saas_models/login/picked_city_model.dart'; import 'package:flutter/foundation.dart'; import 'package:hive/hive.dart'; import 'package:path_provider/path_provider.dart'; @@ -15,6 +18,9 @@ class HiveStore { static Future init() async { if (!kIsWeb) { var dir = await getApplicationDocumentsDirectory(); + Hive.registerAdapter(ChinaRegionModelAdapter()); //HiveTypeId:3 + Hive.registerAdapter(HistoryLoginModelAdapter()); //HiveTypeId:4 + Hive.registerAdapter(PickedCityModelAdapter()); //HiveTypeId:6 Hive.init(dir.path); _appBox = await Hive.openBox('app'); _dataBox = await Hive.openBox('dataBox');