Rename onImageTapCallBack to onImagePickCallback

pull/37/head^2
singerdmx 4 years ago
parent 4f044e2b09
commit 9bcee88705
  1. 4
      README.md
  2. 2
      app/lib/pages/home_page.dart
  3. 2
      example/main.dart
  4. 10
      lib/widgets/toolbar.dart

@ -26,7 +26,7 @@ and then embed the toolbar and the editor, within your app. For example:
Column(
children: [
QuillToolbar.basic(
controller: _controller, onImageTapCallBack: _uploadImageCallBack),
controller: _controller, onImagePickCallback: _uploadImageCallBack),
Expanded(
child: Container(
child: QuillEditor.basic(
@ -65,7 +65,7 @@ _controller = QuillController(
## Configuration
The `QuillToolbar` class lets you customise which formatting options are available. To prevent the image uploading widget from appearing, set `onImageTapCallBack` to null.
The `QuillToolbar` class lets you customise which formatting options are available. To prevent the image uploading widget from appearing, set `onImagePickCallback` to null.
## Web

@ -125,7 +125,7 @@ class _HomePageState extends State<HomePage> {
Container(
child: QuillToolbar.basic(
controller: _controller,
onImageTapCallBack: _fakeUploadImageCallBack),
onImagePickCallback: _fakeUploadImageCallBack),
)
],
);

@ -20,7 +20,7 @@ class _HomePageState extends State<HomePage> {
body: Column(
children: [
QuillToolbar.basic(
controller: _controller, onImageTapCallBack: _uploadImageCallBack),
controller: _controller, onImagePickCallback: _uploadImageCallBack),
Expanded(
child: Container(
child: QuillEditor.basic(

@ -891,7 +891,7 @@ class QuillToolbar extends StatefulWidget implements PreferredSizeWidget {
bool showLink = true,
bool showHistory = true,
bool showHorizontalRule = false,
OnImagePickCallback onImageTapCallBack}) {
OnImagePickCallback onImagePickCallback}) {
iconSize = toolbarIconSize;
return QuillToolbar(key: key, children: [
Visibility(
@ -974,22 +974,22 @@ class QuillToolbar extends StatefulWidget implements PreferredSizeWidget {
),
SizedBox(width: 0.6),
Visibility(
visible: onImageTapCallBack != null,
visible: onImagePickCallback != null,
child: ImageButton(
icon: Icons.image,
controller: controller,
imageSource: ImageSource.gallery,
onImagePickCallback: onImageTapCallBack,
onImagePickCallback: onImagePickCallback,
),
),
SizedBox(width: 0.6),
Visibility(
visible: onImageTapCallBack != null,
visible: onImagePickCallback != null,
child: ImageButton(
icon: Icons.photo_camera,
controller: controller,
imageSource: ImageSource.camera,
onImagePickCallback: onImageTapCallBack,
onImagePickCallback: onImagePickCallback,
),
),
Visibility(

Loading…
Cancel
Save