Closed cuong0993 closed 1 week ago
Why? This is a feature, not a bug. You can use Shadcn components without never using Material, and you also have the ability to use it in conjunction with Material and Cupertino. It's almost impossible to have no dependency on Material, some Enums and properties are provided only by material. Importing it it's not a problem.
For consistency and a better library foundation, I think. For example, the Progress is a material LinearProgressIndicator https://github.com/nank1ro/flutter-shadcn-ui/blob/f71ed25acc438ca1eb4e09c9973e741be030ffee/lib/src/components/progress.dart#L51.
I can use LinearProgressIndicator directly (and other Shadcn UI components almost that have a "similar" built-in material component too) Suppose I have to use mixed UI components. In that case, I will stay with built-in material flutter( and MUI on the web) and then grab randomly/individually components individually from pub.dev and npmjs.com.
But the LinearProgressIndicator is all is needed for the ShadProgress, it's just themed correctly. We don't want to reinvent the wheel when it's not necessary. If you use directly the LinearProgressIndicator and compare it with the ShadProgress you'll see differences (the theme)
Thank you for clarifying.
Like shadcn only depends on radix. This library should only depend on widgets. I tried but a lot of work need to be done here. Like missing Separator (Divider in material), Progress (LinearProgressIndicator in material)