Update `QuillDialogTheme` with `buttonStyle`

pull/1185/head
bambinoua 2 years ago
parent 250d1bda48
commit 14eecfa1a0
  1. 11
      lib/src/models/themes/quill_dialog_theme.dart

@ -1,12 +1,14 @@
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// Used to configure the dialog's look and feel.
class QuillDialogTheme with Diagnosticable { class QuillDialogTheme with Diagnosticable {
const QuillDialogTheme({ const QuillDialogTheme({
this.labelTextStyle, this.labelTextStyle,
this.inputTextStyle, this.inputTextStyle,
this.dialogBackgroundColor, this.dialogBackgroundColor,
this.shape, this.shape,
this.buttonStyle,
}); });
///The text style to use for the label shown in the link-input dialog ///The text style to use for the label shown in the link-input dialog
@ -25,11 +27,15 @@ class QuillDialogTheme with Diagnosticable {
/// The default shape is a [RoundedRectangleBorder] with a radius of 4.0 /// The default shape is a [RoundedRectangleBorder] with a radius of 4.0
final ShapeBorder? shape; final ShapeBorder? shape;
/// Customizes this button's appearance.
final ButtonStyle? buttonStyle;
QuillDialogTheme copyWith({ QuillDialogTheme copyWith({
TextStyle? labelTextStyle, TextStyle? labelTextStyle,
TextStyle? inputTextStyle, TextStyle? inputTextStyle,
Color? dialogBackgroundColor, Color? dialogBackgroundColor,
ShapeBorder? shape, ShapeBorder? shape,
ButtonStyle? buttonStyle,
}) { }) {
return QuillDialogTheme( return QuillDialogTheme(
labelTextStyle: labelTextStyle ?? this.labelTextStyle, labelTextStyle: labelTextStyle ?? this.labelTextStyle,
@ -37,6 +43,7 @@ class QuillDialogTheme with Diagnosticable {
dialogBackgroundColor: dialogBackgroundColor:
dialogBackgroundColor ?? this.dialogBackgroundColor, dialogBackgroundColor ?? this.dialogBackgroundColor,
shape: shape ?? this.shape, shape: shape ?? this.shape,
buttonStyle: buttonStyle ?? buttonStyle,
); );
} }
@ -49,7 +56,8 @@ class QuillDialogTheme with Diagnosticable {
other.labelTextStyle == labelTextStyle && other.labelTextStyle == labelTextStyle &&
other.inputTextStyle == inputTextStyle && other.inputTextStyle == inputTextStyle &&
other.dialogBackgroundColor == dialogBackgroundColor && other.dialogBackgroundColor == dialogBackgroundColor &&
other.shape == shape; other.shape == shape &&
other.buttonStyle == buttonStyle;
} }
@override @override
@ -58,5 +66,6 @@ class QuillDialogTheme with Diagnosticable {
inputTextStyle, inputTextStyle,
dialogBackgroundColor, dialogBackgroundColor,
shape, shape,
buttonStyle,
); );
} }

Loading…
Cancel
Save