mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-06-28 20:09:51 +00:00
Project inicialization and base configuration
This commit is contained in:
commit
2d3a0f3244
76 changed files with 2386 additions and 0 deletions
51
lib/base.dart
Normal file
51
lib/base.dart
Normal file
|
@ -0,0 +1,51 @@
|
|||
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),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue