Getting Started with Flutter Develop

Setting Up

  • IDE(vscode)
  • SDK(flutter)
  • Screen Sharing - Vysor(screen Copy Android)
閱讀全文 »

Dart

variable

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// variable
void main() {
var name = "Robert";
print(name);

// ?表示 lastName 是可空的字符串(String 或 null)。
// String? lastName = "Robert";
// print(lastName);
// A value of type 'int' can't be assigned to a variable of type 'String'.
// lastName = 2 ;

// late 必须 在使用之前赋值
// late String name ;
// name = "Robert";
// print(name);

// Can't assign to the final variable
// final num2 = 3;
// num2 = 2;

// Can't assign to the const variable
// const num3 = 3;
// num3 = 4;
}
閱讀全文 »

original

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
void main() {
return runApp(
MaterialApp(
home: Scaffold(
backgroundColor: Colors.red,
appBar: AppBar(
title: Text('Dicee'),
backgroundColor: Colors.red,
),
body: DicePage(),
),
),
);
}

class DicePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container();
}
}
閱讀全文 »