Fix warrnings

pull/1507/head
Ellet 1 year ago committed by X Code
parent eeb720e097
commit 0c6d33d0fc
  1. 2
      CHANGELOG.md
  2. 2
      example/lib/pages/home_page.dart
  3. 15
      flutter_quill_extensions/lib/presentation/embeds/toolbar/utils/image_video_utils.dart
  4. 15
      flutter_quill_extensions/lib/presentation/embeds/toolbar/video_button/video_button.dart
  5. 2
      flutter_quill_extensions/lib/presentation/embeds/utils.dart

@ -1,5 +1,5 @@
## [8.1.12] ## [8.1.12]
- Add the option to add configurations for `fresh_quill_extensions` using `extraConfigurations` - Add the option to add configurations for `flutter_quill_extensions` using `extraConfigurations`
## [8.1.11] ## [8.1.11]
- Follow dart best practices by using `lints` and remove `pedantic` as well `platform` since they are not used - Follow dart best practices by using `lints` and remove `pedantic` as well `platform` since they are not used

@ -5,7 +5,6 @@ import 'dart:convert';
import 'dart:io' show File, Platform; import 'dart:io' show File, Platform;
import 'dart:ui'; import 'dart:ui';
import 'package:file_picker/file_picker.dart';
import 'package:filesystem_picker/filesystem_picker.dart'; import 'package:filesystem_picker/filesystem_picker.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -14,7 +13,6 @@ import 'package:flutter_quill/extensions.dart';
import 'package:flutter_quill/flutter_quill.dart'; import 'package:flutter_quill/flutter_quill.dart';
import 'package:flutter_quill_extensions/flutter_quill_extensions.dart'; import 'package:flutter_quill_extensions/flutter_quill_extensions.dart';
import 'package:flutter_quill_extensions/presentation/embeds/embed_types/image.dart'; import 'package:flutter_quill_extensions/presentation/embeds/embed_types/image.dart';
import 'package:flutter_quill_extensions/presentation/models/config/toolbar/buttons/video.dart';
import 'package:path/path.dart' as path; import 'package:path/path.dart' as path;
import 'package:path_provider/path_provider.dart'; import 'package:path_provider/path_provider.dart';

@ -126,7 +126,8 @@ class TypeLinkDialogState extends State<TypeLinkDialog> {
// color: Colors.orangeAccent, // color: Colors.orangeAccent,
// ), // ),
// label: Text('Gallery'.i18n), // label: Text('Gallery'.i18n),
// onPressed: () => Navigator.pop(ctx, MediaPickSetting.gallery), // onPressed: () => Navigator.pop(ctx,
// MediaPickSetting.gallery),
// ), // ),
// TextButton.icon( // TextButton.icon(
// icon: const Icon( // icon: const Icon(
@ -156,7 +157,8 @@ class TypeLinkDialogState extends State<TypeLinkDialog> {
// imageUrl = await webImagePickImpl(onImagePickCallback); // imageUrl = await webImagePickImpl(onImagePickCallback);
// return; // return;
// } // }
// final file = await ImagePicker().pickImage(source: ImageSource.gallery); // final file = await ImagePicker()
//.pickImage(source: ImageSource.gallery);
// imageUrl = file?.path; // imageUrl = file?.path;
// if (imageUrl == null) { // if (imageUrl == null) {
// return; // return;
@ -166,7 +168,8 @@ class TypeLinkDialogState extends State<TypeLinkDialog> {
// } else { // } else {
// assert(filePickImpl != null, 'Desktop must provide filePickImpl'); // assert(filePickImpl != null, 'Desktop must provide filePickImpl');
// imageUrl = // imageUrl =
// await _pickImageDesktop(context, filePickImpl!, onImagePickCallback); // await _pickImageDesktop
//(context, filePickImpl!, onImagePickCallback);
// } // }
// if (imageUrl == null) { // if (imageUrl == null) {
@ -227,11 +230,13 @@ class TypeLinkDialogState extends State<TypeLinkDialog> {
// } else { // } else {
// assert(filePickImpl != null, 'Desktop must provide filePickImpl'); // assert(filePickImpl != null, 'Desktop must provide filePickImpl');
// videoUrl = // videoUrl =
// await _pickVideoDesktop(context, filePickImpl!, onVideoPickCallback); // await _pickVideoDesktop(context, filePickImpl!,
// onVideoPickCallback);
// } // }
// if (videoUrl != null) { // if (videoUrl != null) {
// controller.replaceText(index, length, BlockEmbed.video(videoUrl), null); // controller.replaceText(index, length, BlockEmbed.video(videoUrl),
// null);
// } // }
// } // }

@ -6,7 +6,6 @@ import 'package:flutter_quill/flutter_quill.dart';
import '../../../../logic/models/config/configurations.dart'; import '../../../../logic/models/config/configurations.dart';
import '../../../../logic/services/image_picker/image_options.dart'; import '../../../../logic/services/image_picker/image_options.dart';
import '../../../models/config/toolbar/buttons/video.dart'; import '../../../models/config/toolbar/buttons/video.dart';
import '../../embed_types.dart';
import '../../embed_types/video.dart'; import '../../embed_types/video.dart';
import '../utils/image_video_utils.dart'; import '../utils/image_video_utils.dart';
import 'select_video_source.dart'; import 'select_video_source.dart';
@ -173,12 +172,12 @@ class QuillToolbarVideoButton extends StatelessWidget {
return value; return value;
} }
void _linkSubmitted(String? value) { // void _linkSubmitted(String? value) {
if (value != null && value.isNotEmpty) { // if (value != null && value.isNotEmpty) {
final index = controller.selection.baseOffset; // final index = controller.selection.baseOffset;
final length = controller.selection.extentOffset - index; // final length = controller.selection.extentOffset - index;
controller.replaceText(index, length, BlockEmbed.video(value), null); // controller.replaceText(index, length, BlockEmbed.video(value), null);
} // }
} // }
} }

@ -2,9 +2,7 @@ import 'dart:io' show File;
import 'package:flutter/foundation.dart' show immutable; import 'package:flutter/foundation.dart' show immutable;
import 'package:flutter/widgets.dart' show BuildContext; import 'package:flutter/widgets.dart' show BuildContext;
import 'package:flutter_quill/flutter_quill.dart';
import '../../logic/models/config/configurations.dart'; import '../../logic/models/config/configurations.dart';
import '../../logic/services/image_saver/s_image_saver.dart';
// I would like to orgnize the project structure and the code more // I would like to orgnize the project structure and the code more
// but here I don't want to change too much since that is a community project // but here I don't want to change too much since that is a community project

Loading…
Cancel
Save