install static method

Future install(
  1. String filePathOrUrlString, {
  2. String appId = '',
})

for Android : install apk by its file absolute path | for iOS: go to app store by the url; if the target platform is higher than android 24: a appId is not required (the caller's applicationId which is defined in build.gradle)

Implementation

static Future<dynamic> install(String filePathOrUrlString,
    {String appId = ''}) async {
  if (Platform.isAndroid) {
    return installApk(filePathOrUrlString, appId: appId);
  } else if (Platform.isIOS) {
    return gotoAppStore(filePathOrUrlString);
  }
  return {'isSuccess': false, 'errorMessage': 'unsupported device'};
}