Only launch video as link when read only

pull/307/head
Xin Yao 4 years ago
parent bb38db5ed0
commit b12a28b625
  1. 3
      CHANGELOG.md
  2. 5
      lib/src/widgets/video_app.dart
  3. 2
      pubspec.yaml

@ -1,3 +1,6 @@
## [1.7.0]
* Support video.
## [1.6.4] ## [1.6.4]
* Bug fix for clear format button. * Bug fix for clear format button.

@ -40,6 +40,7 @@ class _VideoAppState extends State<VideoApp> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
final defaultStyles = DefaultStyles.getInstance(context); final defaultStyles = DefaultStyles.getInstance(context);
if (!_controller.value.isInitialized || _controller.value.hasError) { if (!_controller.value.isInitialized || _controller.value.hasError) {
if (widget.readOnly) {
return RichText( return RichText(
text: TextSpan( text: TextSpan(
text: widget.videoUrl, text: widget.videoUrl,
@ -49,6 +50,10 @@ class _VideoAppState extends State<VideoApp> {
); );
} }
return RichText(
text: TextSpan(text: widget.videoUrl, style: defaultStyles.link));
}
return Container( return Container(
height: 300, height: 300,
child: InkWell( child: InkWell(

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

Loading…
Cancel
Save