Skip to content

Commit

Permalink
[Presentation] Added AnnotatedRegion for ios
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Oct 30, 2022
1 parent 41c5b06 commit 588158a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CastIt.Android/lib/presentation/app_widget.dart
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import 'dart:ui';

import 'package:castit/application/bloc.dart';
import 'package:castit/domain/enums/enums.dart';
import 'package:castit/generated/l10n.dart';
import 'package:castit/presentation/intro/intro_page.dart';
import 'package:castit/presentation/main_page.dart';
import 'package:castit/presentation/shared/extensions/app_theme_type_extensions.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

Expand All @@ -29,7 +31,10 @@ class AppWidget extends StatelessWidget {
return MaterialApp(
title: s.appTitle,
theme: themeData,
home: s.firstInstall ? IntroPage() : MainPage(),
home: AnnotatedRegion(
value: s.theme == AppThemeType.dark ? SystemUiOverlayStyle.light : SystemUiOverlayStyle.dark,
child: s.firstInstall ? IntroPage() : MainPage(),
),
//Without this, the lang won't be reloaded
locale: locale,
localizationsDelegates: delegates,
Expand Down

0 comments on commit 588158a

Please sign in to comment.