File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -110,8 +110,7 @@ Widget _defaultEmbedBuilder(
110
110
: Image .file (io.File (imageUrl));
111
111
case 'video' :
112
112
final videoUrl = node.value.data;
113
- if (videoUrl.contains ('youtube.com' ) ||
114
- videoUrl.contains ('youtu.be' )) {
113
+ if (videoUrl.contains ('youtube.com' ) || videoUrl.contains ('youtu.be' )) {
115
114
return YoutubeVideoApp (
116
115
videoUrl: videoUrl, context: context, readOnly: readOnly);
117
116
}
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import 'editor.dart';
21
21
import 'text_block.dart' ;
22
22
import 'text_line.dart' ;
23
23
import 'video_app.dart' ;
24
+ import 'youtube_video_app.dart' ;
24
25
25
26
class QuillSimpleViewer extends StatefulWidget {
26
27
const QuillSimpleViewer ({
@@ -113,6 +114,10 @@ class _QuillSimpleViewerState extends State<QuillSimpleViewer>
113
114
: Image .file (io.File (imageUrl));
114
115
case 'video' :
115
116
final videoUrl = node.value.data;
117
+ if (videoUrl.contains ('youtube.com' ) || videoUrl.contains ('youtu.be' )) {
118
+ return YoutubeVideoApp (
119
+ videoUrl: videoUrl, context: context, readOnly: readOnly);
120
+ }
116
121
return VideoApp (
117
122
videoUrl: videoUrl, context: context, readOnly: readOnly);
118
123
default :
You can’t perform that action at this time.
0 commit comments