mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-24 08:20:40 +00:00
fixed generic type
This commit is contained in:
parent
12abf99e2f
commit
c05d4e80b8
1 changed files with 2 additions and 4 deletions
|
@ -8,12 +8,10 @@ typedef _WidgetBuilder<W, T extends Identifiable> = W Function(BuildContext cont
|
||||||
class ExpandableSectionList<T extends Identifiable> extends StatefulWidget {
|
class ExpandableSectionList<T extends Identifiable> extends StatefulWidget {
|
||||||
final List<T> values;
|
final List<T> values;
|
||||||
final VoidCallback onSectionTitleTap;
|
final VoidCallback onSectionTitleTap;
|
||||||
final ExpandableSectionListItem Function(BuildContext context, int index) builder;
|
|
||||||
final _WidgetBuilder<List<Widget>, T> contentBuilder;
|
final _WidgetBuilder<List<Widget>, T> contentBuilder;
|
||||||
final _WidgetBuilder<List<IconButton>, T> actionsBuilder;
|
final _WidgetBuilder<List<IconButton>, T> actionsBuilder;
|
||||||
|
|
||||||
const ExpandableSectionList({
|
const ExpandableSectionList({
|
||||||
required this.builder,
|
|
||||||
required this.values,
|
required this.values,
|
||||||
required this.onSectionTitleTap,
|
required this.onSectionTitleTap,
|
||||||
required this.contentBuilder,
|
required this.contentBuilder,
|
||||||
|
@ -22,10 +20,10 @@ class ExpandableSectionList<T extends Identifiable> extends StatefulWidget {
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<ExpandableSectionList> createState() => _ExpandableSectionListState();
|
State<ExpandableSectionList> createState() => _ExpandableSectionListState<T>();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ExpandableSectionListState extends State<ExpandableSectionList> {
|
class _ExpandableSectionListState<T extends Identifiable> extends State<ExpandableSectionList<T>> {
|
||||||
final Map<String, GlobalKey<ExpandableSectionListItemState>> keysMap = {};
|
final Map<String, GlobalKey<ExpandableSectionListItemState>> keysMap = {};
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
Loading…
Reference in a new issue