From 70ae00865d226b7f6cb94507c3a03abe72f88eb8 Mon Sep 17 00:00:00 2001 From: Yassine Ben Massaoud <48437666+UnluckyY1@users.noreply.github.com> Date: Tue, 27 Aug 2024 09:10:19 +0100 Subject: [PATCH] fix: Update compileSdkVersion to fix Android release build with flutter 3.24 (#398) * fix:Update compileSdkVersion to fix Android release build with flutter 3.24 * wifi_iot(android): upgrade compleiSDKVersion to 34 * fix dart analyzer issues --------- Co-authored-by: Harsh Bhikadia --- packages/wifi_iot/android/build.gradle | 2 +- packages/wifi_scan/android/build.gradle | 2 +- packages/wifi_scan/example/lib/main.dart | 8 ++- pubspec.lock | 70 +++++++++++++----------- 4 files changed, 46 insertions(+), 36 deletions(-) diff --git a/packages/wifi_iot/android/build.gradle b/packages/wifi_iot/android/build.gradle index 9aca1f7d..c4d62eb2 100644 --- a/packages/wifi_iot/android/build.gradle +++ b/packages/wifi_iot/android/build.gradle @@ -24,7 +24,7 @@ apply plugin: 'com.android.library' android { namespace 'com.alternadom.wifiiot' - compileSdkVersion 30 + compileSdkVersion 34 defaultConfig { minSdkVersion 16 diff --git a/packages/wifi_scan/android/build.gradle b/packages/wifi_scan/android/build.gradle index 1efefb31..24ba46ad 100644 --- a/packages/wifi_scan/android/build.gradle +++ b/packages/wifi_scan/android/build.gradle @@ -27,7 +27,7 @@ apply plugin: 'kotlin-android' android { namespace 'dev.flutternetwork.wifi.wifi_scan' - compileSdkVersion 30 + compileSdkVersion 34 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 diff --git a/packages/wifi_scan/example/lib/main.dart b/packages/wifi_scan/example/lib/main.dart index c309cf1a..9a409ab3 100644 --- a/packages/wifi_scan/example/lib/main.dart +++ b/packages/wifi_scan/example/lib/main.dart @@ -31,14 +31,14 @@ class _MyAppState extends State { final can = await WiFiScan.instance.canStartScan(); // if can-not, then show error if (can != CanStartScan.yes) { - if (mounted) kShowSnackBar(context, "Cannot start scan: $can"); + if (context.mounted) kShowSnackBar(context, "Cannot start scan: $can"); return; } } // call startScan API final result = await WiFiScan.instance.startScan(); - if (mounted) kShowSnackBar(context, "startScan: $result"); + if (context.mounted) kShowSnackBar(context, "startScan: $result"); // reset access points. setState(() => accessPoints = []); } @@ -49,7 +49,9 @@ class _MyAppState extends State { final can = await WiFiScan.instance.canGetScannedResults(); // if can-not, then show error if (can != CanGetScannedResults.yes) { - if (mounted) kShowSnackBar(context, "Cannot get scanned results: $can"); + if (context.mounted) { + kShowSnackBar(context, "Cannot get scanned results: $can"); + } accessPoints = []; return false; } diff --git a/pubspec.lock b/pubspec.lock index 31cce37e..4968248f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -13,10 +13,10 @@ packages: dependency: transitive description: name: args - sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.5.0" async: dependency: transitive description: @@ -53,18 +53,18 @@ packages: dependency: transitive description: name: cli_util - sha256: b8db3080e59b2503ca9e7922c3df2072cf13992354d5e944074ffa836fba43b7 + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 url: "https://pub.dev" source: hosted - version: "0.4.0" + version: "0.4.1" collection: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.0" conventional_commit: dependency: transitive description: @@ -101,26 +101,26 @@ packages: dependency: transitive description: name: graphs - sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" http: dependency: transitive description: name: http - sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.2.2" http_parser: dependency: transitive description: name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + sha256: "40f592dd352890c3b60fec1b68e786cefb9603e05ff303dbc4dda49b304ecdf4" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.0" io: dependency: transitive description: @@ -133,10 +133,10 @@ packages: dependency: transitive description: name: json_annotation - sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" url: "https://pub.dev" source: hosted - version: "4.8.1" + version: "4.9.0" lints: dependency: transitive description: @@ -149,26 +149,26 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" melos: dependency: "direct dev" description: name: melos - sha256: "3f22f6cc629d72acf3acc8a7f8563384550290fa30790efa328c9cf606aa17d7" + sha256: "96e64bbade5712c3f010137e195bca9f1b351fac34ab1f322af492ae34032067" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.4.0" meta: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.15.0" mustache_template: dependency: transitive description: @@ -181,18 +181,18 @@ packages: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" platform: dependency: transitive description: name: platform - sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "3.1.5" pool: dependency: transitive description: @@ -277,10 +277,10 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" term_glyph: dependency: transitive description: @@ -293,10 +293,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.3" typed_data: dependency: transitive description: @@ -313,6 +313,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.0" + web: + dependency: transitive + description: + name: web + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 + url: "https://pub.dev" + source: hosted + version: "1.0.0" yaml: dependency: transitive description: @@ -325,9 +333,9 @@ packages: dependency: transitive description: name: yaml_edit - sha256: "1579d4a0340a83cf9e4d580ea51a16329c916973bffd5bd4b45e911b25d46bfd" + sha256: e9c1a3543d2da0db3e90270dbb1e4eebc985ee5e3ffe468d83224472b2194a5f url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.2.1" sdks: - dart: ">=3.0.0 <4.0.0" + dart: ">=3.4.0 <4.0.0"