클릭 가능한 Text 위젯 만들기
MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: () => debugPrint('Pressed Text!'),
child: const Center(
child: Text(
'Rakunary',
style: TextStyle(
fontWeight: FontWeight.bold,
decoration: TextDecoration.underline,
),
),
),
),
);
MouseRegion으로 마우스를 감지하고 cursor 속성으로 마우스 포인터를 변경한다.
GestureDetector로 마우스 클릭을 감지한다.