Skip to content

Commit 7fadc89

Browse files
EchoElletgithub-actions[bot]
authored andcommitted
chore(version): update to version 10.8.0
1 parent 0193230 commit 7fadc89

File tree

12 files changed

+445
-10
lines changed

12 files changed

+445
-10
lines changed

CHANGELOG.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,116 @@
44

55
All notable changes to this project will be documented in this file.
66

7+
## 10.8.0
8+
9+
> [!CAUTION]
10+
> This release can be breaking change for `flutter_quill_extensions` users as it remove the built-in support for loading YouTube videos
11+
12+
If you're using [flutter_quill_extensions](https://pub.dev/packages/flutter_quill_extensions) then this release, can be a breaking change for you if you load videos in the editor and expect YouTube videos to be supported, [youtube_player_flutter](https://pub.dev/packages/youtube_player_flutter) and [flutter_inappwebview](https://pub.dev/packages/flutter_inappwebview) are no longer dependencies of the extensions package, which are used to support loading YouTube Iframe videos on non-web platforms, more details about the discussion and reasons in [#2286](https://github.com/singerdmx/flutter-quill/pull/2286) and [#2284](https://github.com/singerdmx/flutter-quill/issues/2284).
13+
14+
We have added an experimental property that gives you more flexibility and control about the implementation you want to use for loading videos.
15+
16+
> [!WARNING]
17+
> It's likely to experience some common issues while implementing this feature, especially on desktop platforms as the support for [flutter_inappwebview_windows](https://pub.dev/packages/flutter_inappwebview_windows) and [flutter_inappwebview_macos](https://pub.dev/packages/flutter_inappwebview_macos) before 2 days. Some of the issues are in the Flutter Quill editor.
18+
19+
If you want loading YouTube videos to be a feature again with the latest version of Flutter Quill, you can use an existing plugin or package, or implement your own solution. For example, you might use [`youtube_video_player`](https://pub.dev/packages/youtube_video_player) or [`youtube_player_flutter`](https://pub.dev/packages/youtube_player_flutter), which was previously used in [`flutter_quill_extensions`](https://pub.dev/packages/flutter_quill_extensions).
20+
21+
Here’s an example setup using `youtube_player_flutter`:
22+
23+
```shell
24+
flutter pub add youtube_player_flutter
25+
```
26+
27+
Example widget configuration:
28+
29+
```dart
30+
import 'package:flutter/material.dart';
31+
import 'package:youtube_player_flutter/youtube_player_flutter.dart';
32+
33+
class YoutubeVideoPlayer extends StatefulWidget {
34+
const YoutubeVideoPlayer({required this.videoUrl, super.key});
35+
36+
final String videoUrl;
37+
38+
@override
39+
State<YoutubeVideoPlayer> createState() => _YoutubeVideoPlayerState();
40+
}
41+
42+
class _YoutubeVideoPlayerState extends State<YoutubeVideoPlayer> {
43+
late final YoutubePlayerController _youtubePlayerController;
44+
@override
45+
void initState() {
46+
super.initState();
47+
_youtubePlayerController = YoutubePlayerController(
48+
initialVideoId: YoutubePlayer.convertUrlToId(widget.videoUrl) ??
49+
(throw StateError('Expect a valid video URL')),
50+
flags: const YoutubePlayerFlags(
51+
autoPlay: true,
52+
mute: true,
53+
),
54+
);
55+
}
56+
57+
@override
58+
Widget build(BuildContext context) {
59+
return YoutubePlayer(
60+
controller: _youtubePlayerController,
61+
showVideoProgressIndicator: true,
62+
);
63+
}
64+
65+
@override
66+
void dispose() {
67+
_youtubePlayerController.dispose();
68+
super.dispose();
69+
}
70+
}
71+
72+
```
73+
74+
Then, integrate it with `QuillEditorVideoEmbedConfigurations`
75+
76+
```dart
77+
FlutterQuillEmbeds.editorBuilders(
78+
videoEmbedConfigurations: QuillEditorVideoEmbedConfigurations(
79+
customVideoBuilder: (videoUrl, readOnly) {
80+
// Example: Check for YouTube Video URL and return your
81+
// YouTube video widget here.
82+
bool isYouTubeUrl(String videoUrl) {
83+
try {
84+
final uri = Uri.parse(videoUrl);
85+
return uri.host == 'www.youtube.com' ||
86+
uri.host == 'youtube.com' ||
87+
uri.host == 'youtu.be' ||
88+
uri.host == 'www.youtu.be';
89+
} catch (_) {
90+
return false;
91+
}
92+
}
93+
94+
if (isYouTubeUrl(videoUrl)) {
95+
return YoutubeVideoPlayer(
96+
videoUrl: videoUrl,
97+
);
98+
}
99+
100+
// Return null to fallback to the default logic
101+
return null;
102+
},
103+
ignoreYouTubeSupport: true,
104+
),
105+
);
106+
```
107+
108+
> [!NOTE]
109+
> This example illustrates a basic approach, additional adjustments might be necessary to meet your specific needs. YouTube video support is no longer included in this project. Keep in mind that `customVideoBuilder` is experimental and can change without being considered as breaking change. More details in [breaking changes](https://github.com/singerdmx/flutter-quill#-breaking-changes) section.
110+
111+
[`super_clipboard`](https://pub.dev/packages/super_clipboard) will also no longer a dependency of `flutter_quill_extensions` once [PR #2230](https://github.com/singerdmx/flutter-quill/pull/2230) is ready.
112+
113+
We're looking forward to your feedback.
114+
115+
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.7.7...v10.8.0
116+
7117
## 10.7.7
8118

9119
This version is nearly identical to `10.7.6` with a build failure bug fix in [#2283](https://github.com/singerdmx/flutter-quill/pull/2283) related to unmerged change in [#2230](https://github.com/singerdmx/flutter-quill/pull/2230)

CHANGELOG_DATA.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"10.8.0": "> [!CAUTION]\r\n> This release can be breaking change for `flutter_quill_extensions` users as it remove the built-in support for loading YouTube videos\r\n\r\nIf you're using [flutter_quill_extensions](https://pub.dev/packages/flutter_quill_extensions) then this release, can be a breaking change for you if you load videos in the editor and expect YouTube videos to be supported, [youtube_player_flutter](https://pub.dev/packages/youtube_player_flutter) and [flutter_inappwebview](https://pub.dev/packages/flutter_inappwebview) are no longer dependencies of the extensions package, which are used to support loading YouTube Iframe videos on non-web platforms, more details about the discussion and reasons in [#2286](https://github.com/singerdmx/flutter-quill/pull/2286) and [#2284](https://github.com/singerdmx/flutter-quill/issues/2284).\r\n\r\nWe have added an experimental property that gives you more flexibility and control about the implementation you want to use for loading videos.\r\n\r\n> [!WARNING]\r\n> It's likely to experience some common issues while implementing this feature, especially on desktop platforms as the support for [flutter_inappwebview_windows](https://pub.dev/packages/flutter_inappwebview_windows) and [flutter_inappwebview_macos](https://pub.dev/packages/flutter_inappwebview_macos) before 2 days. Some of the issues are in the Flutter Quill editor.\r\n\r\nIf you want loading YouTube videos to be a feature again with the latest version of Flutter Quill, you can use an existing plugin or package, or implement your own solution. For example, you might use [`youtube_video_player`](https://pub.dev/packages/youtube_video_player) or [`youtube_player_flutter`](https://pub.dev/packages/youtube_player_flutter), which was previously used in [`flutter_quill_extensions`](https://pub.dev/packages/flutter_quill_extensions).\r\n\r\nHere’s an example setup using `youtube_player_flutter`:\r\n\r\n```shell\r\nflutter pub add youtube_player_flutter\r\n```\r\n\r\nExample widget configuration:\r\n\r\n```dart\r\nimport 'package:flutter/material.dart';\r\nimport 'package:youtube_player_flutter/youtube_player_flutter.dart';\r\n\r\nclass YoutubeVideoPlayer extends StatefulWidget {\r\n const YoutubeVideoPlayer({required this.videoUrl, super.key});\r\n\r\n final String videoUrl;\r\n\r\n @override\r\n State<YoutubeVideoPlayer> createState() => _YoutubeVideoPlayerState();\r\n}\r\n\r\nclass _YoutubeVideoPlayerState extends State<YoutubeVideoPlayer> {\r\n late final YoutubePlayerController _youtubePlayerController;\r\n @override\r\n void initState() {\r\n super.initState();\r\n _youtubePlayerController = YoutubePlayerController(\r\n initialVideoId: YoutubePlayer.convertUrlToId(widget.videoUrl) ??\r\n (throw StateError('Expect a valid video URL')),\r\n flags: const YoutubePlayerFlags(\r\n autoPlay: true,\r\n mute: true,\r\n ),\r\n );\r\n }\r\n\r\n @override\r\n Widget build(BuildContext context) {\r\n return YoutubePlayer(\r\n controller: _youtubePlayerController,\r\n showVideoProgressIndicator: true,\r\n );\r\n }\r\n\r\n @override\r\n void dispose() {\r\n _youtubePlayerController.dispose();\r\n super.dispose();\r\n }\r\n}\r\n\r\n```\r\n\r\nThen, integrate it with `QuillEditorVideoEmbedConfigurations`\r\n\r\n```dart\r\nFlutterQuillEmbeds.editorBuilders(\r\n videoEmbedConfigurations: QuillEditorVideoEmbedConfigurations(\r\n customVideoBuilder: (videoUrl, readOnly) {\r\n // Example: Check for YouTube Video URL and return your\r\n // YouTube video widget here.\r\n bool isYouTubeUrl(String videoUrl) {\r\n try {\r\n final uri = Uri.parse(videoUrl);\r\n return uri.host == 'www.youtube.com' ||\r\n uri.host == 'youtube.com' ||\r\n uri.host == 'youtu.be' ||\r\n uri.host == 'www.youtu.be';\r\n } catch (_) {\r\n return false;\r\n }\r\n }\r\n\r\n if (isYouTubeUrl(videoUrl)) {\r\n return YoutubeVideoPlayer(\r\n videoUrl: videoUrl,\r\n );\r\n }\r\n\r\n // Return null to fallback to the default logic\r\n return null;\r\n },\r\n ignoreYouTubeSupport: true,\r\n ),\r\n);\r\n```\r\n\r\n> [!NOTE]\r\n> This example illustrates a basic approach, additional adjustments might be necessary to meet your specific needs. YouTube video support is no longer included in this project. Keep in mind that `customVideoBuilder` is experimental and can change without being considered as breaking change. More details in [breaking changes](https://github.com/singerdmx/flutter-quill#-breaking-changes) section.\r\n\r\n[`super_clipboard`](https://pub.dev/packages/super_clipboard) will also no longer a dependency of `flutter_quill_extensions` once [PR #2230](https://github.com/singerdmx/flutter-quill/pull/2230) is ready.\r\n\r\nWe're looking forward to your feedback.\r\n\r\n**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.7.7...v10.8.0",
23
"10.7.7": "This version is nearly identical to `10.7.6` with a build failure bug fix in [#2283](https://github.com/singerdmx/flutter-quill/pull/2283) related to unmerged change in [#2230](https://github.com/singerdmx/flutter-quill/pull/2230)\r\n\r\n\r\n**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.7.6...v10.7.7",
34
"10.7.6": "* Code Comments Typo fixes by @Luismi74 in https://github.com/singerdmx/flutter-quill/pull/2267\r\n* docs: add important note for contributors before introducing new features by @EchoEllet in https://github.com/singerdmx/flutter-quill/pull/2269\r\n* docs(readme): add 'Breaking Changes' section by @EchoEllet in https://github.com/singerdmx/flutter-quill/pull/2275\r\n* Fix: Resolved issue with broken IME composing rect in Windows desktop(re-implementation) by @agata in https://github.com/singerdmx/flutter-quill/pull/2282\r\n\r\n## New Contributors\r\n* @Luismi74 made their first contribution in https://github.com/singerdmx/flutter-quill/pull/2267\r\n\r\n**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.7.5...v10.7.6",
45
"10.7.5": "* fix(ci): add flutter pub get step for quill_native_bridge by @EchoEllet in https://github.com/singerdmx/flutter-quill/pull/2265\r\n* revert: \"Resolved issue with broken IME composing rect in Windows desktop\" by @CatHood0 in https://github.com/singerdmx/flutter-quill/pull/2266\r\n\r\n\r\n**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.7.4...v10.7.5",

dart_quill_delta/CHANGELOG.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,116 @@
44

55
All notable changes to this project will be documented in this file.
66

7+
## 10.8.0
8+
9+
> [!CAUTION]
10+
> This release can be breaking change for `flutter_quill_extensions` users as it remove the built-in support for loading YouTube videos
11+
12+
If you're using [flutter_quill_extensions](https://pub.dev/packages/flutter_quill_extensions) then this release, can be a breaking change for you if you load videos in the editor and expect YouTube videos to be supported, [youtube_player_flutter](https://pub.dev/packages/youtube_player_flutter) and [flutter_inappwebview](https://pub.dev/packages/flutter_inappwebview) are no longer dependencies of the extensions package, which are used to support loading YouTube Iframe videos on non-web platforms, more details about the discussion and reasons in [#2286](https://github.com/singerdmx/flutter-quill/pull/2286) and [#2284](https://github.com/singerdmx/flutter-quill/issues/2284).
13+
14+
We have added an experimental property that gives you more flexibility and control about the implementation you want to use for loading videos.
15+
16+
> [!WARNING]
17+
> It's likely to experience some common issues while implementing this feature, especially on desktop platforms as the support for [flutter_inappwebview_windows](https://pub.dev/packages/flutter_inappwebview_windows) and [flutter_inappwebview_macos](https://pub.dev/packages/flutter_inappwebview_macos) before 2 days. Some of the issues are in the Flutter Quill editor.
18+
19+
If you want loading YouTube videos to be a feature again with the latest version of Flutter Quill, you can use an existing plugin or package, or implement your own solution. For example, you might use [`youtube_video_player`](https://pub.dev/packages/youtube_video_player) or [`youtube_player_flutter`](https://pub.dev/packages/youtube_player_flutter), which was previously used in [`flutter_quill_extensions`](https://pub.dev/packages/flutter_quill_extensions).
20+
21+
Here’s an example setup using `youtube_player_flutter`:
22+
23+
```shell
24+
flutter pub add youtube_player_flutter
25+
```
26+
27+
Example widget configuration:
28+
29+
```dart
30+
import 'package:flutter/material.dart';
31+
import 'package:youtube_player_flutter/youtube_player_flutter.dart';
32+
33+
class YoutubeVideoPlayer extends StatefulWidget {
34+
const YoutubeVideoPlayer({required this.videoUrl, super.key});
35+
36+
final String videoUrl;
37+
38+
@override
39+
State<YoutubeVideoPlayer> createState() => _YoutubeVideoPlayerState();
40+
}
41+
42+
class _YoutubeVideoPlayerState extends State<YoutubeVideoPlayer> {
43+
late final YoutubePlayerController _youtubePlayerController;
44+
@override
45+
void initState() {
46+
super.initState();
47+
_youtubePlayerController = YoutubePlayerController(
48+
initialVideoId: YoutubePlayer.convertUrlToId(widget.videoUrl) ??
49+
(throw StateError('Expect a valid video URL')),
50+
flags: const YoutubePlayerFlags(
51+
autoPlay: true,
52+
mute: true,
53+
),
54+
);
55+
}
56+
57+
@override
58+
Widget build(BuildContext context) {
59+
return YoutubePlayer(
60+
controller: _youtubePlayerController,
61+
showVideoProgressIndicator: true,
62+
);
63+
}
64+
65+
@override
66+
void dispose() {
67+
_youtubePlayerController.dispose();
68+
super.dispose();
69+
}
70+
}
71+
72+
```
73+
74+
Then, integrate it with `QuillEditorVideoEmbedConfigurations`
75+
76+
```dart
77+
FlutterQuillEmbeds.editorBuilders(
78+
videoEmbedConfigurations: QuillEditorVideoEmbedConfigurations(
79+
customVideoBuilder: (videoUrl, readOnly) {
80+
// Example: Check for YouTube Video URL and return your
81+
// YouTube video widget here.
82+
bool isYouTubeUrl(String videoUrl) {
83+
try {
84+
final uri = Uri.parse(videoUrl);
85+
return uri.host == 'www.youtube.com' ||
86+
uri.host == 'youtube.com' ||
87+
uri.host == 'youtu.be' ||
88+
uri.host == 'www.youtu.be';
89+
} catch (_) {
90+
return false;
91+
}
92+
}
93+
94+
if (isYouTubeUrl(videoUrl)) {
95+
return YoutubeVideoPlayer(
96+
videoUrl: videoUrl,
97+
);
98+
}
99+
100+
// Return null to fallback to the default logic
101+
return null;
102+
},
103+
ignoreYouTubeSupport: true,
104+
),
105+
);
106+
```
107+
108+
> [!NOTE]
109+
> This example illustrates a basic approach, additional adjustments might be necessary to meet your specific needs. YouTube video support is no longer included in this project. Keep in mind that `customVideoBuilder` is experimental and can change without being considered as breaking change. More details in [breaking changes](https://github.com/singerdmx/flutter-quill#-breaking-changes) section.
110+
111+
[`super_clipboard`](https://pub.dev/packages/super_clipboard) will also no longer a dependency of `flutter_quill_extensions` once [PR #2230](https://github.com/singerdmx/flutter-quill/pull/2230) is ready.
112+
113+
We're looking forward to your feedback.
114+
115+
**Full Changelog**: https://github.com/singerdmx/flutter-quill/compare/v10.7.7...v10.8.0
116+
7117
## 10.7.7
8118

9119
This version is nearly identical to `10.7.6` with a build failure bug fix in [#2283](https://github.com/singerdmx/flutter-quill/pull/2283) related to unmerged change in [#2230](https://github.com/singerdmx/flutter-quill/pull/2230)

dart_quill_delta/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: dart_quill_delta
22
description: A port of quill-js-delta from typescript to dart
3-
version: 10.7.7
3+
version: 10.8.0
44
homepage: https://github.com/singerdmx/flutter-quill/tree/master/dart_quill_delta/
55
repository: https://github.com/singerdmx/flutter-quill/tree/master/dart_quill_delta/
66
issue_tracker: https://github.com/singerdmx/flutter-quill/issues/

example/macos/Flutter/GeneratedPluginRegistrant.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import Foundation
88
import desktop_drop
99
import device_info_plus
1010
import file_selector_macos
11-
import flutter_inappwebview_macos
1211
import gal
1312
import irondash_engine_context
1413
import path_provider_foundation
@@ -22,7 +21,6 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
2221
DesktopDropPlugin.register(with: registry.registrar(forPlugin: "DesktopDropPlugin"))
2322
DeviceInfoPlusMacosPlugin.register(with: registry.registrar(forPlugin: "DeviceInfoPlusMacosPlugin"))
2423
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
25-
InAppWebViewFlutterPlugin.register(with: registry.registrar(forPlugin: "InAppWebViewFlutterPlugin"))
2624
GalPlugin.register(with: registry.registrar(forPlugin: "GalPlugin"))
2725
IrondashEngineContextPlugin.register(with: registry.registrar(forPlugin: "IrondashEngineContextPlugin"))
2826
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))

example/windows/flutter/generated_plugin_registrant.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#include <desktop_drop/desktop_drop_plugin.h>
1010
#include <file_selector_windows/file_selector_windows.h>
11-
#include <flutter_inappwebview_windows/flutter_inappwebview_windows_plugin_c_api.h>
1211
#include <gal/gal_plugin_c_api.h>
1312
#include <irondash_engine_context/irondash_engine_context_plugin_c_api.h>
1413
#include <share_plus/share_plus_windows_plugin_c_api.h>
@@ -20,8 +19,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
2019
registry->GetRegistrarForPlugin("DesktopDropPlugin"));
2120
FileSelectorWindowsRegisterWithRegistrar(
2221
registry->GetRegistrarForPlugin("FileSelectorWindows"));
23-
FlutterInappwebviewWindowsPluginCApiRegisterWithRegistrar(
24-
registry->GetRegistrarForPlugin("FlutterInappwebviewWindowsPluginCApi"));
2522
GalPluginCApiRegisterWithRegistrar(
2623
registry->GetRegistrarForPlugin("GalPluginCApi"));
2724
IrondashEngineContextPluginCApiRegisterWithRegistrar(

example/windows/flutter/generated_plugins.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
list(APPEND FLUTTER_PLUGIN_LIST
66
desktop_drop
77
file_selector_windows
8-
flutter_inappwebview_windows
98
gal
109
irondash_engine_context
1110
share_plus

0 commit comments

Comments
 (0)