[Flutter] 부모에서 자식으로 State 전송하는 법

제리·2021년 12월 22일
  1. 보내고
    자식위젯(작명 : 보낼 state)
return DialogUI(state: b);
  1. 등록하고
class DialogUI extends StatelessWidget {
  const DialogUI({Key? key, this.state}) : super(key: key);
  final state;
  1. 씁니다.
TextButton(child: Text(state.toString()),onPressed: (){},),

함수도 똑같이하면됨 ㅋ

profile
iOS 준비중

0개의 댓글