Skip to content

Commit e979e8c

Browse files
committed
lesson-7
1 parent b29e817 commit e979e8c

File tree

1 file changed

+30
-22
lines changed

1 file changed

+30
-22
lines changed

myapp/lib/main.dart

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,37 @@
11
import 'package:flutter/material.dart';
22

33
void main() => runApp(MaterialApp(
4-
home: Scaffold(
5-
appBar: AppBar(
6-
title: Text('my first app'),
7-
centerTitle: true,
8-
backgroundColor: Colors.red[600]
9-
),
10-
body: Center(
11-
child: Text(
12-
'hello, ninjas!',
13-
style: TextStyle(
14-
fontSize: 20.0,
15-
fontWeight: FontWeight.bold,
16-
letterSpacing: 2.0,
17-
color: Colors.grey[600],
18-
fontFamily: 'IndieFlower',
4+
home: Home(),
5+
));
6+
7+
class Home extends StatelessWidget {
8+
@override
9+
Widget build(BuildContext context) {
10+
return Scaffold(
11+
appBar: AppBar(
12+
title: Text('my first app'),
13+
centerTitle: true,
14+
backgroundColor: Colors.red[600]
15+
),
16+
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+
),
1926
),
2027
),
21-
),
22-
floatingActionButton: FloatingActionButton(
23-
backgroundColor: Colors.red[600],
24-
child: Text('click'),
25-
),
26-
),
27-
));
28+
floatingActionButton: FloatingActionButton(
29+
backgroundColor: Colors.red[600],
30+
child: Text('click'),
31+
),
32+
);
33+
}
34+
}
35+
2836

2937

0 commit comments

Comments
 (0)