-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add AdaptivePrimaryButton
components
#14
base: main
Are you sure you want to change the base?
Conversation
- add a temporary sample button components with fluent-ui widget by using `FilledButton` - add a temporary sample use-case for this widget - update `main` file & add `FluentApp` to `themeBuilder` section so that we can use fluent-ui widgets - update `main.directories.dart`
- add/create `RequestStateEnum` for handling different state of components - add/create `AdaptiveButtonContentWidget` - update `AdaptivePrimaryButton` - update `adaptivePrimaryButtonUseCase` - update `AppThemeData` & add `lightAccentColors` & `darkAccentColors` - update `main` file & add a knobs for selecting & changing accent colors - update `main.directories.dart` - code style
032267e
to
af49c74
Compare
- add/create `AdaptiveSecondaryButton` widget - add/create `adaptiveSecondaryButtonUseCase` - add/create `AppColors`
- add some tests for different states of `AdaptivePrimaryButton` - add some tests for different states of `AdaptiveSecondaryButton`
98aeec4
to
4f548f4
Compare
Color(0xFF00B294), | ||
Color(0xFF107C10), | ||
Color(0xFF131440), | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider creating named constants for each color to make their purpose clearer
for example:
'primary': Color(0xFF0A4D7E), // First blue
'warning': Color(0xFFD4540A), // Orange
'error': Color(0xFFA7101A), // Red
/// TODO (by Pouria): add loading & error state after defining by UI team | ||
case RequestStateEnum.loading: | ||
return const SizedBox(); | ||
case RequestStateEnum.initial: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current loading state returns an empty SizedBox. This should be improved with a proper loading indicator
), | ||
); | ||
case RequestStateEnum.error: | ||
return const SizedBox(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current error state returns an empty SizedBox. This should provide visual feedback
side: const BorderSide( | ||
color: AppColors.borderColor, | ||
width: 1, | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the border 'RoundedRectangleBorder' is duplicate. Consider create a common
No description provided.