Skip to content

Commit

Permalink
Merge pull request #46 from rosera/tastethedream-patch-44
Browse files Browse the repository at this point in the history
Update ex8-6.md
  • Loading branch information
rosera authored Dec 16, 2022
2 parents aeb0545 + d67ece1 commit 51b03c6
Showing 1 changed file with 25 additions and 24 deletions.
49 changes: 25 additions & 24 deletions ch08/ex8-6.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 = 'SizedBox 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,27 +30,31 @@ class MyStatelessWidget extends StatelessWidget {
}
Widget _buildSizedBoxWidget() {
return Column(
children: [
Container(
width: 200,
height: 200,
color: Colors.red,
),
const SizedBox(
width: 100,
height: 100,
),
const SizedBox(
width: 400,
height: 300,
child: Card(
child: Center(
child: Text('Hello World'),
)
return SingleChildScrollView(
padding: const EdgeInsets.all(10.0),
child: Column(
children: const [
SizedBox(
width: 200,
height: 100,
child: Card(
color: Colors.amber, child: Center(child: Text('Developer'))),
),
SizedBox(
width: 300,
height: 100,
child: Card(
color: Colors.green,
child: Center(child: Text('Flutter Framework'))),
),
SizedBox(
width: 400,
height: 100,
child: Card(
color: Colors.blue, child: Center(child: Text('Dart SDK'))),
),
),
],
],
),
);
}
}
Expand Down

0 comments on commit 51b03c6

Please sign in to comment.