kevlatus / flutter_fortune_wheel

Visualize random selections with Flutter widgets like the wheel of fortune.
https://kevlatus.github.io/flutter_fortune_wheel
MIT License
110 stars 84 forks source link

GestureDetector within FortuneItem doesn't receive events #61

Closed vintage closed 3 years ago

vintage commented 3 years ago

Having fortune wheel with following item:

FortuneItem(
                child: GestureDetector(
                  onTap: () {
                    print("XXX");
                  },
                  child: _DailyWheelItem(
                    chance: 0.03,
                    child: ResourceItem(
                      type: ResourceType.goldPremium,
                      value: 10,
                    ),
                  ),
                ),
              ),

and tapping on it doesn't performs the onTap from the GestureDetector. Would be great to have such option, even it disables the fling capability. I need to register tap callback to display explanation about particular item (like description and chance to hit).

Screenshot_1624602373

kevlatus commented 3 years ago

hey @vintage,

the GestureDetector won't work properly due to how the wheel is implemented. I just published v1.1.0, which includes gesture support on FortuneItems.

I hope that helps.

vintage commented 3 years ago

Just upgraded to 1.1.0 and the gesture detection works great now. Thanks a lot for quick fix!

ManishPatel-Mobilefirst commented 2 years ago

Gesture detection is not working fine (if there are only two or three Fortune Items), if i pass only two Fortune item bottom half of the Item's Detection not work..