sunarya-thito / shadcn_flutter

Shadcn/UI ported to Flutter (Unofficial)
https://sunarya-thito.github.io/shadcn_flutter/
BSD 3-Clause "New" or "Revised" License
103 stars 17 forks source link

StackOverflowError in ColorPicker Dispose Method #138

Open AmoonPod opened 4 days ago

AmoonPod commented 4 days ago

I’m encountering a StackOverflowError in my Flutter application when using the ColorPicker component from shadcn_flutter. The error occurs during the widget tree finalization process, specifically in the dispose method of ColorPicker.

The exception log indicates recursive calls in the dispose method, leading to a stack overflow. Below is the relevant part of the error stack:

The following StackOverflowError was thrown while finalizing the widget tree:
Stack Overflow

When the exception was thrown, this was the stack: 
packages/shadcn_flutter/src/components/form/color_picker.dart 204:6      dispose
[repeated multiple times]
packages/flutter/src/widgets/framework.dart 5826:5                       unmount
...

A recursive call in the dispose method causes a StackOverflowError, leading to app crashes.

I'm not even using ColorPicker in my app widget.

sunarya-thito commented 13 hours ago

Is this on master branch or the release (pub.dev) version?

AmoonPod commented 9 hours ago

Is this on master branch or the release (pub.dev) version?

I'm using pub.dev version.