diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..d8802fdd --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +ios/Libraries/FirebaseMLVisionBarcodeModel.framework/FirebaseMLVisionBarcodeModel filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore index 9bb16ee1..5fc54fe8 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ xcuserdata /ios/Podfile.lock /ios/Flutter/App.framework /ios/Flutter/Flutter.framework +/ios/Flutter/Flutter.podspec /ios/Flutter/Generated.xcconfig /ios/Flutter/.last_build_id /ios/Flutter/flutter_assets/* diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d637045..1695fd77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,17 +6,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [2.10.28] - 2021-05-28 +### Changed +- Vaccination event processing updated in health rules [#651](https://github.com/rokwire/safer-illinois-app/issues/651). +### Added +- Force onboarding if we are upgrading version lower than 2.10.28 [#651](https://github.com/rokwire/safer-illinois-app/issues/651). + + +## [2.10.27] - 2021-05-21 +### Added +- Control visibility of vaccination badge in HealthStatusPanel from FlexUI, set it currently disabled [#647](https://github.com/rokwire/safer-illinois-app/issues/647). +- Added vaccination information to consent texts for text results [#649](https://github.com/rokwire/safer-illinois-app/issues/649). + +## [2.10.26] - 2021-05-18 +### Changed +- Flutter 2.0 Integration [#637](https://github.com/rokwire/safer-illinois-app/issues/637). + ## [2.10.25] - 2021-05-14 +### Added - Add the External link icon to External links [#635](https://github.com/rokwire/safer-illinois-app/issues/635). + +### Fixed - Android: Fix for frequent notifications [#641](https://github.com/rokwire/safer-illinois-app/issues/641). ## [2.10.23] - 2021-05-07 +### Added +- Added Japanese language translation provided by @kamya-k + +### Changed - Changed DefaultTestMonitorInterval to reflect production [#624](https://github.com/rokwire/safer-illinois-app/issues/624). - Removed test result explanation disclaimers [#626](https://github.com/rokwire/safer-illinois-app/issues/626) -- Android: Fix crash in exposures - removeExpiredTime [#629](https://github.com/rokwire/safer-illinois-app/issues/629). -- Added Japanese language translation provided by @kamya-k + +### Fixed - Android: Fix crash in exposures - processExposures [#631](https://github.com/rokwire/safer-illinois-app/issues/631). - Android: Fix crash in exposures - onReceive [#633](https://github.com/rokwire/safer-illinois-app/issues/633). +- Android: Fix crash in exposures - removeExpiredTime [#629](https://github.com/rokwire/safer-illinois-app/issues/629). ## [2.10.22] - 2021-04-27 ### Fixed diff --git a/README.md b/README.md index 7039f817..26ea9070 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,11 @@ The official COVID-19 app of the University of Illinois. Powered by the [Rokwire ## Requirements -### [Flutter](https://flutter.dev/docs/get-started/install) v1.22.1 +### [Flutter](https://flutter.dev/docs/get-started/install) v2.0.6 ### [Android Studio](https://developer.android.com/studio) 3.6+ -### [Xcode](https://apps.apple.com/us/app/xcode/id497799835) 11.5 +### [Xcode](https://apps.apple.com/us/app/xcode/id497799835) 12.5 ### [CocoaPods](https://guides.cocoapods.org/using/getting-started.html) 1.9.3+ diff --git a/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java index c410ac6c..2f3a6c10 100644 --- a/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java +++ b/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java @@ -4,7 +4,6 @@ import androidx.annotation.NonNull; import io.flutter.embedding.engine.FlutterEngine; -import io.flutter.embedding.engine.plugins.shim.ShimPluginRegistry; /** * Generated file. Do not edit. @@ -14,13 +13,12 @@ @Keep public final class GeneratedPluginRegistrant { public static void registerWith(@NonNull FlutterEngine flutterEngine) { - ShimPluginRegistry shimPluginRegistry = new ShimPluginRegistry(flutterEngine); - de.mintware.barcode_scan.BarcodeScanPlugin.registerWith(shimPluginRegistry.registrarFor("de.mintware.barcode_scan.BarcodeScanPlugin")); + flutterEngine.getPlugins().add(new de.mintware.barcode_scan.BarcodeScanPlugin()); flutterEngine.getPlugins().add(new io.flutter.plugins.connectivity.ConnectivityPlugin()); flutterEngine.getPlugins().add(new io.flutter.plugins.deviceinfo.DeviceInfoPlugin()); flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.core.FlutterFirebaseCorePlugin()); flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.crashlytics.FlutterFirebaseCrashlyticsPlugin()); - flutterEngine.getPlugins().add(new io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin()); + flutterEngine.getPlugins().add(new io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingPlugin()); flutterEngine.getPlugins().add(new io.flutter.plugins.firebasemlvision.FirebaseMlVisionPlugin()); flutterEngine.getPlugins().add(new com.example.flutterimagecompress.FlutterImageCompressPlugin()); flutterEngine.getPlugins().add(new com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin()); @@ -30,13 +28,12 @@ public static void registerWith(@NonNull FlutterEngine flutterEngine) { flutterEngine.getPlugins().add(new com.lyokone.location.LocationPlugin()); flutterEngine.getPlugins().add(new io.flutter.plugins.packageinfo.PackageInfoPlugin()); flutterEngine.getPlugins().add(new io.flutter.plugins.pathprovider.PathProviderPlugin()); - flutter.plugins.screen.screen.ScreenPlugin.registerWith(shimPluginRegistry.registrarFor("flutter.plugins.screen.screen.ScreenPlugin")); flutterEngine.getPlugins().add(new io.flutter.plugins.sharedpreferences.SharedPreferencesPlugin()); flutterEngine.getPlugins().add(new com.tekartik.sqflite.SqflitePlugin()); flutterEngine.getPlugins().add(new name.avioli.unilinks.UniLinksPlugin()); flutterEngine.getPlugins().add(new io.flutter.plugins.urllauncher.UrlLauncherPlugin()); flutterEngine.getPlugins().add(new io.flutter.plugins.videoplayer.VideoPlayerPlugin()); - flutterEngine.getPlugins().add(new creativecreatorormaybenot.wakelock.WakelockPlugin()); + flutterEngine.getPlugins().add(new creativemaybeno.wakelock.WakelockPlugin()); flutterEngine.getPlugins().add(new io.flutter.plugins.webviewflutter.WebViewFlutterPlugin()); } } diff --git a/assets/flexUI.json b/assets/flexUI.json index 10c51361..0edafb36 100644 --- a/assets/flexUI.json +++ b/assets/flexUI.json @@ -20,7 +20,9 @@ "settings.notifications": ["covid19"], "settings.covid19": ["exposure_notifications", "provider_test_result", "qr_code"], "settings.privacy": ["statement"], - "settings.account": ["personal_info", "family_members"] + "settings.account": ["personal_info", "family_members"], + + "features": ["vaccination_badge"] }, "rules": { "roles" : { @@ -56,7 +58,8 @@ "onboarding.location_auth" : { "os": "android" } }, "enable" : { - "onboarding.bluetooth_auth" : false + "onboarding.bluetooth_auth" : false, + "features.vaccination_badge" : false } } } diff --git a/assets/health.rules.json b/assets/health.rules.json index 23607fc1..abc1cf34 100644 --- a/assets/health.rules.json +++ b/assets/health.rules.json @@ -9,21 +9,15 @@ "intervals": { "DefaultTestMonitorInterval": 4, "UndergraduateTestMonitorInterval": 4, - "VaccinatedTestMonitorInterval": 30, "UserTestMonitorInterval": null, "TestMonitorInterval": { - "condition": "require-vaccine", - "params": { "interval": { "scope": "past-and-current" }, "vaccine": "effective" }, - "success": "VaccinatedTestMonitorInterval", + "condition": "test-interval", "params": { "interval": "UserTestMonitorInterval" }, + "success": "UserTestMonitorInterval", "fail": { - "condition": "test-interval", "params": { "interval": "UserTestMonitorInterval" }, - "success": "UserTestMonitorInterval", - "fail": { - "condition": "test-user", "params": { "card.role": "Undergraduate", "card.student_level": "1U" }, - "success": "UndergraduateTestMonitorInterval", - "fail": "DefaultTestMonitorInterval" - } + "condition": "test-user", "params": { "card.role": "Undergraduate", "card.student_level": "1U" }, + "success": "UndergraduateTestMonitorInterval", + "fail": "DefaultTestMonitorInterval" } } }, @@ -39,8 +33,7 @@ "color": "#1ACD00", "name": "code.green.name", "description": "code.green.description", - "long_description": "code.green.long_description", - "visible": false + "long_description": "code.green.long_description" }, { "code": "yellow", @@ -134,12 +127,7 @@ "params": { "interval": { "min": 0, "max": 60, "scope": "future" } }, - "success": { - "code": "orange", - "priority": 1, - "next_step": "test.now.step", - "reason": "test.now.reason" - }, + "success": "test-required", "fail": { "code": "yellow", "priority": 3, @@ -151,52 +139,20 @@ }, "PCR.positive-NIP": { - "condition": "require-vaccine", + "condition": "require-test", "params": { - "interval": { "scope": "past" }, - "vaccine": "effective" + "interval": { "min": 0, "max": "TestMonitorInterval", "scope": "future", "current": true } }, "success": { - "condition": "require-test", - "params": { - "interval": { "min": 0, "max": "TestMonitorInterval", "scope": "future", "current": true } - }, - "success": { - "code": "yellow", - "priority": 3, - "next_step_html": "positive-nip.step.html", - "next_step_interval": "TestMonitorInterval", - "event_explanation": "positive-nip.explanation", - "warning": "test.future.warning" - }, - "fail": { - "code": "orange", - "priority": 1, - "next_step": "test.now.step", - "reason": "test.now.reason" - } + "code": "yellow", + "priority": 1, + "next_step_html": "positive-nip.step.html", + "next_step_interval": "TestMonitorInterval", + "event_explanation": "positive-nip.explanation", + "warning": "test.future.warning" }, - "fail": { - "condition": "require-test", - "params": { - "interval": { "min": 0, "max": "TestMonitorInterval", "scope": "future", "current": true } - }, - "success": { - "code": "yellow", - "priority": 1, - "next_step_html": "positive-nip.step.html", - "next_step_interval": "TestMonitorInterval", - "event_explanation": "positive-nip.explanation", - "warning": "test.future.warning" - }, - "fail": { - "code": "orange", - "priority": 1, - "next_step": "test.now.step", - "reason": "test.now.reason" - } - } - }, + "fail": "test-required" + }, "PCR.negative": "test-monitor", @@ -212,25 +168,10 @@ "next_step_interval": 1, "warning": "test.future.warning" }, - "fail": { - "code": "orange", - "priority": 1, - "next_step": "test.now.step", - "reason": "test.now.reason" - } + "fail": "test-required" }, "test-monitor": { - "condition": "require-vaccine", - "params": { - "interval": { "scope": "past" }, - "vaccine": "effective" - }, - "success": "test-monitor-vaccinated", - "fail": "test-monitor-default" - }, - - "test-monitor-default": { "condition": "require-test", "params": { "interval": { "min": 0, "max": "TestMonitorInterval", "scope": "future", "current": true } @@ -242,72 +183,16 @@ "next_step_interval": "TestMonitorInterval", "warning": "test.future.warning" }, - "fail": { - "code": "orange", - "priority": 1, - "next_step": "test.now.step", - "reason": "test.now.reason" - } - }, - "test-monitor-vaccinated": { - "condition": "require-test", - "params": { - "interval": { "min": 0, "max": "TestMonitorInterval", "scope": "future", "current": true } - }, - "success": { - "code": "yellow", - "priority": 3, - "next_step": "test.monitor.step", - "next_step_interval": "TestMonitorInterval", - "warning": "test.future.warning" - }, - "fail": { - "code": "orange", - "priority": 1, - "next_step": "test.now.step", - "reason": "test.now.reason" - } + "fail": "test-required" }, - "force-test": { - "condition": "require-test", - "params": { - "interval": { "min": 0, "scope": "future" } - }, - "success": { - "condition": "timeout", - "params": { - "interval": { "min": 0, "max": 3, "scope": "future", "origin": "referenceDate" } - }, - "success": { - "condition": "require-test", - "params": { - "interval": { "min": 4, "scope": "future", "origin": "referenceDate" } - }, - "success": null, - "fail": { - "code": "orange", - "priority": 4, - "next_step_html": "test.another.now.step.html", - "reason": "test.past.reason" - } - }, - "fail": { - "code": "orange", - "priority": 4, - "next_step_html": "test.after.step.html", - "next_step_interval": { "value": 3, "origin": "referenceDate" }, - "reason": "test.after.reason" - } - }, - "fail": { - "code": "orange", - "priority": 4, - "next_step_html": "test.multiple.step.html", - "reason": "test.required.reason" - } + "test-required": { + "code": "orange", + "priority": 1, + "next_step": "test.now.step", + "reason": "test.now.reason" }, - + "symptoms-match": { "code": "orange", "priority": 1, @@ -326,12 +211,7 @@ "interval": { "min": 4, "max": null, "scope": "future" } }, "success": null, - "fail": { - "code": "orange", - "priority": 1, - "next_step": "test.now.step", - "reason": "test.now.reason" - } + "fail": "test-required" }, "fail": { "code": "orange", @@ -341,6 +221,14 @@ "reason": "exposure.reason" } }, + + "vaccinated": { + "code": "green", + "priority": 4, + "next_step_html": "vaccinated.step.html", + "reason": "vaccinated.reason", + "fcm_topic": "vaccinated" + }, "quarantine-on": { "code": "orange", @@ -356,14 +244,15 @@ "interval": { "scope": "past" }, "vaccine": "effective" }, - "success": { + "success": "vaccinated", + "fail": { "condition": "require-test", "params": { "interval": { "min": 0, "max": "TestMonitorInterval", "scope": "future", "current": true } }, "success": { "code": "yellow", - "priority": -3, + "priority": -1, "next_step": "test.resume.step", "next_step_interval": "TestMonitorInterval", "warning": "test.future.warning" @@ -374,28 +263,48 @@ "next_step": "test.now.step", "reason": "test.now.reason" } + } + }, + + "force-test": { + "condition": "require-test", + "params": { + "interval": { "min": 0, "scope": "future" } }, - "fail": { - "condition": "require-test", + "success": { + "condition": "timeout", "params": { - "interval": { "min": 0, "max": "TestMonitorInterval", "scope": "future", "current": true } + "interval": { "min": 0, "max": 3, "scope": "future", "origin": "referenceDate" } }, "success": { - "code": "yellow", - "priority": -1, - "next_step": "test.resume.step", - "next_step_interval": "TestMonitorInterval", - "warning": "test.future.warning" + "condition": "require-test", + "params": { + "interval": { "min": 4, "scope": "future", "origin": "referenceDate" } }, + "success": null, + "fail": { + "code": "orange", + "priority": 4, + "next_step_html": "test.another.now.step.html", + "reason": "test.past.reason" + } + }, "fail": { "code": "orange", - "priority": -1, - "next_step": "test.now.step", - "reason": "test.now.reason" + "priority": 4, + "next_step_html": "test.after.step.html", + "next_step_interval": { "value": 3, "origin": "referenceDate" }, + "reason": "test.after.reason" } + }, + "fail": { + "code": "orange", + "priority": 4, + "next_step_html": "test.multiple.step.html", + "reason": "test.required.reason" } }, - + "out-of-test-compliance": { "condition": "require-test", "params": { @@ -408,12 +317,7 @@ "next_step_interval": 1, "warning": "test.future.warning" }, - "fail": { - "code": "orange", - "priority": 1, - "next_step": "test.now.step", - "reason": "test.now.reason" - } + "fail": "test-required" }, "exempt-on": { @@ -427,10 +331,13 @@ "interval": { "min": 0, "max": "ExemptInterval", "scope": "future" } }, "success": { - "code": "orange", - "priority": 1, - "next_step": "test.now.step", - "reason": "test.now.reason" + "condition": "require-vaccine", + "params": { + "interval": { "scope": "past" }, + "vaccine": "effective" + }, + "success": "vaccinated", + "fail": "test-required" }, "fail": { "code": "yellow", @@ -451,17 +358,45 @@ }, "exempt-off": { - "code": "orange", - "priority": -1, - "next_step": "test.now.step", - "reason": "Your status changed to Orange because your exempt from testing status was canceled" + "condition": "require-vaccine", + "params": { + "interval": { "scope": "past" }, + "vaccine": "effective" + }, + "success": { + "code": "green", + "priority": -4, + "next_step_html": "vaccinated.step.html", + "reason": "Your status changed to Green because your exempt from testing status was canceled", + "fcm_topic": "vaccinated" + }, + "fail": { + "code": "orange", + "priority": -1, + "next_step": "test.now.step", + "reason": "Your status changed to Orange because your exempt from testing status was canceled" + } }, "release": { - "code": "orange", - "priority": -1, - "next_step": "release.step", - "reason": "release.reason" + "condition": "require-vaccine", + "params": { + "interval": { "scope": "past" }, + "vaccine": "effective" + }, + "success": { + "code": "green", + "priority": -4, + "next_step_html": "vaccinated.step.html", + "reason": "Your status changed to Green because your exempt from testing status was canceled", + "fcm_topic": "vaccinated" + }, + "fail": { + "code": "orange", + "priority": -1, + "next_step": "release.step", + "reason": "release.reason" + } } }, @@ -850,7 +785,7 @@ "rules": [ { "vaccine": "effective", - "status": "test-monitor-vaccinated" + "status": "vaccinated" } ] }, @@ -879,6 +814,8 @@ "symptoms.reason": "Your status changed to Orange because you self-reported symptoms consistent with the virus.", "exposure.step.html": "

You have likely been exposed to a person who is infected with COVID-19.

", "exposure.reason": "Your status changed to Orange because you received an exposure notification.", + "vaccinated.step.html": "

We have a verified record of your completed COVID-19 vaccination on file.

Your vaccination status replaces testing for compliance and building access until further notice.

Please get an on-campus COVID-19 test if you experience symptoms.

Continue to monitor university communications for any changes to your testing policy.

", + "vaccinated.reason": "Your status changed to Green because your vaccination is already effective.", "quarantine-on.step": "Stay at home and avoid contacts", "quarantine-on.reason": "Your status changed to Orange because the Public Health department placed you in Quarantine.", "release.step": "Take a SHIELD Saliva Test", @@ -905,8 +842,8 @@ "symptoms.diarrhea": "Diarrhea", "code.green.name": "Green", - "code.green.description": "Recent Antibodies", - "code.green.long_description": "Green: Recent antibodies", + "code.green.description": "Fully vaccinated", + "code.green.long_description": "Green: Fully vaccinated", "code.yellow.name": "Yellow", "code.yellow.description": "Recent Negative Test", "code.yellow.long_description": "Yellow: Recent negative test", @@ -942,6 +879,8 @@ "symptoms.reason": "Su estado cambió a Naranja porque usted mismo informó de síntomas consistentes con el virus.", "exposure.step.html": "

Es probable que haya estado expuesto a una persona infectada con COVID-19.

", "exposure.reason": "Su estado cambió a Naranja porque recibió una notificación de exposición.", + "vaccinated.step.html": "

Tenemos un registro verificado de su vacunación COVID-19 completa en el archivo.

Su estado de vacunación reemplaza las pruebas de cumplimiento y acceso al edificio hasta nuevo aviso.

Hágase una prueba de COVID-19 en el campus si experimenta síntomas.

Continúe monitoreando las comunicaciones de la universidad para detectar cualquier cambio en su política de exámenes.

", + "vaccinated.reason": "Su estado cambió a Verde porque su vacunación ya es efectiva.", "quarantine-on.step": "Quédese en casa y evite los contactos", "quarantine-on.reason": "Su estado cambió a Orange porque el departamento de Salud Pública lo puso en cuarentena.", "release.step": "Realice una prueba de saliva SHIELD", @@ -968,8 +907,8 @@ "symptoms.diarrhea": "Diarrea", "code.green.name": "Verde", - "code.green.description": "Anticuerpos recientes", - "code.green.long_description": "Verde: anticuerpos recientes", + "code.green.description": "Totalmente vacunado", + "code.green.long_description": "Verde: totalmente vacunado", "code.yellow.name": "Amarillo", "code.yellow.description": "Prueba negativa reciente", "code.yellow.long_description": "Amarillo: prueba negativa reciente", @@ -1005,6 +944,8 @@ "symptoms.reason": "您的狀態更改為橙色,因為您自我報告的症狀與病毒一致。", "exposure.step.html": "

您可能已經接觸了感染了COVID-19的人。

", "exposure.reason": "您的狀態更改為橙色,因為您收到了曝光通知。", + "vaccinated.step.html": "

我們記錄了您完成的COVID-19疫苗接種的經過驗證的記錄。

您的疫苗接種狀態將取代合規性測試和建立訪問權限,直至另行通知。

如果您出現症狀,請進行校園 COVID-19 測試。

繼續監控大學通訊,了解您的考試政策是否有任何變化。

", + "vaccinated.reason": "您的狀態已更改為“綠色”,因為您的疫苗接種已經有效。", "quarantine-on.step": "呆在家裡,避免接觸", "quarantine-on.reason": "您的狀態更改為“橙色”,因為公共衛生部門已將您隔離。", "release.step": "參加SHIELD唾液測試", @@ -1031,8 +972,8 @@ "symptoms.diarrhea":"腹瀉", "code.green.name": "绿色", - "code.green.description": "最近抗體", - "code.green.long_description": "绿色:最近抗体", + "code.green.description": "全面接種", + "code.green.long_description": "绿色:全面接種", "code.yellow.name": "黄色", "code.yellow.description": "最近的陰性測試", "code.yellow.long_description": "黄色:最近阴性测试", @@ -1068,6 +1009,8 @@ "symptoms.reason": "COVID-19の症状と一致する症状を自己申告したため、ステータスがオレンジに変わりました。", "exposure.step.html": "

COVID-19に感染している人と接触した可能性があります。

", "exposure.reason": "接触通知を受信したため、ステータスがオレンジに変更されました。", + "vaccinated.step.html": "

完了したCOVID-19ワクチン接種の確認済みの記録がファイルにあります。

あなたのワクチン接種状況は、追って通知があるまで、コンプライアンスと建物へのアクセスのテストに取って代わります。

症状が出た場合は、キャンパス内のCOVID-19検査を受けてください。

テストポリシーに変更がないか、大学のコミュニケーションを引き続き監視します。

", + "vaccinated.reason": "予防接種がすでに有効になっているため、ステータスが緑に変わりました。", "quarantine-on.step": "家にいて、他の人との接触を避けてください。", "quarantine-on.reason": "Public Health departmentにより隔離状態に置かれているため、ステータスがオレンジに変更されました。", "release.step": "SHIELD唾液検査を受けてください", @@ -1094,8 +1037,8 @@ "symptoms.diarrhea": "下痢", "code.green.name": "緑", - "code.green.description": "抗体が検収されました", - "code.green.long_description": "緑抗体が検収されました", + "code.green.description": "完全に予防接種済み", + "code.green.long_description": "緑:完全に予防接種済み", "code.yellow.name": "黄:", "code.yellow.description": "最近の陰性結果", "code.yellow.long_description": "黄:最近の陰性結果", diff --git a/assets/strings.en.json b/assets/strings.en.json index db87101f..8702f144 100644 --- a/assets/strings.en.json +++ b/assets/strings.en.json @@ -218,7 +218,7 @@ "panel.settings.home.button.feedback.title": "Submit Feedback", "panel.settings.home.button.feedback.hint": "", "panel.settings.home.covid19.exposure_notifications": "Exposure Notifications", - "panel.settings.home.covid19.provider_test_result": "Health Provider Test Results", + "panel.settings.home.covid19.provider_test_result": "Health Provider Test Results and Vaccine Information", "panel.settings.home.covid19.title": "COVID-19", "panel.settings.home.covid19.qr_code.button.title": "QR Code", "panel.settings.home.covid19.transfer.button.title": "Transfer", @@ -462,7 +462,7 @@ "panel.health.onboarding.covid19.consent.label.description": "Exposure Notifications", "panel.health.onboarding.covid19.consent.label.content1": "If you consent to exposure notifications, you allow your phone to send an anonymous Bluetooth signal to nearby Safer Illinois app users who are also using this feature. Your phone will receive and record a signal from their phones as well. If one of those users tests positive for COVID-19 in the next 14 days, the app will alert you to your potential exposure and advise you on next steps. Your identity and health status will remain anonymous, as will the identity and health status of all other users.", "panel.health.onboarding.covid19.consent.check_box.label.participate": "I consent to participate in the Exposure Notification System (requires Bluetooth to be ON).", - "panel.health.onboarding.covid19.consent.check_box.label.allow": "I consent to allow my healthcare provider to provide my test results.", + "panel.health.onboarding.covid19.consent.check_box.label.allow": "I consent to allow my healthcare provider to provide my test results and vaccine information.", "panel.health.onboarding.covid19.consent.label.content2": "Automatic Test Results", "panel.health.onboarding.covid19.consent.label.content3": "I consent to connect test results from my healthcare provider with the Safer Illinois app.", "panel.health.onboarding.covid19.consent.label.content4": "Your participation in these COVID-19 features is voluntary, and you can stop at any time", diff --git a/assets/strings.es.json b/assets/strings.es.json index be675e33..610cf179 100644 --- a/assets/strings.es.json +++ b/assets/strings.es.json @@ -218,7 +218,7 @@ "panel.settings.home.button.feedback.title": "Enviar comentarios", "panel.settings.home.button.feedback.hint": "", "panel.settings.home.covid19.exposure_notifications": "Notificaciones de exposición", - "panel.settings.home.covid19.provider_test_result": "Resultados de la prueba del proveedor de salud", + "panel.settings.home.covid19.provider_test_result": "Resultados de las pruebas del proveedor de servicios de salud e información sobre las vacunas", "panel.settings.home.covid19.title": "COVID-19", "panel.settings.home.covid19.qr_code.button.title": "Código QR", "panel.settings.home.covid19.transfer.button.title": "Transferir", @@ -462,7 +462,7 @@ "panel.health.onboarding.covid19.consent.label.description": "Notificaciones de exposición", "panel.health.onboarding.covid19.consent.label.content1": "Si acepta las notificaciones de exposición, permite que su teléfono envíe una señal anónima de Bluetooth a los usuarios cercanos de la aplicación Safer Illinois que también usan esta función. Su teléfono también recibirá y grabará una señal de sus teléfonos. Si uno de esos usuarios da positivo por COVID-19 en los próximos 14 días, la aplicación lo alertará sobre su posible exposición y le aconsejará sobre los próximos pasos. Su identidad y estado de salud permanecerán anónimos, al igual que la identidad y el estado de salud de todos los demás usuarios.", "panel.health.onboarding.covid19.consent.check_box.label.participate": "Doy mi consentimiento para participar en el Sistema de notificación de exposición (requiere que Bluetooth esté activado).", - "panel.health.onboarding.covid19.consent.check_box.label.allow": "Doy mi consentimiento para permitir que mi proveedor de atención médica proporcione los resultados de mi prueba.", + "panel.health.onboarding.covid19.consent.check_box.label.allow": "Doy mi consentimiento para que mi proveedor de atención médica proporcione los resultados de mis pruebas y la información de la vacuna.", "panel.health.onboarding.covid19.consent.label.content2": "Resultados automáticos de prueba", "panel.health.onboarding.covid19.consent.label.content3": "Doy mi consentimiento para conectar los resultados de las pruebas de mi proveedor de atención médica con la aplicación Safer Illinois.", "panel.health.onboarding.covid19.consent.label.content4": "Su participación es voluntaria y puede detenerse en cualquier momento", diff --git a/assets/strings.ja.json b/assets/strings.ja.json index 8d40baa4..f9ea6330 100644 --- a/assets/strings.ja.json +++ b/assets/strings.ja.json @@ -218,7 +218,7 @@ "panel.settings.home.button.feedback.title": "Submit Feedback", "panel.settings.home.button.feedback.hint": "", "panel.settings.home.covid19.exposure_notifications": "接続通知", - "panel.settings.home.covid19.provider_test_result": "Health Provider Test Results", + "panel.settings.home.covid19.provider_test_result": "医療提供者の検査結果とワクチン情報", "panel.settings.home.covid19.title": "COVID-19", "panel.settings.home.covid19.qr_code.button.title": "QR Code", "panel.settings.home.covid19.transfer.button.title": "Transfer", @@ -462,7 +462,7 @@ "panel.health.onboarding.covid19.consent.label.description": "接続通知", "panel.health.onboarding.covid19.consent.label.content1": "接続通知に承諾した場合は、スマホがこの機能を使用している近くのSafer Illinoisアプリのユーザーに匿名のBluetooth信号を送信するようになります。同様にスマホは、他のユーザーからの信号を受信して記録します。次の14日以内に他のユーザーがCOVID-19の陽性となった場合、アプリは曝露された可能性があることを警告して次のステップについてアドバイスします。すべてのユーザーの身元と健康ステータスは匿名となります。", "panel.health.onboarding.covid19.consent.check_box.label.participate": "接続通知システムに参加することに同意します(Bluetoothをオンにする必要があります)。", - "panel.health.onboarding.covid19.consent.check_box.label.allow": "私は医療従事者が検査結果を提供することに同意します。", + "panel.health.onboarding.covid19.consent.check_box.label.allow": "私は、私の医療提供者が私の検査結果とワクチン情報を提供することを許可することに同意します。", "panel.health.onboarding.covid19.consent.label.content2": "自動検査結果", "panel.health.onboarding.covid19.consent.label.content3": "医療従事者からの検査結果をSafer Illinoisアプリに接続することに同意します。", "panel.health.onboarding.covid19.consent.label.content4": "COVID-19機能への参加は自発的なものであり、いつでも同意を撤回することができます。", diff --git a/assets/strings.zh.json b/assets/strings.zh.json index add1dcc8..9b0ef908 100644 --- a/assets/strings.zh.json +++ b/assets/strings.zh.json @@ -218,7 +218,7 @@ "panel.settings.home.button.feedback.title": "提交反馈", "panel.settings.home.button.feedback.hint": "", "panel.settings.home.covid19.exposure_notifications": "接触通知", - "panel.settings.home.covid19.provider_test_result": "健康提供者测试结果 ", + "panel.settings.home.covid19.provider_test_result": "衛生人員測試結果和疫苗信息", "panel.settings.home.covid19.title": "COVID-19", "panel.settings.home.covid19.qr_code.button.title": "二維碼", "panel.settings.home.covid19.transfer.button.title": "傳遞", @@ -462,7 +462,7 @@ "panel.health.onboarding.covid19.consent.label.description": "接触通知", "panel.health.onboarding.covid19.consent.label.content1": "如果您同意接触通知,則允許您的手機向附近的也在使用此功能的Safer Illinois應用程序用戶發送匿名藍牙信號。 您的電話也將接收並記錄來自其電話的信號。 如果其中一個用戶在接下來的14天內檢測出COVID-19呈陽性,則該應用程序將提醒您可能的暴露情況,並為您提供下一步建議。 您的身份和健康狀態以及所有其他用戶的身份和健康狀態將保持匿名。", "panel.health.onboarding.covid19.consent.check_box.label.participate": "我同意参与接触通知系统(需要打开蓝牙).", - "panel.health.onboarding.covid19.consent.check_box.label.allow": "我同意让我的医疗保健提供者提供我的测试结果.", + "panel.health.onboarding.covid19.consent.check_box.label.allow": "我同意允許我的醫療保健提供者提供我的測試結果和疫苗信息。", "panel.health.onboarding.covid19.consent.label.content2": "自动测试结果", "panel.health.onboarding.covid19.consent.label.content3": "我同意將我的醫療保健提供者的測試結果與Safer Illinois應用程序聯繫起來。", "panel.health.onboarding.covid19.consent.label.content4": "您的参与是自愿的,您可以随时停止.", diff --git a/ios/Flutter/Flutter.podspec b/ios/Flutter/Flutter.podspec deleted file mode 100644 index 5ca30416..00000000 --- a/ios/Flutter/Flutter.podspec +++ /dev/null @@ -1,18 +0,0 @@ -# -# NOTE: This podspec is NOT to be published. It is only used as a local source! -# - -Pod::Spec.new do |s| - s.name = 'Flutter' - s.version = '1.0.0' - s.summary = 'High-performance, high-fidelity mobile apps.' - s.description = <<-DESC -Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS. - DESC - s.homepage = 'https://flutter.io' - s.license = { :type => 'MIT' } - s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } - s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.ios.deployment_target = '8.0' - s.vendored_frameworks = 'Flutter.framework' -end diff --git a/ios/Libraries/FirebaseMLVisionBarcodeModel.framework/FirebaseMLVisionBarcodeModel b/ios/Libraries/FirebaseMLVisionBarcodeModel.framework/FirebaseMLVisionBarcodeModel new file mode 100755 index 00000000..31f519a6 --- /dev/null +++ b/ios/Libraries/FirebaseMLVisionBarcodeModel.framework/FirebaseMLVisionBarcodeModel @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4adf4794df6c1a75ddee15bc363b1b228c5368d7f526ca3f3ae908579ebcd88 +size 183496104 diff --git a/ios/Libraries/FirebaseMLVisionBarcodeModel.framework/Modules/module.modulemap b/ios/Libraries/FirebaseMLVisionBarcodeModel.framework/Modules/module.modulemap new file mode 100755 index 00000000..c0c0aadb --- /dev/null +++ b/ios/Libraries/FirebaseMLVisionBarcodeModel.framework/Modules/module.modulemap @@ -0,0 +1,18 @@ +framework module FirebaseMLVisionBarcodeModel { + export * + module * { export * } + link "c++" + link "z" + link framework "AVFoundation" + link framework "Accelerate" + link framework "CoreFoundation" + link framework "CoreGraphics" + link framework "CoreImage" + link framework "CoreMedia" + link framework "CoreVideo" + link framework "Foundation" + link framework "QuartzCore" + link framework "Security" + link framework "SystemConfiguration" + link framework "UIKit" +} diff --git a/ios/Podfile b/ios/Podfile index 71bfdc27..6fa5a192 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -36,8 +36,11 @@ target 'Runner' do pod 'ZXingObjC', '3.6.4' pod 'PPBlinkID', '~> 5.3.0' pod 'HKDFKit', '0.0.3' - pod 'Firebase/MLVisionBarcodeModel' +# 'Firebase/MLVisionBarcodeModel' is required by 'firebase_ml_vision' plugin from pubspec.yaml. +# Unable to include it in the podfile due to a conflict with FirebaseCore version number. +# Temporarly add 'FirebaseMLVisionBarcodeModel.framework' to the project and link it explicitely. +# pod 'Firebase/MLVisionBarcodeModel' flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index d2c3cfbb..48f3625a 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -12,6 +12,7 @@ 2605FF55236C13A6002F71BE /* GoogleService-Info-Prod.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2605FF53236C13A6002F71BE /* GoogleService-Info-Prod.plist */; }; 2626D94B22DC99C800F6BC2F /* NSString+InaJson.m in Sources */ = {isa = PBXBuildFile; fileRef = 2626D94922DC99C700F6BC2F /* NSString+InaJson.m */; }; 2626D94E22DCB80000F6BC2F /* MapMarkerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2626D94D22DCB80000F6BC2F /* MapMarkerView.m */; }; + 2639CC3B2656607100D8469A /* FirebaseMLVisionBarcodeModel.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2639CC3A2656607100D8469A /* FirebaseMLVisionBarcodeModel.framework */; }; 266FA50323E0388B00F800F5 /* MapController.m in Sources */ = {isa = PBXBuildFile; fileRef = 266FA50223E0388B00F800F5 /* MapController.m */; }; 268F30F122E5DD7900547FE1 /* travel-mode-walk@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 268F30ED22E5DD7900547FE1 /* travel-mode-walk@2x.png */; }; 268F30F222E5DD7900547FE1 /* travel-mode-transit@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 268F30EE22E5DD7900547FE1 /* travel-mode-transit@2x.png */; }; @@ -92,6 +93,7 @@ 2626D94A22DC99C700F6BC2F /* NSString+InaJson.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+InaJson.h"; sourceTree = ""; }; 2626D94C22DCB80000F6BC2F /* MapMarkerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MapMarkerView.h; sourceTree = ""; }; 2626D94D22DCB80000F6BC2F /* MapMarkerView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MapMarkerView.m; sourceTree = ""; }; + 2639CC3A2656607100D8469A /* FirebaseMLVisionBarcodeModel.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = FirebaseMLVisionBarcodeModel.framework; sourceTree = ""; }; 2668953022E1E074003CAB94 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; }; 266FA50123E0388B00F800F5 /* MapController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapController.h; sourceTree = ""; }; 266FA50223E0388B00F800F5 /* MapController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapController.m; sourceTree = ""; }; @@ -200,12 +202,21 @@ buildActionMask = 2147483647; files = ( BB7BF12F5D3356D25889D23A /* Pods_Runner.framework in Frameworks */, + 2639CC3B2656607100D8469A /* FirebaseMLVisionBarcodeModel.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 2639CC392656604500D8469A /* Libraries */ = { + isa = PBXGroup; + children = ( + 2639CC3A2656607100D8469A /* FirebaseMLVisionBarcodeModel.framework */, + ); + path = Libraries; + sourceTree = ""; + }; 2696995822C38A7F00B3290E /* Resources */ = { isa = PBXGroup; children = ( @@ -327,6 +338,7 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, A4FE37309F85C78E8A871D27 /* Pods */, + 2639CC392656604500D8469A /* Libraries */, F8180DF05DB99BBF17C34614 /* Frameworks */, 26E0DD772525C5BF002B7B11 /* build.sh */, ); @@ -595,9 +607,15 @@ inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", "${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework", - "${PODS_ROOT}/../Flutter/Flutter.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseCore/FirebaseCore.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseCoreDiagnostics/FirebaseCoreDiagnostics.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseCrashlytics/FirebaseCrashlytics.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseInstallations/FirebaseInstallations.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseInstanceID/FirebaseInstanceID.framework", + "${BUILT_PRODUCTS_DIR}/FirebaseMessaging/FirebaseMessaging.framework", "${BUILT_PRODUCTS_DIR}/GTMSessionFetcher/GTMSessionFetcher.framework", "${BUILT_PRODUCTS_DIR}/GoogleAPIClientForREST/GoogleAPIClientForREST.framework", + "${BUILT_PRODUCTS_DIR}/GoogleDataTransport/GoogleDataTransport.framework", "${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework", "${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework", "${BUILT_PRODUCTS_DIR}/HKDFKit/HKDFKit.framework", @@ -609,6 +627,7 @@ "${BUILT_PRODUCTS_DIR}/Reachability/Reachability.framework", "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", "${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder/SDWebImageWebPCoder.framework", + "${BUILT_PRODUCTS_DIR}/SwiftProtobuf/SwiftProtobuf.framework", "${BUILT_PRODUCTS_DIR}/Toast/Toast.framework", "${BUILT_PRODUCTS_DIR}/ZXingObjC/ZXingObjC.framework", "${BUILT_PRODUCTS_DIR}/barcode_scan/barcode_scan.framework", @@ -623,7 +642,6 @@ "${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework", "${BUILT_PRODUCTS_DIR}/package_info/package_info.framework", "${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework", - "${BUILT_PRODUCTS_DIR}/screen/screen.framework", "${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework", "${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework", "${BUILT_PRODUCTS_DIR}/uni_links/uni_links.framework", @@ -635,9 +653,15 @@ name = "[CP] Embed Pods Frameworks"; outputPaths = ( "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCore.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCoreDiagnostics.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseCrashlytics.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstallations.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseInstanceID.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FirebaseMessaging.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GTMSessionFetcher.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleAPIClientForREST.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleDataTransport.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HKDFKit.framework", @@ -649,6 +673,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Reachability.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImageWebPCoder.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftProtobuf.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Toast.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ZXingObjC.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/barcode_scan.framework", @@ -663,7 +688,6 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/screen.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/uni_links.framework", @@ -830,6 +854,7 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", + "$(PROJECT_DIR)/Libraries", ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -909,6 +934,7 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", + "$(PROJECT_DIR)/Libraries", ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -994,6 +1020,7 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", + "$(PROJECT_DIR)/Libraries", ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -1073,6 +1100,7 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", + "$(PROJECT_DIR)/Libraries", ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -1208,6 +1236,7 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", + "$(PROJECT_DIR)/Libraries", ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -1238,6 +1267,7 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)/Flutter", + "$(PROJECT_DIR)/Libraries", ); INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata index 1d526a16..919434a6 100644 --- a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/ios/Runner/GeneratedPluginRegistrant.m b/ios/Runner/GeneratedPluginRegistrant.m index 8fc51a45..d178aa33 100644 --- a/ios/Runner/GeneratedPluginRegistrant.m +++ b/ios/Runner/GeneratedPluginRegistrant.m @@ -88,12 +88,6 @@ @import path_provider; #endif -#if __has_include() -#import -#else -@import screen; -#endif - #if __has_include() #import #else @@ -153,7 +147,6 @@ + (void)registerWithRegistry:(NSObject*)registry { [LocationPlugin registerWithRegistrar:[registry registrarForPlugin:@"LocationPlugin"]]; [FLTPackageInfoPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTPackageInfoPlugin"]]; [FLTPathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTPathProviderPlugin"]]; - [ScreenPlugin registerWithRegistrar:[registry registrarForPlugin:@"ScreenPlugin"]]; [FLTSharedPreferencesPlugin registerWithRegistrar:[registry registrarForPlugin:@"FLTSharedPreferencesPlugin"]]; [SqflitePlugin registerWithRegistrar:[registry registrarForPlugin:@"SqflitePlugin"]]; [UniLinksPlugin registerWithRegistrar:[registry registrarForPlugin:@"UniLinksPlugin"]]; diff --git a/lib/main.dart b/lib/main.dart index 6eb54de8..863b7557 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -37,6 +37,7 @@ import 'package:illinois/service/Onboarding.dart'; import 'package:illinois/service/Localization.dart'; import 'package:illinois/ui/RootPanel.dart'; import 'package:illinois/service/Styles.dart'; +import 'package:illinois/utils/Utils.dart'; final AppExitListener appExitListener = AppExitListener(); @@ -140,6 +141,12 @@ class _AppState extends State implements NotificationsListener { // This is just a placeholder to take some action on app upgrade. String lastRunVersion = Storage().lastRunVersion; if ((lastRunVersion == null) || (lastRunVersion != Config().appVersion)) { + + // Force unboarding to concent vaccination (#651) + if (AppVersion.compareVersions(lastRunVersion, '2.10.28') < 0) { + Storage().onBoardingPassed = false; + } + Storage().lastRunVersion = Config().appVersion; } diff --git a/lib/model/Exposure.dart b/lib/model/Exposure.dart index d3857c38..2afa6276 100644 --- a/lib/model/Exposure.dart +++ b/lib/model/Exposure.dart @@ -56,7 +56,7 @@ class ExposureTEK { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { ExposureTEK value; try { value = ExposureTEK.fromJson((entry as Map)?.cast()); } @@ -70,7 +70,7 @@ class ExposureTEK { static List listToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (ExposureTEK value in values) { json.add(value?.toJson()); } @@ -97,7 +97,7 @@ class ExposureTEK { static List mapToJson(Map entries) { List json; if (entries != null) { - json = []; + json = []; for (ExposureTEK value in entries.values) { json.add(value?.toJson()); } diff --git a/lib/model/Groups.dart b/lib/model/Groups.dart index 8a619455..a3f1f0bc 100644 --- a/lib/model/Groups.dart +++ b/lib/model/Groups.dart @@ -127,7 +127,7 @@ class Group { if(AppCollection.isCollectionNotEmpty(members) && status != null){ return members.where((member) => member.status == status).toList(); } - return []; + return []; } Member getMembersById(String id){ @@ -499,7 +499,7 @@ class GroupMembershipStep { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { GroupMembershipStep value; try { value = GroupMembershipStep.fromJson((entry as Map)?.cast()); } @@ -513,7 +513,7 @@ class GroupMembershipStep { static List listToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (GroupMembershipStep value in values) { json.add(value?.toJson()); } @@ -524,7 +524,7 @@ class GroupMembershipStep { static List listFromOthers(List others) { List values; if (others != null) { - values = []; + values = []; for (GroupMembershipStep other in others) { values.add(GroupMembershipStep.fromOther(other)); } @@ -548,7 +548,7 @@ class GroupMembershipQuestion { static List listFromOthers(List others) { List values; if (others != null) { - values = []; + values = []; for (GroupMembershipQuestion other in others) { values.add(GroupMembershipQuestion.fromString(other.question)); } @@ -581,7 +581,7 @@ class GroupMembershipAnswer { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { GroupMembershipAnswer value; try { value = GroupMembershipAnswer.fromJson((entry as Map)?.cast()); } @@ -595,7 +595,7 @@ class GroupMembershipAnswer { static List listToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (GroupMembershipAnswer value in values) { json.add(value?.toJson()); } diff --git a/lib/model/Health.dart b/lib/model/Health.dart index 07d890a3..4c1683fe 100644 --- a/lib/model/Health.dart +++ b/lib/model/Health.dart @@ -492,7 +492,7 @@ class HealthHistory implements Comparable { static Future> listFromJson(List json, Map privateKeys) async { if (json != null) { - List> futures = []; + List> futures = >[]; for (dynamic entry in json) { futures.add(HealthHistory.decryptedFromJson((entry as Map)?.cast(), privateKeys)); } @@ -505,7 +505,7 @@ class HealthHistory implements Comparable { static List listToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (HealthHistory value in values) { json.add(value?.toJson()); } @@ -612,7 +612,7 @@ class HealthHistory implements Comparable { static List pastList(List history) { List result; if (history != null) { - result = List(); + result = []; DateTime nowUtc = DateTime.now().toUtc(); for (int index = 0; index < history.length; index++) { HealthHistory historyEntry = history[index]; @@ -989,7 +989,7 @@ class HealthPendingEvent { static Future> listFromJson(List json, PrivateKey privateKey) async { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { HealthPendingEvent value = await HealthPendingEvent.decryptedFromJson(entry, privateKey); values.add(value); @@ -1155,7 +1155,7 @@ class HealthEventExtra { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { HealthEventExtra value; try { value = HealthEventExtra.fromJson((entry as Map)?.cast()); } @@ -1169,7 +1169,7 @@ class HealthEventExtra { static List listToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (HealthEventExtra value in values) { json.add(value?.toJson()); } @@ -1482,7 +1482,7 @@ class HealthUserAccount { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { HealthUserAccount value; try { value = HealthUserAccount.fromJson((entry as Map)?.cast()); } @@ -1506,7 +1506,7 @@ class HealthUserAccount { static List listToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (HealthUserAccount value in values) { json.add(value?.toJson()); } @@ -1604,7 +1604,7 @@ class HealthServiceProvider { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { HealthServiceProvider value; try { value = HealthServiceProvider.fromJson((entry as Map)?.cast()); } @@ -1618,7 +1618,7 @@ class HealthServiceProvider { static List listToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (HealthServiceProvider value in values) { json.add(value?.toJson()); } @@ -1676,7 +1676,7 @@ String healthServiceMechanismToString(HealthServiceMechanism value) { List healthServiceMechanismListFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { HealthServiceMechanism value; try { value = healthServiceMechanismFromString((entry as String)); } @@ -1690,7 +1690,7 @@ List healthServiceMechanismListFromJson(List js List healthServiceMechanismListToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (HealthServiceMechanism value in values) { json.add(healthServiceMechanismToString(value)); } @@ -1787,7 +1787,7 @@ class HealthServiceLocation { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { HealthServiceLocation value; try { value = HealthServiceLocation.fromJson((entry as Map)?.cast()); } @@ -1801,7 +1801,7 @@ class HealthServiceLocation { static List listToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (HealthServiceLocation value in values) { json.add(value?.toJson()); } @@ -1903,7 +1903,7 @@ class HealthLocationDayOfOperation { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { HealthLocationDayOfOperation value; try { value = HealthLocationDayOfOperation.fromJson((entry as Map)?.cast()); } @@ -1961,7 +1961,7 @@ class HealthTestType { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { HealthTestType value; try { value = HealthTestType.fromJson((entry as Map)?.cast()); } @@ -1975,7 +1975,7 @@ class HealthTestType { static List listToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (HealthTestType value in values) { json.add(value?.toJson()); } @@ -2024,7 +2024,7 @@ class HealthTestTypeResult { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { HealthTestTypeResult value; try { value = HealthTestTypeResult.fromJson((entry as Map)?.cast()); } @@ -2038,7 +2038,7 @@ class HealthTestTypeResult { static List listToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (HealthTestTypeResult value in values) { json.add(value?.toJson()); } @@ -2143,7 +2143,7 @@ class HealthCounty { static List listFromJson(List json, { bool guidelines }) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { HealthCounty value; try { value = HealthCounty.fromJson((entry as Map)?.cast(), guidelines: guidelines); } @@ -2157,7 +2157,7 @@ class HealthCounty { static List listToJson(List values, { bool guidelines }) { List json; if (values != null) { - json = []; + json = []; for (HealthCounty value in values) { json.add(value?.toJson(guidelines : guidelines)); } @@ -2191,7 +2191,7 @@ class HealthGuideline { static List fromJsonList(List jsonList) { List sections; if (jsonList != null) { - sections = List(); + sections = []; for (dynamic jsonEntry in jsonList) { sections.add(HealthGuideline.fromJson(jsonEntry)); } @@ -2202,7 +2202,7 @@ class HealthGuideline { static List listToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (HealthGuideline value in values) { json.add(value?.toJson()); } @@ -2243,7 +2243,7 @@ class HealthGuidelineItem { static List fromJsonList(List jsonList) { List guidelineItems; if (jsonList != null) { - guidelineItems = List(); + guidelineItems = []; for (dynamic jsonEntry in jsonList) { guidelineItems.add(HealthGuidelineItem.fromJson(jsonEntry)); } @@ -2254,7 +2254,7 @@ class HealthGuidelineItem { static List listToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (HealthGuidelineItem value in values) { json.add(value?.toJson()); } @@ -2390,7 +2390,7 @@ class HealthFamilyMember { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { HealthFamilyMember value; try { value = HealthFamilyMember.fromJson((entry as Map)?.cast()); } @@ -2404,7 +2404,7 @@ class HealthFamilyMember { static List listToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (HealthFamilyMember value in values) { json.add(value?.toJson()); } @@ -2470,7 +2470,7 @@ class HealthSymptom { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { HealthSymptom value; try { value = HealthSymptom.fromJson((entry as Map)?.cast()); } @@ -2484,7 +2484,7 @@ class HealthSymptom { static List listToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (HealthSymptom value in values) { json.add(value?.toJson()); } @@ -2559,7 +2559,7 @@ class HealthSymptomsGroup { } static List getSymptoms(List groups, Set selected) { - List symptoms = List(); + List symptoms = []; if ((groups != null) && (selected != null)) { for (HealthSymptomsGroup group in groups) { if ((group.symptoms != null)) { @@ -2577,7 +2577,7 @@ class HealthSymptomsGroup { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { HealthSymptomsGroup value; try { value = HealthSymptomsGroup.fromJson((entry as Map)?.cast()); } @@ -2591,7 +2591,7 @@ class HealthSymptomsGroup { static List listToJson(List values) { List json; if (values != null) { - json = []; + json = []; for (HealthSymptomsGroup value in values) { json.add(value?.toJson()); } @@ -2847,7 +2847,7 @@ class HealthCodeData { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { try { values.add(HealthCodeData.fromJson((entry as Map)?.cast())); } catch(e) { print(e?.toString()); } @@ -2940,7 +2940,7 @@ class HealthTestRule { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { try { values.add(HealthTestRule.fromJson((entry as Map)?.cast())); } catch(e) { print(e?.toString()); } @@ -2986,7 +2986,7 @@ class HealthTestRuleResult { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { try { values.add(HealthTestRuleResult.fromJson((entry as Map)?.cast())); } catch(e) { print(e?.toString()); } @@ -3077,7 +3077,7 @@ class HealthSymptomsRule { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { try { values.add(HealthSymptomsRule.fromJson((entry as Map)?.cast())); } catch(e) { print(e?.toString()); } @@ -3163,7 +3163,7 @@ class HealthContactTraceRule { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { try { values.add(HealthContactTraceRule.fromJson((entry as Map)?.cast())); } catch(e) { print(e?.toString()); } @@ -3238,7 +3238,7 @@ class HealthVaccineRule { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { try { values.add(HealthVaccineRule.fromJson((entry as Map)?.cast())); } catch(e) { print(e?.toString()); } @@ -3313,7 +3313,7 @@ class HealthActionRule { static List listFromJson(List json) { List values; if (json != null) { - values = []; + values = []; for (dynamic entry in json) { try { values.add(HealthActionRule.fromJson((entry as Map)?.cast())); } catch(e) { print(e?.toString()); } diff --git a/lib/model/UserProfile.dart b/lib/model/UserProfile.dart index ff8b5694..3091344a 100644 --- a/lib/model/UserProfile.dart +++ b/lib/model/UserProfile.dart @@ -148,7 +148,7 @@ class UserRole { static List userRolesToList(Set userRoles) { List userRolesList; if (userRoles != null) { - userRolesList = new List(); + userRolesList = []; for (UserRole userRole in userRoles) { userRolesList.add(userRole.toString()); } @@ -433,7 +433,7 @@ class UserPiiData { if (list != null) { if (uuidList == null) { - uuidList = List(); + uuidList = []; } if (uuidRegExp == null) { diff --git a/lib/service/DeepLink.dart b/lib/service/DeepLink.dart index 96ed4c0c..a800dbb6 100644 --- a/lib/service/DeepLink.dart +++ b/lib/service/DeepLink.dart @@ -38,7 +38,7 @@ class DeepLink with Service { // Differentiate initial uri from updated uri // Cache uris until UI is displayed - _urisCache = List(); + _urisCache = []; // 1. Initial Uri getInitialUri().then((uri) { @@ -46,7 +46,7 @@ class DeepLink with Service { }); // 2. Updated uri - getUriLinksStream().listen((Uri uri) async { + uriLinkStream.listen((Uri uri) async { NotificationService().notify(notifyUri, uri); }); } diff --git a/lib/service/Exposure.dart b/lib/service/Exposure.dart index 835a1571..79479c63 100644 --- a/lib/service/Exposure.dart +++ b/lib/service/Exposure.dart @@ -331,7 +331,7 @@ class Exposure with Service implements NotificationsListener { List teks; List json = await _methodChannel.invokeMethod(_teksMethodName); if (json != null) { - teks = []; + teks = []; for (dynamic entry in json) { ExposureTEK tek; try { tek = ExposureTEK.fromJson((entry as Map)?.cast()); } @@ -516,7 +516,7 @@ class Exposure with Service implements NotificationsListener { List> records; try { records = (_database != null) ? await _database.rawQuery(query) : null; } catch (e) { print(e?.toString()); } if (records != null) { - result = []; + result = []; for (Map record in records) { result.add(ExposureRecord( id: record['$_databaseRowID'], @@ -1030,7 +1030,7 @@ class Exposure with Service implements NotificationsListener { if (result != null) { _markLocalExposureProcessed(detectedExposures); if (results == null) { - results = List(); + results = []; } results.add(result); } diff --git a/lib/service/FirebaseMessaging.dart b/lib/service/FirebaseMessaging.dart index b7076453..173a9e2d 100644 --- a/lib/service/FirebaseMessaging.dart +++ b/lib/service/FirebaseMessaging.dart @@ -19,8 +19,10 @@ import 'dart:convert'; import 'dart:io'; import 'dart:math'; import 'dart:ui'; + +import 'package:firebase_messaging/firebase_messaging.dart' as firebase_messaging; +import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:http/http.dart'; -import 'package:firebase_messaging/firebase_messaging.dart' as FirebaseMessagingPlugin; import 'package:illinois/model/Health.dart'; import 'package:illinois/model/UserProfile.dart'; import 'package:illinois/service/AppLivecycle.dart'; @@ -39,6 +41,8 @@ import 'package:illinois/service/UserProfile.dart'; import 'package:illinois/service/LocalNotifications.dart'; import 'package:illinois/utils/Utils.dart'; +const String _channelId = "Notifications_Channel_ID"; + class FirebaseMessaging with Service implements NotificationsListener { static const String notifyToken = "edu.illinois.rokwire.firebase.messaging.token"; @@ -64,6 +68,14 @@ class FirebaseMessaging with Service implements NotificationsListener { }; + + final AndroidNotificationChannel _channel = AndroidNotificationChannel( + _channelId, // id + "Safer Illinois", + "Receive notifications", + importance: Importance.high, + ); + String _token; String _projectID; DateTime _pausedDateTime; @@ -74,8 +86,7 @@ class FirebaseMessaging with Service implements NotificationsListener { FirebaseMessaging._internal(); static final FirebaseMessaging _firebase = FirebaseMessaging._internal(); - FirebaseMessagingPlugin.FirebaseMessaging _firebaseMessaging = FirebaseMessagingPlugin.FirebaseMessaging(); - + final FlutterLocalNotificationsPlugin _firebaseMessaging = FlutterLocalNotificationsPlugin(); factory FirebaseMessaging() { return _firebase; } @@ -114,16 +125,31 @@ class FirebaseMessaging with Service implements NotificationsListener { Future initService() async { // Cache messages until UI is displayed - _messagesCache = List>(); + _messagesCache = >[]; + + //firebase_messaging.FirebaseMessaging.onBackgroundMessage(_firebaseMessagingBackgroundHandler); - _firebaseMessaging.configure( - onMessage: _onFirebaseMessage, - onBackgroundMessage: null, // causes exception in FirebaseMessaging plugin - onLaunch: _onFirebaseLaunch, - onResume: _onFirebaseResume, + await _firebaseMessaging.resolvePlatformSpecificImplementation()?.createNotificationChannel(_channel); + + await firebase_messaging.FirebaseMessaging.instance.setForegroundNotificationPresentationOptions( + alert: true, + badge: true, + sound: true, ); - - _firebaseMessaging.getToken().then((String token) { + + firebase_messaging.FirebaseMessaging.onMessage.listen((firebase_messaging.RemoteMessage message) { + _onFirebaseMessage(message.data); + }); + + firebase_messaging.FirebaseMessaging.onMessageOpenedApp.listen((firebase_messaging.RemoteMessage message) { + print('A new onMessageOpenedApp event was published!'); + _onFirebaseMessage(message.data); + }); + + + + + firebase_messaging.FirebaseMessaging.instance.getToken().then((String token) { _token = token; Log.d('FCM: token: $token'); NotificationService().notify(notifyToken, null); @@ -279,16 +305,6 @@ class FirebaseMessaging with Service implements NotificationsListener { _onMessageProcess(message); } - Future _onFirebaseLaunch(Map message) async { - Log.d("FCM: onFirebaseLaunch"); - _onMessageProcess(message); - } - - Future _onFirebaseResume(Map message) async { - Log.d("FCM: onFirebaseResume"); - _onMessageProcess(message); - } - ///We need to process Android and iOS differently as the plugin gives different format for the both platforms. ///Android diff --git a/lib/service/FlexUI.dart b/lib/service/FlexUI.dart index da4f5501..246e0da9 100644 --- a/lib/service/FlexUI.dart +++ b/lib/service/FlexUI.dart @@ -259,7 +259,7 @@ class FlexUI with Service implements NotificationsListener { result = Map(); contents.forEach((String key, dynamic list) { if (list is List) { - List resultList = List(); + List resultList = []; for (String entry in list) { if (_localeIsEntryAvailable(entry, group: key, rules: rules)) { resultList.add(entry); diff --git a/lib/service/Groups.dart b/lib/service/Groups.dart index b602bfd4..f0168b09 100644 --- a/lib/service/Groups.dart +++ b/lib/service/Groups.dart @@ -81,7 +81,7 @@ class Groups /* with Service */ { } catch (e) { print(e); } - return []; + return []; } @@ -100,7 +100,7 @@ class Groups /* with Service */ { } catch (e) { print(e); } - return []; + return []; } FutureloadGroup(String groupId) async { @@ -172,7 +172,7 @@ class Groups /* with Service */ { json["email"] = Auth()?.authUser?.email ?? ""; json["name"] = Auth()?.authUser?.fullName ?? ""; json["creator_photo_url"] = ""; - json["member_answers"] = AppCollection.isCollectionNotEmpty(answers) ? answers.map((e) => e.toJson()).toList() : []; + json["member_answers"] = AppCollection.isCollectionNotEmpty(answers) ? answers.map((e) => e.toJson()).toList() : []; String body = jsonEncode(json); Response response = await Network().post(url, auth: Network.ShibbolethUserAuth, body: body, headers: _apiHeader); diff --git a/lib/service/Health.dart b/lib/service/Health.dart index b7897014..77ea6132 100644 --- a/lib/service/Health.dart +++ b/lib/service/Health.dart @@ -1126,7 +1126,7 @@ class Health with Service implements NotificationsListener { if (await _applyPendingEventInHistory(event)) { await _markPendingEventAsProcessed(event); if (result == null) { - result = List(); + result = []; } result.add(event); } @@ -1269,7 +1269,7 @@ class Health with Service implements NotificationsListener { List testTypes = await loadTestTypes(); Set testTypeSet = testTypes != null ? testTypes.map((entry) => entry.name).toSet() : null; if (osfTests != null) { - List processed = List(); + List processed = []; DateTime lastOsfTestDateUtc = Storage().lastHealthOsfTestDateUtc; DateTime latestOsfTestDateUtc; @@ -1390,7 +1390,7 @@ class Health with Service implements NotificationsListener { HealthStatus previousStatus = _status; await _rebuildStatus(); - List analyticsSymptoms = []; + List analyticsSymptoms = []; symptoms?.forEach((HealthSymptom symptom) { if (AppString.isStringNotEmpty(symptom?.name)) { analyticsSymptoms.add(symptom.name); diff --git a/lib/service/ImageService.dart b/lib/service/ImageService.dart index 6fd21865..e4921b4e 100644 --- a/lib/service/ImageService.dart +++ b/lib/service/ImageService.dart @@ -43,7 +43,7 @@ class ImageService /* with Service */ { String url = (Config().imagesServiceUrl != null) ? "${Config().imagesServiceUrl}/api/v1/image-types" : null; Response response = await Network().get(url); if ((response != null) && (response.statusCode == 200)) { - List imageTypes = List(); + List imageTypes = []; String responseBody = response.body; List jsonList = AppJson.decode(responseBody); if ((jsonList != null) && jsonList.isNotEmpty) { @@ -61,7 +61,7 @@ class ImageService /* with Service */ { Future useUrl(ImageType imageType, String url) async { // 1. first check if the url gives an image - Response headersResponse = await head(url); + Response headersResponse = await head(Uri.parse(url)); if ((headersResponse != null) && (headersResponse.statusCode == 200)) { //check content type Map headers = headersResponse.headers; @@ -69,7 +69,7 @@ class ImageService /* with Service */ { bool isImage = _isValidImage(contentType); if (isImage) { // 2. download the image - Response response = await get(url); + Response response = await get(Uri.parse(url)); Uint8List imageContent = response.bodyBytes; // 3. call the image service api diff --git a/lib/service/Network.dart b/lib/service/Network.dart index bb63988c..a4a00453 100644 --- a/lib/service/Network.dart +++ b/lib/service/Network.dart @@ -65,14 +65,8 @@ class Network { Future _get2(dynamic url, { String body, Encoding encoding, Map headers, int timeout, Http.Client client }) async { try { - - Uri uri; - if (url is Uri) { - uri = url; - } - else if (url is String) { - uri = Uri.parse(url); - } + + Uri uri = _uriFromUrlString(url); if (uri != null) { @@ -120,19 +114,21 @@ class Network { Future _get(url, { String body, Encoding encoding, Map headers, int auth, int timeout, Http.Client client} ) async { if (Connectivity().isNotOffline) { try { - if (url != null) { + Uri uri = _uriFromUrlString(url); - Map requestHeaders = _prepareHeaders(headers, auth, url); + if (uri != null) { + + Map requestHeaders = await _prepareHeaders(headers, auth, uri); Future response; if (body != null) { - response = _get2(url, headers: requestHeaders, body: body, encoding: encoding, timeout: timeout, client: client); + response = _get2(uri, headers: requestHeaders, body: body, encoding: encoding, timeout: timeout, client: client); } else if (client != null) { - response = client.get(url, headers: requestHeaders); + response = client.get(uri, headers: requestHeaders); } else { - response = Http.get(url, headers: requestHeaders); + response = Http.get(uri, headers: requestHeaders); } if ((response != null) && (timeout != null)) { @@ -176,7 +172,8 @@ class Network { Future _post(url, { body, Encoding encoding, Map headers, int auth, int timeout}) async{ if (Connectivity().isNotOffline) { try { - Future response = (url != null) ? Http.post(url, headers: _prepareHeaders(headers, auth, url), body: body, encoding: encoding) : null; + Uri uri = _uriFromUrlString(url); + Future response = (uri != null) ? Http.post(uri, headers: await _prepareHeaders(headers, auth, uri), body: body, encoding: encoding) : null; return ((response != null) && (timeout != null)) ? response.timeout(Duration(seconds: timeout), onTimeout: _responseTimeoutHandler) : response; } catch (e) { Log.d(e?.toString()); @@ -214,10 +211,11 @@ class Network { Future _put(url, { body, Encoding encoding, Map headers, int auth, int timeout, Http.Client client }) async { if (Connectivity().isNotOffline) { try { - Future response = (url != null) ? + Uri uri = _uriFromUrlString(url); + Future response = (uri != null) ? ((client != null) ? - client.put(url, headers: _prepareHeaders(headers, auth, url), body: body, encoding: encoding) : - Http.put(url, headers: _prepareHeaders(headers, auth, url), body: body, encoding: encoding)) : + client.put(uri, headers: await _prepareHeaders(headers, auth, uri), body: body, encoding: encoding) : + Http.put(uri, headers: await _prepareHeaders(headers, auth, uri), body: body, encoding: encoding)) : null; return ((response != null) && (timeout != null)) ? response.timeout(Duration(seconds: timeout), onTimeout: _responseTimeoutHandler) : response; @@ -257,7 +255,8 @@ class Network { Future _patch(url, { body, Encoding encoding, Map headers, int auth, int timeout }) async { if (Connectivity().isNotOffline) { try { - Future response = (url != null) ? Http.patch(url, headers: _prepareHeaders(headers, auth, url), body: body, encoding: encoding) : null; + Uri uri = _uriFromUrlString(url); + Future response = (uri != null) ? Http.patch(uri, headers: await _prepareHeaders(headers, auth, uri), body: body, encoding: encoding) : null; return ((response != null) && (timeout != null)) ? response.timeout(Duration(seconds: timeout), onTimeout: _responseTimeoutHandler) : response; } catch (e) { Log.d(e?.toString()); @@ -294,7 +293,8 @@ class Network { Future _delete(url, { Map headers, int auth, int timeout }) async { if (Connectivity().isNotOffline) { try { - Future response = (url != null) ? Http.delete(url, headers: _prepareHeaders(headers, auth, url)) : null; + Uri uri = _uriFromUrlString(url); + Future response = (uri != null) ? Http.delete(uri, headers: await _prepareHeaders(headers, auth, uri)) : null; return ((response != null) && (timeout != null)) ? response.timeout(Duration(seconds: timeout), onTimeout: _responseTimeoutHandler) : response; } catch (e) { Log.d(e?.toString()); @@ -331,7 +331,8 @@ class Network { Future _read(url, { Map headers, int auth, int timeout = 60 }) async { if (Connectivity().isNotOffline) { try { - Future response = (url != null) ? Http.read(url, headers: _prepareHeaders(headers, auth, url)) : null; + Uri uri = _uriFromUrlString(url); + Future response = (uri != null) ? Http.read(uri, headers: await _prepareHeaders(headers, auth, uri)) : null; return ((response != null) && (timeout != null)) ? response.timeout(Duration(seconds: timeout)) : response; } catch (e) { Log.d(e?.toString()); @@ -354,7 +355,8 @@ class Network { Future _readBytes(url, { Map headers, int auth, int timeout = 60 }) async{ if (Connectivity().isNotOffline) { try { - Future response = (url != null) ? Http.readBytes(url, headers: _prepareHeaders(headers, auth, url)) : null; + Uri uri = _uriFromUrlString(url); + Future response = (uri != null) ? Http.readBytes(uri, headers: await _prepareHeaders(headers, auth, uri)) : null; return ((response != null) && (timeout != null)) ? response.timeout(Duration(seconds: timeout), onTimeout: _responseBytesHandler) : response; } catch (e) { Log.d(e?.toString()); @@ -374,7 +376,7 @@ class Network { return null; } - Map _prepareHeaders(Map headers, int auth, String url) { + Future> _prepareHeaders(Map headers, int auth, Uri uri) async { Map result; @@ -422,8 +424,8 @@ class Network { //cookies - if (url != null) { - String cookies = _loadCookiesForRequest(url); + if (uri != null) { + String cookies = await _loadCookiesForRequest(uri); if (AppString.isStringNotEmpty(cookies)) { if (result == null) { result = (headers != null) ? Map.from(headers) : Map(); @@ -454,7 +456,8 @@ class Network { void _saveCookiesFromResponse(String url, Http.Response response) { - if (AppString.isStringEmpty(url) || response == null) + Uri uri = _uriFromUrlString(url); + if ((uri == null) || response == null) return; Map responseHeaders = response.headers; @@ -470,31 +473,34 @@ class Network { if (cookiesData == null || cookiesData.length == 0) return; - List cookies = List(); + List cookies = []; for (String cookieData in cookiesData) { Cookie cookie = Cookie.fromSetCookieValue(cookieData); cookies.add(cookie); } var cj = new CookieJar(); - cj.saveFromResponse(Uri.parse(url), cookies); + cj.saveFromResponse(uri, cookies); } - String _loadCookiesForRequest(String url) { - var cj = new CookieJar(); - List cookies = cj.loadForRequest(Uri.parse(url)); - if (cookies == null || cookies.length == 0) - return null; + Future _loadCookiesForRequest(Uri uri) async{ + if(uri != null) { + var cj = new CookieJar(); + List cookies = await cj.loadForRequest(uri); + if (cookies == null || cookies.length == 0) + return null; - String result = ""; - for (Cookie cookie in cookies) { - result += cookie.name + "=" + cookie.value + "; "; - } + String result = ""; + for (Cookie cookie in cookies) { + result += cookie.name + "=" + cookie.value + "; "; + } - //remove the last "; " - result = result.substring(0, result.length - 2); + //remove the last "; " + result = result.substring(0, result.length - 2); - return result; + return result; + } + return null; } Http.Response _responseTimeoutHandler() { @@ -504,5 +510,19 @@ class Network { Uint8List _responseBytesHandler() { return null; } + + Uri _uriFromUrlString(dynamic url){ + Uri uri; + if (url is Uri) { + uri = url; + } + else if (url is String) { + uri = Uri.tryParse(url); + } + else if (url != null) { + uri = Uri.tryParse(url.toString()); + } + return uri; + } } diff --git a/lib/service/OSFHealth.dart b/lib/service/OSFHealth.dart index 5642488b..ce143d88 100644 --- a/lib/service/OSFHealth.dart +++ b/lib/service/OSFHealth.dart @@ -114,7 +114,7 @@ class OSFHealth with Service implements NotificationsListener { if (observationResponse?.statusCode == 200) { String observationBody = (observationResponse?.statusCode == 200) ? observationResponse.body : null; print(observationBody); - List osfTests = List(); + List osfTests = []; Map observJson = (observationBody != null) ? AppJson.decode(observationBody) : null; if(observJson != null){ List resultsList = observJson["entry"]; diff --git a/lib/service/Service.dart b/lib/service/Service.dart index 68e0d08b..ebeabd85 100644 --- a/lib/service/Service.dart +++ b/lib/service/Service.dart @@ -143,7 +143,7 @@ class Services { void _sort() { - List queue = List(); + List queue = []; while (_services.isNotEmpty) { // start with lowest priority service Service svc = _services.last; diff --git a/lib/service/Storage.dart b/lib/service/Storage.dart index 38974fec..1fe60b7d 100644 --- a/lib/service/Storage.dart +++ b/lib/service/Storage.dart @@ -65,7 +65,11 @@ class Storage with Service { } void setString(String key, String value) { - _sharedPreferences.setString(key, value); + if(value != null) { + _sharedPreferences.setString(key, value); + } else { + _sharedPreferences.remove(key); + } NotificationService().notify(notifySettingChanged, key); } @@ -78,10 +82,14 @@ class Storage with Service { } void setEncryptedString(String key, String value) { - if ((_encryptionKey != null) && (value != null)) { - value = AESCrypt.encrypt(value, keyBytes: _encryptionKey); + if(value != null) { + if ((_encryptionKey != null) && (value != null)) { + value = AESCrypt.encrypt(value, keyBytes: _encryptionKey); + } + _sharedPreferences.setString(key, value); + } else { + _sharedPreferences.remove(key); } - _sharedPreferences.setString(key, value); NotificationService().notify(notifySettingChanged, key); } @@ -90,7 +98,11 @@ class Storage with Service { } void setStringList(String key, List value) { - _sharedPreferences.setStringList(key, value); + if(value != null) { + _sharedPreferences.setStringList(key, value); + } else { + _sharedPreferences.remove(key); + } NotificationService().notify(notifySettingChanged, key); } @@ -99,7 +111,11 @@ class Storage with Service { } void setBool(String key, bool value) { - _sharedPreferences.setBool(key, value); + if(value != null) { + _sharedPreferences.setBool(key, value); + } else { + _sharedPreferences.remove(key); + } NotificationService().notify(notifySettingChanged, key); } @@ -108,7 +124,11 @@ class Storage with Service { } void setInt(String key, int value) { - _sharedPreferences.setInt(key, value); + if(value != null) { + _sharedPreferences.setInt(key, value); + } else { + _sharedPreferences.remove(key); + } NotificationService().notify(notifySettingChanged, key); } @@ -117,7 +137,11 @@ class Storage with Service { } void setDouble(String key, double value) { - _sharedPreferences.setDouble(key, value); + if(value != null) { + _sharedPreferences.setDouble(key, value); + } else { + _sharedPreferences.remove(key); + } NotificationService().notify(notifySettingChanged, key); } diff --git a/lib/ui/WebPanel.dart b/lib/ui/WebPanel.dart index cb8008b0..73346935 100644 --- a/lib/ui/WebPanel.dart +++ b/lib/ui/WebPanel.dart @@ -87,7 +87,7 @@ class _WebPanelState extends State implements NotificationsListener{ } List _buildWebView() { - List list = List(); + List list = []; list.add(Visibility( visible: _isForeground, child: WebView( diff --git a/lib/ui/debug/DebugExposureLogsPanel.dart b/lib/ui/debug/DebugExposureLogsPanel.dart index 4ab3dbb3..3fd6314b 100644 --- a/lib/ui/debug/DebugExposureLogsPanel.dart +++ b/lib/ui/debug/DebugExposureLogsPanel.dart @@ -1125,7 +1125,7 @@ class _DebugExposureLogsPanelState extends State // title: const Text('Thanks!'), // content: Text('You typed "$value".'), // actions: [ - // FlatButton( + // TextButton( // onPressed: () { // Navigator.pop(context); // }, @@ -1517,7 +1517,7 @@ class _DebugExposureLogsPanelState extends State // title: const Text('Thanks!'), // content: Text(url), // actions: [ - // FlatButton( + // TextButton( // onPressed: () { // Navigator.pop(context); // }, diff --git a/lib/ui/debug/DebugFirebaseMessagingPanel.dart b/lib/ui/debug/DebugFirebaseMessagingPanel.dart index 36a89608..a4c887ec 100644 --- a/lib/ui/debug/DebugFirebaseMessagingPanel.dart +++ b/lib/ui/debug/DebugFirebaseMessagingPanel.dart @@ -305,7 +305,7 @@ class _GenericMessageWidgetState extends State<_GenericMessageWidget> { ), Padding( padding: const EdgeInsets.symmetric(vertical: 16.0), - child: RaisedButton( + child: ElevatedButton( onPressed: () { // Validate returns true if the form is valid, or false // otherwise. @@ -333,7 +333,7 @@ class _GenericMessageWidgetState extends State<_GenericMessageWidget> { "Please use the Firebase console."), actions: [ // usually buttons at the bottom of the dialog - new FlatButton( + new TextButton( child: new Text("Close"), onPressed: () { Navigator.of(context).pop(); @@ -474,7 +474,7 @@ class _ScoreMessageWidgetState extends State<_ScoreMessageWidget> { ), Padding( padding: const EdgeInsets.symmetric(vertical: 16.0), - child: RaisedButton( + child: ElevatedButton( onPressed: () { // Validate returns true if the form is valid, or false // otherwise. diff --git a/lib/ui/debug/DebugHealthKeysPanel.dart b/lib/ui/debug/DebugHealthKeysPanel.dart index 048a42fb..8174c21e 100644 --- a/lib/ui/debug/DebugHealthKeysPanel.dart +++ b/lib/ui/debug/DebugHealthKeysPanel.dart @@ -395,13 +395,13 @@ class _DebugHealthKeysPanelState extends State { } void _onScanPrivateRSAKey() { - BarcodeScanner.scan().then((String result) { + BarcodeScanner.scan().then((result) { // barcode_scan plugin returns 8 digits when it cannot read the qr code. Prevent it from storing such values - if (AppString.isStringEmpty(result) || (result.length <= 8)) { + if (AppString.isStringEmpty(result?.rawContent) || ((result?.rawContent?.length ?? 0) <= 8)) { AppAlert.showDialogResult(context, 'Failed to read QR code.'); } else { - _applyPrivateRsaKeyString(result); + _applyPrivateRsaKeyString(result?.rawContent); } }); } diff --git a/lib/ui/debug/DebugHomePanel.dart b/lib/ui/debug/DebugHomePanel.dart index eaf086f2..c929dcab 100644 --- a/lib/ui/debug/DebugHomePanel.dart +++ b/lib/ui/debug/DebugHomePanel.dart @@ -494,8 +494,8 @@ class _DebugHomePanelState extends State implements Notification return AlertDialog( content: Text(message), actions: [ - FlatButton(child: Text("Yes"), onPressed: () { Navigator.pop(context, true); }), - FlatButton(child: Text("No"), onPressed: () { Navigator.pop(context, false); }), + TextButton(child: Text("Yes"), onPressed: () { Navigator.pop(context, true); }), + TextButton(child: Text("No"), onPressed: () { Navigator.pop(context, false); }), ]); }).then((result) { if (result == true) { @@ -585,8 +585,8 @@ class _DebugHomePanelState extends State implements Notification return AlertDialog( content: Text(message), actions: [ - FlatButton(child: Text("Yes"), onPressed: () { Navigator.pop(context, true); }), - FlatButton(child: Text("No"), onPressed: () { Navigator.pop(context, false); }), + TextButton(child: Text("Yes"), onPressed: () { Navigator.pop(context, true); }), + TextButton(child: Text("No"), onPressed: () { Navigator.pop(context, false); }), ]); }).then((result) { if (result == true) { diff --git a/lib/ui/groups/GroupCreatePanel.dart b/lib/ui/groups/GroupCreatePanel.dart index e4fdf739..a0c275ac 100644 --- a/lib/ui/groups/GroupCreatePanel.dart +++ b/lib/ui/groups/GroupCreatePanel.dart @@ -220,7 +220,7 @@ class _GroupCreatePanelState extends State { Navigator.pop(context); } - }).catchError((e){ + }).catchError((_){ //error setState(() { _creating = false; diff --git a/lib/ui/groups/GroupDetailPanel.dart b/lib/ui/groups/GroupDetailPanel.dart index e32999d7..2cc865ae 100644 --- a/lib/ui/groups/GroupDetailPanel.dart +++ b/lib/ui/groups/GroupDetailPanel.dart @@ -285,7 +285,7 @@ class _GroupPanelState extends State implements NotificationsListene } Widget _buildGroupInfo() { - List commands = List(); + List commands = []; String members; int membersCount = _group?.membersCount ?? 0; diff --git a/lib/ui/groups/GroupMembersPanel.dart b/lib/ui/groups/GroupMembersPanel.dart index 07594da5..6d3da7e5 100644 --- a/lib/ui/groups/GroupMembersPanel.dart +++ b/lib/ui/groups/GroupMembersPanel.dart @@ -107,7 +107,7 @@ class _GroupMembersPanelState extends State implements Notifi } void _applyMembersFilter(){ - List membersFilter = List(); + List membersFilter = []; _allMembersFilter = Localization().getStringEx("panel.manage_members.label.filter_by.all_members", "All members (#)").replaceAll("#", _members.length.toString()); _selectedMembersFilter = _allMembersFilter; membersFilter.add(_allMembersFilter); @@ -161,7 +161,7 @@ class _GroupMembersPanelState extends State implements Notifi Widget _buildRequests(){ if((_pendingMembers?.length ?? 0) > 0) { - List requests = List(); + List requests = []; for (Member member in (_pendingMembers.length > 2 && _showAllRequestVisibility) ? _pendingMembers.sublist(0, 1) : _pendingMembers) { if(requests.isNotEmpty){ requests.add(Container(height: 10,)); @@ -196,7 +196,7 @@ class _GroupMembersPanelState extends State implements Notifi Widget _buildMembers(){ if((_members?.length ?? 0) > 0) { - List members = List(); + List members = []; for (Member member in _members) { if(_selectedMembersFilter != _allMembersFilter && _selectedMembersFilter != member.officerTitle){ continue; diff --git a/lib/ui/groups/GroupMembershipQuestionsPanel.dart b/lib/ui/groups/GroupMembershipQuestionsPanel.dart index 577ee474..6815d859 100644 --- a/lib/ui/groups/GroupMembershipQuestionsPanel.dart +++ b/lib/ui/groups/GroupMembershipQuestionsPanel.dart @@ -55,8 +55,8 @@ class _GroupMembershipQuestionsPanelState extends State answers = List(); + List answers = []; for (int index = 0; index < _questions.length; index++) { String question = _questions[index].question; TextEditingController controller = _controllers[index]; @@ -201,7 +201,7 @@ class _GroupMembershipRequestPanelState extends State { _steps.add(GroupMembershipStep()); } - _focusNodes = List(); - _controllers = List(); + _focusNodes = []; + _controllers = []; Set eventIds = Set(); for (GroupMembershipStep step in _steps) { _controllers.add(TextEditingController(text: step.description ?? '')); diff --git a/lib/ui/groups/GroupPendingMemberPanel.dart b/lib/ui/groups/GroupPendingMemberPanel.dart index 3a56a46d..46ff477b 100644 --- a/lib/ui/groups/GroupPendingMemberPanel.dart +++ b/lib/ui/groups/GroupPendingMemberPanel.dart @@ -130,7 +130,7 @@ class _GroupPendingMemberPanelState extends State { } Widget _buildQuestions(){ - List list = List(); + List list = []; if(AppCollection.isCollectionNotEmpty(widget?.member?.answers)) { for (int index = 0; index < widget.member.answers.length; index++) { GroupMembershipAnswer answer = widget.member.answers[index]; diff --git a/lib/ui/groups/GroupSettingsPanel.dart b/lib/ui/groups/GroupSettingsPanel.dart index fdc4df18..7c546694 100644 --- a/lib/ui/groups/GroupSettingsPanel.dart +++ b/lib/ui/groups/GroupSettingsPanel.dart @@ -472,11 +472,11 @@ class _GroupSettingsPanelState extends State { if(buttons?.isEmpty??true) return Container(); - List rows = List(); + List rows = []; List lastRowChildren; for(int i=0; i { List _buildTagsButtons(){ List tags = _group?.tags; - List result = new List(); + List result = []; if (AppCollection.isCollectionNotEmpty(tags)) { tags.forEach((String tag) { result.add(_buildTagButton(tag)); @@ -537,7 +537,7 @@ class _GroupSettingsPanelState extends State { void onTagTap(String tag){ if(_group!=null) { if (_group.tags == null) { - _group.tags = new List(); + _group.tags = []; } if (_group.tags.contains(tag)) { @@ -553,7 +553,7 @@ class _GroupSettingsPanelState extends State { String tag = _groupTagsController.text?.toString(); if(_group!=null) { if (_group.tags == null) { - _group.tags = new List(); + _group.tags = []; } _group.tags.add(tag); _groupTagsController.clear(); @@ -728,7 +728,7 @@ class _GroupSettingsPanelState extends State { }); Navigator.pop(context); - }).catchError((e){ + }).catchError((_){ AppAlert.showDialogResult(context, Localization().getStringEx("panel.groups_create.tags.label.update_error", "Unable to update the group")); //error setState(() { diff --git a/lib/ui/groups/GroupsHomePanel.dart b/lib/ui/groups/GroupsHomePanel.dart index da92c5c6..b13210cd 100644 --- a/lib/ui/groups/GroupsHomePanel.dart +++ b/lib/ui/groups/GroupsHomePanel.dart @@ -129,7 +129,7 @@ class _GroupsHomePanelState extends State implements Notificati setState(() { _isFilterLoading = true; }); - List categories = List(); + List categories = []; categories.add(_allCategoriesValue); categories.addAll(await Groups().categories); _categories = categories; @@ -353,7 +353,7 @@ class _GroupsHomePanelState extends State implements Notificati ), ); } else { - List widgets = List(); + List widgets = []; if(AppCollection.isCollectionNotEmpty(_myGroups)) { widgets.add(Container(height: 8,)); for (Group group in _myGroups) { @@ -371,7 +371,7 @@ class _GroupsHomePanelState extends State implements Notificati Widget _buildMyPendingGroupsSection(){ if(AppCollection.isCollectionNotEmpty(_myPendingGroups)) { - List widgets = List(); + List widgets = []; widgets.add(Container(height: 16,)); widgets.add( Container( @@ -419,7 +419,7 @@ class _GroupsHomePanelState extends State implements Notificati Widget _buildAllGroupsContent(){ if(AppCollection.isCollectionNotEmpty(_allFilteredGroups)){ - List widgets = List(); + List widgets = []; widgets.add(Container(height: 8,)); for(Group group in _allFilteredGroups){ widgets.add(Padding( diff --git a/lib/ui/health/HealthAddTestResultPanel.dart b/lib/ui/health/HealthAddTestResultPanel.dart index 18397676..4629aa50 100644 --- a/lib/ui/health/HealthAddTestResultPanel.dart +++ b/lib/ui/health/HealthAddTestResultPanel.dart @@ -104,7 +104,7 @@ class _HealthAddTestResultPanelState extends State imp void _loadProviders() { _loading = true; Health().loadProviders().then((List providers){ - _providerItems = List(); + _providerItems = []; if(providers?.isNotEmpty?? false) { _providerItems.addAll(providers?.map((HealthServiceProvider provider) { ProviderDropDownItem item = ProviderDropDownItem(type: ProviderDropDownItemType.provider, item: provider); @@ -261,7 +261,7 @@ class _HealthAddTestResultPanelState extends State imp if (itemsCount == 0) { return null; } - List> items = List>(); + List> items = []; try{ items.addAll(_providerItems.map((ProviderDropDownItem item) { return DropdownMenuItem( diff --git a/lib/ui/health/HealthCareTeamPanel.dart b/lib/ui/health/HealthCareTeamPanel.dart index 0c4d39d2..934d83b4 100644 --- a/lib/ui/health/HealthCareTeamPanel.dart +++ b/lib/ui/health/HealthCareTeamPanel.dart @@ -38,7 +38,7 @@ class HealthCareTeamPanel extends StatefulWidget { } class _HealthCareTeamPanelState extends State with TickerProviderStateMixin{ - List _animationControllers = List(); + List _animationControllers = []; //bool _moreInfoExpanded = false; @override diff --git a/lib/ui/health/HealthGuidelinesPanel.dart b/lib/ui/health/HealthGuidelinesPanel.dart index d6954c71..2c9dba4d 100644 --- a/lib/ui/health/HealthGuidelinesPanel.dart +++ b/lib/ui/health/HealthGuidelinesPanel.dart @@ -211,7 +211,7 @@ class _HealthGuidelinesPanelState extends State { List _buildCountyDropdownItems(){ List result; if (_counties?.isNotEmpty ?? false) { - result = List (); + result = []; for (HealthCounty county in _counties.values) { result.add(DropdownMenuItem( value: county.id, diff --git a/lib/ui/health/HealthHistoryPanel.dart b/lib/ui/health/HealthHistoryPanel.dart index dc9199a6..2951d1db 100644 --- a/lib/ui/health/HealthHistoryPanel.dart +++ b/lib/ui/health/HealthHistoryPanel.dart @@ -41,7 +41,7 @@ class HealthHistoryPanel extends StatefulWidget { class _HealthHistoryPanelState extends State implements NotificationsListener { - List _history = List(); + List _history = []; bool _isRefreshing = false; bool _isDeleting = false; bool _isReposting = false; diff --git a/lib/ui/health/HealthHomePanel.dart b/lib/ui/health/HealthHomePanel.dart index afc1e2ef..85780724 100644 --- a/lib/ui/health/HealthHomePanel.dart +++ b/lib/ui/health/HealthHomePanel.dart @@ -842,7 +842,7 @@ class _HealthHomePanelState extends State implements Notificati for (HealthUserAccount account in Health().user.accounts) { if (account.isActive) { if (items == null) { - items = items = List>(); + items = items = []; } items.add(DropdownMenuItem( value: account, child: _userAccountsDropDownItem(account) diff --git a/lib/ui/health/HealthStatusPanel.dart b/lib/ui/health/HealthStatusPanel.dart index 86f4e054..9c02dd72 100644 --- a/lib/ui/health/HealthStatusPanel.dart +++ b/lib/ui/health/HealthStatusPanel.dart @@ -17,6 +17,7 @@ import 'dart:async'; import 'dart:typed_data'; import 'package:illinois/service/Config.dart'; +import 'package:illinois/service/FlexUI.dart'; import 'package:intl/intl.dart'; import 'package:flutter/cupertino.dart'; @@ -363,7 +364,7 @@ class _HealthStatusPanelState extends State implements Notifi List _buildCountyDropdownItems(){ List result; if (_counties?.isNotEmpty ?? false) { - result = List (); + result = []; for (HealthCounty county in _counties) { result.add(DropdownMenuItem( value: county, @@ -456,7 +457,7 @@ class _HealthStatusPanelState extends State implements Notifi ), ), ), - Visibility(visible: Health().isVaccinated, child: + Visibility(visible: Health().isVaccinated && FlexUI().hasFeature('vaccination_badge'), child: Container(width: screenWidth, height: _photoSize, child: Align(alignment: Alignment.bottomRight, child: Padding(padding: EdgeInsets.only(right: vaccinatedPaddingWidth), child: diff --git a/lib/ui/health/HealthStatusUpdatePanel.dart b/lib/ui/health/HealthStatusUpdatePanel.dart index d2a8ae8c..6579ab20 100644 --- a/lib/ui/health/HealthStatusUpdatePanel.dart +++ b/lib/ui/health/HealthStatusUpdatePanel.dart @@ -182,7 +182,7 @@ class _HealthStatusUpdatePanelState extends State { else if (reasonHistory.isSymptoms) { reasonHistoryName = Localization().getStringEx("panel.health.status_update.label.reason.symptoms.title", "You reported new symptoms"); - List symptomLayouts = List(); + List symptomLayouts = []; List symptoms = reasonHistory.symptoms; if (symptoms?.isNotEmpty ?? false) { symptoms.forEach((HealthSymptom symptom){ diff --git a/lib/ui/health/HealthTestLocationsPanel.dart b/lib/ui/health/HealthTestLocationsPanel.dart index 9f05b06b..23fbdfc8 100644 --- a/lib/ui/health/HealthTestLocationsPanel.dart +++ b/lib/ui/health/HealthTestLocationsPanel.dart @@ -188,7 +188,7 @@ class _HealthTestLocationsPanelState extends State{ if (itemsCount == 0) { return null; } - List> items = List>(); + List> items = []; items.addAll(_providerItems.map((ProviderDropDownItem providerItem){ return DropdownMenuItem( @@ -257,7 +257,7 @@ class _HealthTestLocationsPanelState extends State{ if (providers != null) { // init providers list - providerItems = List(); + providerItems = []; providerItems.add(ProviderDropDownItem(type: ProviderDropDownItemType.all)); for (HealthServiceProvider provider in providers) { providerItems.add(ProviderDropDownItem(provider: provider)); @@ -546,13 +546,13 @@ class _TestLocation extends StatelessWidget { } Widget _buildWorkTime(){ - List items = List(); + List items = []; HealthLocationDayOfOperation period; LinkedHashMap workingPeriods; List workTimes = testLocation?.daysOfOperation; if(workTimes?.isNotEmpty ?? false){ workingPeriods = Map.fromIterable(workTimes, key: (period) => period?.weekDay); - items = workingPeriods?.values?.toList()?? List(); + items = workingPeriods?.values?.toList()?? []; period = _determineTodayPeriod(workingPeriods); if ((period == null) || !period.isOpen) { period = _findNextPeriod(workingPeriods); diff --git a/lib/ui/health/HealthTestReportPanel.dart b/lib/ui/health/HealthTestReportPanel.dart index ecdf6ca0..06dfaf5f 100644 --- a/lib/ui/health/HealthTestReportPanel.dart +++ b/lib/ui/health/HealthTestReportPanel.dart @@ -92,7 +92,7 @@ class _HealthTestReportPanelState extends State{ setState(() { _decreaseProgress(); try{ - _types = List(); + _types = []; if(types?.isNotEmpty?? false) { _types.addAll(types?.map((HealthTestType type) { TestDropDownItem item = TestDropDownItem(type: TestDropDownItemType.provider, item: type); diff --git a/lib/ui/onboarding/OnboardingAuthBluetoothPanel.dart b/lib/ui/onboarding/OnboardingAuthBluetoothPanel.dart index e3a75049..c9d1aae7 100644 --- a/lib/ui/onboarding/OnboardingAuthBluetoothPanel.dart +++ b/lib/ui/onboarding/OnboardingAuthBluetoothPanel.dart @@ -222,7 +222,7 @@ class _OnboardingAuthBluetoothPanelState extends State[ - FlatButton( + TextButton( onPressed: () { Analytics.instance.logAlert(text: message, selection:okTitle); if (pushNext) { diff --git a/lib/ui/onboarding/OnboardingAuthLocationPanel.dart b/lib/ui/onboarding/OnboardingAuthLocationPanel.dart index 73a2b63a..b317948c 100644 --- a/lib/ui/onboarding/OnboardingAuthLocationPanel.dart +++ b/lib/ui/onboarding/OnboardingAuthLocationPanel.dart @@ -202,7 +202,7 @@ class OnboardingAuthLocationPanel extends StatelessWidget with OnboardingPanel { Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - FlatButton( + TextButton( onPressed: () { Analytics.instance.logAlert(text: message, selection:okTitle); if (pushNext) { diff --git a/lib/ui/onboarding/OnboardingAuthNotificationsPanel.dart b/lib/ui/onboarding/OnboardingAuthNotificationsPanel.dart index 4dd4dd21..5b453522 100644 --- a/lib/ui/onboarding/OnboardingAuthNotificationsPanel.dart +++ b/lib/ui/onboarding/OnboardingAuthNotificationsPanel.dart @@ -211,7 +211,7 @@ Widget _buildDialogWidget(BuildContext context) { Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - FlatButton( + TextButton( onPressed: () { Analytics.instance.logAlert(text:"Already have access", selection: "Ok"); _goNext(context, replace : true); diff --git a/lib/ui/onboarding/OnboardingHealthConsentPanel.dart b/lib/ui/onboarding/OnboardingHealthConsentPanel.dart index a5b8255b..ba5a37ac 100644 --- a/lib/ui/onboarding/OnboardingHealthConsentPanel.dart +++ b/lib/ui/onboarding/OnboardingHealthConsentPanel.dart @@ -158,7 +158,7 @@ class _OnboardingHealthConsentPanelState extends State i Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - FlatButton( + TextButton( onPressed: () { Analytics.instance.logAlert(text: "Unable to login", selection: "Ok"); Navigator.pop(context); diff --git a/lib/ui/settings/SettingsHomePanel.dart b/lib/ui/settings/SettingsHomePanel.dart index 27fd35f5..1bc961ee 100644 --- a/lib/ui/settings/SettingsHomePanel.dart +++ b/lib/ui/settings/SettingsHomePanel.dart @@ -86,6 +86,8 @@ class _SettingsHomePanelState extends State implements Notifi @override void initState() { + super.initState(); + NotificationService().subscribe(this, [ Auth.notifyUserPiiDataChanged, UserProfile.notifyProfileUpdated, @@ -98,7 +100,6 @@ class _SettingsHomePanelState extends State implements Notifi _loadVersionInfo(); _refreshHealthUser(); - super.initState(); } @override @@ -253,7 +254,7 @@ class _SettingsHomePanelState extends State implements Notifi // Connect Widget _buildConnect() { - List contentList = new List(); + List contentList = []; contentList.add(Padding( padding: EdgeInsets.only(left: 8, right: 8, top: 12, bottom: 2), child: Text( @@ -354,7 +355,7 @@ class _SettingsHomePanelState extends State implements Notifi // Customizations Widget _buildCustomizations() { - List customizationOptions = new List(); + List customizationOptions = []; List codes = FlexUI()['settings.customizations'] ?? []; for (int index = 0; index < codes.length; index++) { String code = codes[index]; @@ -389,7 +390,7 @@ class _SettingsHomePanelState extends State implements Notifi // Connected Widget _buildConnected() { - List contentList = new List(); + List contentList = []; List codes = FlexUI()['settings.connected'] ?? []; for (String code in codes) { @@ -409,7 +410,7 @@ class _SettingsHomePanelState extends State implements Notifi } List _buildConnectedNetIdLayout() { - List contentList = List(); + List contentList = []; List codes = FlexUI()['settings.connected.netid'] ?? []; for (int index = 0; index < codes.length; index++) { @@ -452,7 +453,7 @@ class _SettingsHomePanelState extends State implements Notifi } List _buildConnectedPhoneLayout() { - List contentList = List(); + List contentList = []; String fullName = Auth().fullUserName ?? ''; bool hasFullName = AppString.isStringNotEmpty(fullName); @@ -524,14 +525,14 @@ class _SettingsHomePanelState extends State implements Notifi Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - FlatButton( + TextButton( onPressed: () { Analytics.instance.logAlert(text: "Sign out", selection: "Yes"); Navigator.pop(context); Auth().logout(); }, child: Text(Localization().getStringEx("panel.settings.home.logout.button.yes", "Yes"))), - FlatButton( + TextButton( onPressed: () { Analytics.instance.logAlert(text: "Sign out", selection: "No"); Navigator.pop(context); @@ -548,7 +549,7 @@ class _SettingsHomePanelState extends State implements Notifi // NotificationsOptions Widget _buildNotifications() { - List contentList = new List(); + List contentList = []; List codes = FlexUI()['settings.notifications'] ?? []; for (int index = 0; index < codes.length; index++) { @@ -648,7 +649,7 @@ class _SettingsHomePanelState extends State implements Notifi Widget _buildCovid19Settings() { - List contentList = List(); + List contentList = []; if (Auth().isLoggedIn) { if ((_refreshingHealthUser == true) || Health().refreshingUser) { @@ -702,7 +703,7 @@ class _SettingsHomePanelState extends State implements Notifi contentList.add(ToggleRibbonButton( height: null, borderRadius: borderRadius, - label: Localization().getStringEx("panel.settings.home.covid19.provider_test_result", "Health Provider Test Results"), + label: Localization().getStringEx("panel.settings.home.covid19.provider_test_result", "Health Provider Test Results and Vaccine Information"), toggled: (Health().user?.consent == true), context: context, onTap: _onProviderTestResult)); @@ -931,7 +932,7 @@ class _SettingsHomePanelState extends State implements Notifi return AlertDialog( content: Text(message, style: TextStyle(color: Styles().colors.fillColorPrimary, fontSize: 16, fontFamily: Styles().fontFamilies.bold)), actions: [ - FlatButton( + TextButton( child: Text( Localization().getStringEx("dialog.yes.title", "Yes"), style: TextStyle(color: Styles().colors.fillColorPrimary, fontSize: 16, fontFamily: Styles().fontFamilies.bold)), onPressed: () { @@ -939,7 +940,7 @@ class _SettingsHomePanelState extends State implements Notifi Navigator.pop(buildContext, true); } ), - FlatButton( + TextButton( child: Text(Localization().getStringEx("dialog.no.title", "No"), style: TextStyle(color: Styles().colors.fillColorPrimary, fontSize: 16, fontFamily: Styles().fontFamilies.bold)), onPressed: () { Analytics.instance.logAlert(text: message, selection: "No"); @@ -979,12 +980,12 @@ class _SettingsHomePanelState extends State implements Notifi Analytics.instance.logSelect(target: "Scan COVID-19 Secret QRcode"); BarcodeScanner.scan().then((result) { // barcode_scan plugin returns 8 digits when it cannot read the qr code. Prevent it from storing such values - if (AppString.isStringEmpty(result) || (result.length <= 8)) { + if (AppString.isStringEmpty(result?.rawContent) || ((result?.rawContent?.length ?? 0) <= 8)) { AppAlert.showDialogResult(context, Localization().getStringEx('panel.settings.home.covid19.alert.qr_code.scan.failed.msg', 'Failed to read QR code.')); } else { setState(() { _scanningHealthUserKeys = true; }); - _onCovid19QrCodeScanSucceeded(result); + _onCovid19QrCodeScanSucceeded(result?.rawContent); } }); } @@ -1030,7 +1031,7 @@ class _SettingsHomePanelState extends State implements Notifi // Privacy Widget _buildPrivacy() { - List contentList = new List(); + List contentList = []; List codes = FlexUI()['settings.privacy'] ?? []; for (int index = 0; index < codes.length; index++) { @@ -1066,7 +1067,7 @@ class _SettingsHomePanelState extends State implements Notifi // Account Widget _buildAccount() { - List contentList = new List(); + List contentList = []; List codes = FlexUI()['settings.account'] ?? []; for (int index = 0; index < codes.length; index++) { @@ -1246,9 +1247,11 @@ class _SettingsHomePanelState extends State implements Notifi } void _updateState() { - if (mounted) { - setState(() {}); - } + Future.delayed(Duration(), () { + if (mounted) { + setState(() {}); + } + }); } } diff --git a/lib/ui/settings/SettingsPersonalInfoPanel.dart b/lib/ui/settings/SettingsPersonalInfoPanel.dart index f2c1e4f8..85f2acf5 100644 --- a/lib/ui/settings/SettingsPersonalInfoPanel.dart +++ b/lib/ui/settings/SettingsPersonalInfoPanel.dart @@ -299,7 +299,7 @@ class _SettingsPersonalInfoPanelState extends State { Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - FlatButton( + TextButton( onPressed: () { Analytics.instance.logAlert(text: "Sign out", selection: "Yes"); Auth().logout(); @@ -307,7 +307,7 @@ class _SettingsPersonalInfoPanelState extends State { Navigator.pop(context); }, child: Text(Localization().getStringEx("panel.profile_info.logout.button.yes", "Yes"))), - FlatButton( + TextButton( onPressed: () { Analytics.instance.logAlert(text: "Sign out", selection: "No"); Navigator.pop(context); diff --git a/lib/ui/settings2/Settings2HomePanel.dart b/lib/ui/settings2/Settings2HomePanel.dart index a1ffac9e..31e11777 100644 --- a/lib/ui/settings2/Settings2HomePanel.dart +++ b/lib/ui/settings2/Settings2HomePanel.dart @@ -282,7 +282,7 @@ class _Settings2HomePanelState extends State implements Noti } Widget _buildConnectedNetIdLayout() { - List contentList = List(); + List contentList = []; if(Auth().isShibbolethLoggedIn){ contentList.add(Container( @@ -319,7 +319,7 @@ class _Settings2HomePanelState extends State implements Noti } Widget _buildConnectedPhoneLayout() { - List contentList = List(); + List contentList = []; if(Auth().isPhoneLoggedIn){ String full = Auth()?.userPiiData?.fullName ?? ""; @@ -502,14 +502,14 @@ class _Settings2HomePanelState extends State implements Noti Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - FlatButton( + TextButton( onPressed: () { Analytics.instance.logAlert(text: "Sign out", selection: "Yes"); Navigator.pop(context); Auth().logout(); }, child: Text("Yes")), - FlatButton( + TextButton( onPressed: () { Analytics.instance.logAlert(text: "Sign out", selection: "No"); Navigator.pop(context); @@ -794,14 +794,14 @@ class _DebugContainerState extends State<_DebugContainer> { Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - FlatButton( + TextButton( onPressed: () { Navigator.pop(context); //_finish(); }, child: Text(Localization().getStringEx('dialog.cancel.title', 'Cancel'))), Container(width: 6), - FlatButton( + TextButton( onPressed: () { _onEnterPin(pinController?.text); //_finish(); diff --git a/lib/ui/settings2/Settings2TransferEncryptionKeyPanel.dart b/lib/ui/settings2/Settings2TransferEncryptionKeyPanel.dart index 8e027fed..9c820bf6 100644 --- a/lib/ui/settings2/Settings2TransferEncryptionKeyPanel.dart +++ b/lib/ui/settings2/Settings2TransferEncryptionKeyPanel.dart @@ -281,11 +281,11 @@ class _Settings2TransferEncryptionKeyPanelState extends State { if (AppCollection.isCollectionEmpty(buttonsJsonContent)) { return Container(); } - List buttons = List(); + List buttons = []; for (Map buttonContent in buttonsJsonContent) { String title = buttonContent['title']; buttons.add(Row( diff --git a/lib/ui/widgets/MapWidget.dart b/lib/ui/widgets/MapWidget.dart index f8921ee0..9f223ace 100644 --- a/lib/ui/widgets/MapWidget.dart +++ b/lib/ui/widgets/MapWidget.dart @@ -73,7 +73,7 @@ class MapController { int get mapId { return _mapId; } Future placePOIs(List explores) async { - List jsonData = List(); + List jsonData = []; if (AppCollection.isCollectionNotEmpty(explores)) { for (dynamic explore in explores) { jsonData.add(explore.toJson()); diff --git a/lib/ui/widgets/StatusInfoDialog.dart b/lib/ui/widgets/StatusInfoDialog.dart index c85c2e59..02cb0dae 100644 --- a/lib/ui/widgets/StatusInfoDialog.dart +++ b/lib/ui/widgets/StatusInfoDialog.dart @@ -28,7 +28,7 @@ class StatusInfoDialog extends StatelessWidget{ const StatusInfoDialog({Key key, this.currentCountyName}) : super(key: key); static show(BuildContext context, countyName){ - showDialog(context: context,child: StatusInfoDialog(currentCountyName: countyName,)); + showDialog(context: context, builder: (context) => StatusInfoDialog(currentCountyName: countyName,)); } @override diff --git a/lib/utils/Crypt.dart b/lib/utils/Crypt.dart index 6cf0fad7..34efca70 100644 --- a/lib/utils/Crypt.dart +++ b/lib/utils/Crypt.dart @@ -173,7 +173,7 @@ class AESCrypt { Uint8List encryptedJson = encrypter.encrypt(dataString, iv: iv).bytes; - List list = List(); + List list = []; list.addAll(keyString2.codeUnits); list.addAll(encryptedJson); Uint8List data = Uint8List.fromList(list); @@ -423,12 +423,12 @@ class RsaKeyHelper { var version = ASN1Integer(BigInt.from(0)); var modulus = ASN1Integer(privateKey.n); var publicExponent = ASN1Integer(privateKey.exponent); - var privateExponent = ASN1Integer(privateKey.d); + var privateExponent = ASN1Integer(privateKey.privateExponent); var p = ASN1Integer(privateKey.p); var q = ASN1Integer(privateKey.q); - var dP = privateKey.d % (privateKey.p - BigInt.from(1)); + var dP = privateKey.privateExponent % (privateKey.p - BigInt.from(1)); var exp1 = ASN1Integer(dP); - var dQ = privateKey.d % (privateKey.q - BigInt.from(1)); + var dQ = privateKey.privateExponent % (privateKey.q - BigInt.from(1)); var exp2 = ASN1Integer(dQ); var iQ = privateKey.q.modInverse(privateKey.p); var co = ASN1Integer(iQ); diff --git a/lib/utils/Utils.dart b/lib/utils/Utils.dart index 72abc9f0..5f1ab617 100644 --- a/lib/utils/Utils.dart +++ b/lib/utils/Utils.dart @@ -365,7 +365,7 @@ class AppAlert { return AlertDialog( content: Text(message), actions: [ - FlatButton( + TextButton( child: Text(Localization().getStringEx("dialog.ok.title", "OK")), onPressed: () { Analytics.instance.logAlert(text: message, selection: "Ok"); @@ -401,7 +401,7 @@ class AppAlert { AppString.isStringNotEmpty(message) ? Text(message, textAlign: TextAlign.center,) : Container(), ],), actions: [ - FlatButton( + TextButton( child: Text(Localization().getStringEx("dialog.ok.title", "OK")), onPressed: (){ Analytics.instance.logAlert(text: message, selection: "OK"); @@ -536,7 +536,7 @@ class AppDeviceOrientation { List orientationsList; if (stringsList != null) { - orientationsList = List(); + orientationsList = []; for (dynamic string in stringsList) { if (string is String) { DeviceOrientation orientation = fromStr(string); @@ -553,7 +553,7 @@ class AppDeviceOrientation { List stringsList; if (orientationsList != null) { - stringsList = List(); + stringsList = []; for (DeviceOrientation orientation in orientationsList) { String orientationString = toStr(orientation); if (orientationString != null) { diff --git a/pubspec.lock b/pubspec.lock index 163efbdb..7926ab08 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,140 +7,133 @@ packages: name: archive url: "https://pub.dartlang.org" source: hosted - version: "2.0.13" + version: "3.1.2" args: dependency: transitive description: name: args url: "https://pub.dartlang.org" source: hosted - version: "1.6.0" + version: "2.1.0" asn1lib: dependency: transitive description: name: asn1lib url: "https://pub.dartlang.org" source: hosted - version: "0.6.5" + version: "1.0.0" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0-nullsafety.1" + version: "2.5.0" barcode_scan: dependency: "direct main" description: name: barcode_scan url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "3.0.1" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" characters: dependency: transitive description: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.3" + version: "1.1.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" chewie: dependency: transitive description: name: chewie url: "https://pub.dartlang.org" source: hosted - version: "0.9.10" + version: "0.12.2" chewie_audio: dependency: transitive description: name: chewie_audio url: "https://pub.dartlang.org" source: hosted - version: "1.0.0+1" + version: "1.1.2" clock: dependency: transitive description: name: clock url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" collection: dependency: "direct main" description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.15.0-nullsafety.3" + version: "1.15.0" connectivity: dependency: "direct main" description: name: connectivity url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "3.0.3" connectivity_for_web: dependency: transitive description: name: connectivity_for_web url: "https://pub.dartlang.org" source: hosted - version: "0.3.1+2" + version: "0.4.0" connectivity_macos: dependency: transitive description: name: connectivity_macos url: "https://pub.dartlang.org" source: hosted - version: "0.1.0+5" + version: "0.2.0" connectivity_platform_interface: dependency: transitive description: name: connectivity_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.6" - convert: - dependency: transitive - description: - name: convert - url: "https://pub.dartlang.org" - source: hosted - version: "2.1.1" + version: "2.0.1" cookie_jar: dependency: "direct main" description: name: cookie_jar url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "3.0.1" crypto: dependency: transitive description: name: crypto url: "https://pub.dartlang.org" source: hosted - version: "2.1.5" + version: "3.0.1" css_colors: dependency: transitive description: name: css_colors url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.1.1" csslib: dependency: transitive description: @@ -148,111 +141,132 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.16.2" + cupertino_icons: + dependency: transitive + description: + name: cupertino_icons + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" device_info: dependency: "direct main" description: name: device_info url: "https://pub.dartlang.org" source: hosted - version: "0.4.2+8" + version: "2.0.0" device_info_platform_interface: dependency: transitive description: name: device_info_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "2.0.1" dotted_border: dependency: "direct main" description: name: dotted_border url: "https://pub.dartlang.org" source: hosted - version: "1.0.6" + version: "2.0.0" encrypt: dependency: "direct main" description: name: encrypt url: "https://pub.dartlang.org" source: hosted - version: "4.0.3" + version: "5.0.0" fake_async: dependency: transitive description: name: fake_async url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" ffi: dependency: transitive description: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "0.1.3" + version: "1.0.0" file: dependency: transitive description: name: file url: "https://pub.dartlang.org" source: hosted - version: "5.2.1" - firebase: - dependency: transitive - description: - name: firebase - url: "https://pub.dartlang.org" - source: hosted - version: "7.3.0" + version: "6.1.0" firebase_core: dependency: "direct main" description: name: firebase_core url: "https://pub.dartlang.org" source: hosted - version: "0.5.0+1" + version: "1.1.0" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "4.0.0" firebase_core_web: dependency: transitive description: name: firebase_core_web url: "https://pub.dartlang.org" source: hosted - version: "0.2.0" + version: "1.0.2" firebase_crashlytics: dependency: "direct main" description: name: firebase_crashlytics url: "https://pub.dartlang.org" source: hosted - version: "0.2.1+1" + version: "2.0.2" firebase_crashlytics_platform_interface: dependency: transitive description: name: firebase_crashlytics_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.1.1" + version: "3.0.2" firebase_messaging: dependency: "direct main" description: name: firebase_messaging url: "https://pub.dartlang.org" source: hosted - version: "7.0.3" + version: "9.1.3" + firebase_messaging_platform_interface: + dependency: transitive + description: + name: firebase_messaging_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" + firebase_messaging_web: + dependency: transitive + description: + name: firebase_messaging_web + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.6" firebase_ml_vision: dependency: "direct main" description: name: firebase_ml_vision url: "https://pub.dartlang.org" source: hosted - version: "0.9.7" + version: "0.12.0+1" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.11" flutter: dependency: "direct main" description: flutter @@ -264,28 +278,35 @@ packages: name: flutter_html url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.3.0" flutter_image_compress: dependency: "direct main" description: name: flutter_image_compress url: "https://pub.dartlang.org" source: hosted - version: "0.7.0" + version: "1.0.0" + flutter_layout_grid: + dependency: transitive + description: + name: flutter_layout_grid + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.5" flutter_local_notifications: dependency: "direct main" description: name: flutter_local_notifications url: "https://pub.dartlang.org" source: hosted - version: "2.0.0+1" + version: "5.0.0+4" flutter_local_notifications_platform_interface: dependency: transitive description: name: flutter_local_notifications_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "3.0.0" flutter_localizations: dependency: "direct main" description: flutter @@ -304,14 +325,14 @@ packages: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "1.0.11" + version: "2.0.1" flutter_svg: dependency: transitive description: name: flutter_svg url: "https://pub.dartlang.org" source: hosted - version: "0.18.1" + version: "0.20.0-nullsafety.3" flutter_swiper: dependency: "direct main" description: @@ -335,7 +356,7 @@ packages: name: fluttertoast url: "https://pub.dartlang.org" source: hosted - version: "7.1.1" + version: "8.0.6" html: dependency: transitive description: @@ -349,273 +370,280 @@ packages: name: http url: "https://pub.dartlang.org" source: hosted - version: "0.12.2" + version: "0.13.3" http_parser: dependency: transitive description: name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "3.1.4" + version: "4.0.0" image_picker: dependency: "direct main" description: name: image_picker url: "https://pub.dartlang.org" source: hosted - version: "0.6.7+11" + version: "0.7.4" + image_picker_for_web: + dependency: transitive + description: + name: image_picker_for_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.1.1" + version: "2.1.0" + import_js_library: + dependency: transitive + description: + name: import_js_library + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" intl: dependency: transitive description: name: intl url: "https://pub.dartlang.org" source: hosted - version: "0.16.1" + version: "0.17.0" js: dependency: transitive description: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.2" + version: "0.6.3" location: dependency: "direct main" description: name: location url: "https://pub.dartlang.org" source: hosted - version: "3.0.2" + version: "4.1.1" location_platform_interface: dependency: transitive description: name: location_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "2.1.0" location_web: dependency: transitive description: name: location_web url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "3.0.0" logger: dependency: "direct main" description: name: logger url: "https://pub.dartlang.org" source: hosted - version: "0.9.4" + version: "1.0.0" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10-nullsafety.1" + version: "0.12.10" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" mime_type: dependency: "direct main" description: name: mime_type url: "https://pub.dartlang.org" source: hosted - version: "0.3.2" - open_iconic_flutter: - dependency: transitive - description: - name: open_iconic_flutter - url: "https://pub.dartlang.org" - source: hosted - version: "0.3.0" + version: "1.0.0" package_info: dependency: "direct main" description: name: package_info url: "https://pub.dartlang.org" source: hosted - version: "0.4.3" + version: "2.0.0" path: dependency: transitive description: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.1" + version: "1.8.0" path_drawing: dependency: transitive description: name: path_drawing url: "https://pub.dartlang.org" source: hosted - version: "0.4.1+1" + version: "0.5.1" path_parsing: dependency: transitive description: name: path_parsing url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.2.1" path_provider: dependency: "direct main" description: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "1.6.18" + version: "2.0.1" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+2" + version: "2.0.0" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.4+4" + version: "2.0.0" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "2.0.1" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "0.0.4+1" + version: "2.0.1" pedantic: dependency: transitive description: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.9.2" + version: "1.11.0" petitparser: dependency: transitive description: name: petitparser url: "https://pub.dartlang.org" source: hosted - version: "3.1.0" + version: "4.1.0" platform: dependency: transitive description: name: platform url: "https://pub.dartlang.org" source: hosted - version: "2.2.1" + version: "3.0.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "2.0.0" pointycastle: dependency: transitive description: name: pointycastle url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "3.0.1" process: dependency: transitive description: name: process url: "https://pub.dartlang.org" source: hosted - version: "3.0.13" + version: "4.2.1" + protobuf: + dependency: transitive + description: + name: protobuf + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.3" qr: dependency: transitive description: name: qr url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "2.0.0" qr_flutter: dependency: "direct main" description: name: qr_flutter url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "4.0.0" quiver: dependency: transitive description: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.1.3" - screen: - dependency: transitive - description: - name: screen - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.5" + version: "2.1.5" shared_preferences: dependency: "direct main" description: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "0.5.12" + version: "2.0.5" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux url: "https://pub.dartlang.org" source: hosted - version: "0.0.2+2" + version: "2.0.0" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+10" + version: "2.0.0" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.4" + version: "2.0.0" shared_preferences_web: dependency: transitive description: name: shared_preferences_web url: "https://pub.dartlang.org" source: hosted - version: "0.1.2+7" + version: "2.0.0" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+1" + version: "2.0.0" sky_engine: dependency: transitive description: flutter @@ -627,77 +655,77 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0-nullsafety.2" + version: "1.8.0" sprintf: dependency: "direct main" description: name: sprintf url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "6.0.0" sqflite: dependency: "direct main" description: name: sqflite url: "https://pub.dartlang.org" source: hosted - version: "1.3.1+1" + version: "2.0.0+3" sqflite_common: dependency: transitive description: name: sqflite_common url: "https://pub.dartlang.org" source: hosted - version: "1.0.2+1" + version: "2.0.0+2" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.10.0-nullsafety.1" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.1" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.1.0-nullsafety.1" + version: "1.1.0" synchronized: dependency: transitive description: name: synchronized url: "https://pub.dartlang.org" source: hosted - version: "2.2.0+2" + version: "3.0.0" term_glyph: dependency: transitive description: name: term_glyph url: "https://pub.dartlang.org" source: hosted - version: "1.2.0-nullsafety.1" + version: "1.2.0" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19-nullsafety.2" + version: "0.2.19" timezone: dependency: transitive description: name: timezone url: "https://pub.dartlang.org" source: hosted - version: "0.5.7" + version: "0.7.0" transformer_page_view: dependency: transitive description: @@ -711,77 +739,91 @@ packages: name: typed_data url: "https://pub.dartlang.org" source: hosted - version: "1.3.0-nullsafety.3" + version: "1.3.0" uni_links: dependency: "direct main" description: name: uni_links url: "https://pub.dartlang.org" source: hosted - version: "0.4.0" + version: "0.5.1" + uni_links_platform_interface: + dependency: transitive + description: + name: uni_links_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + uni_links_web: + dependency: transitive + description: + name: uni_links_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.0" url_launcher: dependency: "direct main" description: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "5.7.2" + version: "6.0.3" url_launcher_linux: dependency: transitive description: name: url_launcher_linux url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+1" + version: "2.0.0" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+8" + version: "2.0.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "1.0.8" + version: "2.0.2" url_launcher_web: dependency: transitive description: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "0.1.4+1" + version: "2.0.0" url_launcher_windows: dependency: transitive description: name: url_launcher_windows url: "https://pub.dartlang.org" source: hosted - version: "0.0.1+1" + version: "2.0.0" uuid: dependency: "direct main" description: name: uuid url: "https://pub.dartlang.org" source: hosted - version: "2.2.2" + version: "3.0.4" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0-nullsafety.3" + version: "2.1.0" video_player: dependency: transitive description: name: video_player url: "https://pub.dartlang.org" source: hosted - version: "0.10.12+5" + version: "1.0.1" video_player_platform_interface: dependency: transitive description: @@ -795,42 +837,56 @@ packages: name: video_player_web url: "https://pub.dartlang.org" source: hosted - version: "0.1.4" + version: "0.1.4+1" wakelock: dependency: transitive description: name: wakelock url: "https://pub.dartlang.org" source: hosted - version: "0.1.4+2" + version: "0.2.1+1" + wakelock_platform_interface: + dependency: transitive + description: + name: wakelock_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.0+1" + wakelock_web: + dependency: transitive + description: + name: wakelock_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.0+3" webview_flutter: dependency: "direct main" description: name: webview_flutter url: "https://pub.dartlang.org" source: hosted - version: "0.3.24" + version: "1.0.7" win32: dependency: transitive description: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "1.7.3" + version: "2.0.5" xdg_directories: dependency: transitive description: name: xdg_directories url: "https://pub.dartlang.org" source: hosted - version: "0.1.2" + version: "0.2.0" xml: dependency: transitive description: name: xml url: "https://pub.dartlang.org" source: hosted - version: "4.5.1" + version: "5.1.0" sdks: - dart: ">=2.10.0-110 <2.11.0" - flutter: ">=1.18.0-6.0.pre <2.0.0" + dart: ">=2.12.0 <3.0.0" + flutter: ">=2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 9bbe093e..ae10ad9c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: Illinois client application. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 2.10.25+1025 +version: 2.10.28+1028 environment: sdk: ">=2.2.0 <3.0.0" @@ -24,39 +24,43 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - archive: ^2.0.13 - shared_preferences: ^0.5.3+5 + archive: ^3.1.2 + shared_preferences: ^2.0.5 flutter_swiper: ^1.1.6 - mime_type: ^0.3.2 - location: ^3.0.2 - uni_links: ^0.4.0 - url_launcher: ^5.2.3 - fluttertoast: ^7.0.4 + mime_type: ^1.0.0 + location: ^4.1.1 + uni_links: ^0.5.1 + url_launcher: ^6.0.3 + fluttertoast: ^8.0.6 # Firebase - firebase_core: ^0.5.0+1 - firebase_messaging: ^7.0.3 - firebase_crashlytics: ^0.2.1+1 - firebase_ml_vision: ^0.9.4 + firebase_core: ^1.1.0 + firebase_messaging: ^9.1.3 + firebase_crashlytics: ^2.0.2 + firebase_ml_vision: ^0.12.0+1 # End Firebase - logger: ^0.9.2 - flutter_local_notifications: ^2.0.0+1 - sprintf: ^5.0.0 - sqflite: ^1.1.7+1 - encrypt: ^4.0.2 - package_info: ^0.4.0+9 - device_info: ^0.4.0+4 - connectivity: ^2.0.2 + logger: ^1.0.0 + flutter_local_notifications: ^5.0.0+4 + sprintf: ^6.0.0 + sqflite: ^2.0.0+3 + encrypt: ^5.0.0 + package_info: ^2.0.0 + device_info: ^2.0.0 + connectivity: ^3.0.3 collection: ^1.14.11 - uuid: ^2.0.2 - image_picker: ^0.6.7+4 - path_provider: ^1.3.1 - cookie_jar: ^1.0.0 - flutter_html: ^1.0.2 # Rollback flutter_html to 0.11.1 due to accessibility issue https://github.com/rokwire/safer-illinois-app/issues/195 - qr_flutter: ^3.1.0 - webview_flutter: ^0.3.19+7 - dotted_border: ^1.0.5 - flutter_image_compress: ^0.7.0 - barcode_scan: 2.0.2 # Explicitly use older version of the plugin. The latest one does not work! + uuid: ^3.0.4 + image_picker: ^0.7.4 + path_provider: ^2.0.1 + cookie_jar: ^3.0.1 + flutter_html: ^1.3.0 + qr_flutter: ^4.0.0 + webview_flutter: ^1.0.7 + dotted_border: ^2.0.0 + flutter_image_compress: ^1.0.0 + barcode_scan: ^3.0.1 + + # TBD: wait for 'google_ml_kit' to get ready and replace 'firebase_ml_vision'. +# 'firebase_ml_vision' requires 'Firebase/MLVisionBarcodeModel' pod that is currently impossible to add. +# google_ml_kit: ... dev_dependencies: flutter_test: diff --git a/scripts/build.sh b/scripts/build.sh index 7af06938..dda34f9c 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -105,7 +105,7 @@ if [ "$PLATFORM" = "all" ] || [ "$PLATFORM" = "ios" ]; then xcodebuild -workspace Runner.xcworkspace -scheme Runner -archivePath ../build/_output/tmp/Runner.xcarchive archive xcodebuild -exportArchive -archivePath ../build/_output/tmp/Runner.xcarchive -exportPath ../build/_output/tmp/ -exportOptionsPlist ../build/_output/$BRAND-$VERSION-$ENV.plist cd .. - cp ./build/_output/tmp/Runner.ipa ./build/_output/$BRAND-$VERSION-$ENV.ipa + cp ./build/_output/tmp/Safer\ Illinois.ipa ./build/_output/$BRAND-$VERSION-$ENV.ipa #rm -rf ./build/_output/tmp/ aws s3 cp $QR_BUILD_PATH s3://rokwire-ios-beta/Installs/