7
This commit is contained in:
@@ -16,6 +16,7 @@ class MyApp extends StatelessWidget {
|
||||
debugShowCheckedModeBanner: false,
|
||||
theme: ThemeData(
|
||||
appBarTheme: AppBarTheme(
|
||||
elevation: 0,
|
||||
iconTheme: IconThemeData(color: Colors.black),
|
||||
titleTextStyle: TextStyle(color: Colors.black,fontSize: 18,fontWeight: FontWeight.bold)
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:iroute/07/01/pages/page_b.dart';
|
||||
import 'page_b.dart';
|
||||
|
||||
class PageA extends StatelessWidget {
|
||||
const PageA({super.key});
|
||||
@@ -10,14 +10,13 @@ class PageA extends StatelessWidget {
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: bgColor,
|
||||
appBar: AppBar(title: Text('A'),
|
||||
elevation: 0,
|
||||
appBar: AppBar(title: const Text('A'),
|
||||
backgroundColor: bgColor,
|
||||
),
|
||||
body: Center(
|
||||
child: ElevatedButton(
|
||||
onPressed: ()=>toPageB(context),
|
||||
child: Text('Push B'),
|
||||
child: const Text('Push B'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -11,14 +11,13 @@ class PageB extends StatelessWidget {
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: bgColor,
|
||||
appBar: AppBar(title: Text('B',style: TextStyle(color: Colors.black),),
|
||||
elevation: 0,
|
||||
appBar: AppBar(title: const Text('B',),
|
||||
backgroundColor: bgColor,
|
||||
),
|
||||
body: Center(
|
||||
child: ElevatedButton(
|
||||
onPressed: ()=>toPageC(context),
|
||||
child: Text('Push C'),
|
||||
child: const Text('Push C'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -5,12 +5,16 @@ class PageC extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const Color bgColor = Color(0xffFFE6CD);
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text('C'),),
|
||||
body: Center(
|
||||
child: Text(
|
||||
'C'
|
||||
),
|
||||
backgroundColor: bgColor,
|
||||
appBar: AppBar(
|
||||
title: const Text('C'),
|
||||
backgroundColor: bgColor,
|
||||
),
|
||||
body: const Center(
|
||||
child: Text('到达终点'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user