diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e40823..514bfce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [6.0.0] - 2023.08.22 + +- Fixes for breaking changes in Flutter 2.13, mostly related to the text selection API. + ## [5.0.0] - 2023.05.15 - Update APIs to match the Flutter 3.10 and Dart 3.0 release. (#45) (@Satsrag) diff --git a/analysis_options.yaml b/analysis_options.yaml index a9a4340..92ba1ce 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -1,7 +1,6 @@ -include: package:flutter_lints/flutter.yaml +include: package:lints/recommended.yaml analyzer: - exclude: [build/**] language: strict-casts: true strict-raw-types: true diff --git a/example/lib/main.dart b/example/lib/main.dart index 6f03025..ae6d035 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -18,7 +18,7 @@ import 'demos/resizable_text_demo.dart'; import 'demos/text_demo.dart'; import 'demos/text_span_demo.dart'; -const versionTitle = 'Flutter mongol package 5.0.0'; +const versionTitle = 'Flutter mongol package 6.0.0'; void main() { runApp(const DemoApp()); diff --git a/example/macos/Runner.xcodeproj/project.pbxproj b/example/macos/Runner.xcodeproj/project.pbxproj index 0007b22..9818e68 100644 --- a/example/macos/Runner.xcodeproj/project.pbxproj +++ b/example/macos/Runner.xcodeproj/project.pbxproj @@ -182,7 +182,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = "The Flutter Authors"; TargetAttributes = { 33CC10EC2044A3C60003C045 = { diff --git a/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index ad089fa..b8071e7 100644 --- a/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ =3.0.0 <4.0.0" + dart: ">=3.1.0-185.0.dev <4.0.0" diff --git a/lib/src/editing/mongol_editable_text.dart b/lib/src/editing/mongol_editable_text.dart index b17f429..fb8aaf0 100644 --- a/lib/src/editing/mongol_editable_text.dart +++ b/lib/src/editing/mongol_editable_text.dart @@ -25,8 +25,7 @@ import 'package:flutter/material.dart' ScrollToDocumentBoundaryIntent, Size, kMinInteractiveDimension; -import 'package:flutter/rendering.dart' - show CaretChangedHandler, RevealedOffset, ViewportOffset; +import 'package:flutter/rendering.dart' show RevealedOffset, ViewportOffset; import 'package:flutter/scheduler.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart' @@ -133,7 +132,6 @@ import 'package:mongol/src/base/mongol_text_align.dart'; import 'package:mongol/src/editing/mongol_render_editable.dart'; import 'package:mongol/src/editing/text_selection/mongol_text_selection.dart'; -import 'mongol_text_editing_action.dart'; import 'mongol_text_editing_intents.dart'; export 'package:flutter/services.dart' @@ -381,7 +379,7 @@ class MongolEditableText extends StatefulWidget { 'Use `contextMenuBuilder` instead. ' 'This feature was deprecated after v3.3.0-0.5.pre.', ) - ToolbarOptions? toolbarOptions, + ToolbarOptions? toolbarOptions, this.autofillHints, this.autofillClient, this.clipBehavior = Clip.hardEdge, @@ -1373,8 +1371,9 @@ class MongolEditableTextState extends State AutomaticKeepAliveClientMixin, WidgetsBindingObserver, TickerProviderStateMixin, - TextSelectionDelegate - implements TextInputClient, AutofillClient, MongolTextEditingActionTarget { + TextSelectionDelegate, + TextInputClient + implements AutofillClient { Timer? _cursorTimer; AnimationController get _cursorBlinkOpacityController { return _backingCursorBlinkOpacityController ??= AnimationController( @@ -2543,12 +2542,6 @@ class MongolEditableTextState extends State } } - Rect? _currentCaretRect; - - void _handleCaretChanged(Rect caretRect) { - _currentCaretRect = caretRect; - } - // Animation configuration for scrolling the caret back on screen. static const Duration _caretAnimationDuration = Duration(milliseconds: 100); static const Curve _caretAnimationCurve = Curves.fastOutSlowIn; @@ -2562,7 +2555,13 @@ class MongolEditableTextState extends State _showCaretOnScreenScheduled = true; SchedulerBinding.instance.addPostFrameCallback((Duration _) { _showCaretOnScreenScheduled = false; - if (_currentCaretRect == null || !_scrollController.hasClients) { + // Since we are in a post frame callback, check currentContext in case + // RenderEditable has been disposed (in which case it will be null). + final renderEditable = _editableKey.currentContext?.findRenderObject() + as MongolRenderEditable?; + if (renderEditable == null || + !(renderEditable.selection?.isValid ?? false) || + !_scrollController.hasClients) { return; } @@ -2592,7 +2591,9 @@ class MongolEditableTextState extends State final caretPadding = widget.scrollPadding.copyWith(right: rightSpacing); - final targetOffset = _getOffsetToRevealCaret(_currentCaretRect!); + final caretRect = + renderEditable.getLocalRectForCaret(renderEditable.selection!.extent); + final targetOffset = _getOffsetToRevealCaret(caretRect); final Rect rectToReveal; final TextSelection selection = textEditingValue.selection; @@ -2891,8 +2892,7 @@ class MongolEditableTextState extends State /// /// This property is typically used to notify the renderer of input gestures /// when [MongolRenderEditable.ignorePointer] is true. - @override - MongolRenderEditable get renderEditable => + late final MongolRenderEditable renderEditable = _editableKey.currentContext!.findRenderObject()! as MongolRenderEditable; @override @@ -3590,7 +3590,6 @@ class MongolEditableTextState extends State autocorrect: widget.autocorrect, enableSuggestions: widget.enableSuggestions, offset: offset, - onCaretChanged: _handleCaretChanged, rendererIgnoresPointer: widget.rendererIgnoresPointer, cursorWidth: widget.cursorWidth, cursorHeight: widget.cursorHeight, @@ -3665,7 +3664,6 @@ class _MongolEditable extends LeafRenderObjectWidget { required this.autocorrect, required this.enableSuggestions, required this.offset, - this.onCaretChanged, this.rendererIgnoresPointer = false, this.cursorWidth, required this.cursorHeight, @@ -3697,7 +3695,6 @@ class _MongolEditable extends LeafRenderObjectWidget { final bool autocorrect; final bool enableSuggestions; final ViewportOffset offset; - final CaretChangedHandler? onCaretChanged; final bool rendererIgnoresPointer; final double? cursorWidth; final double cursorHeight; @@ -3727,7 +3724,6 @@ class _MongolEditable extends LeafRenderObjectWidget { textAlign: textAlign, selection: value.selection, offset: offset, - onCaretChanged: onCaretChanged, ignorePointer: rendererIgnoresPointer, obscuringCharacter: obscuringCharacter, obscureText: obscureText, @@ -3762,7 +3758,6 @@ class _MongolEditable extends LeafRenderObjectWidget { ..textAlign = textAlign ..selection = value.selection ..offset = offset - ..onCaretChanged = onCaretChanged ..ignorePointer = rendererIgnoresPointer ..obscuringCharacter = obscuringCharacter ..obscureText = obscureText diff --git a/lib/src/editing/mongol_input_decorator.dart b/lib/src/editing/mongol_input_decorator.dart index d3cd2a2..f5de047 100644 --- a/lib/src/editing/mongol_input_decorator.dart +++ b/lib/src/editing/mongol_input_decorator.dart @@ -635,7 +635,7 @@ class _RenderDecorationLayout { // The workhorse: layout and paint a _Decorator widget's _Decoration. class _RenderDecoration extends RenderBox - with SlottedContainerRenderObjectMixin<_DecorationSlot> { + with SlottedContainerRenderObjectMixin<_DecorationSlot, RenderBox> { _RenderDecoration({ required _Decoration decoration, required TextBaseline textBaseline, @@ -1455,8 +1455,8 @@ class _RenderDecoration extends RenderBox } } -class _Decorator extends RenderObjectWidget - with SlottedMultiChildRenderObjectWidgetMixin<_DecorationSlot> { +class _Decorator + extends SlottedMultiChildRenderObjectWidget<_DecorationSlot, RenderBox> { const _Decorator({ required this.textAlignHorizontal, required this.decoration, diff --git a/lib/src/editing/mongol_render_editable.dart b/lib/src/editing/mongol_render_editable.dart index ddd0a22..116b262 100644 --- a/lib/src/editing/mongol_render_editable.dart +++ b/lib/src/editing/mongol_render_editable.dart @@ -17,27 +17,9 @@ import 'package:mongol/src/base/mongol_text_painter.dart'; import '../base/mongol_paragraph.dart'; -// ignore_for_file: deprecated_member_use_from_same_package -// ignore_for_file: todo - const double _kCaretGap = 1.0; // pixels const double _kCaretWidthOffset = 2.0; // pixels -/// Signature for the callback that reports when the user changes the selection -/// (including the cursor location). -/// -/// Used by [MongolRenderEditable.onSelectionChanged]. -@Deprecated( - 'Signature of a deprecated class method, ' - 'textSelectionDelegate.userUpdateTextEditingValue. ' - 'This feature was deprecated after v1.26.0-17.2.pre.', -) -typedef MongolSelectionChangedHandler = void Function( - TextSelection selection, - MongolRenderEditable renderObject, - SelectionChangedCause cause, -); - /// The consecutive sequence of [TextPosition]s that the caret should move to /// when the user navigates the paragraph using the left arrow key or the /// right arrow key. @@ -230,12 +212,6 @@ class MongolRenderEditable extends RenderBox double textScaleFactor = 1.0, TextSelection? selection, required ViewportOffset offset, - @Deprecated( - 'Uses the textSelectionDelegate.userUpdateTextEditingValue instead. ' - 'This feature was deprecated after v1.26.0-17.2.pre.', - ) - this.onSelectionChanged, - this.onCaretChanged, this.ignorePointer = false, bool readOnly = false, bool forceLine = true, @@ -393,7 +369,7 @@ class MongolRenderEditable extends RenderBox } // Caret painters: - late final _CaretPainter _caretPainter = _CaretPainter(_onCaretChanged); + late final _CaretPainter _caretPainter = _CaretPainter(); // Text Highlight painters: final _TextHighlightPainter _selectionPainter = _TextHighlightPainter(); @@ -422,15 +398,6 @@ class MongolRenderEditable extends RenderBox ); } - /// Called when the selection changes. - /// - /// If this is null, then selection changes will be ignored. - @Deprecated( - 'Uses the textSelectionDelegate.userUpdateTextEditingValue instead. ' - 'This feature was deprecated after v1.26.0-17.2.pre.', - ) - MongolSelectionChangedHandler? onSelectionChanged; - double? _textLayoutLastMaxHeight; double? _textLayoutLastMinHeight; @@ -443,16 +410,6 @@ class MongolRenderEditable extends RenderBox ); } - Rect? _lastCaretRect; - - /// Called during the paint phase when the caret location changes. - CaretChangedHandler? onCaretChanged; - - void _onCaretChanged(Rect caretRect) { - if (_lastCaretRect != caretRect) onCaretChanged?.call(caretRect); - _lastCaretRect = (onCaretChanged == null) ? null : caretRect; - } - /// Whether the [handleEvent] will propagate pointer events to selection /// handlers. /// @@ -569,46 +526,26 @@ class MongolRenderEditable extends RenderBox void _setSelection(TextSelection nextSelection, SelectionChangedCause cause) { if (nextSelection.isValid) { - // The nextSelection is calculated based on _plainText, which can be out + // The nextSelection is calculated based on plainText, which can be out // of sync with the textSelectionDelegate.textEditingValue by one frame. // This is due to the render editable and editable text handle pointer // event separately. If the editable text changes the text during the // event handler, the render editable will use the outdated text stored in - // the _plainText when handling the pointer event. + // the plainText when handling the pointer event. // // If this happens, we need to make sure the new selection is still valid. - final textLength = textSelectionDelegate.textEditingValue.text.length; + final int textLength = textSelectionDelegate.textEditingValue.text.length; nextSelection = nextSelection.copyWith( baseOffset: math.min(nextSelection.baseOffset, textLength), extentOffset: math.min(nextSelection.extentOffset, textLength), ); } - _handleSelectionChange(nextSelection, cause); _setTextEditingValue( textSelectionDelegate.textEditingValue.copyWith(selection: nextSelection), cause, ); } - void _handleSelectionChange( - TextSelection nextSelection, - SelectionChangedCause cause, - ) { - // Changes made by the keyboard can sometimes be "out of band" for listening - // components, so always send those events, even if we didn't think it - // changed. Also, focusing an empty field is sent as a selection change even - // if the selection offset didn't change. - final focusingEmpty = (nextSelection.baseOffset == 0) && - (nextSelection.extentOffset == 0) && - !hasFocus; - if (nextSelection == selection && - cause != SelectionChangedCause.keyboard && - !focusingEmpty) { - return; - } - onSelectionChanged?.call(nextSelection, this, cause); - } - /// Returns the index into the string of the next character boundary after the /// given index. /// @@ -1362,38 +1299,44 @@ class MongolRenderEditable extends RenderBox } void _handleSetSelection(TextSelection selection) { - _handleSelectionChange(selection, SelectionChangedCause.keyboard); + _setSelection(selection, SelectionChangedCause.keyboard); } - void _handleMoveCursorForwardByCharacter(bool extentSelection) { + void _handleMoveCursorForwardByCharacter(bool extendSelection) { assert(selection != null); final extentOffset = _textPainter.getOffsetAfter(selection!.extentOffset); - if (extentOffset == null) return; - final baseOffset = !extentSelection ? extentOffset : selection!.baseOffset; - _handleSelectionChange( + if (extentOffset == null) { + return; + } + final baseOffset = !extendSelection ? extentOffset : selection!.baseOffset; + _setSelection( TextSelection(baseOffset: baseOffset, extentOffset: extentOffset), SelectionChangedCause.keyboard, ); } - void _handleMoveCursorBackwardByCharacter(bool extentSelection) { + void _handleMoveCursorBackwardByCharacter(bool extendSelection) { assert(selection != null); final extentOffset = _textPainter.getOffsetBefore(selection!.extentOffset); - if (extentOffset == null) return; - final baseOffset = !extentSelection ? extentOffset : selection!.baseOffset; - _handleSelectionChange( + if (extentOffset == null) { + return; + } + final baseOffset = !extendSelection ? extentOffset : selection!.baseOffset; + _setSelection( TextSelection(baseOffset: baseOffset, extentOffset: extentOffset), SelectionChangedCause.keyboard, ); } - void _handleMoveCursorForwardByWord(bool extentSelection) { + void _handleMoveCursorForwardByWord(bool extendSelection) { assert(selection != null); final currentWord = _textPainter.getWordBoundary(selection!.extent); final nextWord = _getNextWord(currentWord.end); - if (nextWord == null) return; - final baseOffset = extentSelection ? selection!.baseOffset : nextWord.start; - _handleSelectionChange( + if (nextWord == null) { + return; + } + final baseOffset = extendSelection ? selection!.baseOffset : nextWord.start; + _setSelection( TextSelection( baseOffset: baseOffset, extentOffset: nextWord.start, @@ -1402,14 +1345,16 @@ class MongolRenderEditable extends RenderBox ); } - void _handleMoveCursorBackwardByWord(bool extentSelection) { + void _handleMoveCursorBackwardByWord(bool extendSelection) { assert(selection != null); final currentWord = _textPainter.getWordBoundary(selection!.extent); final previousWord = _getPreviousWord(currentWord.start - 1); - if (previousWord == null) return; + if (previousWord == null) { + return; + } final baseOffset = - extentSelection ? selection!.baseOffset : previousWord.start; - _handleSelectionChange( + extendSelection ? selection!.baseOffset : previousWord.start; + _setSelection( TextSelection( baseOffset: baseOffset, extentOffset: previousWord.start, @@ -2435,7 +2380,7 @@ class _TextHighlightPainter extends MongolRenderEditablePainter { } class _CaretPainter extends MongolRenderEditablePainter { - _CaretPainter(this.caretPaintCallback); + _CaretPainter(); bool get shouldPaint => _shouldPaint; bool _shouldPaint = true; @@ -2446,7 +2391,7 @@ class _CaretPainter extends MongolRenderEditablePainter { notifyListeners(); } - CaretChangedHandler caretPaintCallback; + bool showRegularCaret = false; final Paint caretPaint = Paint(); late final Paint floatingCursorPaint = Paint(); @@ -2479,28 +2424,13 @@ class _CaretPainter extends MongolRenderEditablePainter { notifyListeners(); } - void paintRegularCursor(Canvas canvas, MongolRenderEditable renderEditable, - Color caretColor, TextPosition textPosition) { - final caretPrototype = renderEditable._caretPrototype; - final caretOffset = renderEditable._textPainter - .getOffsetForCaret(textPosition, caretPrototype); - var caretRect = caretPrototype.shift(caretOffset + cursorOffset); - - final caretWidth = renderEditable._textPainter - .getFullWidthForCaret(textPosition, caretPrototype); - if (caretWidth != null) { - caretRect = Rect.fromLTWH( - caretRect.left - _kCaretWidthOffset, - caretRect.top, - caretWidth, - caretRect.height, - ); - } - - caretRect = caretRect.shift(renderEditable._paintOffset); - final integralRect = - caretRect.shift(renderEditable._snapToPhysicalPixel(caretRect.topLeft)); - + void paintRegularCursor( + Canvas canvas, + MongolRenderEditable renderEditable, + Color caretColor, + TextPosition textPosition, + ) { + final integralRect = renderEditable.getLocalRectForCaret(textPosition); if (shouldPaint) { final radius = cursorRadius; caretPaint.color = caretColor; @@ -2511,7 +2441,6 @@ class _CaretPainter extends MongolRenderEditablePainter { canvas.drawRRect(caretRRect, caretPaint); } } - caretPaintCallback(integralRect); } @override diff --git a/lib/src/editing/mongol_text_editing_action.dart b/lib/src/editing/mongol_text_editing_action.dart deleted file mode 100644 index b5fa04b..0000000 --- a/lib/src/editing/mongol_text_editing_action.dart +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2014 The Flutter Authors. -// Copyright 2021 Suragch. -// All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/widgets/text_editing_action.dart - -import 'package:flutter/widgets.dart' show Intent, ContextAction, StatefulElement, protected, primaryFocus; - -import 'mongol_render_editable.dart'; - -// import 'actions.dart'; -// import 'editable_text.dart'; -// import 'focus_manager.dart'; -// import 'framework.dart'; - -/// The recipient of a [MongolTextEditingAction]. -/// -/// MongolTextEditingActions will only be enabled when an implementer of this -/// class is focused. -/// -/// See also: -/// -/// * [MongolEditableTextState], which implements this and is the most typical -/// target of a MongolTextEditingAction. -abstract class MongolTextEditingActionTarget { - /// The renderer that handles [MongolTextEditingAction]s. - /// - /// See also: - /// - /// * [MongolEditableTextState.renderEditable], which overrides this. - MongolRenderEditable get renderEditable; -} - -/// An [Action] related to editing text. -/// -/// Enables itself only when a [MongolTextEditingActionTarget], e.g. -/// [MongolEditableText], is currently focused. The result of this is that when a -/// MongolTextEditingActionTarget is not focused, it will fall through to any -/// non-MongolTextEditingAction that handles the same shortcut. For example, -/// overriding the tab key in [Shortcuts] with a MongolTextEditingAction will only -/// invoke your MongolTextEditingAction when a MongolTextEditingActionTarget is focused, -/// otherwise the default tab behavior will apply. -/// -/// The currently focused MongolTextEditingActionTarget is available in the [invoke] -/// method via [textEditingActionTarget]. -/// -/// See also: -/// -/// * [CallbackAction], which is a similar Action type but unrelated to text -/// editing. -abstract class MongolTextEditingAction extends ContextAction { - /// Returns the currently focused [MongolTextEditingAction], or null if none is - /// focused. - @protected - MongolTextEditingActionTarget? get textEditingActionTarget { - // If a MongolTextEditingActionTarget is not focused, then ignore this action. - if (primaryFocus?.context == null - || primaryFocus!.context! is! StatefulElement - || ((primaryFocus!.context! as StatefulElement).state is! MongolTextEditingActionTarget)) { - return null; - } - return (primaryFocus!.context! as StatefulElement).state as MongolTextEditingActionTarget; - } - - @override - bool isEnabled(T intent) { - // The Action is disabled if there is no focused MongolTextEditingActionTarget. - return textEditingActionTarget != null; - } -} diff --git a/lib/src/editing/text_selection/mongol_text_selection_controls.dart b/lib/src/editing/text_selection/mongol_text_selection_controls.dart index 5da1a5a..c925b12 100644 --- a/lib/src/editing/text_selection/mongol_text_selection_controls.dart +++ b/lib/src/editing/text_selection/mongol_text_selection_controls.dart @@ -8,6 +8,7 @@ import 'dart:math' as math; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart' show Theme, TextSelectionTheme, Icons; import 'package:flutter/widgets.dart'; @@ -45,8 +46,7 @@ class MongolTextSelectionControls extends TextSelectionControls { Offset selectionMidpoint, List endpoints, TextSelectionDelegate delegate, - // todo editor-fixes set it nullable - ClipboardStatusNotifier? clipboardStatus, + ValueListenable? clipboardStatus, Offset? lastSecondaryTapDownPosition, ) { return _TextSelectionControlsToolbar( @@ -57,9 +57,7 @@ class MongolTextSelectionControls extends TextSelectionControls { delegate: delegate, clipboardStatus: clipboardStatus, handleCut: canCut(delegate) ? () => handleCut(delegate) : null, - handleCopy: canCopy(delegate) - ? () => handleCopy(delegate, clipboardStatus) - : null, + handleCopy: canCopy(delegate) ? () => handleCopy(delegate) : null, handlePaste: canPaste(delegate) ? () => handlePaste(delegate) : null, handleSelectAll: canSelectAll(delegate) ? () => handleSelectAll(delegate) : null, @@ -162,7 +160,7 @@ class _TextSelectionControlsToolbar extends StatefulWidget { required this.textLineWidth, }) : super(key: key); - final ClipboardStatusNotifier? clipboardStatus; + final ValueListenable? clipboardStatus; final TextSelectionDelegate delegate; final List endpoints; final Rect globalEditableRegion; @@ -190,7 +188,6 @@ class _TextSelectionControlsToolbarState void initState() { super.initState(); widget.clipboardStatus?.addListener(_onChangedClipboardStatus); - widget.clipboardStatus?.update(); } @override @@ -200,18 +197,12 @@ class _TextSelectionControlsToolbarState widget.clipboardStatus?.addListener(_onChangedClipboardStatus); oldWidget.clipboardStatus?.removeListener(_onChangedClipboardStatus); } - widget.clipboardStatus?.update(); } @override void dispose() { - super.dispose(); - // When used in an Overlay, it can happen that this is disposed after its - // creator has already disposed _clipboardStatus. - // todo editor-fixes should remove if(...) expression? - // if (!widget.clipboardStatus.disposed) { widget.clipboardStatus?.removeListener(_onChangedClipboardStatus); - // } + super.dispose(); } @override diff --git a/lib/src/text/mongol_render_paragraph.dart b/lib/src/text/mongol_render_paragraph.dart index d5ffec5..9ce08c3 100644 --- a/lib/src/text/mongol_render_paragraph.dart +++ b/lib/src/text/mongol_render_paragraph.dart @@ -13,14 +13,14 @@ import 'package:mongol/src/base/mongol_text_align.dart'; import '../base/mongol_text_painter.dart'; -// This is a horizontal elipsis. Could use a Mongolian elipsis U+1801 instead. +// This is a horizontal ellipsis. Could use a Mongolian ellipsis U+1801 instead. const String _kEllipsis = '\u2026'; /// A render object that displays a paragraph of vertical Mongolian text. class MongolRenderParagraph extends RenderBox with ContainerRenderObjectMixin, - RenderBoxContainerDefaultsMixin, + RenderInlineChildrenContainerDefaults, RelayoutWhenSystemFontsChangeMixin { /// Creates a vertical paragraph render object. /// diff --git a/pubspec.lock b/pubspec.lock index 739c26f..d371b69 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.17.2" fake_async: dependency: "direct dev" description: @@ -58,47 +58,39 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c + sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.2" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - js: - dependency: transitive - description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 - url: "https://pub.dev" - source: hosted - version: "0.6.7" lints: dependency: transitive description: name: lints - sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.1" matcher: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.5.0" meta: dependency: "direct dev" description: @@ -124,10 +116,10 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" stack_trace: dependency: "direct dev" description: @@ -164,10 +156,10 @@ packages: dependency: "direct dev" description: name: test_api - sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.6.0" vector_math: dependency: transitive description: @@ -176,5 +168,13 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + web: + dependency: transitive + description: + name: web + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" + source: hosted + version: "0.1.4-beta" sdks: - dart: ">=3.0.0 <4.0.0" + dart: ">=3.1.0-185.0.dev <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 6910ed6..93e50af 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: mongol description: Flutter widget package for displaying and editing vertical Mongolian text. # When updating version, also update CHANGELOG.md and example/lib/main.dart -version: 5.0.0 +version: 6.0.0 homepage: https://github.com/suragch/mongol environment: