chore: add TODO in QuillToolbarVideoButton

pull/1916/head
Ellet 10 months ago
parent 6688311313
commit 33b6986581
  1. 28
      flutter_quill_extensions/lib/embeds/video/toolbar/video_button.dart

@ -9,6 +9,8 @@ import '../../others/image_video_utils.dart';
import '../video.dart';
import 'select_video_source.dart';
// TODO: Add custom callback to validate the video link input
class QuillToolbarVideoButton extends StatelessWidget {
const QuillToolbarVideoButton({
required this.controller,
@ -72,11 +74,6 @@ class QuillToolbarVideoButton extends StatelessWidget {
final childBuilder =
options.childBuilder ?? baseButtonExtraOptions(context)?.childBuilder;
// final iconColor =
// iconTheme?.iconUnselectedFillColor ?? theme.iconTheme.color;
// final iconFillColor = iconTheme?.iconUnselectedFillColor ??
// (options.fillColor ?? theme.canvasColor);
if (childBuilder != null) {
return childBuilder(
QuillToolbarVideoButtonOptions(
@ -150,18 +147,6 @@ class QuillToolbarVideoButton extends StatelessWidget {
.onVideoInsertCallback(videoUrl, controller);
await options.videoConfigurations.onVideoInsertedCallback?.call(videoUrl);
}
// if (options.onVideoPickCallback != null) {
// final selector = options.mediaPickSettingSelector ??
// ImageVideoUtils.selectMediaPickSetting;
// final source = await selector(context);
// if (source != null) {
// if (source == MediaPickSetting.gallery) {
// } else {
// await _typeLink(context);
// }
// }
// } else {}
}
Future<String?> _typeLink(BuildContext context) async {
@ -176,13 +161,4 @@ class QuillToolbarVideoButton extends StatelessWidget {
);
return value;
}
// void _linkSubmitted(String? value) {
// if (value != null && value.isNotEmpty) {
// final index = controller.selection.baseOffset;
// final length = controller.selection.extentOffset - index;
// controller.replaceText(index, length, BlockEmbed.video(value), null);
// }
// }
}

Loading…
Cancel
Save