fix: removed misleading parameters (#1825)

* fix: removed misleading parameters

* unused imports
pull/1830/head
coolswood 12 months ago committed by GitHub
parent b547e281c9
commit fa780ad102
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      flutter_quill_extensions/lib/embeds/image/toolbar/image_button.dart
  2. 1
      flutter_quill_extensions/lib/embeds/others/camera_button/camera_button.dart
  3. 4
      flutter_quill_extensions/lib/models/config/camera/camera_configurations.dart
  4. 4
      flutter_quill_extensions/lib/models/config/formula/formula_configurations.dart
  5. 4
      flutter_quill_extensions/lib/models/config/image/toolbar/image_configurations.dart
  6. 2
      flutter_quill_extensions/lib/models/config/media/media_button_configurations.dart
  7. 4
      flutter_quill_extensions/lib/models/config/video/toolbar/video_configurations.dart
  8. 1
      lib/src/models/config/toolbar/buttons/font_size_configurations.dart
  9. 3
      lib/src/models/config/toolbar/buttons/search_configurations.dart
  10. 4
      lib/src/models/config/toolbar/buttons/toggle_check_list_configurations.dart
  11. 4
      lib/src/models/config/toolbar/buttons/toggle_style_configurations.dart
  12. 7
      lib/src/models/themes/quill_icon_theme.dart
  13. 1
      lib/src/widgets/toolbar/buttons/toggle_check_list_button.dart
  14. 3
      lib/src/widgets/toolbar/buttons/toggle_style_button.dart

@ -81,7 +81,6 @@ class QuillToolbarImageButton extends StatelessWidget {
iconSize: iconSize, iconSize: iconSize,
iconButtonFactor: iconButtonFactor, iconButtonFactor: iconButtonFactor,
dialogTheme: options.dialogTheme, dialogTheme: options.dialogTheme,
fillColor: options.fillColor,
iconTheme: options.iconTheme, iconTheme: options.iconTheme,
linkRegExp: options.linkRegExp, linkRegExp: options.linkRegExp,
tooltip: options.tooltip, tooltip: options.tooltip,

@ -87,7 +87,6 @@ class QuillToolbarCameraButton extends StatelessWidget {
QuillToolbarCameraButtonOptions( QuillToolbarCameraButtonOptions(
afterButtonPressed: _afterButtonPressed(context), afterButtonPressed: _afterButtonPressed(context),
iconData: options.iconData, iconData: options.iconData,
fillColor: options.fillColor,
iconSize: options.iconSize, iconSize: options.iconSize,
iconButtonFactor: iconButtonFactor, iconButtonFactor: iconButtonFactor,
iconTheme: options.iconTheme, iconTheme: options.iconTheme,

@ -1,4 +1,3 @@
import 'package:flutter/widgets.dart' show Color;
import 'package:flutter_quill/flutter_quill.dart'; import 'package:flutter_quill/flutter_quill.dart';
import '../../../embeds/others/camera_button/camera_types.dart'; import '../../../embeds/others/camera_button/camera_types.dart';
@ -18,7 +17,6 @@ class QuillToolbarCameraButtonOptions extends QuillToolbarBaseButtonOptions<
this.cameraConfigurations = const QuillToolbarCameraConfigurations(), this.cameraConfigurations = const QuillToolbarCameraConfigurations(),
super.iconSize, super.iconSize,
super.iconButtonFactor, super.iconButtonFactor,
this.fillColor,
super.iconData, super.iconData,
super.afterButtonPressed, super.afterButtonPressed,
super.tooltip, super.tooltip,
@ -26,7 +24,5 @@ class QuillToolbarCameraButtonOptions extends QuillToolbarBaseButtonOptions<
super.childBuilder, super.childBuilder,
}); });
final Color? fillColor;
final QuillToolbarCameraConfigurations cameraConfigurations; final QuillToolbarCameraConfigurations cameraConfigurations;
} }

@ -1,4 +1,3 @@
import 'package:flutter/widgets.dart' show Color;
import 'package:flutter_quill/flutter_quill.dart'; import 'package:flutter_quill/flutter_quill.dart';
class QuillToolbarFormulaButtonExtraOptions class QuillToolbarFormulaButtonExtraOptions
@ -18,10 +17,7 @@ class QuillToolbarFormulaButtonOptions extends QuillToolbarBaseButtonOptions<
super.iconTheme, super.iconTheme,
super.afterButtonPressed, super.afterButtonPressed,
super.childBuilder, super.childBuilder,
this.fillColor,
super.iconSize, super.iconSize,
super.iconButtonFactor, super.iconButtonFactor,
}); });
final Color? fillColor;
} }

@ -1,4 +1,3 @@
import 'package:flutter/widgets.dart' show Color;
import 'package:flutter_quill/flutter_quill.dart'; import 'package:flutter_quill/flutter_quill.dart';
import 'package:meta/meta.dart' show immutable; import 'package:meta/meta.dart' show immutable;
@ -26,14 +25,11 @@ class QuillToolbarImageButtonOptions extends QuillToolbarBaseButtonOptions<
super.afterButtonPressed, super.afterButtonPressed,
super.childBuilder, super.childBuilder,
super.iconTheme, super.iconTheme,
this.fillColor,
this.dialogTheme, this.dialogTheme,
this.linkRegExp, this.linkRegExp,
this.imageButtonConfigurations = const QuillToolbarImageConfigurations(), this.imageButtonConfigurations = const QuillToolbarImageConfigurations(),
}); });
final Color? fillColor;
final QuillDialogTheme? dialogTheme; final QuillDialogTheme? dialogTheme;
/// [imageLinkRegExp] is a regular expression to identify image links. /// [imageLinkRegExp] is a regular expression to identify image links.

@ -24,7 +24,6 @@ class QuillToolbarMediaButtonOptions extends QuillToolbarBaseButtonOptions<
this.childrenSpacing = 16.0, this.childrenSpacing = 16.0,
this.autovalidateMode = AutovalidateMode.disabled, this.autovalidateMode = AutovalidateMode.disabled,
super.iconSize, super.iconSize,
this.fillColor,
this.dialogTheme, this.dialogTheme,
this.labelText, this.labelText,
this.hintText, this.hintText,
@ -40,7 +39,6 @@ class QuillToolbarMediaButtonOptions extends QuillToolbarBaseButtonOptions<
super.childBuilder, super.childBuilder,
}); });
final Color? fillColor;
final QuillMediaType type; final QuillMediaType type;
final QuillDialogTheme? dialogTheme; final QuillDialogTheme? dialogTheme;
final MediaFilePicker? mediaFilePicker; final MediaFilePicker? mediaFilePicker;

@ -1,4 +1,3 @@
import 'package:flutter/widgets.dart' show Color;
import 'package:flutter_quill/flutter_quill.dart'; import 'package:flutter_quill/flutter_quill.dart';
import '../../../../embeds/video/video.dart'; import '../../../../embeds/video/video.dart';
@ -17,7 +16,6 @@ class QuillToolbarVideoButtonOptions extends QuillToolbarBaseButtonOptions<
const QuillToolbarVideoButtonOptions({ const QuillToolbarVideoButtonOptions({
this.linkRegExp, this.linkRegExp,
this.dialogTheme, this.dialogTheme,
this.fillColor,
super.iconSize, super.iconSize,
super.iconButtonFactor, super.iconButtonFactor,
super.iconData, super.iconData,
@ -31,6 +29,4 @@ class QuillToolbarVideoButtonOptions extends QuillToolbarBaseButtonOptions<
final RegExp? linkRegExp; final RegExp? linkRegExp;
final QuillDialogTheme? dialogTheme; final QuillDialogTheme? dialogTheme;
final QuillToolbarVideoConfigurations videoConfigurations; final QuillToolbarVideoConfigurations videoConfigurations;
final Color? fillColor;
} }

@ -75,7 +75,6 @@ class QuillToolbarFontSizeButtonOptions extends QuillToolbarBaseButtonOptions<
QuillToolbarFontSizeButtonOptions copyWith({ QuillToolbarFontSizeButtonOptions copyWith({
double? iconSize, double? iconSize,
double? iconButtonFactor, double? iconButtonFactor,
Color? fillColor,
double? hoverElevation, double? hoverElevation,
double? highlightElevation, double? highlightElevation,
List<PopupMenuEntry<String>>? items, List<PopupMenuEntry<String>>? items,

@ -23,7 +23,6 @@ class QuillToolbarSearchButtonOptions extends QuillToolbarBaseButtonOptions<
super.iconSize, super.iconSize,
super.iconButtonFactor, super.iconButtonFactor,
this.dialogBarrierColor, this.dialogBarrierColor,
this.fillColor,
this.customOnPressedCallback, this.customOnPressedCallback,
}); });
@ -32,8 +31,6 @@ class QuillToolbarSearchButtonOptions extends QuillToolbarBaseButtonOptions<
/// By default will be [dialogBarrierColor] from [QuillSharedConfigurations] /// By default will be [dialogBarrierColor] from [QuillSharedConfigurations]
final Color? dialogBarrierColor; final Color? dialogBarrierColor;
final Color? fillColor;
/// By default we will show simple search dialog ui /// By default we will show simple search dialog ui
/// you can pass value to this callback to change this /// you can pass value to this callback to change this
final QuillToolbarSearchButtonOnPressedCallback? customOnPressedCallback; final QuillToolbarSearchButtonOnPressedCallback? customOnPressedCallback;

@ -1,5 +1,4 @@
import 'package:flutter/foundation.dart' show immutable; import 'package:flutter/foundation.dart' show immutable;
import 'package:flutter/widgets.dart' show Color;
import '../../../documents/attribute.dart'; import '../../../documents/attribute.dart';
import '../../quill_configurations.dart'; import '../../quill_configurations.dart';
@ -23,7 +22,6 @@ class QuillToolbarToggleCheckListButtonOptions
const QuillToolbarToggleCheckListButtonOptions({ const QuillToolbarToggleCheckListButtonOptions({
super.iconSize, super.iconSize,
super.iconButtonFactor, super.iconButtonFactor,
this.fillColor,
this.attribute = Attribute.unchecked, this.attribute = Attribute.unchecked,
this.isShouldRequestKeyboard = false, this.isShouldRequestKeyboard = false,
super.iconTheme, super.iconTheme,
@ -33,8 +31,6 @@ class QuillToolbarToggleCheckListButtonOptions
super.childBuilder, super.childBuilder,
}); });
final Color? fillColor;
final Attribute attribute; final Attribute attribute;
/// Should we request the keyboard when you press the toggle check list button /// Should we request the keyboard when you press the toggle check list button

@ -1,6 +1,5 @@
// ignore_for_file: public_member_api_docs, sort_constructors_first // ignore_for_file: public_member_api_docs, sort_constructors_first
import 'package:flutter/foundation.dart' show immutable; import 'package:flutter/foundation.dart' show immutable;
import 'package:flutter/widgets.dart' show Color;
import '../base_button_configurations.dart'; import '../base_button_configurations.dart';
@ -26,12 +25,9 @@ class QuillToolbarToggleStyleButtonOptions
super.iconData, super.iconData,
super.iconSize, super.iconSize,
super.iconButtonFactor, super.iconButtonFactor,
this.fillColor,
super.tooltip, super.tooltip,
super.afterButtonPressed, super.afterButtonPressed,
super.iconTheme, super.iconTheme,
super.childBuilder, super.childBuilder,
}); });
final Color? fillColor;
} }

@ -4,17 +4,10 @@ import 'package:flutter/material.dart';
@immutable @immutable
class QuillIconTheme { class QuillIconTheme {
const QuillIconTheme({ const QuillIconTheme({
this.iconButtonSelectedStyle,
this.iconButtonUnselectedStyle,
this.iconButtonSelectedData, this.iconButtonSelectedData,
this.iconButtonUnselectedData, this.iconButtonUnselectedData,
}); });
@Deprecated('Please use iconButtonUnselectedData instead')
final ButtonStyle? iconButtonUnselectedStyle;
@Deprecated('Please use iconButtonSelectedData instead')
final ButtonStyle? iconButtonSelectedStyle;
final IconButtonData? iconButtonUnselectedData; final IconButtonData? iconButtonUnselectedData;
final IconButtonData? iconButtonSelectedData; final IconButtonData? iconButtonSelectedData;

@ -146,7 +146,6 @@ class QuillToolbarToggleCheckListButtonState
context, context,
Attribute.unchecked, Attribute.unchecked,
iconData, iconData,
options.fillColor,
_isToggled, _isToggled,
_toggleAttribute, _toggleAttribute,
afterButtonPressed, afterButtonPressed,

@ -13,7 +13,6 @@ typedef ToggleStyleButtonBuilder = Widget Function(
BuildContext context, BuildContext context,
Attribute attribute, Attribute attribute,
IconData icon, IconData icon,
Color? fillColor,
bool? isToggled, bool? isToggled,
VoidCallback? onPressed, VoidCallback? onPressed,
VoidCallback? afterPressed, [ VoidCallback? afterPressed, [
@ -172,7 +171,6 @@ class QuillToolbarToggleStyleButtonState
context, context,
widget.attribute, widget.attribute,
iconData, iconData,
options.fillColor,
_isToggled, _isToggled,
_toggleAttribute, _toggleAttribute,
afterButtonPressed, afterButtonPressed,
@ -231,7 +229,6 @@ Widget defaultToggleStyleButtonBuilder(
BuildContext context, BuildContext context,
Attribute attribute, Attribute attribute,
IconData icon, IconData icon,
Color? fillColor,
bool? isToggled, bool? isToggled,
VoidCallback? onPressed, VoidCallback? onPressed,
VoidCallback? afterPressed, [ VoidCallback? afterPressed, [

Loading…
Cancel
Save