Update README

pull/37/head^2
Xin Yao 4 years ago
parent b810dc0003
commit c561c852b0
  1. 8
      README.md
  2. 11
      example/main.dart

@ -25,8 +25,7 @@ and then embed the toolbar and the editor, within your app. For example:
```dart
Column(
children: [
QuillToolbar.basic(
controller: _controller, onImagePickCallback: _uploadImageCallBack),
QuillToolbar.basic(controller: _controller),
Expanded(
child: Container(
child: QuillEditor.basic(
@ -38,6 +37,7 @@ Column(
],
)
```
Check out [Sample Page] for advanced usage.
## Input / Output
@ -65,7 +65,8 @@ _controller = QuillController(
## Configuration
The `QuillToolbar` class lets you customise which formatting options are available. To prevent the image uploading widget from appearing, set `onImagePickCallback` to null.
The `QuillToolbar` class lets you customise which formatting options are available.
[Sample Page] provided sample code for advanced usage and configuration.
## Web
@ -93,3 +94,4 @@ One client and affiliated collaborator of **[FlutterQuill]** is Bullet Journal A
[FlutterQuill]: https://pub.dev/packages/flutter_quill
[ReactQuill]: https://github.com/zenoamaro/react-quill
[Slack Group]: https://join.slack.com/t/bulletjournal1024/shared_invite/zt-fys7t9hi-ITVU5PGDen1rNRyCjdcQ2g
[Sample Page]: https://github.com/singerdmx/flutter-quill/blob/master/app/lib/pages/home_page.dart

@ -1,6 +1,3 @@
import 'dart:async';
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_quill/widgets/controller.dart';
import 'package:flutter_quill/widgets/editor.dart';
@ -19,8 +16,7 @@ class _HomePageState extends State<HomePage> {
return Scaffold(
body: Column(
children: [
QuillToolbar.basic(
controller: _controller, onImagePickCallback: _uploadImageCallBack),
QuillToolbar.basic(controller: _controller),
Expanded(
child: Container(
child: QuillEditor.basic(
@ -32,9 +28,4 @@ class _HomePageState extends State<HomePage> {
],
));
}
Future<String> _uploadImageCallBack(File file) async {
// call upload file API and return file's absolute url
return new Completer<String>().future;
}
}

Loading…
Cancel
Save