mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
parent
63059ea39d
commit
462daee934
@ -96,6 +96,7 @@ class _DocumentPageState extends State<DocumentPage> {
|
|||||||
|
|
||||||
Widget _renderAppFlowyEditor(EditorState editorState) {
|
Widget _renderAppFlowyEditor(EditorState editorState) {
|
||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
|
final editorMaxWidth = MediaQuery.of(context).size.width * 0.6;
|
||||||
final editor = AppFlowyEditor(
|
final editor = AppFlowyEditor(
|
||||||
editorState: editorState,
|
editorState: editorState,
|
||||||
autoFocus: editorState.document.isEmpty,
|
autoFocus: editorState.document.isEmpty,
|
||||||
@ -112,9 +113,14 @@ class _DocumentPageState extends State<DocumentPage> {
|
|||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: SizedBox.expand(
|
child: Center(
|
||||||
|
child: Container(
|
||||||
|
constraints: BoxConstraints(
|
||||||
|
maxWidth: editorMaxWidth,
|
||||||
|
),
|
||||||
child: editor,
|
child: editor,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ EditorStyle customEditorTheme(BuildContext context) {
|
|||||||
? EditorStyle.dark
|
? EditorStyle.dark
|
||||||
: EditorStyle.light;
|
: EditorStyle.light;
|
||||||
editorStyle = editorStyle.copyWith(
|
editorStyle = editorStyle.copyWith(
|
||||||
|
padding: const EdgeInsets.all(0),
|
||||||
textStyle: editorStyle.textStyle?.copyWith(
|
textStyle: editorStyle.textStyle?.copyWith(
|
||||||
fontFamily: 'poppins',
|
fontFamily: 'poppins',
|
||||||
fontSize: _baseFontSize,
|
fontSize: _baseFontSize,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user