Merge pull request #1422 from LucasXu0/editor_background

chore: set theme.surface as editor's background color
This commit is contained in:
Lucas.Xu 2022-11-08 11:00:49 +08:00 committed by GitHub
commit bf06211bff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,7 @@ import 'package:app_flowy/plugins/doc/presentation/plugins/horizontal_rule_node_
import 'package:app_flowy/startup/startup.dart';
import 'package:app_flowy/plugins/doc/presentation/banner.dart';
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:flowy_infra/theme.dart';
import 'package:flowy_infra_ui/widget/error_page.dart';
import 'package:flowy_sdk/protobuf/flowy-folder/view.pb.dart';
import 'package:flutter/material.dart';
@ -73,12 +74,18 @@ class _DocumentPageState extends State<DocumentPage> {
}
Widget _renderDocument(BuildContext context, DocumentState state) {
return Column(
children: [
if (state.isDeleted) _renderBanner(context),
// AppFlowy Editor
_renderAppFlowyEditor(context.read<DocumentBloc>().editorState),
],
final theme = context.watch<AppTheme>();
return Container(
color: theme.surface,
child: Column(
children: [
if (state.isDeleted) _renderBanner(context),
// AppFlowy Editor
_renderAppFlowyEditor(
context.read<DocumentBloc>().editorState,
),
],
),
);
}