Files
iroute/lib/13/01____/pages/page_a.dart
toly 75690361b3 10
2023-10-12 08:13:08 +08:00

31 lines
676 B
Dart

import 'package:flutter/material.dart';
import '../main.dart';
class PageA extends StatelessWidget {
const PageA({super.key});
@override
Widget build(BuildContext context) {
const Color bgColor = Color(0xffCCFFFF);
return Scaffold(
backgroundColor: bgColor,
appBar: AppBar(
title: const Text('A 界面'),
backgroundColor: bgColor,
),
body: Center(
child: ElevatedButton(
onPressed: () => toPageB(context),
child: const Text('Push B'),
),
));
}
void toPageB(BuildContext context) {
// router.value = ['/', 'a', 'b'];
router.go('/a/b');
}
}