From c90fb94d974b679f10ed20e812a73f9e90de0d39 Mon Sep 17 00:00:00 2001 From: Dawn Rose <63545980+tastethedream@users.noreply.github.com> Date: Tue, 6 Dec 2022 14:06:25 +0000 Subject: [PATCH] Update ex8-5.md Code updated to reflect QC2 sction 9.7 --- ch08/ex8-5.md | 41 ++++++----------------------------------- 1 file changed, 6 insertions(+), 35 deletions(-) diff --git a/ch08/ex8-5.md b/ch08/ex8-5.md index 0ef9477..86b5f72 100644 --- a/ch08/ex8-5.md +++ b/ch08/ex8-5.md @@ -9,9 +9,7 @@ void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); - - static const String _title = 'Example'; - + static const String _title = 'Center Widget Demo'; @override Widget build(BuildContext context) { return const MaterialApp( @@ -23,7 +21,6 @@ class MyApp extends StatelessWidget { class MyStatelessWidget extends StatelessWidget { const MyStatelessWidget({Key? key}) : super(key: key); - @override Widget build(BuildContext context) { return Scaffold( @@ -33,38 +30,12 @@ class MyStatelessWidget extends StatelessWidget { } Widget _buildCenterWidget() { - return Column( - children: [ - const Center( - child: Text("Center Text"), - ), - Row(children: [ - Container( - color: Colors.green, - child: const Center(child: Text("Container Center"))), - Container( - color: Colors.teal, - child: const Center(child: Text("Container Center"))), - Expanded( - child: Container( - color: Colors.yellow, - child: const Center(child: Text("Container Center"))), - ), - ]), - Container( - color: Colors.blue, - child: const Center(child: Text("Container Center"))), - Container( - color: Colors.red, - child: const Center(child: Text("Container Center"))), - Expanded( - child: Container( - color: Colors.yellow, - child: const Center(child: Text("Container Center"))), - ), - ], + return const Center( + child: Text( + "Top Five Spoken Languages - 2022", + style: TextStyle(fontSize: 30, color: Colors.grey), + ), ); } } - ```