SafeArea
This commit is contained in:
@@ -25,27 +25,19 @@ Future<void> main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
await initializeDateFormatting();
|
||||
|
||||
print("Инициализируем сервисы кеширования...");
|
||||
await CacheService().initialize();
|
||||
await AvatarCacheService().initialize();
|
||||
await ChatCacheService().initialize();
|
||||
await ContactLocalNamesService().initialize();
|
||||
print("Сервисы кеширования инициализированы");
|
||||
|
||||
print("Инициализируем AccountManager...");
|
||||
await AccountManager().initialize();
|
||||
await AccountManager().migrateOldAccount();
|
||||
print("AccountManager инициализирован");
|
||||
|
||||
print("Инициализируем MusicPlayerService...");
|
||||
await MusicPlayerService().initialize();
|
||||
print("MusicPlayerService инициализирован");
|
||||
|
||||
final hasToken = await ApiService.instance.hasToken();
|
||||
print("При запуске приложения токен ${hasToken ? 'найден' : 'не найден'}");
|
||||
|
||||
if (hasToken) {
|
||||
print("Инициируем подключение к WebSocket при запуске...");
|
||||
ApiService.instance.connect();
|
||||
}
|
||||
|
||||
@@ -110,7 +102,7 @@ class MyApp extends StatelessWidget {
|
||||
color: ColorScheme.fromSeed(
|
||||
seedColor: accentColor,
|
||||
brightness: Brightness.dark,
|
||||
).onSurface, // ← Используем цвет onSurface из цветовой схемы
|
||||
).onSurface,
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -148,7 +140,8 @@ class MyApp extends StatelessWidget {
|
||||
? oledTheme
|
||||
: baseDarkTheme;
|
||||
|
||||
return MaterialApp(
|
||||
return SafeArea(
|
||||
child: MaterialApp(
|
||||
title: 'Komet',
|
||||
navigatorKey: navigatorKey,
|
||||
builder: (context, child) {
|
||||
@@ -173,8 +166,8 @@ class MyApp extends StatelessWidget {
|
||||
],
|
||||
supportedLocales: const [Locale('ru'), Locale('en')],
|
||||
locale: const Locale('ru'),
|
||||
|
||||
home: hasToken ? const HomeScreen() : const PhoneEntryScreen(),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user