Skip to content

Commit

Permalink
Merge pull request #15 from StarProxima/preparation-v0.6.1
Browse files Browse the repository at this point in the history
Fix SystemUiOverlayStyle, fix version v0.6.1+2
  • Loading branch information
StarProxima authored Apr 8, 2023
2 parents 0210479 + 1528315 commit 8de6ba0
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 31 deletions.
61 changes: 31 additions & 30 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@ void main() {
setWindowMinSize(const Size(460, 380));
}

// TODO: iOS support
SystemChrome.setSystemUIOverlayStyle(
const SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarBrightness: Brightness.light,
statusBarIconBrightness: Brightness.dark,
),
);

runApp(const ProviderScope(child: MainApp()));
}

Expand All @@ -42,28 +33,38 @@ class MainApp extends ConsumerWidget {
final appColors = AppColors.light;
final appTextStyles = AppTextStyles.light;

return DevicePreview(
enabled: false,
builder: (context) => MaterialApp.router(
debugShowCheckedModeBanner: true,
locale: DevicePreview.locale(context),
builder: DevicePreview.appBuilder,
scrollBehavior: AppScrollBehavior(),
title: 'Куб.Расписание',
localizationsDelegates: const [
GlobalCupertinoLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
],
supportedLocales: const [
Locale('ru'),
Locale('en'),
],
themeMode: ThemeMode.light,
theme: AppTheme.themeByStyles(
colors: appColors,
textStyles: appTextStyles,
return AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle(
statusBarColor: Colors.transparent,
statusBarBrightness: Brightness.light,
statusBarIconBrightness: Brightness.dark,
systemNavigationBarIconBrightness: Brightness.dark,
systemNavigationBarColor: appColors.background,
systemNavigationBarDividerColor: appColors.background,
),
child: DevicePreview(
enabled: false,
builder: (context) => MaterialApp.router(
debugShowCheckedModeBanner: false,
locale: DevicePreview.locale(context),
builder: DevicePreview.appBuilder,
scrollBehavior: AppScrollBehavior(),
title: 'Куб.Расписание',
localizationsDelegates: const [
GlobalCupertinoLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
],
supportedLocales: const [
Locale('ru'),
Locale('en'),
],
themeMode: ThemeMode.light,
theme: AppTheme.themeByStyles(
colors: appColors,
textStyles: appTextStyles,
),
routerConfig: ref.watch(routerProvider),
),
routerConfig: ref.watch(routerProvider),
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: cube_system
description: Modern electronic timetable
publish_to: 'none'
version: 0.6.1
version: 0.6.1+2

environment:
sdk: '>=2.19.2 <3.0.0'
Expand Down

0 comments on commit 8de6ba0

Please sign in to comment.