v9
This commit is contained in:
@@ -3,11 +3,32 @@ import '../router/app_router_delegate.dart';
|
||||
import 'app_navigation_rail.dart';
|
||||
import 'app_top_bar/app_top_bar.dart';
|
||||
|
||||
class AppNavigation extends StatelessWidget {
|
||||
const AppNavigation({super.key});
|
||||
class AppNavigation extends StatefulWidget {
|
||||
final Widget navigator;
|
||||
|
||||
const AppNavigation({super.key,required this.navigator});
|
||||
|
||||
@override
|
||||
State<AppNavigation> createState() => _AppNavigationState();
|
||||
}
|
||||
|
||||
class _AppNavigationState extends State<AppNavigation> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
print('======_AppNavigationState#initState==============');
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
print('======_AppNavigationState#dispose==============');
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
print('=======AppNavigation#build===============');
|
||||
double px1 = 1/View.of(context).devicePixelRatio;
|
||||
return Scaffold(
|
||||
body: Row(
|
||||
@@ -19,10 +40,7 @@ class AppNavigation extends StatelessWidget {
|
||||
const AppTopBar(),
|
||||
Divider(height: px1,),
|
||||
Expanded(
|
||||
child: Router(
|
||||
routerDelegate: router,
|
||||
backButtonDispatcher: RootBackButtonDispatcher(),
|
||||
),
|
||||
child: widget.navigator,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user