Move flutter_quill_test to seperated package (#1507)

* Split flutter_quill_test to a separated package
* Update version and main workflow
pull/1508/head
Ellet 1 year ago committed by GitHub
parent 9e0db463e5
commit adc067fe26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .github/workflows/main.yml
  2. 3
      CHANGELOG.md
  3. 14
      README.md
  4. 2
      flutter_quill_extensions/LICENSE
  5. 4
      flutter_quill_extensions/pubspec.yaml
  6. 30
      flutter_quill_test/.gitignore
  7. 10
      flutter_quill_test/.metadata
  8. 3
      flutter_quill_test/CHANGELOG.md
  9. 21
      flutter_quill_test/LICENSE
  10. 26
      flutter_quill_test/README.md
  11. 4
      flutter_quill_test/analysis_options.yaml
  12. 0
      flutter_quill_test/lib/flutter_quill_test.dart
  13. 9
      flutter_quill_test/lib/src/test/widget_tester_extension.dart
  14. 29
      flutter_quill_test/pubspec.yaml
  15. 1
      flutter_quill_test/test/flutter_quill_test_test.dart
  16. 1
      lib/flutter_quill.dart
  17. 7
      lib/src/widgets/editor/editor.dart
  18. 59
      lib/src/widgets/raw_editor/raw_editor.dart
  19. 11
      pubspec.yaml
  20. 2
      test/bug_fix_test.dart
  21. 5
      test/widgets/editor_test.dart

@ -25,6 +25,9 @@ jobs:
- name: Install flutter_quill_extensions dependencies - name: Install flutter_quill_extensions dependencies
run: flutter pub get -C flutter_quill_extensions run: flutter pub get -C flutter_quill_extensions
- name: Install flutter_quill_test dependencies
run: flutter pub get -C flutter_quill_test
- name: Run flutter analysis - name: Run flutter analysis
run: flutter analyze run: flutter analyze

@ -1,3 +1,6 @@
## [8.2.2]
- Move the `flutter_quill_test` to seperated package [flutter_quill_test](https://pub.dev/packages/fresh_quill_extensions)
## [8.2.1] ## [8.2.1]
- Update `README.md` - Update `README.md`

@ -623,19 +623,7 @@ Typescript/Javascript package.
## Testing ## Testing
To aid in testing applications using the editor an extension to the flutter `WidgetTester` is provided which includes methods to simplify interacting with the editor in test cases. Please use [flutter_quill_test](https://pub.dev/packages/flutter_quill_test) for testing
Import the test utilities in your test file:
```dart
import 'package:flutter_quill/flutter_quill_test.dart';
```
and then enter text using `quillEnterText`:
```dart
await tester.quillEnterText(find.byType(QuillEditor), 'test\n');
```
## License ## License

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2020 Xin Yao Copyright (c) 2023 Xin Yao
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

@ -1,8 +1,8 @@
name: flutter_quill_extensions name: flutter_quill_extensions
description: Embed extensions for flutter_quill including image, video, formula and etc. description: Embed extensions for flutter_quill including image, video, formula and etc.
version: 0.6.0-dev.4 version: 0.6.0-dev.4
homepage: https://github.com/singerdmx/flutter-quill homepage: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions
repository: https://github.com/singerdmx/flutter-quill repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_extensions
topics: topics:
- ui - ui

@ -0,0 +1,30 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
migrate_working_dir/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
/pubspec.lock
**/doc/api/
.dart_tool/
.packages
build/

@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: "d211f42860350d914a5ad8102f9ec32764dc6d06"
channel: "stable"
project_type: package

@ -0,0 +1,3 @@
## 0.0.1
* initial release.

@ -0,0 +1,21 @@
MIT License
Copyright (c) Flutter Quill Team
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -0,0 +1,26 @@
# Flutter Quill Test
## Testing
To aid in testing applications using the editor an extension to the flutter `WidgetTester` is provided which includes methods to simplify interacting with the editor in test cases.
Import the test utilities in your test file:
```dart
import 'package:flutter_quill/flutter_quill_test.dart';
```
and then enter text using `quillEnterText`:
```dart
await tester.quillEnterText(find.byType(QuillEditor), 'test\n');
```
## Contributing
We welcome contributions!
Please follow these guidelines when contributing to our project. See [CONTRIBUTING.md](./../CONTRIBUTING.md) for more details.
## License
This project is licensed under the [MIT License](LICENSE) - see the [LICENSE](LICENSE) file for details.

@ -0,0 +1,4 @@
include: package:flutter_lints/flutter.yaml
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options

@ -1,9 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_quill/flutter_quill.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import '../widgets/editor/editor.dart';
import '../widgets/raw_editor/raw_editor.dart';
/// Extends /// Extends
extension QuillEnterText on WidgetTester { extension QuillEnterText on WidgetTester {
/// Give the QuillEditor widget specified by [finder] the focus. /// Give the QuillEditor widget specified by [finder] the focus.
@ -44,10 +42,11 @@ extension QuillEnterText on WidgetTester {
/// `find.byType(QuillEditor)`. /// `find.byType(QuillEditor)`.
Future<void> quillUpdateEditingValue(Finder finder, String text) async { Future<void> quillUpdateEditingValue(Finder finder, String text) async {
return TestAsyncUtils.guard(() async { return TestAsyncUtils.guard(() async {
final editor = state<RawEditorState>( final editor = state<QuillRawEditorState>(
find.descendant( find.descendant(
of: finder, of: finder,
matching: find.byType(RawEditor, skipOffstage: finder.skipOffstage), matching:
find.byType(QuillRawEditor, skipOffstage: finder.skipOffstage),
matchRoot: true), matchRoot: true),
); );
testTextInput.updateEditingValue(TextEditingValue( testTextInput.updateEditingValue(TextEditingValue(

@ -0,0 +1,29 @@
name: flutter_quill_test
description: Testing for flutter_quill
version: 0.0.1
homepage: https://1o24bbs.com/c/bulletjournal/108
repository: https://github.com/singerdmx/flutter-quill/tree/master/flutter_quill_test
environment:
sdk: '>=3.1.5 <4.0.0'
flutter: ">=1.17.0"
dependencies:
flutter:
sdk: flutter
flutter_quill: ^8.2.1
flutter_test:
sdk: flutter
dev_dependencies:
flutter_lints: ^2.0.0
# In case you are working on changes for both libraries
# Comment the dependency_overrides section when publishing the package,
# then uncomment it back, this will be automated later
dependency_overrides:
flutter_quill:
path: ../
flutter:

@ -27,6 +27,7 @@ export 'src/widgets/default_styles.dart';
export 'src/widgets/editor/editor.dart'; export 'src/widgets/editor/editor.dart';
export 'src/widgets/embeds.dart'; export 'src/widgets/embeds.dart';
export 'src/widgets/link.dart' show LinkActionPickerDelegate, LinkMenuAction; export 'src/widgets/link.dart' show LinkActionPickerDelegate, LinkMenuAction;
export 'src/widgets/raw_editor/raw_editor.dart';
export 'src/widgets/style_widgets/style_widgets.dart'; export 'src/widgets/style_widgets/style_widgets.dart';
export 'src/widgets/toolbar/base_toolbar.dart'; export 'src/widgets/toolbar/base_toolbar.dart';
export 'src/widgets/toolbar/toolbar.dart'; export 'src/widgets/toolbar/toolbar.dart';

@ -15,12 +15,11 @@ import '../box.dart';
import '../cursor.dart'; import '../cursor.dart';
import '../delegate.dart'; import '../delegate.dart';
import '../float_cursor.dart'; import '../float_cursor.dart';
import '../raw_editor/raw_editor.dart';
import '../text_selection.dart'; import '../text_selection.dart';
/// Base interface for the editor state which defines contract used by /// Base interface for the editor state which defines contract used by
/// various mixins. /// various mixins.
abstract class EditorState extends State<RawEditor> abstract class EditorState extends State<QuillRawEditor>
implements TextSelectionDelegate { implements TextSelectionDelegate {
ScrollController get scrollController; ScrollController get scrollController;
@ -239,7 +238,7 @@ class QuillEditorState extends State<QuillEditor>
final child = QuillEditorProvider( final child = QuillEditorProvider(
editorConfigurations: configurations, editorConfigurations: configurations,
child: RawEditor( child: QuillRawEditor(
key: _editorKey, key: _editorKey,
controller: context.requireQuillController, controller: context.requireQuillController,
focusNode: widget.focusNode, focusNode: widget.focusNode,
@ -252,7 +251,7 @@ class QuillEditorState extends State<QuillEditor>
onLaunchUrl: configurations.onLaunchUrl, onLaunchUrl: configurations.onLaunchUrl,
contextMenuBuilder: showSelectionToolbar contextMenuBuilder: showSelectionToolbar
? (configurations.contextMenuBuilder ?? ? (configurations.contextMenuBuilder ??
RawEditor.defaultContextMenuBuilder) QuillRawEditor.defaultContextMenuBuilder)
: null, : null,
showSelectionHandles: isMobile(theme.platform), showSelectionHandles: isMobile(theme.platform),
showCursor: configurations.showCursor, showCursor: configurations.showCursor,

@ -55,8 +55,8 @@ import '../toolbar/buttons/search/search_dialog.dart';
import 'raw_editor_state_selection_delegate_mixin.dart'; import 'raw_editor_state_selection_delegate_mixin.dart';
import 'raw_editor_state_text_input_client_mixin.dart'; import 'raw_editor_state_text_input_client_mixin.dart';
class RawEditor extends StatefulWidget { class QuillRawEditor extends StatefulWidget {
const RawEditor({ const QuillRawEditor({
required this.controller, required this.controller,
required this.focusNode, required this.focusNode,
required this.scrollController, required this.scrollController,
@ -139,7 +139,7 @@ class RawEditor extends StatefulWidget {
static Widget defaultContextMenuBuilder( static Widget defaultContextMenuBuilder(
BuildContext context, BuildContext context,
RawEditorState state, QuillRawEditorState state,
) { ) {
return TextFieldTapRegion( return TextFieldTapRegion(
child: AdaptiveTextSelectionToolbar.buttonItems( child: AdaptiveTextSelectionToolbar.buttonItems(
@ -227,9 +227,10 @@ class RawEditor extends StatefulWidget {
/// Delegate for building the text selection handles and toolbar. /// Delegate for building the text selection handles and toolbar.
/// ///
/// The [RawEditor] widget used on its own will not trigger the display /// The [QuillRawEditor] widget used on its own will not trigger the display
/// of the selection toolbar by itself. The toolbar is shown by calling /// of the selection toolbar by itself. The toolbar is shown by calling
/// [RawEditorState.showToolbar] in response to an appropriate user event. /// [QuillRawEditorState.showToolbar] in response to
/// an appropriate user event.
final TextSelectionControls selectionCtrls; final TextSelectionControls selectionCtrls;
/// The appearance of the keyboard. /// The appearance of the keyboard.
@ -287,14 +288,14 @@ class RawEditor extends StatefulWidget {
final ContentInsertionConfiguration? contentInsertionConfiguration; final ContentInsertionConfiguration? contentInsertionConfiguration;
@override @override
State<StatefulWidget> createState() => RawEditorState(); State<StatefulWidget> createState() => QuillRawEditorState();
} }
class RawEditorState extends EditorState class QuillRawEditorState extends EditorState
with with
AutomaticKeepAliveClientMixin<RawEditor>, AutomaticKeepAliveClientMixin<QuillRawEditor>,
WidgetsBindingObserver, WidgetsBindingObserver,
TickerProviderStateMixin<RawEditor>, TickerProviderStateMixin<QuillRawEditor>,
RawEditorStateTextInputClientMixin, RawEditorStateTextInputClientMixin,
RawEditorStateSelectionDelegateMixin { RawEditorStateSelectionDelegateMixin {
final GlobalKey _editorKey = GlobalKey(); final GlobalKey _editorKey = GlobalKey();
@ -354,7 +355,7 @@ class RawEditorState extends EditorState
} }
/// Returns the [ContextMenuButtonItem]s representing the buttons in this /// Returns the [ContextMenuButtonItem]s representing the buttons in this
/// platform's default selection menu for [RawEditor]. /// platform's default selection menu for [QuillRawEditor].
/// ///
/// Copied from [EditableTextState]. /// Copied from [EditableTextState].
List<ContextMenuButtonItem> get contextMenuButtonItems { List<ContextMenuButtonItem> get contextMenuButtonItems {
@ -390,7 +391,7 @@ class RawEditorState extends EditorState
} }
/// Gets the line heights at the start and end of the selection for the given /// Gets the line heights at the start and end of the selection for the given
/// [RawEditorState]. /// [QuillRawEditorState].
/// ///
/// Copied from [EditableTextState]. /// Copied from [EditableTextState].
_GlyphHeights _getGlyphHeights() { _GlyphHeights _getGlyphHeights() {
@ -1171,7 +1172,7 @@ class RawEditorState extends EditorState
} }
@override @override
void didUpdateWidget(RawEditor oldWidget) { void didUpdateWidget(QuillRawEditor oldWidget) {
super.didUpdateWidget(oldWidget); super.didUpdateWidget(oldWidget);
_cursorCont.show.value = widget.showCursor; _cursorCont.show.value = widget.showCursor;
@ -2208,7 +2209,7 @@ class _DeleteTextAction<T extends DirectionalTextEditingIntent>
extends ContextAction<T> { extends ContextAction<T> {
_DeleteTextAction(this.state, this.getTextBoundariesForIntent); _DeleteTextAction(this.state, this.getTextBoundariesForIntent);
final RawEditorState state; final QuillRawEditorState state;
final _TextBoundary Function(T intent) getTextBoundariesForIntent; final _TextBoundary Function(T intent) getTextBoundariesForIntent;
TextRange _expandNonCollapsedRange(TextEditingValue value) { TextRange _expandNonCollapsedRange(TextEditingValue value) {
@ -2280,7 +2281,7 @@ class _UpdateTextSelectionAction<T extends DirectionalCaretMovementIntent>
_UpdateTextSelectionAction(this.state, this.ignoreNonCollapsedSelection, _UpdateTextSelectionAction(this.state, this.ignoreNonCollapsedSelection,
this.getTextBoundariesForIntent); this.getTextBoundariesForIntent);
final RawEditorState state; final QuillRawEditorState state;
final bool ignoreNonCollapsedSelection; final bool ignoreNonCollapsedSelection;
final _TextBoundary Function(T intent) getTextBoundariesForIntent; final _TextBoundary Function(T intent) getTextBoundariesForIntent;
@ -2366,7 +2367,7 @@ class _ExtendSelectionOrCaretPositionAction extends ContextAction<
_ExtendSelectionOrCaretPositionAction( _ExtendSelectionOrCaretPositionAction(
this.state, this.getTextBoundariesForIntent); this.state, this.getTextBoundariesForIntent);
final RawEditorState state; final QuillRawEditorState state;
final _TextBoundary Function( final _TextBoundary Function(
ExtendSelectionToNextWordBoundaryOrCaretLocationIntent intent) ExtendSelectionToNextWordBoundaryOrCaretLocationIntent intent)
getTextBoundariesForIntent; getTextBoundariesForIntent;
@ -2417,7 +2418,7 @@ class _UpdateTextSelectionToAdjacentLineAction<
T extends DirectionalCaretMovementIntent> extends ContextAction<T> { T extends DirectionalCaretMovementIntent> extends ContextAction<T> {
_UpdateTextSelectionToAdjacentLineAction(this.state); _UpdateTextSelectionToAdjacentLineAction(this.state);
final RawEditorState state; final QuillRawEditorState state;
QuillVerticalCaretMovementRun? _verticalMovementRun; QuillVerticalCaretMovementRun? _verticalMovementRun;
TextSelection? _runSelection; TextSelection? _runSelection;
@ -2484,7 +2485,7 @@ class _UpdateTextSelectionToAdjacentLineAction<
class _SelectAllAction extends ContextAction<SelectAllTextIntent> { class _SelectAllAction extends ContextAction<SelectAllTextIntent> {
_SelectAllAction(this.state); _SelectAllAction(this.state);
final RawEditorState state; final QuillRawEditorState state;
@override @override
Object? invoke(SelectAllTextIntent intent, [BuildContext? context]) { Object? invoke(SelectAllTextIntent intent, [BuildContext? context]) {
@ -2506,7 +2507,7 @@ class _SelectAllAction extends ContextAction<SelectAllTextIntent> {
class _CopySelectionAction extends ContextAction<CopySelectionTextIntent> { class _CopySelectionAction extends ContextAction<CopySelectionTextIntent> {
_CopySelectionAction(this.state); _CopySelectionAction(this.state);
final RawEditorState state; final QuillRawEditorState state;
@override @override
void invoke(CopySelectionTextIntent intent, [BuildContext? context]) { void invoke(CopySelectionTextIntent intent, [BuildContext? context]) {
@ -2532,7 +2533,7 @@ class _HideSelectionToolbarAction
extends ContextAction<HideSelectionToolbarIntent> { extends ContextAction<HideSelectionToolbarIntent> {
_HideSelectionToolbarAction(this.state); _HideSelectionToolbarAction(this.state);
final RawEditorState state; final QuillRawEditorState state;
@override @override
void invoke(HideSelectionToolbarIntent intent, [BuildContext? context]) { void invoke(HideSelectionToolbarIntent intent, [BuildContext? context]) {
@ -2546,7 +2547,7 @@ class _HideSelectionToolbarAction
class _UndoKeyboardAction extends ContextAction<UndoTextIntent> { class _UndoKeyboardAction extends ContextAction<UndoTextIntent> {
_UndoKeyboardAction(this.state); _UndoKeyboardAction(this.state);
final RawEditorState state; final QuillRawEditorState state;
@override @override
void invoke(UndoTextIntent intent, [BuildContext? context]) { void invoke(UndoTextIntent intent, [BuildContext? context]) {
@ -2562,7 +2563,7 @@ class _UndoKeyboardAction extends ContextAction<UndoTextIntent> {
class _RedoKeyboardAction extends ContextAction<RedoTextIntent> { class _RedoKeyboardAction extends ContextAction<RedoTextIntent> {
_RedoKeyboardAction(this.state); _RedoKeyboardAction(this.state);
final RawEditorState state; final QuillRawEditorState state;
@override @override
void invoke(RedoTextIntent intent, [BuildContext? context]) { void invoke(RedoTextIntent intent, [BuildContext? context]) {
@ -2585,7 +2586,7 @@ class ToggleTextStyleIntent extends Intent {
class _ToggleTextStyleAction extends Action<ToggleTextStyleIntent> { class _ToggleTextStyleAction extends Action<ToggleTextStyleIntent> {
_ToggleTextStyleAction(this.state); _ToggleTextStyleAction(this.state);
final RawEditorState state; final QuillRawEditorState state;
bool _isStyleActive(Attribute styleAttr, Map<String, Attribute> attrs) { bool _isStyleActive(Attribute styleAttr, Map<String, Attribute> attrs) {
if (styleAttr.key == Attribute.list.key) { if (styleAttr.key == Attribute.list.key) {
@ -2620,7 +2621,7 @@ class IndentSelectionIntent extends Intent {
class _IndentSelectionAction extends Action<IndentSelectionIntent> { class _IndentSelectionAction extends Action<IndentSelectionIntent> {
_IndentSelectionAction(this.state); _IndentSelectionAction(this.state);
final RawEditorState state; final QuillRawEditorState state;
@override @override
void invoke(IndentSelectionIntent intent, [BuildContext? context]) { void invoke(IndentSelectionIntent intent, [BuildContext? context]) {
@ -2639,7 +2640,7 @@ class OpenSearchIntent extends Intent {
class _OpenSearchAction extends ContextAction<OpenSearchIntent> { class _OpenSearchAction extends ContextAction<OpenSearchIntent> {
_OpenSearchAction(this.state); _OpenSearchAction(this.state);
final RawEditorState state; final QuillRawEditorState state;
@override @override
Future invoke(OpenSearchIntent intent, [BuildContext? context]) async { Future invoke(OpenSearchIntent intent, [BuildContext? context]) async {
@ -2671,7 +2672,7 @@ class ApplyHeaderIntent extends Intent {
class _ApplyHeaderAction extends Action<ApplyHeaderIntent> { class _ApplyHeaderAction extends Action<ApplyHeaderIntent> {
_ApplyHeaderAction(this.state); _ApplyHeaderAction(this.state);
final RawEditorState state; final QuillRawEditorState state;
Attribute<dynamic> _getHeaderValue() { Attribute<dynamic> _getHeaderValue() {
return state.controller return state.controller
@ -2699,7 +2700,7 @@ class ApplyCheckListIntent extends Intent {
class _ApplyCheckListAction extends Action<ApplyCheckListIntent> { class _ApplyCheckListAction extends Action<ApplyCheckListIntent> {
_ApplyCheckListAction(this.state); _ApplyCheckListAction(this.state);
final RawEditorState state; final QuillRawEditorState state;
bool _getIsToggled() { bool _getIsToggled() {
final attrs = state.controller.getSelectionStyle().attributes; final attrs = state.controller.getSelectionStyle().attributes;
@ -2737,7 +2738,7 @@ class ApplyLinkIntent extends Intent {
class ApplyLinkAction extends Action<ApplyLinkIntent> { class ApplyLinkAction extends Action<ApplyLinkIntent> {
ApplyLinkAction(this.state); ApplyLinkAction(this.state);
final RawEditorState state; final QuillRawEditorState state;
@override @override
Object? invoke(ApplyLinkIntent intent) async { Object? invoke(ApplyLinkIntent intent) async {
@ -2768,7 +2769,7 @@ class InsertEmbedIntent extends Intent {
} }
/// Signature for a widget builder that builds a context menu for the given /// Signature for a widget builder that builds a context menu for the given
/// [RawEditorState]. /// [QuillRawEditorState].
/// ///
/// See also: /// See also:
/// ///
@ -2776,7 +2777,7 @@ class InsertEmbedIntent extends Intent {
/// [EditableText] /// [EditableText]
typedef QuillEditorContextMenuBuilder = Widget Function( typedef QuillEditorContextMenuBuilder = Widget Function(
BuildContext context, BuildContext context,
RawEditorState rawEditorState, QuillRawEditorState rawEditorState,
); );
class _GlyphHeights { class _GlyphHeights {

@ -1,6 +1,6 @@
name: flutter_quill name: flutter_quill
description: A rich text editor built for the modern Android, iOS, web and desktop platforms. It is the WYSIWYG editor and a Quill component for Flutter. description: A rich text editor built for the modern Android, iOS, web and desktop platforms. It is the WYSIWYG editor and a Quill component for Flutter.
version: 8.2.1 version: 8.2.2
homepage: https://1o24bbs.com/c/bulletjournal/108 homepage: https://1o24bbs.com/c/bulletjournal/108
repository: https://github.com/singerdmx/flutter-quill repository: https://github.com/singerdmx/flutter-quill
@ -49,12 +49,13 @@ dependencies:
pasteboard: ^0.2.0 pasteboard: ^0.2.0
equatable: ^2.0.5 equatable: ^2.0.5
flutter_animate: ^4.2.0+1 flutter_animate: ^4.2.0+1
flutter_test:
sdk: flutter
meta: ^1.9.1 meta: ^1.9.1
flutter: flutter:
uses-material-design: true uses-material-design: true
dev_dependencies: dev_dependencies:
lints: ^3.0.0 lints: ^3.0.0
flutter_test:
sdk: flutter
flutter_quill_test:
path: ./flutter_quill_test

@ -1,6 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_quill/flutter_quill.dart'; import 'package:flutter_quill/flutter_quill.dart';
import 'package:flutter_quill/flutter_quill_test.dart'; import 'package:flutter_quill_test/flutter_quill_test.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
void main() { void main() {

@ -3,8 +3,7 @@ import 'dart:convert' show jsonDecode;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_quill/flutter_quill.dart'; import 'package:flutter_quill/flutter_quill.dart';
import 'package:flutter_quill/flutter_quill_test.dart'; import 'package:flutter_quill_test/flutter_quill_test.dart';
import 'package:flutter_quill/src/widgets/raw_editor/raw_editor.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
void main() { void main() {
@ -95,7 +94,7 @@ void main() {
expect(latestUri, equals(uri)); expect(latestUri, equals(uri));
}); });
Widget customBuilder(BuildContext context, RawEditorState state) { Widget customBuilder(BuildContext context, QuillRawEditorState state) {
return AdaptiveTextSelectionToolbar( return AdaptiveTextSelectionToolbar(
anchors: state.contextMenuAnchors, anchors: state.contextMenuAnchors,
children: [ children: [

Loading…
Cancel
Save