FeedbackThemeData constructor

FeedbackThemeData(
  1. {Color background = Colors.grey,
  2. Color feedbackSheetColor = _lightGrey,
  3. double feedbackSheetHeight = .25,
  4. Color activeFeedbackModeColor = _blue,
  5. List<Color> drawColors = _defaultDrawColors,
  6. TextStyle bottomSheetDescriptionStyle = _defaultBottomSheetDescriptionStyle,
  7. TextStyle bottomSheetTextInputStyle = _defaultBottomSheetTextInputStyle,
  8. bool sheetIsDraggable = true,
  9. Color? dragHandleColor,
  10. ColorScheme? colorScheme}
)

Creates a FeedbackThemeData. Theme

Implementation

FeedbackThemeData(
    {this.background = Colors.grey,
    this.feedbackSheetColor = _lightGrey,
    this.feedbackSheetHeight = .25,
    this.activeFeedbackModeColor = _blue,
    this.drawColors = _defaultDrawColors,
    this.bottomSheetDescriptionStyle = _defaultBottomSheetDescriptionStyle,
    this.bottomSheetTextInputStyle = _defaultBottomSheetTextInputStyle,
    this.sheetIsDraggable = true,
    Color? dragHandleColor,
    ColorScheme? colorScheme})
    :
      // if the user chooses to supply custom drawing colors,
      // make sure there is at least on color to draw with
      assert(
        // ignore: prefer_is_empty
        drawColors.length > 0,
        'There must be at least one color to draw with',
      ),
      brightness = ThemeData.estimateBrightnessForColor(feedbackSheetColor) {
  final bool isDark = brightness == Brightness.dark;
  this.dragHandleColor =
      dragHandleColor ?? (isDark ? Colors.black26 : Colors.white38);
  this.colorScheme = colorScheme ??
      (isDark
          ? ColorScheme.dark(background: background)
          : ColorScheme.light(background: background));
}