selfprivacy.org.app/lib/ui/pages/rootRoute.dart

52 lines
1.3 KiB
Dart
Raw Normal View History

2020-11-29 20:07:46 +00:00
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:selfprivacy/ui/components/brand_tab_bar/brand_tab_bar.dart';
2020-12-02 09:16:23 +00:00
import 'package:selfprivacy/ui/pages/more/more.dart';
2020-12-03 16:52:53 +00:00
import 'package:selfprivacy/ui/pages/providers/providers.dart';
2020-12-01 19:08:19 +00:00
import 'package:selfprivacy/ui/pages/services/services.dart';
2020-12-03 16:52:53 +00:00
import 'package:selfprivacy/ui/pages/users/users.dart';
2020-11-29 20:07:46 +00:00
class RootPage extends StatefulWidget {
const RootPage({Key key}) : super(key: key);
@override
_RootPageState createState() => _RootPageState();
}
class _RootPageState extends State<RootPage>
with SingleTickerProviderStateMixin {
TabController tabController;
@override
void initState() {
tabController = TabController(length: 4, vsync: this);
super.initState();
}
@override
void dispose() {
super.dispose();
2020-12-10 20:33:19 +00:00
tabController.dispose();
2020-11-29 20:07:46 +00:00
}
@override
Widget build(BuildContext context) {
return SafeArea(
child: Scaffold(
body: TabBarView(
controller: tabController,
children: [
2020-12-30 14:13:25 +00:00
ProvidersPage(),
ServicesPage(),
2021-01-06 17:35:57 +00:00
UsersPage(),
2020-12-02 09:16:23 +00:00
MorePage(),
2020-11-29 20:07:46 +00:00
],
),
2020-12-08 19:26:51 +00:00
bottomNavigationBar: BrandTabBar(
2020-11-29 20:07:46 +00:00
controller: tabController,
),
),
);
}
}