Merge pull request 'update deprecated' (#2) from kit into master

Reviewed-on: #2
This commit is contained in:
kit 2024-09-09 10:26:50 +07:00
commit c15ddf8e7a
7 changed files with 7 additions and 12 deletions

View File

@ -80,7 +80,6 @@ class BasicDemo extends StatelessWidget {
// You can return a Link (maybe you need to upload the image to your // You can return a Link (maybe you need to upload the image to your
// storage before displaying in the editor or you can also use base64 // storage before displaying in the editor or you can also use base64
getImageUrl: (image) { getImageUrl: (image) {
String link = 'https://avatars.githubusercontent.com/u/24323581?v=4';
String base64 = base64Encode(image.readAsBytesSync()); String base64 = base64Encode(image.readAsBytesSync());
String base64String = 'data:image/png;base64, $base64'; String base64String = 'data:image/png;base64, $base64';
return base64String; return base64String;

View File

@ -93,7 +93,6 @@ class _CustomToolbarDemoState extends State<CustomToolbarDemo> {
// You can return a Link (maybe you need to upload the image to your // You can return a Link (maybe you need to upload the image to your
// storage before displaying in the editor or you can also use base64 // storage before displaying in the editor or you can also use base64
getImageUrl: (image) { getImageUrl: (image) {
String link = 'https://avatars.githubusercontent.com/u/24323581?v=4';
String base64 = base64Encode(image.readAsBytesSync()); String base64 = base64Encode(image.readAsBytesSync());
String base64String = 'data:image/png;base64, $base64'; String base64String = 'data:image/png;base64, $base64';
return base64String; return base64String;

View File

@ -1,9 +1,6 @@
import 'dart:convert';
import 'package:example/basic.dart'; import 'package:example/basic.dart';
import 'package:example/custom_toolbar_demo.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:rich_editor/rich_editor.dart';
void main() { void main() {
runApp(MyApp()); runApp(MyApp());

View File

@ -65,7 +65,7 @@ class LocalServer {
}); });
completer.complete(); completer.complete();
}); });
}, onError: (e, stackTrace) => print('Error: $e $stackTrace')); });
return completer.future; return completer.future;
} }
} }
@ -117,7 +117,7 @@ class WebSocketServer {
}, onError: (err) => print('[!]Error -- ${err.toString()}')); }, onError: (err) => print('[!]Error -- ${err.toString()}'));
completer.complete(); completer.complete();
}, onError: (err) => print('[!]Error -- ${err.toString()}')); }, onError: (err) => print('[!]Error -- ${err.toString()}'));
}, onError: (err) => print('[!]Error -- ${err.toString()}')); });
return completer.future; return completer.future;
} }

View File

@ -65,9 +65,9 @@ class _InsertImageDialogState extends State<InsertImageDialog> {
final picker = ImagePicker(); final picker = ImagePicker();
var image; var image;
if (widget.isVideo) { if (widget.isVideo) {
image = await picker.getVideo(source: ImageSource.gallery); image = await picker.pickVideo(source: ImageSource.gallery);
} else { } else {
image = await picker.getImage( image = await picker.pickImage(
source: ImageSource.gallery, source: ImageSource.gallery,
maxWidth: 800.0, maxWidth: 800.0,
maxHeight: 600.0, maxHeight: 600.0,

View File

@ -82,10 +82,10 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
name: flutter_colorpicker name: flutter_colorpicker
sha256: "3410869743dc4e4493a0a865c119b091452f5ea5d93e703f62415a320625e871" sha256: "969de5f6f9e2a570ac660fb7b501551451ea2a1ab9e2097e89475f60e07816ea"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.5.0" version: "1.1.0"
flutter_inappwebview: flutter_inappwebview:
dependency: "direct main" dependency: "direct main"
description: description:

View File

@ -17,7 +17,7 @@ dependencies:
mime: ^1.0.0 mime: ^1.0.0
image_picker: ^0.8.3+1 image_picker: ^0.8.3+1
flutter_widget_from_html_core: ^0.10.1 flutter_widget_from_html_core: ^0.10.1
flutter_colorpicker: ^0.5.0 flutter_colorpicker: ^1.1.0
path: ^1.8.0 path: ^1.8.0
xml2json: ^6.2.3 xml2json: ^6.2.3