fix: fix runtime errors

pull/1517/head
Adil Hanney 1 year ago committed by X Code
parent 33b8cb2498
commit 5eb122712b
  1. 2
      lib/src/models/config/toolbar/buttons/clear_format.dart
  2. 2
      lib/src/models/config/toolbar/buttons/color.dart
  3. 2
      lib/src/models/config/toolbar/buttons/history.dart
  4. 2
      lib/src/models/config/toolbar/buttons/indent.dart
  5. 2
      lib/src/models/config/toolbar/buttons/link_style.dart
  6. 2
      lib/src/models/config/toolbar/buttons/link_style2.dart
  7. 2
      lib/src/models/config/toolbar/buttons/search.dart
  8. 2
      lib/src/models/config/toolbar/buttons/select_alignment.dart
  9. 2
      lib/src/models/config/toolbar/buttons/select_header_style.dart
  10. 2
      lib/src/models/config/toolbar/buttons/toggle_check_list.dart
  11. 2
      lib/src/models/config/toolbar/buttons/toggle_style.dart
  12. 2
      lib/src/widgets/toolbar/buttons/clear_format.dart
  13. 2
      lib/src/widgets/toolbar/buttons/color.dart
  14. 2
      lib/src/widgets/toolbar/buttons/history.dart
  15. 2
      lib/src/widgets/toolbar/buttons/indent.dart
  16. 2
      lib/src/widgets/toolbar/buttons/link_style.dart
  17. 2
      lib/src/widgets/toolbar/buttons/link_style2.dart
  18. 2
      lib/src/widgets/toolbar/buttons/search/search.dart
  19. 2
      lib/src/widgets/toolbar/buttons/select_alignment.dart
  20. 2
      lib/src/widgets/toolbar/buttons/select_header_style.dart
  21. 7
      lib/src/widgets/toolbar/buttons/toggle_check_list.dart
  22. 8
      lib/src/widgets/toolbar/buttons/toggle_style.dart

@ -20,7 +20,9 @@ class QuillToolbarClearFormatButtonOptions
super.iconTheme,
super.tooltip,
this.iconSize,
this.iconButtonFactor,
});
final double? iconSize;
final double? iconButtonFactor;
}

@ -26,6 +26,7 @@ class QuillToolbarColorButtonOptions extends QuillToolbarBaseButtonOptions<
const QuillToolbarColorButtonOptions({
this.dialogBarrierColor,
this.iconSize,
this.iconButtonFactor,
super.iconData,
super.afterButtonPressed,
super.childBuilder,
@ -36,6 +37,7 @@ class QuillToolbarColorButtonOptions extends QuillToolbarBaseButtonOptions<
});
final double? iconSize;
final double? iconButtonFactor;
/// By default will use the default `dialogBarrierColor` from
/// [QuillSharedConfigurations]

@ -28,6 +28,7 @@ class QuillToolbarHistoryButtonOptions extends QuillToolbarBaseButtonOptions<
super.tooltip,
super.childBuilder,
this.iconSize,
this.iconButtonFactor,
});
/// If this true then it will be the undo button
@ -36,4 +37,5 @@ class QuillToolbarHistoryButtonOptions extends QuillToolbarBaseButtonOptions<
/// By default will use [globalIconSize]
final double? iconSize;
final double? iconButtonFactor;
}

@ -21,7 +21,9 @@ class QuillToolbarIndentButtonOptions extends QuillToolbarBaseButtonOptions {
super.iconTheme,
super.tooltip,
this.iconSize,
this.iconButtonFactor,
});
final double? iconSize;
final double? iconButtonFactor;
}

@ -22,6 +22,7 @@ class QuillToolbarLinkStyleButtonOptions extends QuillToolbarBaseButtonOptions<
this.linkDialogAction,
this.dialogBarrierColor,
this.iconSize,
this.iconButtonFactor,
super.iconData,
super.globalIconSize,
super.afterButtonPressed,
@ -32,6 +33,7 @@ class QuillToolbarLinkStyleButtonOptions extends QuillToolbarBaseButtonOptions<
});
final double? iconSize;
final double? iconButtonFactor;
final QuillDialogTheme? dialogTheme;
final RegExp? linkRegExp;
final LinkDialogAction? linkDialogAction;

@ -17,6 +17,7 @@ class QuillToolbarLinkStyleButton2Options extends QuillToolbarBaseButtonOptions<
QuillToolbarLinkStyleButton2ExtraOptions> {
const QuillToolbarLinkStyleButton2Options({
this.iconSize,
this.iconButtonFactor,
this.dialogTheme,
this.constraints,
this.addLinkLabel,
@ -36,6 +37,7 @@ class QuillToolbarLinkStyleButton2Options extends QuillToolbarBaseButtonOptions<
});
final double? iconSize;
final double? iconButtonFactor;
final QuillDialogTheme? dialogTheme;
/// The constrains for dialog.

@ -21,6 +21,7 @@ class QuillToolbarSearchButtonOptions extends QuillToolbarBaseButtonOptions {
super.iconTheme,
this.dialogTheme,
this.iconSize,
this.iconButtonFactor,
this.dialogBarrierColor,
this.fillColor,
this.customOnPressedCallback,
@ -28,6 +29,7 @@ class QuillToolbarSearchButtonOptions extends QuillToolbarBaseButtonOptions {
final QuillDialogTheme? dialogTheme;
final double? iconSize;
final double? iconButtonFactor;
/// By default will be [dialogBarrierColor] from [QuillSharedConfigurations]
final Color? dialogBarrierColor;

@ -18,6 +18,7 @@ class QuillToolbarSelectAlignmentButtonOptions
this.iconsData,
this.tooltips,
this.iconSize,
this.iconButtonFactor,
super.afterButtonPressed,
/// This will called on every select alignment button
@ -26,6 +27,7 @@ class QuillToolbarSelectAlignmentButtonOptions
super.iconTheme,
});
final double? iconSize;
final double? iconButtonFactor;
/// Default to
/// const QuillToolbarSelectAlignmentValues(

@ -25,6 +25,7 @@ class QuillToolbarSelectHeaderStyleButtonsOptions
this.axis,
this.attributes,
this.iconSize,
this.iconButtonFactor,
});
/// Default value:
@ -39,4 +40,5 @@ class QuillToolbarSelectHeaderStyleButtonsOptions
/// By default we will the toolbar axis from [QuillToolbarConfigurations]
final Axis? axis;
final double? iconSize;
final double? iconButtonFactor;
}

@ -22,6 +22,7 @@ class QuillToolbarToggleCheckListButtonOptions
QuillToolbarToggleCheckListButtonExtraOptions> {
const QuillToolbarToggleCheckListButtonOptions({
this.iconSize,
this.iconButtonFactor,
this.fillColor,
this.attribute = Attribute.unchecked,
this.isShouldRequestKeyboard = false,
@ -34,6 +35,7 @@ class QuillToolbarToggleCheckListButtonOptions
});
final double? iconSize;
final double? iconButtonFactor;
final Color? fillColor;

@ -22,6 +22,7 @@ class QuillToolbarToggleStyleButtonOptions
const QuillToolbarToggleStyleButtonOptions({
super.iconData,
this.iconSize,
this.iconButtonFactor,
this.fillColor,
super.tooltip,
super.afterButtonPressed,
@ -31,5 +32,6 @@ class QuillToolbarToggleStyleButtonOptions
});
final double? iconSize;
final double? iconButtonFactor;
final Color? fillColor;
}

@ -28,7 +28,7 @@ class QuillToolbarClearFormatButton extends StatelessWidget {
}
double _iconButtonFactor(BuildContext context) {
final baseIconFactor = baseButtonExtraOptions(context).iconButtonFactor;
final baseIconFactor = baseButtonExtraOptions(context).globalIconButtonFactor;
final iconButtonFactor = options.iconButtonFactor;
return iconButtonFactor ?? baseIconFactor;
}

@ -109,7 +109,7 @@ class QuillToolbarColorButtonState extends State<QuillToolbarColorButton> {
}
double get iconButtonFactor {
final baseIconFactor = baseButtonExtraOptions.iconButtonFactor;
final baseIconFactor = baseButtonExtraOptions.globalIconButtonFactor;
final iconButtonFactor = options.iconButtonFactor;
return iconButtonFactor ?? baseIconFactor;
}

@ -62,7 +62,7 @@ class QuillToolbarHistoryButtonState extends State<QuillToolbarHistoryButton> {
final iconSize = options.iconSize ??
baseButtonConfigurations.globalIconSize;
final iconButtonFactor = options.iconButtonFactor ??
baseButtonConfigurations.iconButtonFactor;
baseButtonConfigurations.globalIconButtonFactor;
final iconTheme = options.iconTheme ?? baseButtonConfigurations.iconTheme;
final afterButtonPressed = options.afterButtonPressed ??

@ -43,7 +43,7 @@ class QuillToolbarIndentButtonState extends State<QuillToolbarIndentButton> {
}
double get iconButtonFactor {
final baseIconFactor = baseButtonExtraOptions.iconButtonFactor;
final baseIconFactor = baseButtonExtraOptions.globalIconButtonFactor;
final iconButtonFactor = options.iconButtonFactor;
return iconButtonFactor ?? baseIconFactor;
}

@ -68,7 +68,7 @@ class QuillToolbarLinkStyleButtonState
}
double get iconButtonFactor {
final baseIconFactor = baseButtonExtraOptions.iconButtonFactor;
final baseIconFactor = baseButtonExtraOptions.globalIconButtonFactor;
final iconButtonFactor = options.iconButtonFactor;
return iconButtonFactor ?? baseIconFactor;
}

@ -76,7 +76,7 @@ class _QuillToolbarLinkStyleButton2State
}
double get iconButtonFactor {
final baseIconFactor = baseButtonExtraOptions.iconButtonFactor;
final baseIconFactor = baseButtonExtraOptions.globalIconButtonFactor;
final iconButtonFactor = options.iconButtonFactor;
return iconButtonFactor ?? baseIconFactor;
}

@ -28,7 +28,7 @@ class QuillToolbarSearchButton extends StatelessWidget {
}
double _iconButtonFactor(BuildContext context) {
final baseIconFactor = baseButtonExtraOptions(context).iconButtonFactor;
final baseIconFactor = baseButtonExtraOptions(context).globalIconButtonFactor;
final iconButtonFactor = options.iconButtonFactor;
return iconButtonFactor ?? baseIconFactor;
}

@ -67,7 +67,7 @@ class QuillToolbarSelectAlignmentButtonState
}
double get _iconButtonFactor {
final baseIconFactor = baseButtonExtraOptions.iconButtonFactor;
final baseIconFactor = baseButtonExtraOptions.globalIconButtonFactor;
final iconButtonFactor = options.iconButtonFactor;
return iconButtonFactor ?? baseIconFactor;
}

@ -62,7 +62,7 @@ class QuillToolbarSelectHeaderStyleButtonsState
}
double get iconButtonFactor {
final baseIconFactor = baseButtonExtraOptions.iconButtonFactor;
final baseIconFactor = baseButtonExtraOptions.globalIconButtonFactor;
final iconButtonFactor = options.iconButtonFactor;
return iconButtonFactor ?? baseIconFactor;
}

@ -93,6 +93,12 @@ class QuillToolbarToggleCheckListButtonState
return iconSize ?? baseFontSize;
}
double get iconButtonFactor {
final baseIconFactor = baseButtonExtraOptions.globalIconButtonFactor;
final iconButtonFactor = options.iconButtonFactor;
return iconButtonFactor ?? baseIconFactor;
}
VoidCallback? get afterButtonPressed {
return options.afterButtonPressed ??
baseButtonExtraOptions.afterButtonPressed;
@ -154,6 +160,7 @@ class QuillToolbarToggleCheckListButtonState
_toggleAttribute,
afterButtonPressed,
iconSize,
iconButtonFactor,
iconTheme,
),
);

@ -68,6 +68,13 @@ class QuillToolbarToggleStyleButtonState
return iconSize ?? baseFontSize;
}
double get iconButtonFactor {
final baseIconFactor =
context.requireQuillToolbarBaseButtonOptions.globalIconButtonFactor;
final iconButtonFactor = options.iconButtonFactor;
return iconButtonFactor ?? baseIconFactor;
}
VoidCallback? get afterButtonPressed {
return options.afterButtonPressed ??
context.requireQuillToolbarBaseButtonOptions.afterButtonPressed;
@ -159,6 +166,7 @@ class QuillToolbarToggleStyleButtonState
_toggleAttribute,
options.afterButtonPressed,
iconSize,
iconButtonFactor,
iconTheme,
),
);

Loading…
Cancel
Save