Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
[flutter]: fix bugs
appflowy0e94092df1d9
diff --git a/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/menu_app.dart b/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/menu_app.dartindex e5a7a95aad..ef106b0147 100644--- a/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/menu_app.dart+++ b/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/menu_app.dart@@ -88,7 +88,7 @@ class _MenuAppState extends State<MenuApp> {return MultiProvider(providers: [ChangeNotifierProvider.value(value: notifier)],child: Consumer(builder: (context, AppDataNotifier notifier, child) {- return const ViewSection().padding(vertical: 8);+ return const ViewSection();}),);}diff --git a/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/section.dart b/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/section.dartindex ef51c8a783..79c9d69955 100644--- a/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/section.dart+++ b/app_flowy/lib/workspace/presentation/widgets/menu/widget/app/section/section.dart@@ -37,18 +37,24 @@ class ViewSection extends StatelessWidget {}Widget _renderSectionItems(BuildContext context, List<View> views) {- var viewWidgets = views.map(- (view) => ViewSectionItem(- view: view,- isSelected: _isViewSelected(context, view.id),- onSelected: (view) {- context.read<ViewSectionNotifier>().selectedView = view;- Provider.of<MenuSharedState>(context, listen: false).selectedView = view;- },- ).padding(vertical: 4),- );+ List<Widget> viewWidgets = [];++ if (views.isNotEmpty) {+ viewWidgets = views+ .map(+ (view) => ViewSectionItem(+ view: view,+ isSelected: _isViewSelected(context, view.id),+ onSelected: (view) {+ context.read<ViewSectionNotifier>().selectedView = view;+ Provider.of<MenuSharedState>(context, listen: false).selectedView = view;+ },+ ).padding(vertical: 4),+ )+ .toList(growable: false);+ }- return Column(children: viewWidgets.toList(growable: false));+ return Column(children: viewWidgets);}bool _isViewSelected(BuildContext context, String viewId) {