|
|
@ -4,6 +4,7 @@ import 'package:flutter/material.dart'; |
|
|
|
/// Used to configure the dialog's look and feel. |
|
|
|
/// Used to configure the dialog's look and feel. |
|
|
|
class QuillDialogTheme with Diagnosticable { |
|
|
|
class QuillDialogTheme with Diagnosticable { |
|
|
|
const QuillDialogTheme({ |
|
|
|
const QuillDialogTheme({ |
|
|
|
|
|
|
|
this.buttonTextStyle, |
|
|
|
this.labelTextStyle, |
|
|
|
this.labelTextStyle, |
|
|
|
this.inputTextStyle, |
|
|
|
this.inputTextStyle, |
|
|
|
this.dialogBackgroundColor, |
|
|
|
this.dialogBackgroundColor, |
|
|
@ -17,6 +18,9 @@ class QuillDialogTheme with Diagnosticable { |
|
|
|
this.runSpacing = 8.0, |
|
|
|
this.runSpacing = 8.0, |
|
|
|
}) : assert(runSpacing >= 0); |
|
|
|
}) : assert(runSpacing >= 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
///The text style to use for the button shown in the dialog |
|
|
|
|
|
|
|
final TextStyle? buttonTextStyle; |
|
|
|
|
|
|
|
|
|
|
|
///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 |
|
|
|
final TextStyle? labelTextStyle; |
|
|
|
final TextStyle? labelTextStyle; |
|
|
|
|
|
|
|
|
|
|
@ -59,6 +63,7 @@ class QuillDialogTheme with Diagnosticable { |
|
|
|
final double runSpacing; |
|
|
|
final double runSpacing; |
|
|
|
|
|
|
|
|
|
|
|
QuillDialogTheme copyWith({ |
|
|
|
QuillDialogTheme copyWith({ |
|
|
|
|
|
|
|
TextStyle? buttonTextStyle, |
|
|
|
TextStyle? labelTextStyle, |
|
|
|
TextStyle? labelTextStyle, |
|
|
|
TextStyle? inputTextStyle, |
|
|
|
TextStyle? inputTextStyle, |
|
|
|
Color? dialogBackgroundColor, |
|
|
|
Color? dialogBackgroundColor, |
|
|
@ -72,6 +77,7 @@ class QuillDialogTheme with Diagnosticable { |
|
|
|
double? runSpacing, |
|
|
|
double? runSpacing, |
|
|
|
}) { |
|
|
|
}) { |
|
|
|
return QuillDialogTheme( |
|
|
|
return QuillDialogTheme( |
|
|
|
|
|
|
|
buttonTextStyle: buttonTextStyle ?? this.buttonTextStyle, |
|
|
|
labelTextStyle: labelTextStyle ?? this.labelTextStyle, |
|
|
|
labelTextStyle: labelTextStyle ?? this.labelTextStyle, |
|
|
|
inputTextStyle: inputTextStyle ?? this.inputTextStyle, |
|
|
|
inputTextStyle: inputTextStyle ?? this.inputTextStyle, |
|
|
|
dialogBackgroundColor: |
|
|
|
dialogBackgroundColor: |
|
|
@ -96,6 +102,7 @@ class QuillDialogTheme with Diagnosticable { |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
return other is QuillDialogTheme && |
|
|
|
return other is QuillDialogTheme && |
|
|
|
|
|
|
|
other.buttonTextStyle == buttonTextStyle && |
|
|
|
other.labelTextStyle == labelTextStyle && |
|
|
|
other.labelTextStyle == labelTextStyle && |
|
|
|
other.inputTextStyle == inputTextStyle && |
|
|
|
other.inputTextStyle == inputTextStyle && |
|
|
|
other.dialogBackgroundColor == dialogBackgroundColor && |
|
|
|
other.dialogBackgroundColor == dialogBackgroundColor && |
|
|
@ -112,6 +119,7 @@ class QuillDialogTheme with Diagnosticable { |
|
|
|
|
|
|
|
|
|
|
|
@override |
|
|
|
@override |
|
|
|
int get hashCode => Object.hash( |
|
|
|
int get hashCode => Object.hash( |
|
|
|
|
|
|
|
buttonTextStyle, |
|
|
|
labelTextStyle, |
|
|
|
labelTextStyle, |
|
|
|
inputTextStyle, |
|
|
|
inputTextStyle, |
|
|
|
dialogBackgroundColor, |
|
|
|
dialogBackgroundColor, |
|
|
|