본문 바로가기
반응형

Flutter4

[Flutter] Buttons ✅ ButtonStyle 1. RaisedButton ➡ ElevatedButton RaisedButton은 ElevatedButton으로 변경되면서 글씨색과 배경색을 주는 방법이 바뀌었다. // Flutter2 부터는 ElevatedButton이 사용되지만 원래의 코드를 위해서 잠시 사용 child: RaisedButton( color: Colors.orangeAccent, textColor: Colors.white, child: Text(answerText), onPressed: selectHandler, ), ); } } //변경 후 두가지 방법 child: ElevatedButton( //1️⃣ style: ButtonStyle( // backgroundColor: MaterialStateProp.. 2022. 3. 21.
[Flutter] Flutter 기초 state 연결하기. class MyApp extends StatefulWidget { @override State createState() { // TODO: implement createState return _MyAppState(); } } //여러 사람이 일 할 경우 MyAppState를 사용하거나 조작할 수 없도록 보호기능을 걸기 위해서는 // _ 2022. 3. 19.
[Flutter] Dart 변수 및 유형 String "Hello" or 'Hello'' (큰 따옴표 또는 작은 따옴표를 사용할 수 있으며 일관성을 유지 해야함.) int 18 or -23 소수 자리수가 없는 숫자 double -1.32 또는 832.12122 소수 자리수가 있는 숫자 num double 및 int의 상위 유형이지만 사용하지 않는 것이 좋다. 2022. 3. 17.
[Flutter]Error: The parameter 'key' can't have a value of 'null' because of its type 'Key', but the implicit default value is 'null'. - 'Key' 오류 이러한 오류가 계속 날 경우 main.dart파일 맨 위에 // @dart=2.9를 적어준 후 flutter pub get을 한후 flutter run 다시 실행하면 오류 해결됨. 2022. 2. 16.