Skip to content

Commit

Permalink
Fix status bar style on launch
Browse files Browse the repository at this point in the history
  • Loading branch information
Sominemo committed Oct 16, 2022
1 parent a00ed8b commit 7400c8e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 29 deletions.
2 changes: 1 addition & 1 deletion l10n/intl_ru.arb
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"stickers_without_suggestions": "Стикеры без подсказок",
"stickers_without_suggestions_info": "У некоторых стикеров нет подсказок, но вы можете добавить их вручную, нажав на иконку в правом нижнем углу стикера",
"all_stickers": "Все стикеры",
"login_with_vk_to": "Войдите ВКонтакте чтобы:",
"login_with_vk_to": "Войдите ВКонтакте, чтобы:",
"and_also": "а также",
"login_with_vk_to_library": "Получить доступ к добавленным наборам стикеров",
"login_with_vk_to_store": "Просматривать популярные наборы",
Expand Down
5 changes: 5 additions & 0 deletions lib/flows/start/nav.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ class StartRouteState extends State<StartRoute> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
toolbarHeight: 0,
elevation: 0,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
),
body: Center(
child: _widgetOptions.elementAt(_selectedIndex),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/generated/intl/messages_ru.dart
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class MessageLookup extends MessageLookupByLibrary {
"login":
MessageLookupByLibrary.simpleMessage("Логин или номер телефона"),
"login_with_vk_to":
MessageLookupByLibrary.simpleMessage("Войдите ВКонтакте чтобы:"),
MessageLookupByLibrary.simpleMessage("Войдите ВКонтакте, чтобы:"),
"login_with_vk_to_library": MessageLookupByLibrary.simpleMessage(
"Получить доступ к добавленным наборам стикеров"),
"login_with_vk_to_search": MessageLookupByLibrary.simpleMessage(
Expand Down
28 changes: 1 addition & 27 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import 'package:sticker_import/flows/start/nav.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:sticker_import/generated/l10n.dart';
import 'package:sticker_import/services/connection/user_list.dart';
import 'package:sticker_import/utils/chrome.dart';
import 'package:sticker_import/utils/debugging.dart';

import 'services/native/method_channels.dart';
import 'utils/chrome.dart';

void main() async {
WidgetsFlutterBinding.ensureInitialized();
Expand Down Expand Up @@ -59,9 +59,6 @@ class TginfoMoverApp extends StatelessWidget {
return MaterialApp(
title: 'Sticker Importer',
debugShowCheckedModeBanner: false,
navigatorObservers: [
SystemChromeNavigationObserver(),
],
builder: (context, child) {
return ScrollConfiguration(
behavior: NoOverscrollBehavior(),
Expand Down Expand Up @@ -270,26 +267,3 @@ class TginfoMoverApp extends StatelessWidget {
);
}
}

class SystemChromeNavigationObserver
extends RouteObserver<ModalRoute<dynamic>> {
SystemChromeNavigationObserver();

@override
void didPush(Route<dynamic> route, Route<dynamic>? previousRoute) {
super.didPush(route, previousRoute);
updateBar();
}

@override
void didReplace({Route<dynamic>? newRoute, Route<dynamic>? oldRoute}) {
super.didReplace(newRoute: newRoute, oldRoute: oldRoute);
updateBar();
}

@override
void didPop(Route<dynamic> route, Route<dynamic>? previousRoute) {
super.didPop(route, previousRoute);
updateBar();
}
}

0 comments on commit 7400c8e

Please sign in to comment.