Skip to content

Commit

Permalink
Merge pull request #45 from rosera/tastethedream-patch-43
Browse files Browse the repository at this point in the history
Update ex8-5.md
  • Loading branch information
rosera authored Dec 16, 2022
2 parents 52806a7 + c90fb94 commit aeb0545
Showing 1 changed file with 6 additions and 35 deletions.
41 changes: 6 additions & 35 deletions ch08/ex8-5.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand All @@ -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),
),
);
}
}
```

0 comments on commit aeb0545

Please sign in to comment.