Skip to content

Commit

Permalink
Upgrade dependencies (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
amantoux authored Jan 11, 2024
1 parent 123d317 commit f6df900
Show file tree
Hide file tree
Showing 22 changed files with 82 additions and 106 deletions.
9 changes: 3 additions & 6 deletions packages/fleather/lib/src/rendering/editable_text_block.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ class RenderEditableTextBlock extends RenderEditableContainerBox
implements RenderEditableBox {
///
RenderEditableTextBlock({
List<RenderEditableBox>? children,
required BlockNode node,
required TextDirection textDirection,
super.children,
required BlockNode super.node,
required super.textDirection,
required EdgeInsetsGeometry padding,
required Decoration decoration,
EdgeInsets contentPadding = EdgeInsets.zero,
Expand All @@ -20,9 +20,6 @@ class RenderEditableTextBlock extends RenderEditableContainerBox
_savedPadding = padding,
_contentPadding = contentPadding,
super(
children: children,
node: node,
textDirection: textDirection,
padding: padding.add(contentPadding),
);

Expand Down
9 changes: 3 additions & 6 deletions packages/fleather/lib/src/rendering/editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,14 @@ class RenderEditor extends RenderEditableContainerBox
implements RenderAbstractEditor {
RenderEditor({
ViewportOffset? offset,
List<RenderEditableBox>? children,
super.children,
required ParchmentDocument document,
required TextDirection textDirection,
required super.textDirection,
required bool hasFocus,
required TextSelection selection,
required LayerLink startHandleLayerLink,
required LayerLink endHandleLayerLink,
required EdgeInsetsGeometry padding,
required super.padding,
required CursorController cursorController,
this.onSelectionChanged,
EdgeInsets floatingCursorAddedMargin =
Expand All @@ -159,10 +159,7 @@ class RenderEditor extends RenderEditableContainerBox
_cursorController = cursorController,
_maxContentWidth = maxContentWidth,
super(
children: children,
node: document.root,
textDirection: textDirection,
padding: padding,
);

ParchmentDocument _document;
Expand Down
6 changes: 3 additions & 3 deletions packages/fleather/lib/src/widgets/baseline_proxy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ class BaselineProxy extends SingleChildRenderObjectWidget {
final EdgeInsets padding;

const BaselineProxy({
Key? key,
Widget? child,
super.key,
super.child,
required this.textStyle,
required this.padding,
}) : super(key: key, child: child);
});

@override
RenderBaselineProxy createRenderObject(BuildContext context) {
Expand Down
18 changes: 7 additions & 11 deletions packages/fleather/lib/src/widgets/editable_text_block.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class EditableTextBlock extends StatelessWidget {
final EdgeInsets? contentPadding;

const EditableTextBlock({
Key? key,
super.key,
required this.node,
required this.controller,
required this.readOnly,
Expand All @@ -43,7 +43,7 @@ class EditableTextBlock extends StatelessWidget {
required this.linkActionPicker,
this.onLaunchUrl,
this.contentPadding,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -267,13 +267,12 @@ class _EditableBlock extends MultiChildRenderObjectWidget {
final EdgeInsets? contentPadding;

const _EditableBlock({
Key? key,
required this.node,
required this.decoration,
required List<Widget> children,
required super.children,
this.contentPadding,
this.padding = const VerticalSpacing(),
}) : super(key: key, children: children);
});

EdgeInsets get _padding =>
EdgeInsets.only(top: padding.top, bottom: padding.bottom);
Expand Down Expand Up @@ -310,13 +309,12 @@ class _NumberPoint extends StatelessWidget {
final TextStyle style;

const _NumberPoint({
Key? key,
required this.number,
required this.width,
required this.style,
this.withDot = true,
this.padding = 0.0,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand All @@ -333,9 +331,8 @@ class _BulletPoint extends StatelessWidget {
final TextStyle style;

const _BulletPoint({
Key? key,
required this.style,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand All @@ -350,11 +347,10 @@ class _BulletPoint extends StatelessWidget {

class _CheckboxPoint extends StatelessWidget {
const _CheckboxPoint({
Key? key,
required this.value,
required this.enabled,
required this.onChanged,
}) : super(key: key);
});

final bool value;
final bool enabled;
Expand Down
6 changes: 3 additions & 3 deletions packages/fleather/lib/src/widgets/editable_text_line.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class EditableTextLine extends RenderObjectWidget {

/// Creates an editable line of text.
const EditableTextLine({
Key? key,
super.key,
required this.node,
required this.body,
required this.cursorController,
Expand All @@ -47,7 +47,7 @@ class EditableTextLine extends RenderObjectWidget {
this.leading,
this.indentWidth = 0.0,
this.spacing = const VerticalSpacing(),
}) : super(key: key);
});

EdgeInsetsGeometry get _padding => EdgeInsetsDirectional.only(
start: indentWidth,
Expand Down Expand Up @@ -93,7 +93,7 @@ class EditableTextLine extends RenderObjectWidget {
}

class _RenderEditableTextLineElement extends RenderObjectElement {
_RenderEditableTextLineElement(EditableTextLine line) : super(line);
_RenderEditableTextLineElement(EditableTextLine super.line);

final Map<TextLineSlot, Element> slotToChild = <TextLineSlot, Element>{};

Expand Down
15 changes: 7 additions & 8 deletions packages/fleather/lib/src/widgets/editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class FleatherEditor extends StatefulWidget {
final GlobalKey<EditorState>? editorKey;

const FleatherEditor({
Key? key,
super.key,
required this.controller,
this.editorKey,
this.focusNode,
Expand All @@ -280,7 +280,7 @@ class FleatherEditor extends StatefulWidget {
this.contextMenuBuilder = defaultContextMenuBuilder,
this.embedBuilder = defaultFleatherEmbedBuilder,
this.linkActionPickerDelegate = defaultLinkActionPickerDelegate,
}) : super(key: key);
});

@override
State<FleatherEditor> createState() => _FleatherEditorState();
Expand Down Expand Up @@ -490,7 +490,7 @@ class _FleatherEditorSelectionGestureDetectorBuilder

class RawEditor extends StatefulWidget {
const RawEditor({
Key? key,
super.key,
required this.controller,
this.focusNode,
this.scrollController,
Expand Down Expand Up @@ -526,8 +526,7 @@ class RawEditor extends StatefulWidget {
'minHeight can\'t be greater than maxHeight',
),
// keyboardType = keyboardType ?? TextInputType.multiline,
showCursor = showCursor ?? !readOnly,
super(key: key);
showCursor = showCursor ?? !readOnly;

/// Controls the document being edited.
final FleatherController controller;
Expand Down Expand Up @@ -2005,8 +2004,8 @@ class RawEditorState extends EditorState

class _Editor extends MultiChildRenderObjectWidget {
const _Editor({
required Key key,
required List<Widget> children,
required Key super.key,
required super.children,
this.offset,
required this.document,
required this.textDirection,
Expand All @@ -2018,7 +2017,7 @@ class _Editor extends MultiChildRenderObjectWidget {
required this.cursorController,
this.padding = EdgeInsets.zero,
this.maxContentWidth,
}) : super(key: key, children: children);
});

final ViewportOffset? offset;
final ParchmentDocument document;
Expand Down
32 changes: 14 additions & 18 deletions packages/fleather/lib/src/widgets/editor_toolbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class InsertEmbedButton extends StatelessWidget {
final IconData icon;

const InsertEmbedButton({
Key? key,
super.key,
required this.controller,
required this.icon,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -48,8 +48,7 @@ class UndoRedoButton extends StatelessWidget {
final FleatherController controller;
final _UndoRedoButtonVariant _variant;

const UndoRedoButton._(this.controller, this._variant, {Key? key})
: super(key: key);
const UndoRedoButton._(this.controller, this._variant, {super.key});

const UndoRedoButton.undo({
Key? key,
Expand Down Expand Up @@ -114,10 +113,10 @@ class LinkStyleButton extends StatefulWidget {
final IconData? icon;

const LinkStyleButton({
Key? key,
super.key,
required this.controller,
this.icon,
}) : super(key: key);
});

@override
State<LinkStyleButton> createState() => _LinkStyleButtonState();
Expand Down Expand Up @@ -185,7 +184,7 @@ class _LinkStyleButtonState extends State<LinkStyleButton> {
}

class _LinkDialog extends StatefulWidget {
const _LinkDialog({Key? key}) : super(key: key);
const _LinkDialog();

@override
_LinkDialogState createState() => _LinkDialogState();
Expand Down Expand Up @@ -248,12 +247,12 @@ class ToggleStyleButton extends StatefulWidget {
final ToggleStyleButtonBuilder childBuilder;

const ToggleStyleButton({
Key? key,
super.key,
required this.attribute,
required this.icon,
required this.controller,
this.childBuilder = defaultToggleStyleButtonBuilder,
}) : super(key: key);
});

@override
State<ToggleStyleButton> createState() => _ToggleStyleButtonState();
Expand Down Expand Up @@ -364,13 +363,12 @@ typedef ColorButtonBuilder = Widget Function(BuildContext, Color?);
/// Works as a dropdown menu button.
class ColorButton extends StatefulWidget {
const ColorButton(
{Key? key,
{super.key,
required this.controller,
required this.attributeKey,
required this.nullColorLabel,
required this.builder,
this.pickColor})
: super(key: key);
this.pickColor});

final FleatherController controller;
final ColorParchmentAttributeBuilder attributeKey;
Expand Down Expand Up @@ -745,8 +743,7 @@ class IndentationButton extends StatefulWidget {
final FleatherController controller;

const IndentationButton(
{Key? key, this.increase = true, required this.controller})
: super(key: key);
{super.key, this.increase = true, required this.controller});

@override
State<IndentationButton> createState() => _IndentationButtonState();
Expand Down Expand Up @@ -821,8 +818,7 @@ class FleatherToolbar extends StatefulWidget implements PreferredSizeWidget {
final List<Widget> children;
final EdgeInsetsGeometry? padding;

const FleatherToolbar({Key? key, this.padding, required this.children})
: super(key: key);
const FleatherToolbar({super.key, this.padding, required this.children});

factory FleatherToolbar.basic({
Key? key,
Expand Down Expand Up @@ -1189,14 +1185,14 @@ class FLIconButton extends StatelessWidget {
final double highlightElevation;

const FLIconButton({
Key? key,
super.key,
required this.onPressed,
this.icon,
this.size = 40,
this.fillColor,
this.hoverElevation = 1,
this.highlightElevation = 1,
}) : super(key: key);
});

@override
Widget build(BuildContext context) {
Expand Down
6 changes: 3 additions & 3 deletions packages/fleather/lib/src/widgets/embed_proxy.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import '../rendering/embed_proxy.dart';

class EmbedProxy extends SingleChildRenderObjectWidget {
const EmbedProxy({
Key? key,
required Widget child,
}) : super(key: key, child: child);
super.key,
required Widget super.child,
});

@override
RenderEmbedProxy createRenderObject(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions packages/fleather/lib/src/widgets/field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class FleatherField extends StatefulWidget {
final GlobalKey<EditorState>? editorKey;

const FleatherField({
Key? key,
super.key,
required this.controller,
this.editorKey,
this.focusNode,
Expand All @@ -181,7 +181,7 @@ class FleatherField extends StatefulWidget {
this.contextMenuBuilder = defaultContextMenuBuilder,
this.spellCheckConfiguration,
this.embedBuilder = defaultFleatherEmbedBuilder,
}) : super(key: key);
});

@override
State<FleatherField> createState() => _FleatherFieldState();
Expand Down
8 changes: 3 additions & 5 deletions packages/fleather/lib/src/widgets/keyboard_listener.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ class FleatherPressedKeys extends ChangeNotifier {

class FleatherKeyboardListener extends StatefulWidget {
final Widget child;
const FleatherKeyboardListener({Key? key, required this.child})
: super(key: key);
const FleatherKeyboardListener({super.key, required this.child});

@override
FleatherKeyboardListenerState createState() =>
Expand Down Expand Up @@ -76,10 +75,9 @@ class FleatherKeyboardListenerState extends State<FleatherKeyboardListener> {
class _FleatherPressedKeysAccess extends InheritedWidget {
final FleatherPressedKeys pressedKeys;
const _FleatherPressedKeysAccess({
Key? key,
required this.pressedKeys,
required Widget child,
}) : super(key: key, child: child);
required super.child,
});

@override
bool updateShouldNotify(covariant _FleatherPressedKeysAccess oldWidget) {
Expand Down
Loading

0 comments on commit f6df900

Please sign in to comment.