QueryResultBuilder<T>.sync constructor
QueryResultBuilder<T>.sync ({
- Key? key,
- required QueryResult<
T> result, - Widget? child,
- required ValueWidgetBuilder<
Object> failedBuilder, - required ValueWidgetBuilder<
T> succeededBuilder,
Consume ActionResult
failedBuilder
- Builder to be used when ActionResult.failed is given.doneBuilder
- Builder to be used when ActionResult.succeeded is given.
Implementation
QueryResultBuilder.sync({
Key? key,
required QueryResult<T> result,
Widget? child,
required ValueWidgetBuilder<Object> failedBuilder,
required ValueWidgetBuilder<T> succeededBuilder,
}) : super(
key: key,
stated: result,
child: child,
patternDefs: (b) => b
..error(OnState.isFailed(), failedBuilder)
..value(OnState.isSuceeded(), succeededBuilder),
);