mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 22:57:12 -04:00
feat: adjust math_equation block and image block on mobile platform (#3890)
* feat: add image toolbar entry * feat: add ... buttos on math_equation and image block * fix: review issues * feat: add copy link and save image to gallery * feat: support redo / undo on mobile toolbar
This commit is contained in:
parent
3e6529aeb8
commit
8116ea1dba
31 changed files with 928 additions and 201 deletions
|
@ -26,6 +26,22 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
|
||||
enum EditorNotificationType {
|
||||
undo,
|
||||
redo,
|
||||
}
|
||||
|
||||
class EditorNotification extends Notification {
|
||||
const EditorNotification({
|
||||
required this.type,
|
||||
});
|
||||
|
||||
EditorNotification.undo() : type = EditorNotificationType.undo;
|
||||
EditorNotification.redo() : type = EditorNotificationType.redo;
|
||||
|
||||
final EditorNotificationType type;
|
||||
}
|
||||
|
||||
class DocumentPage extends StatefulWidget {
|
||||
const DocumentPage({
|
||||
super.key,
|
||||
|
@ -95,7 +111,10 @@ class _DocumentPageState extends State<DocumentPage> {
|
|||
);
|
||||
} else {
|
||||
editorState = documentBloc.editorState!;
|
||||
return _buildEditorPage(context, state);
|
||||
return _buildEditorPage(
|
||||
context,
|
||||
state,
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
|
@ -116,6 +135,7 @@ class _DocumentPageState extends State<DocumentPage> {
|
|||
),
|
||||
header: _buildCoverAndIcon(context),
|
||||
);
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
if (state.isDeleted) _buildBanner(context),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue