Merge pull request #1451 from richardshiue/flowy-editor-background

fix: use surface color of colorscheme as editor's background color
This commit is contained in:
Lucas.Xu 2022-11-14 16:51:24 +08:00 committed by GitHub
commit e076c2be90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 11 deletions

View File

@ -73,17 +73,14 @@ class _DocumentPageState extends State<DocumentPage> {
}
Widget _renderDocument(BuildContext context, DocumentState state) {
return Container(
color: Theme.of(context).colorScheme.surface,
child: Column(
children: [
if (state.isDeleted) _renderBanner(context),
// AppFlowy Editor
_renderAppFlowyEditor(
context.read<DocumentBloc>().editorState,
),
],
),
return Column(
children: [
if (state.isDeleted) _renderBanner(context),
// AppFlowy Editor
_renderAppFlowyEditor(
context.read<DocumentBloc>().editorState,
),
],
);
}

View File

@ -19,6 +19,7 @@ EditorStyle customEditorTheme(BuildContext context) {
bold: editorStyle.bold?.copyWith(
fontWeight: FontWeight.w500,
),
backgroundColor: Theme.of(context).colorScheme.surface,
);
return editorStyle;
}