update deprecated

This commit is contained in:
kit
2024-09-09 10:26:22 +07:00
parent ec2d14570a
commit 067abee437
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());