Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/src/presentation/pages/suggestion/suggestion_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -797,10 +797,12 @@ class _NewCommentButton extends StatelessWidget {
child: FilledButton(
style: context.theme.filledButtonTheme.style?.copyWith(
backgroundColor: WidgetStateProperty.resolveWith<Color>(
(states) => context.theme.colorScheme.secondaryContainer,
(states) => theme.secondaryButtonBackgroundColor ??
context.theme.colorScheme.secondaryContainer,
),
foregroundColor: WidgetStatePropertyAll(
context.theme.colorScheme.onSecondaryContainer,
theme.secondaryButtonForegroundColor ??
context.theme.colorScheme.onSecondaryContainer,
),
),
onPressed: onClick,
Expand Down
11 changes: 11 additions & 0 deletions lib/src/presentation/pages/theme/suggestions_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ class SuggestionsTheme {

final Color featureLabelColor;
final Color bugLabelColor;

final Color? backgroundColor;
final Color? secondaryButtonBackgroundColor;
final Color? secondaryButtonForegroundColor;

SuggestionsTheme({
required this.actionColor,
Expand All @@ -35,6 +38,8 @@ class SuggestionsTheme {
required this.fade,
required this.fabColor,
this.backgroundColor,
this.secondaryButtonBackgroundColor,
this.secondaryButtonForegroundColor,
});

factory SuggestionsTheme.initial() => SuggestionsTheme(
Expand Down Expand Up @@ -70,6 +75,8 @@ class SuggestionsTheme {
Color? fade,
Color? fabColor,
Color? backgroundColor,
Color? secondaryButtonBackgroundColor,
Color? secondaryButtonForegroundColor,
}) {
return SuggestionsTheme(
actionColor: actionColor ?? this.actionColor,
Expand All @@ -88,6 +95,10 @@ class SuggestionsTheme {
fade: fade ?? this.fade,
fabColor: fabColor ?? this.fabColor,
backgroundColor: backgroundColor ?? this.backgroundColor,
secondaryButtonBackgroundColor:
secondaryButtonBackgroundColor ?? this.secondaryButtonBackgroundColor,
secondaryButtonForegroundColor:
secondaryButtonForegroundColor ?? this.secondaryButtonForegroundColor,
);
}
}