diff --git a/feedback/lib/src/controls_column.dart b/feedback/lib/src/controls_column.dart index 27eec0d..68dc4f0 100644 --- a/feedback/lib/src/controls_column.dart +++ b/feedback/lib/src/controls_column.dart @@ -13,6 +13,7 @@ class ControlsColumn extends StatelessWidget { super.key, required this.mode, required this.activeColor, + required this.backgroundColor, required this.onColorChanged, required this.onUndo, required this.onControlModeChanged, @@ -32,12 +33,14 @@ class ControlsColumn extends StatelessWidget { final VoidCallback onClearDrawing; final List colors; final Color activeColor; + final Color backgroundColor; final FeedbackMode mode; @override Widget build(BuildContext context) { final isNavigatingActive = FeedbackMode.navigate == mode; return Card( + color: backgroundColor, margin: EdgeInsets.zero, shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all( @@ -51,7 +54,8 @@ class ControlsColumn extends StatelessWidget { children: [ IconButton( key: const ValueKey('close_controls_column'), - icon: const Icon(Icons.close), + icon: Icon(Icons.close, + color: FeedbackTheme.of(context).feedbackMenuForegroundColor), onPressed: onCloseFeedback, ), _ColumnDivider(), @@ -83,12 +87,14 @@ class ControlsColumn extends StatelessWidget { ), IconButton( key: const ValueKey('undo_button'), - icon: const Icon(Icons.undo), + icon: Icon(Icons.undo, + color: FeedbackTheme.of(context).feedbackMenuForegroundColor), onPressed: isNavigatingActive ? null : onUndo, ), IconButton( key: const ValueKey('clear_button'), - icon: const Icon(Icons.delete), + icon: Icon(Icons.delete, + color: FeedbackTheme.of(context).feedbackMenuForegroundColor), onPressed: isNavigatingActive ? null : onClearDrawing, ), for (final color in colors) diff --git a/feedback/lib/src/feedback_widget.dart b/feedback/lib/src/feedback_widget.dart index 5a9a271..6881f81 100644 --- a/feedback/lib/src/feedback_widget.dart +++ b/feedback/lib/src/feedback_widget.dart @@ -217,6 +217,8 @@ class FeedbackWidgetState extends State progress: sheetProgress, minScale: .7, child: ControlsColumn( + backgroundColor: FeedbackTheme.of(context) + .feedbackMenuBackgroundColor, mode: mode, activeColor: painterController.drawColor, colors: widget.drawColors, diff --git a/feedback/lib/src/theme/feedback_theme.dart b/feedback/lib/src/theme/feedback_theme.dart index 5befc0f..3feffb6 100644 --- a/feedback/lib/src/theme/feedback_theme.dart +++ b/feedback/lib/src/theme/feedback_theme.dart @@ -35,6 +35,8 @@ class FeedbackThemeData { FeedbackThemeData( {this.background = Colors.grey, this.feedbackSheetColor = _lightGrey, + this.feedbackMenuBackgroundColor = _lightGrey, + this.feedbackMenuForegroundColor = Colors.black, this.feedbackSheetHeight = .25, this.activeFeedbackModeColor = _blue, this.drawColors = _defaultDrawColors, @@ -69,6 +71,8 @@ class FeedbackThemeData { background: Colors.grey.shade700, dragHandleColor: Colors.white38, feedbackSheetColor: _darkGrey, + feedbackMenuBackgroundColor: _darkGrey, + feedbackMenuForegroundColor: Colors.white, bottomSheetDescriptionStyle: const TextStyle( color: Colors.white, ), @@ -82,6 +86,8 @@ class FeedbackThemeData { background: Colors.grey, dragHandleColor: Colors.black26, feedbackSheetColor: _lightGrey, + feedbackMenuBackgroundColor: _lightGrey, + feedbackMenuForegroundColor: Colors.black, bottomSheetDescriptionStyle: _defaultBottomSheetDescriptionStyle, sheetIsDraggable: sheetIsDraggable, brightness: Brightness.light, @@ -97,6 +103,14 @@ class FeedbackThemeData { /// his feedback and thoughts. final Color feedbackSheetColor; + /// The background color of the column containing the action buttons + /// in the feedback menu. + final Color feedbackMenuBackgroundColor; + + /// The foreground color of the column containing the action buttons (Trash, Undo, ModeButtons) + /// in the feedback menu. + final Color feedbackMenuForegroundColor; + /// The height of the bottom sheet as a fraction of the screen height. /// /// Values between .2 and .3 are usually ideal. diff --git a/feedback/test/controls_column_test.dart b/feedback/test/controls_column_test.dart index 0560ff1..c876b3b 100644 --- a/feedback/test/controls_column_test.dart +++ b/feedback/test/controls_column_test.dart @@ -7,6 +7,7 @@ import 'package:flutter/material.dart'; void main() { Widget create({ Color? activeColor, + Color? backgroundColor, FeedbackMode? mode, ValueChanged? onColorChanged, VoidCallback? onUndo, @@ -18,6 +19,7 @@ void main() { return FeedbackLocalization( child: ControlsColumn( activeColor: activeColor ?? Colors.red, + backgroundColor: backgroundColor ?? Colors.grey, mode: mode ?? FeedbackMode.draw, colors: colors ?? [Colors.red, Colors.green, Colors.blue, Colors.yellow],