mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
Merge redesign part 1.
This commit is contained in:
commit
c950f8bfc0
126 changed files with 4852 additions and 2871 deletions
|
@ -1,4 +1,5 @@
|
|||
import 'package:cake_wallet/reactions/bootstrap.dart';
|
||||
import 'package:cake_wallet/store/app_store.dart';
|
||||
import 'package:cake_wallet/store/authentication_store.dart';
|
||||
import 'package:cake_wallet/core/auth_service.dart';
|
||||
import 'package:cake_wallet/bitcoin/bitcoin_wallet_service.dart';
|
||||
|
@ -52,6 +53,8 @@ import 'package:cake_wallet/generated/i18n.dart';
|
|||
import 'package:cake_wallet/src/domain/common/language.dart';
|
||||
import 'package:cake_wallet/src/stores/seed_language/seed_language_store.dart';
|
||||
|
||||
bool isThemeChangerRegistered = false;
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
|
@ -127,6 +130,8 @@ void main() async {
|
|||
contactSource: contacts,
|
||||
tradesSource: trades,
|
||||
fiatConvertationService: fiatConvertationService,
|
||||
templates: templates,
|
||||
exchangeTemplates: exchangeTemplates,
|
||||
initialMigrationVersion: 4);
|
||||
|
||||
setReactions(
|
||||
|
@ -167,9 +172,11 @@ Future<void> initialSetup(
|
|||
@required Box<Node> nodes,
|
||||
@required Box<WalletInfo> walletInfoSource,
|
||||
@required Box<Contact> contactSource,
|
||||
@required Box<Trade> tradesSource,
|
||||
@required Box<Trade> tradesSource,
|
||||
@required FiatConvertationService fiatConvertationService,
|
||||
int initialMigrationVersion = 4}) async {
|
||||
@required Box<Template> templates,
|
||||
@required Box<ExchangeTemplate> exchangeTemplates,
|
||||
int initialMigrationVersion = 4}) async {
|
||||
await defaultSettingsMigration(
|
||||
version: initialMigrationVersion,
|
||||
sharedPreferences: sharedPreferences,
|
||||
|
@ -178,7 +185,9 @@ Future<void> initialSetup(
|
|||
walletInfoSource: walletInfoSource,
|
||||
nodeSource: nodes,
|
||||
contactSource: contactSource,
|
||||
tradesSource: tradesSource);
|
||||
tradesSource: tradesSource,
|
||||
templates: templates,
|
||||
exchangeTemplates: exchangeTemplates);
|
||||
await bootstrap(fiatConvertationService: fiatConvertationService);
|
||||
monero_wallet.onStartup();
|
||||
}
|
||||
|
@ -191,7 +200,8 @@ class CakeWalletApp extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final settingsStore = Provider.of<SettingsStore>(context);
|
||||
//final settingsStore = Provider.of<SettingsStore>(context);
|
||||
final settingsStore = getIt.get<AppStore>().settingsStore;
|
||||
|
||||
return ChangeNotifierProvider<ThemeChanger>(
|
||||
create: (_) => ThemeChanger(
|
||||
|
@ -222,12 +232,20 @@ class MaterialAppWithTheme extends StatelessWidget {
|
|||
final transactionDescriptions =
|
||||
Provider.of<Box<TransactionDescription>>(context);
|
||||
|
||||
final statusBarColor =
|
||||
settingsStore.isDarkTheme ? Colors.black : Colors.white;
|
||||
if (!isThemeChangerRegistered) {
|
||||
setupThemeChangerStore(theme);
|
||||
isThemeChangerRegistered = true;
|
||||
}
|
||||
|
||||
/*final statusBarColor =
|
||||
settingsStore.isDarkTheme ? Colors.black : Colors.white;*/
|
||||
final _settingsStore = getIt.get<AppStore>().settingsStore;
|
||||
|
||||
final statusBarColor = Colors.transparent;
|
||||
final statusBarBrightness =
|
||||
settingsStore.isDarkTheme ? Brightness.light : Brightness.dark;
|
||||
_settingsStore.isDarkTheme ? Brightness.light : Brightness.dark;
|
||||
final statusBarIconBrightness =
|
||||
settingsStore.isDarkTheme ? Brightness.light : Brightness.dark;
|
||||
_settingsStore.isDarkTheme ? Brightness.light : Brightness.dark;
|
||||
|
||||
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
|
||||
statusBarColor: statusBarColor,
|
||||
|
@ -264,4 +282,4 @@ class MaterialAppWithTheme extends StatelessWidget {
|
|||
authenticationStore: getIt.get<AuthenticationStore>(),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue