TextButton(
onPressed: () {},
child: Text("버튼입니다"),
),
TextButton(
onPressed: null,
child: Text("버튼입니다"),
),
onPressed가 null인 버튼은 글자가 검정이 아닌 회색으로 비활성화 되어있다. 클릭해봐도 아무런 효과가 없다.
AbsorbPointer(
absorbing: true,
child: SizedBox(
width: 100,
height: 100,
child: TextButton(
onPressed: () {},
child: Text("버튼입니다"),
),
),
)
absorbing:true
그냥 true false로 바꿔주면된다.