Upgrade to 1.7.1

pull/310/head
Xin Yao 4 years ago
parent d3e5d5603e
commit 34e6a35795
  1. 3
      CHANGELOG.md
  2. 10
      lib/src/widgets/editor.dart
  3. 1
      lib/src/widgets/youtube_video_app.dart
  4. 2
      pubspec.yaml

@ -1,3 +1,6 @@
## [1.7.1]
* Support Youtube video.
## [1.7.0]
* Support video.

@ -8,7 +8,6 @@ import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter_quill/src/widgets/youtube_video_app.dart';
import 'package:string_validator/string_validator.dart';
import 'package:url_launcher/url_launcher.dart';
@ -27,6 +26,7 @@ import 'image.dart';
import 'raw_editor.dart';
import 'text_selection.dart';
import 'video_app.dart';
import 'youtube_video_app.dart';
const linkPrefixes = [
'mailto:', // email
@ -110,14 +110,12 @@ Widget _defaultEmbedBuilder(
: Image.file(io.File(imageUrl));
case 'video':
final videoUrl = node.value.data;
if (videoUrl.toString().contains('www.youtube.com') ||
videoUrl.toString().contains('youtu.be')) {
if (videoUrl.contains('youtube.com') ||
videoUrl.contains('youtu.be')) {
return YoutubeVideoApp(
videoUrl: videoUrl, context: context, readOnly: readOnly);
} else {
return VideoApp(
videoUrl: videoUrl, context: context, readOnly: readOnly);
}
return VideoApp(videoUrl: videoUrl, context: context, readOnly: readOnly);
default:
throw UnimplementedError(
'Embeddable type "${node.value.type}" is not supported by default '

@ -37,7 +37,6 @@ class _YoutubeVideoAppState extends State<YoutubeVideoApp> {
Widget build(BuildContext context) {
final defaultStyles = DefaultStyles.getInstance(context);
if (_youtubeController == null) {
print('problem with youtube video');
if (widget.readOnly) {
return RichText(
text: TextSpan(

@ -1,6 +1,6 @@
name: flutter_quill
description: A rich text editor supporting mobile and web (Demo App @ bulletjournal.us)
version: 1.7.0
version: 1.7.1
#author: bulletjournal
homepage: https://bulletjournal.us/home/index.html
repository: https://github.com/singerdmx/flutter-quill

Loading…
Cancel
Save