clickable_widget 0.0.1 copy "clickable_widget: ^0.0.1" to clipboard
clickable_widget: ^0.0.1 copied to clipboard

outdated

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;
  • onTapCancel
  • onDoubleTapDown
  • onDoubleTap
  • onDoubleTapCancel
  • onLongPressDown
  • onLongPressCancel
  • onLongPress
  • onLongPressStart
  • onLongPressMoveUpdate
  • onLongPressUp
  • onLongPressEnd

Available widgets #

  1. ClickableContainer
  2. ClickableImage
  3. ClickableCard
  4. ClickableGridTile
  5. 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

https://github.com/GV-22/clickable_widget

Distributed under the BSD-3-Clause

Contributing #

  1. Fork it (https://github.com/GV-22/clickable_widget/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request
8
likes
0
points
26
downloads

Publisher

unverified uploader

Weekly Downloads

This Flutter plugin provides some widgets with gesture handlers.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on clickable_widget