clickable_widget 0.0.1
clickable_widget: ^0.0.1 copied to clipboard
This Flutter plugin provides some widgets with gesture handlers.
Clickable Widget #
This Flutter plugin provides some widgets with gesture handlers.
By default some flutter widget (Widget Without Gesture) doesn't trigger gesture events so we wrapp theme inside InkWell or GestureDetector so i decide to make a package wich give developpers some gesture handlers directly inside those WWG.
Available gesture handlers #
onTap;onTapDown;onTapUp;onTapCancelonDoubleTapDownonDoubleTaponDoubleTapCancelonLongPressDownonLongPressCancelonLongPressonLongPressStartonLongPressMoveUpdateonLongPressUponLongPressEnd
Available widgets #
- ClickableContainer
- ClickableImage
- ClickableCard
- ClickableGridTile
- ClickableSizedBox
Usage #
Add Clickable Widget to your pubspec.yaml in dev_dependencies: section.
dependencies:
clickable_widget: latest_version
Update dependencies
flutter pub get
Import Clickable Container widget in your code
ClickableContainer(
onTap: () {
debugPrint("container tapped");
},
alignment: Alignment.center,
width: 100,
height: 100,
child: const Text("This is a clickable container"),
),
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("This is a clickable container"),
),
Meta #
Gael Vinou gaelvinou@gmail.com
- Twitter @gael_vinou
- LinkedIn Gael Vinou
https://github.com/GV-22/clickable_widget
Distributed under the BSD-3-Clause
Contributing #
- Fork it (https://github.com/GV-22/clickable_widget/fork)
- Create your feature branch (
git checkout -b feature/fooBar) - Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request