mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: adjust board dark mode UI
This commit is contained in:
parent
c5963bc765
commit
8632b141ad
@ -9,6 +9,7 @@ import 'package:app_flowy/plugins/grid/application/field/field_controller.dart';
|
|||||||
import 'package:app_flowy/plugins/grid/application/row/row_data_controller.dart';
|
import 'package:app_flowy/plugins/grid/application/row/row_data_controller.dart';
|
||||||
import 'package:app_flowy/plugins/grid/presentation/widgets/cell/cell_builder.dart';
|
import 'package:app_flowy/plugins/grid/presentation/widgets/cell/cell_builder.dart';
|
||||||
import 'package:app_flowy/plugins/grid/presentation/widgets/row/row_detail.dart';
|
import 'package:app_flowy/plugins/grid/presentation/widgets/row/row_detail.dart';
|
||||||
|
import 'package:app_flowy/workspace/application/appearance.dart';
|
||||||
import 'package:appflowy_board/appflowy_board.dart';
|
import 'package:appflowy_board/appflowy_board.dart';
|
||||||
import 'package:easy_localization/easy_localization.dart';
|
import 'package:easy_localization/easy_localization.dart';
|
||||||
import 'package:flowy_infra/image.dart';
|
import 'package:flowy_infra/image.dart';
|
||||||
@ -21,6 +22,7 @@ import 'package:flowy_sdk/protobuf/flowy-grid/block_entities.pb.dart';
|
|||||||
import 'package:flowy_sdk/protobuf/flowy-grid/field_entities.pb.dart';
|
import 'package:flowy_sdk/protobuf/flowy-grid/field_entities.pb.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:provider/provider.dart';
|
||||||
import '../../grid/application/row/row_cache.dart';
|
import '../../grid/application/row/row_cache.dart';
|
||||||
import '../application/board_bloc.dart';
|
import '../application/board_bloc.dart';
|
||||||
import 'card/card.dart';
|
import 'card/card.dart';
|
||||||
@ -88,20 +90,21 @@ class _BoardContentState extends State<BoardContent> {
|
|||||||
children: [const _ToolbarBlocAdaptor(), _buildBoard(context)],
|
children: [const _ToolbarBlocAdaptor(), _buildBoard(context)],
|
||||||
);
|
);
|
||||||
|
|
||||||
return Container(
|
return Padding(
|
||||||
color: context.read<AppTheme>().surface,
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||||
child: column,
|
child: column,
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Expanded _buildBoard(BuildContext context) {
|
Widget _buildBoard(BuildContext context) {
|
||||||
return Expanded(
|
return ChangeNotifierProvider.value(
|
||||||
|
value: Provider.of<AppearanceSettingModel>(context, listen: true),
|
||||||
|
child: Selector<AppearanceSettingModel, AppTheme>(
|
||||||
|
selector: (ctx, notifier) => notifier.theme,
|
||||||
|
builder: (ctx, theme, child) => Expanded(
|
||||||
child: AppFlowyBoard(
|
child: AppFlowyBoard(
|
||||||
boardScrollController: scrollManager,
|
boardScrollController: scrollManager,
|
||||||
scrollController: ScrollController(),
|
scrollController: ScrollController(),
|
||||||
@ -115,7 +118,9 @@ class _BoardContentState extends State<BoardContent> {
|
|||||||
),
|
),
|
||||||
groupConstraints: const BoxConstraints.tightFor(width: 300),
|
groupConstraints: const BoxConstraints.tightFor(width: 300),
|
||||||
config: AppFlowyBoardConfig(
|
config: AppFlowyBoardConfig(
|
||||||
groupBackgroundColor: HexColor.fromHex('#F7F8FC'),
|
groupBackgroundColor: theme.bg1,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -320,8 +325,16 @@ class _ToolbarBlocAdaptor extends StatelessWidget {
|
|||||||
fieldController: bloc.fieldController,
|
fieldController: bloc.fieldController,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
return ChangeNotifierProvider.value(
|
||||||
|
value: Provider.of<AppearanceSettingModel>(context, listen: true),
|
||||||
|
child: Selector<AppearanceSettingModel, AppTheme>(
|
||||||
|
selector: (ctx, notifier) => notifier.theme,
|
||||||
|
builder: (ctx, theme, child) {
|
||||||
return BoardToolbar(toolbarContext: toolbarContext);
|
return BoardToolbar(toolbarContext: toolbarContext);
|
||||||
},
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ class _SettingButton extends StatelessWidget {
|
|||||||
onPressed: () {},
|
onPressed: () {},
|
||||||
icon: Padding(
|
icon: Padding(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 3.0, horizontal: 3.0),
|
padding: const EdgeInsets.symmetric(vertical: 3.0, horizontal: 3.0),
|
||||||
child: svgWidget("grid/setting/setting"),
|
child: svgWidget("grid/setting/setting", color: theme.iconColor),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
popupBuilder: (BuildContext popoverContext) {
|
popupBuilder: (BuildContext popoverContext) {
|
||||||
|
Loading…
Reference in New Issue
Block a user