Fix the structure of flutter quill extensions, fix context use

pull/1657/head
Ellet 1 year ago
parent 788a9c6457
commit 6e4afb2179
  1. 2
      flutter_quill_extensions/lib/embeds/formula/toolbar/formula_button.dart
  2. 2
      flutter_quill_extensions/lib/embeds/image/editor/image_embed.dart
  3. 2
      flutter_quill_extensions/lib/embeds/image/editor/image_menu.dart
  4. 2
      flutter_quill_extensions/lib/embeds/image/editor/image_web_embed.dart
  5. 2
      flutter_quill_extensions/lib/embeds/image/toolbar/image_button.dart
  6. 2
      flutter_quill_extensions/lib/embeds/others/camera_button/camera_button.dart
  7. 2
      flutter_quill_extensions/lib/embeds/video/editor/video_embed.dart
  8. 2
      flutter_quill_extensions/lib/embeds/video/editor/video_web_embed.dart
  9. 7
      flutter_quill_extensions/lib/embeds/video/toolbar/video_button.dart
  10. 2
      flutter_quill_extensions/lib/embeds/widgets/image.dart
  11. 34
      flutter_quill_extensions/lib/flutter_quill_extensions.dart
  12. 2
      flutter_quill_extensions/lib/models/config/camera/camera_configurations.dart
  13. 0
      flutter_quill_extensions/lib/models/config/formula/formula_configurations.dart
  14. 0
      flutter_quill_extensions/lib/models/config/image/editor/image_configurations.dart
  15. 0
      flutter_quill_extensions/lib/models/config/image/editor/image_web_configurations.dart
  16. 0
      flutter_quill_extensions/lib/models/config/image/toolbar/image_configurations.dart
  17. 2
      flutter_quill_extensions/lib/models/config/media/media_button_configurations.dart
  18. 0
      flutter_quill_extensions/lib/models/config/video/editor/video_configurations.dart
  19. 0
      flutter_quill_extensions/lib/models/config/video/editor/video_web_configurations.dart
  20. 0
      flutter_quill_extensions/lib/models/config/video/toolbar/video_configurations.dart

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_quill/flutter_quill.dart';
import '../../../models/config/toolbar/buttons/formula_configurations.dart';
import '../../../models/config/formula/formula_configurations.dart';
class QuillToolbarFormulaButton extends StatelessWidget {
const QuillToolbarFormulaButton({

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_quill/flutter_quill.dart' hide OptionalSize;
import 'package:flutter_quill/translations.dart';
import '../../../models/config/editor/image/image_configurations.dart';
import '../../../models/config/image/editor/image_configurations.dart';
import '../../../models/config/shared_configurations.dart';
import '../../../utils/element_utils/element_utils.dart';
import '../../widgets/image.dart';

@ -6,7 +6,7 @@ import 'package:flutter_quill/flutter_quill.dart'
import 'package:flutter_quill/translations.dart';
import 'package:super_clipboard/super_clipboard.dart';
import '../../../models/config/editor/image/image_configurations.dart';
import '../../../models/config/image/editor/image_configurations.dart';
import '../../../models/config/shared_configurations.dart';
import '../../../services/image_saver/s_image_saver.dart';
import '../../../utils/element_utils/element_utils.dart';

@ -3,7 +3,7 @@ import 'package:flutter/widgets.dart';
import 'package:flutter_quill/flutter_quill.dart';
import 'package:universal_html/html.dart' as html;
import '../../../models/config/editor/image/image_web_configurations.dart';
import '../../../models/config/image/editor/image_web_configurations.dart';
import '../../../utils/dart_ui/dart_ui_fake.dart'
if (dart.library.html) '../../../utils/dart_ui/dart_ui_real.dart' as ui;
import '../../../utils/element_utils/element_web_utils.dart';

@ -5,7 +5,7 @@ import 'package:flutter_quill/flutter_quill.dart';
import 'package:flutter_quill/translations.dart';
import '../../../models/config/shared_configurations.dart';
import '../../../models/config/toolbar/buttons/image_configurations.dart';
import '../../../models/config/image/toolbar/image_configurations.dart';
import '../../../services/image_picker/image_picker.dart';
import '../../others/image_video_utils.dart';
import '../editor/image_embed_types.dart';

@ -11,7 +11,7 @@ import 'package:flutter_quill/flutter_quill.dart'
import 'package:flutter_quill/translations.dart';
import '../../../models/config/shared_configurations.dart';
import '../../../models/config/toolbar/buttons/camera_configurations.dart';
import '../../../models/config/camera/camera_configurations.dart';
import '../../../services/image_picker/image_options.dart';
import 'camera_types.dart';
import 'select_camera_action.dart';

@ -2,7 +2,7 @@ import 'package:flutter/foundation.dart' show kIsWeb;
import 'package:flutter/material.dart';
import 'package:flutter_quill/flutter_quill.dart';
import '../../../models/config/editor/video/video_configurations.dart';
import '../../../models/config/video/editor/video_configurations.dart';
import '../../../utils/element_utils/element_utils.dart';
import '../../../utils/utils.dart';
import '../../widgets/video_app.dart';

@ -4,7 +4,7 @@ import 'package:universal_html/html.dart' as html;
import 'package:youtube_player_flutter/youtube_player_flutter.dart'
show YoutubePlayer;
import '../../../models/config/editor/video/video_web_configurations.dart';
import '../../../models/config/video/editor/video_web_configurations.dart';
import '../../../utils/dart_ui/dart_ui_fake.dart'
if (dart.library.html) '../../../utils/dart_ui/dart_ui_real.dart' as ui;
import '../../../utils/element_utils/element_web_utils.dart';

@ -1,11 +1,9 @@
// ignore_for_file: use_build_context_synchronously
import 'package:flutter/material.dart';
import 'package:flutter_quill/flutter_quill.dart';
import 'package:flutter_quill/translations.dart';
import '../../../models/config/shared_configurations.dart';
import '../../../models/config/toolbar/buttons/video_configurations.dart';
import '../../../models/config/video/toolbar/video_configurations.dart';
import '../../../services/image_picker/image_options.dart';
import '../../others/image_video_utils.dart';
import '../video.dart';
@ -141,7 +139,8 @@ class QuillToolbarVideoButton extends StatelessWidget {
(await imagePickerService.pickVideo(source: ImageSource.gallery))?.path,
InsertVideoSource.camera =>
(await imagePickerService.pickVideo(source: ImageSource.camera))?.path,
InsertVideoSource.link => await _typeLink(context),
InsertVideoSource.link =>
context.mounted ? await _typeLink(context) : null,
};
if (videoUrl == null) {
return;

@ -6,7 +6,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_quill/flutter_quill.dart';
import 'package:photo_view/photo_view.dart';
import '../../models/config/editor/image/image_configurations.dart';
import '../../models/config/image/editor/image_configurations.dart';
import '../../utils/utils.dart';
import '../image/editor/image_embed_types.dart';

@ -13,14 +13,14 @@ import 'embeds/others/camera_button/camera_button.dart';
import 'embeds/video/editor/video_embed.dart';
import 'embeds/video/editor/video_web_embed.dart';
import 'embeds/video/toolbar/video_button.dart';
import 'models/config/editor/image/image_configurations.dart';
import 'models/config/editor/image/image_web_configurations.dart';
import 'models/config/editor/video/video_configurations.dart';
import 'models/config/editor/video/video_web_configurations.dart';
import 'models/config/toolbar/buttons/camera_configurations.dart';
import 'models/config/toolbar/buttons/image_configurations.dart';
import 'models/config/toolbar/buttons/media_button_configurations.dart';
import 'models/config/toolbar/buttons/video_configurations.dart';
import 'models/config/image/editor/image_configurations.dart';
import 'models/config/image/editor/image_web_configurations.dart';
import 'models/config/video/editor/video_configurations.dart';
import 'models/config/video/editor/video_web_configurations.dart';
import 'models/config/camera/camera_configurations.dart';
import 'models/config/image/toolbar/image_configurations.dart';
import 'models/config/media/media_button_configurations.dart';
import 'models/config/video/toolbar/video_configurations.dart';
export 'embeds/embed_types.dart';
export 'embeds/formula/toolbar/formula_button.dart';
@ -36,16 +36,16 @@ export 'embeds/video/editor/video_web_embed.dart';
export 'embeds/video/toolbar/video_button.dart';
export 'embeds/video/video.dart';
export 'extensions/controller_ext.dart';
export 'models/config/editor/image/image_configurations.dart';
export 'models/config/editor/image/image_web_configurations.dart';
export 'models/config/editor/video/video_configurations.dart';
export 'models/config/editor/video/video_web_configurations.dart';
export 'models/config/image/editor/image_configurations.dart';
export 'models/config/image/editor/image_web_configurations.dart';
export 'models/config/video/editor/video_configurations.dart';
export 'models/config/video/editor/video_web_configurations.dart';
export 'models/config/shared_configurations.dart';
export 'models/config/toolbar/buttons/camera_configurations.dart';
export 'models/config/toolbar/buttons/formula_configurations.dart';
export 'models/config/toolbar/buttons/image_configurations.dart';
export 'models/config/toolbar/buttons/media_button_configurations.dart';
export 'models/config/toolbar/buttons/video_configurations.dart';
export 'models/config/camera/camera_configurations.dart';
export 'models/config/formula/formula_configurations.dart';
export 'models/config/image/toolbar/image_configurations.dart';
export 'models/config/media/media_button_configurations.dart';
export 'models/config/video/toolbar/video_configurations.dart';
export 'utils/utils.dart';
@immutable

@ -1,7 +1,7 @@
import 'package:flutter/widgets.dart' show Color;
import 'package:flutter_quill/flutter_quill.dart';
import '../../../../embeds/others/camera_button/camera_types.dart';
import '../../../embeds/others/camera_button/camera_types.dart';
class QuillToolbarCameraButtonExtraOptions
extends QuillToolbarBaseButtonExtraOptions {

@ -2,7 +2,7 @@ import 'package:flutter/widgets.dart' show AutovalidateMode;
import 'package:flutter/widgets.dart' show Color, Size;
import 'package:flutter_quill/flutter_quill.dart';
import '../../../../embeds/embed_types.dart';
import '../../../embeds/embed_types.dart';
class QuillToolbarMediaButtonExtraOptions
extends QuillToolbarBaseButtonExtraOptions {
Loading…
Cancel
Save