-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcode_organize.dart
45 lines (41 loc) · 974 Bytes
/
code_organize.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
inside main.dart
import "package:flutter/material.dart";
import './first_screen.dart';
void main() {
runApp(MyFlutterApp());
}
class MyFlutterApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: "My Flutter App",
home: Scaffold(
appBar: AppBar(
title:
Center(child: Text("My first App Screen",)),
),
body: FirstScreen()
)
);
}
}
inside first_screen.dart
import 'package:flutter/material.dart';
class FirstScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Material(
color: Colors.lightBlueAccent,
child: Center(
child: Text("Hello Flutter",
textDirection: TextDirection.ltr,
style: TextStyle(
fontSize: 40.0,
color: Colors.white,
),
),
),
);
}
}