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), + ), ); } } - ```