Skip to content

Commit f0c9981

Browse files
committed
lesson-8
1 parent e979e8c commit f0c9981

File tree

5 files changed

+5
-13
lines changed

5 files changed

+5
-13
lines changed

myapp/assets/space-1.jpg

1.93 MB
Loading

myapp/assets/space-2.jpg

3.28 MB
Loading

myapp/assets/space-3.jpg

1.25 MB
Loading

myapp/lib/main.dart

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,7 @@ class Home extends StatelessWidget {
1414
backgroundColor: Colors.red[600]
1515
),
1616
body: Center(
17-
child: Text(
18-
'hello again, ninjas!',
19-
style: TextStyle(
20-
fontSize: 20.0,
21-
fontWeight: FontWeight.bold,
22-
letterSpacing: 2.0,
23-
color: Colors.grey[600],
24-
fontFamily: 'IndieFlower',
25-
),
26-
),
17+
child: Image.asset('assets/space-3.jpg'),
2718
),
2819
floatingActionButton: FloatingActionButton(
2920
backgroundColor: Colors.red[600],

myapp/pubspec.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ flutter:
4141
uses-material-design: true
4242

4343
# To add assets to your application, add an assets section, like this:
44-
# assets:
45-
# - images/a_dot_burr.jpeg
46-
# - images/a_dot_ham.jpeg
44+
assets:
45+
# - assets/space-1.jpg
46+
# - assets/space-2.jpg
47+
- assets/
4748

4849
# An image asset can refer to one or more resolution-specific "variants", see
4950
# https://flutter.dev/assets-and-images/#resolution-aware.

0 commit comments

Comments
 (0)