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
// storage before displaying in the editor or you can also use base64
getImageUrl: (image) {
String link = 'https://avatars.githubusercontent.com/u/24323581?v=4';
String base64 = base64Encode(image.readAsBytesSync());
String base64String = 'data:image/png;base64, $base64';
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
// storage before displaying in the editor or you can also use base64
getImageUrl: (image) {
String link = 'https://avatars.githubusercontent.com/u/24323581?v=4';
String base64 = base64Encode(image.readAsBytesSync());
String base64String = 'data:image/png;base64, $base64';
return base64String;

View File

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

View File

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

View File

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

View File

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

View File

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