Implement `constrains` and `buttonStyle`

pull/1185/head
bambinoua 2 years ago
parent d3fc816910
commit bfece1c4a7
  1. 16
      lib/src/widgets/toolbar/link_style_button2.dart

@ -241,6 +241,7 @@ class _LinkStyleDialogState extends State<LinkStyleDialog> {
@override
Widget build(BuildContext context) {
final constraints = widget.constraints ??
widget.dialogTheme?.linkDialogConstraints ??
() {
final mediaQuery = MediaQuery.of(context);
final maxWidth =
@ -248,14 +249,13 @@ class _LinkStyleDialogState extends State<LinkStyleDialog> {
return BoxConstraints(maxWidth: maxWidth, maxHeight: 80);
}();
var buttonStyle = widget.dialogTheme?.buttonStyle;
if (buttonStyle == null) {
if (widget.buttonSize != null) {
buttonStyle = Theme.of(context).elevatedButtonTheme.style?.copyWith(
fixedSize: MaterialStatePropertyAll(widget.buttonSize),
);
}
}
final buttonStyle = widget.buttonSize != null
? Theme.of(context)
.elevatedButtonTheme
.style
?.copyWith(fixedSize: MaterialStatePropertyAll(widget.buttonSize))
: widget.dialogTheme?.buttonStyle;
;
return Dialog(
backgroundColor: widget.dialogTheme?.dialogBackgroundColor,

Loading…
Cancel
Save