feat: add require_trailing_commas to analysis_options.ymal. (#2227)

This commit is contained in:
Lucas.Xu 2023-04-10 15:10:42 +08:00 committed by GitHub
parent 4d56b42b83
commit aac5c2a4da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
210 changed files with 2927 additions and 1984 deletions

View file

@ -61,27 +61,28 @@ class _DocumentPageState extends State<DocumentPage> {
providers: [
BlocProvider<DocumentBloc>.value(value: documentBloc),
],
child:
BlocBuilder<DocumentBloc, DocumentState>(builder: (context, state) {
return state.loadingState.map(
loading: (_) => SizedBox.expand(
child: Container(color: Colors.transparent),
),
finish: (result) => result.successOrFail.fold(
(_) {
if (state.forceClose) {
widget.onDeleted();
return const SizedBox();
} else if (documentBloc.editorState == null) {
return const SizedBox();
} else {
return _renderDocument(context, state);
}
},
(err) => FlowyErrorPage(err.toString()),
),
);
}),
child: BlocBuilder<DocumentBloc, DocumentState>(
builder: (context, state) {
return state.loadingState.map(
loading: (_) => SizedBox.expand(
child: Container(color: Colors.transparent),
),
finish: (result) => result.successOrFail.fold(
(_) {
if (state.forceClose) {
widget.onDeleted();
return const SizedBox();
} else if (documentBloc.editorState == null) {
return const SizedBox();
} else {
return _renderDocument(context, state);
}
},
(err) => FlowyErrorPage(err.toString()),
),
);
},
),
);
}
@ -191,11 +192,13 @@ class _AppFlowyEditorPageState extends State<_AppFlowyEditorPage> {
toolbarItems: [
smartEditItem,
],
themeData: theme.copyWith(extensions: [
...theme.extensions.values,
customEditorTheme(context),
...customPluginTheme(context),
]),
themeData: theme.copyWith(
extensions: [
...theme.extensions.values,
customEditorTheme(context),
...customPluginTheme(context),
],
),
);
return Expanded(
child: Center(