mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-18 13:02:05 +00:00
51 lines
No EOL
1.6 KiB
Dart
51 lines
No EOL
1.6 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:animations/animations.dart';
|
|
|
|
import 'package:adguard_home_manager/widgets/bottom_nav_bar.dart';
|
|
import 'package:flutter/services.dart';
|
|
|
|
class Base extends StatefulWidget {
|
|
const Base({Key? key}) : super(key: key);
|
|
|
|
@override
|
|
State<Base> createState() => _BaseState();
|
|
}
|
|
|
|
class _BaseState extends State<Base> {
|
|
int selectedScreen = 0;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return AnnotatedRegion<SystemUiOverlayStyle>(
|
|
value: SystemUiOverlayStyle(
|
|
statusBarColor: Colors.transparent,
|
|
statusBarBrightness: Theme.of(context).brightness == Brightness.light
|
|
? Brightness.light
|
|
: Brightness.dark,
|
|
statusBarIconBrightness: Theme.of(context).brightness == Brightness.light
|
|
? Brightness.dark
|
|
: Brightness.light,
|
|
systemNavigationBarColor: Theme.of(context).scaffoldBackgroundColor,
|
|
systemNavigationBarIconBrightness: Theme.of(context).brightness == Brightness.light
|
|
? Brightness.dark
|
|
: Brightness.light,
|
|
),
|
|
child: Scaffold(
|
|
body: PageTransitionSwitcher(
|
|
duration: const Duration(milliseconds: 200),
|
|
transitionBuilder: (
|
|
(child, primaryAnimation, secondaryAnimation) => FadeThroughTransition(
|
|
animation: primaryAnimation,
|
|
secondaryAnimation: secondaryAnimation,
|
|
child: child,
|
|
)
|
|
),
|
|
),
|
|
bottomNavigationBar: BottomNavBar(
|
|
selectedScreen: selectedScreen,
|
|
onSelect: (value) => setState(() => selectedScreen = value),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |