路由生命周期状态

This commit is contained in:
toly
2023-12-07 08:10:09 +08:00
parent 25b3bc16b2
commit 34d8e6dd75
13 changed files with 797 additions and 16 deletions

24
lib/11/color_detail.dart Normal file
View File

@@ -0,0 +1,24 @@
import 'package:flutter/material.dart';
class ColorDetailPage extends StatelessWidget {
final Color color;
const ColorDetailPage({super.key, required this.color});
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: color,
appBar: AppBar(
centerTitle: true,
iconTheme: IconThemeData(color: Colors.white),
titleTextStyle: TextStyle(color: Colors.white,fontSize: 16,fontWeight: FontWeight.bold),
backgroundColor: color,
title: Text('颜色详情页'),
),
body: Center(
child: Text( '#${color.value.toRadixString(16)}',style: TextStyle(color: Colors.white,fontSize: 26,fontWeight: FontWeight.bold),),
),
);
}
}