The isToggled property is extracted into a class

pull/1564/head
Ellet 1 year ago
parent 07dbef8414
commit f5bcaa8dc5
No known key found for this signature in database
GPG Key ID: C488CC70BBCEF0D1
  1. 9
      lib/src/models/config/toolbar/buttons/base.dart
  2. 4
      lib/src/models/config/toolbar/buttons/toggle_style.dart

@ -8,6 +8,15 @@ import '../../../themes/quill_icon_theme.dart' show QuillIconTheme;
import '../../quill_configurations.dart'
show kDefaultIconSize, kIconButtonFactor;
class QuillToolbarBaseButtonExtraOptionsIsToggled extends Equatable {
const QuillToolbarBaseButtonExtraOptionsIsToggled(this.isToggled);
final bool isToggled;
@override
List<Object?> get props => [isToggled];
}
@immutable
class QuillToolbarBaseButtonExtraOptions extends Equatable {
const QuillToolbarBaseButtonExtraOptions({

@ -5,7 +5,8 @@ import 'package:flutter/widgets.dart' show Color;
import 'base.dart';
class QuillToolbarToggleStyleButtonExtraOptions
extends QuillToolbarBaseButtonExtraOptions {
extends QuillToolbarBaseButtonExtraOptions
implements QuillToolbarBaseButtonExtraOptionsIsToggled {
const QuillToolbarToggleStyleButtonExtraOptions({
required super.controller,
required super.context,
@ -13,6 +14,7 @@ class QuillToolbarToggleStyleButtonExtraOptions
required this.isToggled,
});
@override
final bool isToggled;
}

Loading…
Cancel
Save