nank1ro / flutter-shadcn-ui

shadcn-ui ported in Flutter. Awesome UI components for Flutter, fully customizable.
https://mariuti.com/shadcn-ui
MIT License
657 stars 42 forks source link

Feedback animation response is very slow #73

Open santoshgistto opened 3 weeks ago

santoshgistto commented 3 weeks ago

Steps to reproduce

  1. Select any field like popover

Expected results

response should be quick

Actual results

Animation feedback response is slow

Platform

Web

Code sample

final fruits = { 'apple': 'Apple', 'banana': 'Banana', 'blueberry': 'Blueberry', 'grapes': 'Grapes', 'pineapple': 'Pineapple', };

@override Widget build(BuildContext context) { return ConstrainedBox( constraints: const BoxConstraints(minWidth: 180), child: ShadSelect( placeholder: const Text('Select a fruit'), options: [ Padding( padding: const EdgeInsets.fromLTRB(32, 6, 6, 6), child: Text( 'Fruits', style: theme.textTheme.muted.copyWith( fontWeight: FontWeight.w600, color: theme.colorScheme.popoverForeground, ), textAlign: TextAlign.start, ), ), ...fruits.entries .map((e) => ShadOption(value: e.key, child: Text(e.value))) .toList(), ], selectedOptionBuilder: (context, value) => Text(fruits[value]!), ), ); }

Screenshots or Video

Screenshots / Video demonstration [Upload media here]

Logs

Logs ```console [Paste your logs here] ```

Flutter Doctor output

Doctor output ```console [Paste your output here] ```
santoshgistto commented 3 weeks ago

Thanks for this package

nank1ro commented 3 weeks ago

@santoshgistto what do you mean with animation feedback?

santoshgistto commented 3 weeks ago

I mean fade in animation is slow for most of the widgets

https://github.com/nank1ro/flutter-shadcn-ui/assets/12577046/42fe627d-745b-4780-9357-503eeafb1f06

nank1ro commented 3 weeks ago

Added the good first issue badge, fell free to open a PR yourself, or we'll leave it here for someone. The changes are pretty simple, just update the default PopoverTheme effects in the component_defaults.dart file (popoverTheme) The default animation code used by ShadcnUI can be found here https://www.radix-ui.com/primitives/docs/components/popover

santoshgistto commented 2 weeks ago

@nank1ro you can assign me i will work on this :)