ListManager<I extends ItemClassWithAccessor, T extends ItemSourceState<ItemClassWithAccessor> , B extends Bloc> class
Intended to be the main entry point and the only widget one should
ever construct when using this package. UI needing to consume
the child blocs should do so via traditional BlocBuilder
implementations.
class YourListWidget extends StatelessWidget {
@override
build(context) {
return Scaffold(
appBar: AppBar(
title: Text('List Widget'),
),
body: BlocProvider<YourItemSourceBloc>(
create: (_) => YourItemSourceBloc(),
child: ListManager<
YourItemClass,
YourSourceBlocStateWithItems,
YourItemSourceBloc>(
filterProperties: ['property1'],
searchProperties: ['property2'],
child: Column(
children: [
BlocBuilder<FilterConditionsBloc, FilterConditionsState>(
builder: (context, state) {
return Text('Render your filter conditions UI.');
},
),
BlocBuilder<SearchQueryCubit, String>(
builder: (context, state) {
return Text('Render your Search UI.');
},
),
BlocBuilder<ItemListBloc, ItemListState>(
builder: (context, state) {
return Text('Render your list UI.');
},
),
],
),
),
),
);
}
}
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- ListManager
Constructors
-
ListManager({required Widget child, B? sourceBloc, List<
String> filterProperties = const [], List<String> searchProperties = const [], Key? key}) -
Intended to be the main entry point and the only widget one should
ever construct when using this package. UI needing to consume
the child blocs should do so via traditional
BlocBuilder
implementations.const
Properties
- child → Widget
-
The widget to be rendered. The build context will have access to all
of the blocs created by this widget to manage your list.
final
-
filterProperties
→ List<
String> -
A List of property keys that should be used
by the FilterConditionsBloc when generating available conditions.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
searchProperties
→ List<
String> -
A List of property keys that should be used
by the ItemListBloc while searching against the active query.
final
- sourceBloc → B?
-
Bloc
that will contain an ItemSourceState. If one is not provided the current BuildContext will be used to look it up.final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited