clickable_widget
이 Flutter 플러그인은 Flutter에서 기본적으로 제공하지 않는 일부 터치 이벤트 처리 기능을 가진 Flutter 위젯을 제공합니다.
이 Flutter 플러그인은 터치 이벤트 처리기가 있는 일부 위젯을 제공합니다.
{"sdk":"flutter"}{"sdk":"flutter"}^2.0.0아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
This Flutter plugin provides some flutter widgets having gesture handlers their don't natively have in Flutter.
By default some flutter widgets (Widget Without Gesture) do not trigger gesture events so we wrap them inside the InkWell/GestureDetector widget. To overcome this, I decide to build a package which give developpers some gesture handlers directly inside WWG.
onTap;onTapDown;onTapUp;onTapCancelonDoubleTapDownonDoubleTaponDoubleTapCancelonLongPressDownonLongPressCancelonLongPressonLongPressStartonLongPressMoveUpdateonLongPressUponLongPressEndAdd Clickable Widget to your pubspec.yaml in dependencies: section.
dependencies:
clickable_widget: ^latest
Update dependencies
$ flutter pub get
Import Clickable Container widget in your code
ClickableContainer(
onTap: () {
debugPrint("container tapped");
},
alignment: Alignment.center,
width: 100.0,
height: 100.0,
color: Colors.grey,
child: const Text("Tap me!"),
),
Import Clickable Image widget in your code
ClickableImage(
onTap: () {
debugPrint("network image tapped");
},
clickableImageType: ClickableImageType.network,
src: "https://pixabay.com/fr/images/search/nature/",
),
Import Clickable GridTile widget in your code
ClickableGridTile(
onTap: () {
debugPrint("grid tile tapped");
},
child: const Text("Tap me!"),
),
For more exmample, refer to the example section.
Gael Vinou [gaelvinou@gmail.com](mailto:gaelvinou@gmail.com)
https://github.com/GV-22/clickable_widget
Distributed under the MIT License
git checkout -b feature/fooBar)git commit -am 'Add some fooBar')git push origin feature/fooBar)