buildInitializeWrapper method
Implementation
Widget buildInitializeWrapper({
required Widget Function(CameraValue, Widget?) builder,
bool Function()? isInitialized,
Widget? child,
}) {
if (innerController == null) {
return const SizedBox.shrink();
}
return ValueListenableBuilder<CameraValue>(
valueListenable: controller,
builder: (_, CameraValue value, Widget? w) {
if (isInitialized?.call() ?? value.isInitialized) {
return builder(value, w);
}
return const SizedBox.shrink();
},
child: child,
);
}