checkForAppUpdate static method
Implementation
static void checkForAppUpdate(
BuildContext context, {
Widget? Function(Map<String, dynamic>)? customWidget,
}) {
if (_appId.isNotEmpty) {
if (!_showNativeUI && customWidget == null) {
throw Exception(
"set showNativeUI = 'true' in setAppId()"
" or/else return your custom widget in checkForAppUpdate() Method ",
);
} else if (_showNativeUI && customWidget != null) {
_printWarning(
"set showNativeUI = 'false' to show custom ui in setAppId() or/else remove custom widget from checkForAppUpdate() method");
}
FlutterAppUpdatePackagePlatform.instance.initMethod(context,
appId: _appId,
showNativeUI: _showNativeUI,
customWidget: customWidget);
} else {
throw Exception(
"Make sure you initialized AppsOnAir by calling initialize() method");
}
}