기초 내용

기본 세팅(개발 환경)

Dart 란?

Dart 기초

Dart 2

레이아웃 작성

상 하단 앱바 만들기

요소 추가

여백

https://landroid.tistory.com/20

LifeCycle

Navigator

프로젝트

chatBot

변경된 변수와 상태를 업데이트 해주는 클래스

StatefulWidget

해당 클래스를 State<>으로 privite ( _classname) 로 넘겨주고

멤버 함수 안에서 setState로 변경된 함수를 업데이트한다

class _DiceRollerState extends State<DiceRoller> {
  int currentDice = 3 ;
  var Diceimage = 'assets/images/dice-3.png';

  void rollDice() {
    int currentDice = randomizer.nextInt(6)+1 ; //nextInt(max) >> 0~ max 상성
    setState(() {
      Diceimage = 'assets/images/dice-${currentDice}.png';
    });

    print('Change Dice to $currentDice');
  }

Deep Dive: Flutter's (Stateful) Widget Lifecycle

Every Flutter Widget has a built-in lifecycle: A collection of methods that are automatically executed by Flutter (at certain points of time).

There are three extremely important (stateful) widget lifecycle methods you should be aware of: