From e12b42370c6d4b74a9d0d0996985a6b0c81b39e9 Mon Sep 17 00:00:00 2001 From: Joshua Tang Date: Sun, 20 Aug 2023 11:10:31 +1000 Subject: [PATCH] fix: expansion panel list to expand properly --- lib/widgets/list_views/expansion_panel_list.dart | 8 ++++---- macos/Runner.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/widgets/list_views/expansion_panel_list.dart b/lib/widgets/list_views/expansion_panel_list.dart index 388554e50..3b8d71cfa 100644 --- a/lib/widgets/list_views/expansion_panel_list.dart +++ b/lib/widgets/list_views/expansion_panel_list.dart @@ -1,7 +1,7 @@ +import 'package:appainter/common/common.dart'; import 'package:appainter/widgets/widgets.dart'; import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; -import 'package:appainter/common/common.dart'; abstract class ExpansionPanelItem extends StatelessWidget { String get header; @@ -41,9 +41,9 @@ class _MyExpansionPanelListState extends State { return SingleChildScrollView( child: ExpansionPanelList( expandedHeaderPadding: EdgeInsets.zero, - expansionCallback: (int index, bool isExpanded) { - setState(() => _expandStates[index] = !isExpanded); - }, + expansionCallback: (int index, bool isExpanded) => setState( + () => _expandStates[index] = isExpanded, + ), children: widget.items.mapIndexed((index, item) { return ExpansionPanel( headerBuilder: (context, isExpanded) => _Header(item: item), diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 8c2816760..a4f8fbe1c 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -205,7 +205,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = ""; TargetAttributes = { 33CC10EC2044A3C60003C045 = { diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 97bbe2f3b..c57a4469f 100644 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@