starknet.dart
starknet.dart copied to clipboard
Allow customization via ThemeData instead of hardcoded styles
Hi
I'm currently integrating wallet_kit's widget into a Flutter project, and I've noticed that some widgets use hardcoded styles — such as TextStyle, ButtonStyle, or Color — directly in their constructors. This makes it difficult to customize the appearance of text, buttons, and other components from outside the package.
I’d like to suggest enhancing the widgets to support external theming by relying more on Theme.of(context) and ThemeData. For example:
- Use
Theme.of(context).textTheme.bodyMediuminstead ofTextStyle(color: Colors.black) - Support
ElevatedButtonTheme.of(context)orButtonStylefrom the app's theme - Avoid hardcoded colors for backgrounds, borders, icons, etc.
Benefits:
- Developers can match the UI to their app's branding
- Supports light and dark themes more seamlessly
- Allows greater flexibility and consistency