buildPreview method

Widget buildPreview(
  1. BuildContext context
)

Implementation

Widget buildPreview(BuildContext context) {
  final Widget builder;
  if (widget.viewType == CameraPickerViewType.video) {
    builder = Stack(
      children: <Widget>[
        Center(
          child: AspectRatio(
            aspectRatio: videoController.value.aspectRatio,
            child: VideoPlayer(videoController),
          ),
        ),
        buildPlayControlButton(context),
      ],
    );
  } else {
    builder = Image.file(previewFile);
  }
  return MergeSemantics(
    child: Semantics(
      label: Constants.textDelegate.sActionPreviewHint,
      image: true,
      onTapHint: Constants.textDelegate.sActionPreviewHint,
      sortKey: const OrdinalSortKey(1),
      child: builder,
    ),
  );
}