Obsidian/Recognition/Programing/Flutter/InkWell.md

16 lines
383 B
Markdown
Raw Normal View History

2023-08-14 16:19:25 +00:00
컨테이너와 같이 별도의 제스쳐 기능을 제공하지 않는 위젯에 제스쳐 기능을 추가하고자 할 때 InkWell 위젯을 이용할 수 있다.
```dart
InkWell(
child: Container(
padding: EdgeInsets.all(12.0),
child: Text('Flat Button'),
),
onTap: () {
Scaffold.of(context).showSnackBar(SnackBar(content: Text('Tap')));
},
);
'''