feat: support changing block background color (#3998)

This commit is contained in:
Lucas.Xu
2023-11-24 15:30:20 +08:00
committed by GitHub
parent 1fad713477
commit 414bb26e56
10 changed files with 273 additions and 66 deletions

View File

@ -9,9 +9,10 @@ import 'package:appflowy/mobile/presentation/favorite/mobile_favorite_page.dart'
import 'package:appflowy/mobile/presentation/presentation.dart';
import 'package:appflowy/mobile/presentation/setting/font/font_picker_screen.dart';
import 'package:appflowy/mobile/presentation/setting/language/language_picker_screen.dart';
import 'package:appflowy/plugins/base/color/color_picker_screen.dart';
import 'package:appflowy/plugins/base/emoji/emoji_picker_screen.dart';
import 'package:appflowy/plugins/document/presentation/editor_plugins/code_block/code_language_screen.dart';
import 'package:appflowy/plugins/database_view/grid/application/row/row_detail_bloc.dart';
import 'package:appflowy/plugins/document/presentation/editor_plugins/code_block/code_language_screen.dart';
import 'package:appflowy/plugins/document/presentation/editor_plugins/image/image_picker_screen.dart';
import 'package:appflowy/plugins/document/presentation/editor_plugins/mobile_toolbar_item/mobile_block_settings_screen.dart';
import 'package:appflowy/startup/startup.dart';
@ -69,6 +70,9 @@ GoRouter generateRouter(Widget child) {
_mobileEmojiPickerPageRoute(),
_mobileImagePickerPageRoute(),
// color picker
_mobileColorPickerPageRoute(),
// code language picker
_mobileCodeLanguagePickerPageRoute(),
_mobileLanguagePickerPageRoute(),
@ -263,6 +267,22 @@ GoRoute _mobileEmojiPickerPageRoute() {
);
}
GoRoute _mobileColorPickerPageRoute() {
return GoRoute(
parentNavigatorKey: AppGlobals.rootNavKey,
path: MobileColorPickerScreen.routeName,
pageBuilder: (context, state) {
final title =
state.uri.queryParameters[MobileColorPickerScreen.pageTitle] ?? '';
return MaterialPage(
child: MobileColorPickerScreen(
title: title,
),
);
},
);
}
GoRoute _mobileImagePickerPageRoute() {
return GoRoute(
parentNavigatorKey: AppGlobals.rootNavKey,