1
This commit is contained in:
30
lib/15/02/pages/page_b.dart
Normal file
30
lib/15/02/pages/page_b.dart
Normal file
@@ -0,0 +1,30 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../main.dart';
|
||||
|
||||
class PageB extends StatelessWidget {
|
||||
const PageB({super.key});
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const Color bgColor = Color(0xffCCE5FF);
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: bgColor,
|
||||
appBar: AppBar(
|
||||
title: const Text('B 界面'),
|
||||
backgroundColor: bgColor,
|
||||
),
|
||||
body: Center(
|
||||
child: ElevatedButton(
|
||||
onPressed: () => toPageC(context),
|
||||
child: const Text('Push C'),
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
void toPageC(BuildContext context){
|
||||
router.value = ['/','a','b','c'];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user