Remove unused parameters

pull/1602/head
Ellet 2 years ago
parent 717ecc2aaa
commit df493afb52
No known key found for this signature in database
GPG Key ID: C488CC70BBCEF0D1
  1. 5
      lib/src/models/config/editor/elements/list/ordered_list.dart
  2. 5
      lib/src/models/config/editor/elements/list/unordered_list.dart
  3. 10
      lib/src/widgets/style_widgets/bullet_point.dart
  4. 15
      lib/src/widgets/style_widgets/number_point.dart

@ -1,17 +1,12 @@
import 'package:equatable/equatable.dart'; import 'package:equatable/equatable.dart';
import 'package:flutter/foundation.dart' show immutable; import 'package:flutter/foundation.dart' show immutable;
import 'package:flutter/widgets.dart' show Color;
@immutable @immutable
class QuillEditorOrderedListElementOptions extends Equatable { class QuillEditorOrderedListElementOptions extends Equatable {
const QuillEditorOrderedListElementOptions({ const QuillEditorOrderedListElementOptions({
this.backgroundColor,
this.fontColor,
this.useTextColorForDot = true, this.useTextColorForDot = true,
}); });
final Color? backgroundColor;
final Color? fontColor;
final bool useTextColorForDot; final bool useTextColorForDot;
@override @override
List<Object?> get props => []; List<Object?> get props => [];

@ -1,17 +1,12 @@
import 'package:equatable/equatable.dart'; import 'package:equatable/equatable.dart';
import 'package:flutter/foundation.dart' show immutable; import 'package:flutter/foundation.dart' show immutable;
import 'package:flutter/widgets.dart' show Color;
@immutable @immutable
class QuillEditorUnOrderedListElementOptions extends Equatable { class QuillEditorUnOrderedListElementOptions extends Equatable {
const QuillEditorUnOrderedListElementOptions({ const QuillEditorUnOrderedListElementOptions({
this.backgroundColor,
this.fontColor,
this.useTextColorForDot = true, this.useTextColorForDot = true,
}); });
final Color? backgroundColor;
final Color? fontColor;
final bool useTextColorForDot; final bool useTextColorForDot;
@override @override
List<Object?> get props => []; List<Object?> get props => [];

@ -1,18 +1,18 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../extensions/quill_configurations_ext.dart';
class QuillEditorBulletPoint extends StatelessWidget { class QuillEditorBulletPoint extends StatelessWidget {
const QuillEditorBulletPoint({ const QuillEditorBulletPoint({
required this.style, required this.style,
required this.width, required this.width,
this.padding = 0, this.padding = 0,
this.backgroundColor,
super.key, super.key,
}); });
final TextStyle style; final TextStyle style;
final double width; final double width;
final double padding; final double padding;
final Color? backgroundColor;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -20,12 +20,10 @@ class QuillEditorBulletPoint extends StatelessWidget {
alignment: AlignmentDirectional.topEnd, alignment: AlignmentDirectional.topEnd,
width: width, width: width,
padding: EdgeInsetsDirectional.only(end: padding), padding: EdgeInsetsDirectional.only(end: padding),
color: context.quillEditorElementOptions?.unorderedList.backgroundColor, color: backgroundColor,
child: Text( child: Text(
'', '',
style: style.copyWith( style: style,
color: context.quillEditorElementOptions?.unorderedList.fontColor,
),
), ),
); );
} }

@ -1,6 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../extensions/quill_configurations_ext.dart';
import '../../models/documents/attribute.dart'; import '../../models/documents/attribute.dart';
import '../quill/text_block.dart'; import '../quill/text_block.dart';
@ -15,6 +14,7 @@ class QuillEditorNumberPoint extends StatelessWidget {
this.withDot = true, this.withDot = true,
this.padding = 0.0, this.padding = 0.0,
super.key, super.key,
this.backgroundColor,
}); });
final int index; final int index;
@ -25,6 +25,7 @@ class QuillEditorNumberPoint extends StatelessWidget {
final Map<String, Attribute> attrs; final Map<String, Attribute> attrs;
final bool withDot; final bool withDot;
final double padding; final double padding;
final Color? backgroundColor;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -37,12 +38,10 @@ class QuillEditorNumberPoint extends StatelessWidget {
alignment: AlignmentDirectional.topEnd, alignment: AlignmentDirectional.topEnd,
width: width, width: width,
padding: EdgeInsetsDirectional.only(end: padding), padding: EdgeInsetsDirectional.only(end: padding),
color: context.quillEditorElementOptions?.orderedList.backgroundColor, color: backgroundColor,
child: Text( child: Text(
withDot ? '$s.' : s, withDot ? '$s.' : s,
style: style.copyWith( style: style,
color: context.quillEditorElementOptions?.orderedList.fontColor,
),
), ),
); );
} }
@ -74,12 +73,10 @@ class QuillEditorNumberPoint extends StatelessWidget {
alignment: AlignmentDirectional.topEnd, alignment: AlignmentDirectional.topEnd,
width: width, width: width,
padding: EdgeInsetsDirectional.only(end: padding), padding: EdgeInsetsDirectional.only(end: padding),
color: context.quillEditorElementOptions?.orderedList.backgroundColor, color: backgroundColor,
child: Text( child: Text(
withDot ? '$s.' : s, withDot ? '$s.' : s,
style: style.copyWith( style: style,
color: context.quillEditorElementOptions?.orderedList.fontColor,
),
), ),
); );
} }

Loading…
Cancel
Save