SunnyList<T>.ofList constructor
SunnyList<T>.ofList ({
- required String id,
- ListTileBuilder<
T> ? itemBuilder, - SunnyListDelegate<
T?> ? type, - required SunnyObservableList<
T> list, - bool? primary,
- bool showDividers = false,
- DiffEquality diffEquality = const DiffEquality(),
- KeyGenerator<
T> ? keyGenerator, - Consumer<
Iterable< ? onChange,T> > - bool useStateTracker = true,
- bool reverse = false,
- bool? refreshWithPage,
- ScrollController? scrollController,
- EdgeInsets? padding,
- AnimationType animationType = AnimationType.size,
- AnimationType dismissAnimationType = AnimationType.slide,
- bool? shrinkWrap,
- SunnyListWidgetBuilder<
T> ? emptyState, - List<
SwipeActionBuilder< primarySwipeActions = const [],T> > - List<
SwipeActionBuilder< secondarySwipeActions = const [],T> > - SunnyListWidgetBuilder<
T> ? header,
Implementation
@protected
SunnyList.ofList({
required this.id,
this.itemBuilder,
SunnyListDelegate<T?>? type,
required SunnyObservableList<T> list,
this.primary,
this.showDividers = false,
this.diffEquality = const DiffEquality(),
this.keyGenerator,
this.onChange,
this.useStateTracker = true,
this.reverse = false,
this.refreshWithPage,
this.scrollController,
this.padding,
this.animationType = AnimationType.size,
this.dismissAnimationType = AnimationType.slide,
this.shrinkWrap,
this.emptyState,
this.primarySwipeActions = const [],
this.secondarySwipeActions = const [],
this.header,
}) : state = type ?? (() => SunnyListState()),
_start = [...list],
vstream = (() => list.changeStream.replacements()),
super(key: Key(id));