GoogleVisionBuilder.cropHints constructor
GoogleVisionBuilder.cropHints({
- Key? key,
- required Future<
GoogleVision> googleVision, - required ImageProvider<
Object> imageProvider, - required Widget builder(
- BuildContext,
- CropHintsAnnotation?,
- ImageDetail
- Widget onError()?,
- Widget onLoading()?,
- int maxResults = 10,
Creates a new instance of GoogleVisionBuilder for crop hint detections.
Implementation
factory GoogleVisionBuilder.cropHints({
Key? key,
required Future<GoogleVision> googleVision,
required ImageProvider imageProvider,
required Widget Function(BuildContext, CropHintsAnnotation?, ImageDetail)
builder,
Widget Function(Object)? onError,
Widget Function()? onLoading,
int maxResults = 10,
}) =>
GoogleVisionBuilder(
builder: (BuildContext context,
AsyncSnapshot<AnnotatedResponses> snapshot,
ImageDetail imageDetail) =>
_checkSnapshot(
snapshot,
onError: onError,
onLoading: onLoading,
) ??
builder(
context,
snapshot.data?.responses.first.cropHintsAnnotation,
imageDetail,
),
imageProvider: imageProvider,
googleVision: googleVision,
features: _getFeatures(AnnotationType.cropHints, maxResults),
onError: onError,
onLoading: onLoading,
);