Added functionality to jump to talk-tab when app is launched via notification

This commit is contained in:
2023-09-16 17:38:55 +02:00
parent 248483be4e
commit 6d48d299b5
4 changed files with 11 additions and 5 deletions

View File

@ -23,12 +23,13 @@ import 'view/pages/timetable/timetable.dart';
class App extends StatefulWidget {
const App({Key? key}) : super(key: key);
static PersistentTabController bottomNavigator = PersistentTabController(initialIndex: 0);
@override
State<App> createState() => _AppState();
}
class _AppState extends State<App> {
int currentPage = 0;
late Timer refetchChats;
late Timer updateTimings;
@ -68,11 +69,9 @@ class _AppState extends State<App> {
@override
Widget build(BuildContext context) {
PersistentTabController tabController = PersistentTabController(initialIndex: 0);
return PersistentTabView(
context,
controller: tabController,
controller: App.bottomNavigator,
navBarStyle: NavBarStyle.style6,
hideNavigationBarWhenKeyboardShows: true,
navBarHeight: MediaQuery.of(context).viewInsets.bottom > 0 ? 0.0 : kBottomNavigationBarHeight,