diff --git a/lib/app_version_update.dart b/lib/app_version_update.dart index bc1bf20..fa38b69 100644 --- a/lib/app_version_update.dart +++ b/lib/app_version_update.dart @@ -85,15 +85,11 @@ class AppVersionUpdate { AppVersionResult? appVersionResult, bool? mandatory = false, String? title = 'New version available', - TextStyle? titleTextStyle = const TextStyle( - fontSize: 24.0, fontWeight: FontWeight.w500, color: Colors.black), + TextStyle? titleTextStyle = const TextStyle(fontSize: 24.0, fontWeight: FontWeight.w500, color: Colors.black), String? content = 'Would you like to update your application?', - TextStyle? contentTextStyle = const TextStyle( - fontSize: 16.0, fontWeight: FontWeight.w400, color: Colors.black), - ButtonStyle? cancelButtonStyle = const ButtonStyle( - backgroundColor: WidgetStatePropertyAll(Colors.redAccent)), - ButtonStyle? updateButtonStyle = const ButtonStyle( - backgroundColor: WidgetStatePropertyAll(Colors.green)), + TextStyle? contentTextStyle = const TextStyle(fontSize: 16.0, fontWeight: FontWeight.w400, color: Colors.black), + ButtonStyle? cancelButtonStyle = const ButtonStyle(backgroundColor: WidgetStatePropertyAll(Colors.redAccent)), + ButtonStyle? updateButtonStyle = const ButtonStyle(backgroundColor: WidgetStatePropertyAll(Colors.green)), String? cancelButtonText = 'UPDATE LATER', String? updateButtonText = 'UPDATE', TextStyle? cancelTextStyle = const TextStyle(color: Colors.white), diff --git a/lib/core/functions/convert_version.dart b/lib/core/functions/convert_version.dart index bbb15e8..d8f783a 100644 --- a/lib/core/functions/convert_version.dart +++ b/lib/core/functions/convert_version.dart @@ -31,14 +31,12 @@ convertVersion({String? version, String? versionStore}) { var maxLength = max(localVersion.length, storeVersion.length); for (int i = 0; i < maxLength; i++) { /// if any of the store elements is smaller than a corresponding element of local version we will exit the function with false. - if (int.parse(storeVersion.getOrDefault(i, '0')) < - int.parse(localVersion.getOrDefault(i, '0'))) { + if (int.parse(storeVersion.getOrDefault(i, '0')) < int.parse(localVersion.getOrDefault(i, '0'))) { return false; } /// if any element of the store version is greater than the corresponding local version, there is an update. - if (int.parse(storeVersion.getOrDefault(i, '0')) > - int.parse(localVersion.getOrDefault(i, '0'))) { + if (int.parse(storeVersion.getOrDefault(i, '0')) > int.parse(localVersion.getOrDefault(i, '0'))) { return true; } } diff --git a/pubspec.yaml b/pubspec.yaml index cac9e98..be69d93 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: app_version_update description: An easy and quick way to check if the local app is updated with the same version in their respective stores (Play Store / Apple Store ). # author: KauĂȘ Tomaz Murakami -version: 5.0.3 +version: 6.0.0 homepage: https://github.com/kauemurakami/app_version_update environment: