목표 : 수 계산과 String안에 넣어서 결과출력
기본적인 + - * / % 는 기본언어랑 같다.
Operators
*Unary Operators

*Assignment Operators

TypeCasting
-int.parse();

-double.parse();

-toString();


Relational Operators
== , != , < , > , <= , >=
Logical Operators
&& , ||
Tenary Operators( Dart에만 있는 개념)
A ? B : C (if a == true| select B Else Select C)
Ex)
int age = 16;
String a = age > 17 ? 'Adult' : 'Child';
bool b = age > 12 ? true : false;

Null Safety ( null 에서 오는 오류 방지 )
만약 int a; print(a); 이러면 실행이 에러난다.
=> int? a; print(a); 이러면 출력값이 'null' 이다.

PS. 이상한 문법 발견

num 의 type 이 int 면 true 인것이다. 저런식으로도 쓰는 방법이 있다..
'⌨️flutter' 카테고리의 다른 글
5.Dart-Repeating code(다트 반복문) (0) | 2022.08.16 |
---|---|
4.Dart - Control the Flow of Code(다트 조건문) (0) | 2022.08.15 |
2.Dart-data type(다트 변수) (0) | 2022.08.15 |
1.Dart language -다트란? (0) | 2022.08.15 |
flutter[플러터]를 시작하며 (0) | 2022.08.15 |