0 purchases
clickable widget
Clickable Widget #
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.
Available gesture handlers #
onTap;
onTapDown;
onTapUp;
onTapCancel
onDoubleTapDown
onDoubleTap
onDoubleTapCancel
onLongPressDown
onLongPressCancel
onLongPress
onLongPressStart
onLongPressMoveUpdate
onLongPressUp
onLongPressEnd
Available widgets #
ClickableContainer
ClickableImage
ClickableCard
ClickableGridTile
ClickableSizedBox
ClickableText
ClickableRow
ClickableColumn
Usage #
Add Clickable Widget to your pubspec.yaml in dependencies: section.
dependencies:
clickable_widget: ^latest
copied to clipboard
Update dependencies
$ flutter pub get
copied to clipboard
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!"),
),
copied to clipboard
Import Clickable Image widget in your code
ClickableImage(
onTap: () {
debugPrint("network image tapped");
},
clickableImageType: ClickableImageType.network,
src: "https://pixabay.com/fr/images/search/nature/",
),
copied to clipboard
Import Clickable GridTile widget in your code
ClickableGridTile(
onTap: () {
debugPrint("grid tile tapped");
},
child: const Text("Tap me!"),
),
copied to clipboard
For more exmample, refer to the example section.
Meta #
Gael Vinou [email protected]
Twitter @gael_vinou
LinkedIn Gael Vinou
https://github.com/GV-22/clickable_widget
Distributed under the MIT License
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
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.