From 4c38c706d4baf1e71e13ad64538fc970e09deae9 Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Thu, 14 Nov 2024 15:50:50 +0200 Subject: [PATCH 01/16] refactor: rename packages to apps --- {packages => apps}/firmware_notifier/.fvmrc | 0 .../firmware_notifier/README.md | 0 .../firmware_notifier/analysis_options.yaml | 0 .../bin/firmware_notifier.dart | 0 .../lib/firmware_notifier.dart | 0 .../firmware_notifier/pubspec.yaml | 0 .../test/firmware_notifier_test.dart | 0 .../test/firmware_notifier_test.mocks.dart | 0 {packages => apps}/firmware_updater/.fvmrc | 0 .../firmware_updater/analysis_options.yaml | 0 .../assets/firmware-updater.desktop | 0 .../firmware_updater/firmware-updater.png | Bin .../integration_test/README.md | 0 .../firmware_updater_test.dart | 0 {packages => apps}/firmware_updater/l10n.yaml | 0 .../firmware_updater/lib/detail_page.dart | 0 .../firmware_updater/lib/device_model.dart | 0 .../firmware_updater/lib/device_page.dart | 0 .../firmware_updater/lib/device_store.dart | 0 .../firmware_updater/lib/device_tile.dart | 0 .../firmware_updater/lib/firmware_app.dart | 0 .../lib/fwupd_dbus_service.dart | 0 .../firmware_updater/lib/fwupd_l10n.dart | 0 .../lib/fwupd_mock_service.dart | 0 .../firmware_updater/lib/fwupd_notifier.dart | 0 .../firmware_updater/lib/fwupd_service.dart | 0 .../firmware_updater/lib/fwupd_x.dart | 0 .../firmware_updater/lib/main.dart | 0 .../firmware_updater/lib/release_page.dart | 0 .../firmware_updater/lib/src/l10n/app_am.arb | 0 .../firmware_updater/lib/src/l10n/app_ar.arb | 0 .../firmware_updater/lib/src/l10n/app_be.arb | 0 .../firmware_updater/lib/src/l10n/app_bg.arb | 0 .../firmware_updater/lib/src/l10n/app_bn.arb | 0 .../firmware_updater/lib/src/l10n/app_bo.arb | 0 .../firmware_updater/lib/src/l10n/app_bs.arb | 0 .../firmware_updater/lib/src/l10n/app_ca.arb | 0 .../firmware_updater/lib/src/l10n/app_cs.arb | 0 .../firmware_updater/lib/src/l10n/app_cy.arb | 0 .../firmware_updater/lib/src/l10n/app_da.arb | 0 .../firmware_updater/lib/src/l10n/app_de.arb | 0 .../firmware_updater/lib/src/l10n/app_dz.arb | 0 .../firmware_updater/lib/src/l10n/app_el.arb | 0 .../firmware_updater/lib/src/l10n/app_en.arb | 0 .../firmware_updater/lib/src/l10n/app_eo.arb | 0 .../firmware_updater/lib/src/l10n/app_es.arb | 0 .../firmware_updater/lib/src/l10n/app_et.arb | 0 .../firmware_updater/lib/src/l10n/app_eu.arb | 0 .../firmware_updater/lib/src/l10n/app_fa.arb | 0 .../firmware_updater/lib/src/l10n/app_fi.arb | 0 .../firmware_updater/lib/src/l10n/app_fr.arb | 0 .../firmware_updater/lib/src/l10n/app_ga.arb | 0 .../firmware_updater/lib/src/l10n/app_gl.arb | 0 .../firmware_updater/lib/src/l10n/app_gu.arb | 0 .../firmware_updater/lib/src/l10n/app_he.arb | 0 .../firmware_updater/lib/src/l10n/app_hi.arb | 0 .../firmware_updater/lib/src/l10n/app_hr.arb | 0 .../firmware_updater/lib/src/l10n/app_hu.arb | 0 .../firmware_updater/lib/src/l10n/app_id.arb | 0 .../firmware_updater/lib/src/l10n/app_is.arb | 0 .../firmware_updater/lib/src/l10n/app_it.arb | 0 .../firmware_updater/lib/src/l10n/app_ja.arb | 0 .../firmware_updater/lib/src/l10n/app_ka.arb | 0 .../firmware_updater/lib/src/l10n/app_kk.arb | 0 .../firmware_updater/lib/src/l10n/app_km.arb | 0 .../firmware_updater/lib/src/l10n/app_kn.arb | 0 .../firmware_updater/lib/src/l10n/app_ko.arb | 0 .../firmware_updater/lib/src/l10n/app_ku.arb | 0 .../firmware_updater/lib/src/l10n/app_lo.arb | 0 .../firmware_updater/lib/src/l10n/app_lt.arb | 0 .../firmware_updater/lib/src/l10n/app_lv.arb | 0 .../firmware_updater/lib/src/l10n/app_mk.arb | 0 .../firmware_updater/lib/src/l10n/app_ml.arb | 0 .../firmware_updater/lib/src/l10n/app_mr.arb | 0 .../firmware_updater/lib/src/l10n/app_my.arb | 0 .../firmware_updater/lib/src/l10n/app_nb.arb | 0 .../firmware_updater/lib/src/l10n/app_ne.arb | 0 .../firmware_updater/lib/src/l10n/app_nl.arb | 0 .../firmware_updater/lib/src/l10n/app_nn.arb | 0 .../firmware_updater/lib/src/l10n/app_oc.arb | 0 .../firmware_updater/lib/src/l10n/app_pa.arb | 0 .../firmware_updater/lib/src/l10n/app_pl.arb | 0 .../firmware_updater/lib/src/l10n/app_pt.arb | 0 .../lib/src/l10n/app_pt_BR.arb | 0 .../firmware_updater/lib/src/l10n/app_ro.arb | 0 .../firmware_updater/lib/src/l10n/app_ru.arb | 0 .../firmware_updater/lib/src/l10n/app_se.arb | 0 .../firmware_updater/lib/src/l10n/app_si.arb | 0 .../firmware_updater/lib/src/l10n/app_sk.arb | 0 .../firmware_updater/lib/src/l10n/app_sl.arb | 0 .../firmware_updater/lib/src/l10n/app_sq.arb | 0 .../firmware_updater/lib/src/l10n/app_sr.arb | 0 .../firmware_updater/lib/src/l10n/app_sv.arb | 0 .../firmware_updater/lib/src/l10n/app_ta.arb | 0 .../firmware_updater/lib/src/l10n/app_te.arb | 0 .../firmware_updater/lib/src/l10n/app_tg.arb | 0 .../firmware_updater/lib/src/l10n/app_th.arb | 0 .../firmware_updater/lib/src/l10n/app_tl.arb | 0 .../firmware_updater/lib/src/l10n/app_tr.arb | 0 .../firmware_updater/lib/src/l10n/app_ug.arb | 0 .../firmware_updater/lib/src/l10n/app_uk.arb | 0 .../firmware_updater/lib/src/l10n/app_vi.arb | 0 .../firmware_updater/lib/src/l10n/app_zh.arb | 0 .../lib/src/l10n/app_zh_TW.arb | 0 .../lib/src/widgets/app_progress_bar.dart | 0 .../lib/src/widgets/device_header.dart | 0 .../lib/src/widgets/device_icon.dart | 0 .../lib/src/widgets/dialogs.dart | 0 .../lib/src/widgets/error_banner.dart | 0 .../lib/src/widgets/option_card.dart | 0 .../lib/src/widgets/refresh_button.dart | 0 .../lib/src/widgets/release_card.dart | 0 .../lib/src/widgets/small_chip.dart | 0 .../lib/src/widgets/status_banner.dart | 0 .../lib/src/widgets/status_bar.dart | 0 .../firmware_updater/lib/widgets.dart | 0 .../firmware_updater/linux/.gitignore | 0 .../firmware_updater/linux/CMakeLists.txt | 0 .../linux/flutter/CMakeLists.txt | 0 .../firmware_updater/linux/main.cc | 0 .../firmware_updater/linux/my_application.cc | 0 .../firmware_updater/linux/my_application.h | 0 .../firmware_updater/pubspec.yaml | 0 .../test/device_model_test.dart | 0 .../test/device_page_test.dart | 0 .../test/device_store_test.dart | 0 .../test/firmware_app_test.dart | 0 .../test/firmware_app_test.mocks.dart | 0 .../test/fwupd_dbus_service_test.dart | 0 .../test/fwupd_dbus_service_test.mocks.dart | 0 .../test/fwupd_mock_service_test.dart | 0 .../test/fwupd_notifier_test.dart | 0 .../test/release_page_test.dart | 0 .../firmware_updater/test/test_utils.dart | 0 .../test/test_utils.mocks.dart | 0 .../test/widgets/app_progress_bar_test.dart | 0 .../test/widgets/message_dialog_test.dart | 0 .../test/widgets/status_banner_test.dart | 0 melos.yaml | 20 +++++++++--------- snap/snapcraft.yaml | 4 ++-- 140 files changed, 12 insertions(+), 12 deletions(-) rename {packages => apps}/firmware_notifier/.fvmrc (100%) rename {packages => apps}/firmware_notifier/README.md (100%) rename {packages => apps}/firmware_notifier/analysis_options.yaml (100%) rename {packages => apps}/firmware_notifier/bin/firmware_notifier.dart (100%) rename {packages => apps}/firmware_notifier/lib/firmware_notifier.dart (100%) rename {packages => apps}/firmware_notifier/pubspec.yaml (100%) rename {packages => apps}/firmware_notifier/test/firmware_notifier_test.dart (100%) rename {packages => apps}/firmware_notifier/test/firmware_notifier_test.mocks.dart (100%) rename {packages => apps}/firmware_updater/.fvmrc (100%) rename {packages => apps}/firmware_updater/analysis_options.yaml (100%) rename {packages => apps}/firmware_updater/assets/firmware-updater.desktop (100%) rename {packages => apps}/firmware_updater/firmware-updater.png (100%) rename {packages => apps}/firmware_updater/integration_test/README.md (100%) rename {packages => apps}/firmware_updater/integration_test/firmware_updater_test.dart (100%) rename {packages => apps}/firmware_updater/l10n.yaml (100%) rename {packages => apps}/firmware_updater/lib/detail_page.dart (100%) rename {packages => apps}/firmware_updater/lib/device_model.dart (100%) rename {packages => apps}/firmware_updater/lib/device_page.dart (100%) rename {packages => apps}/firmware_updater/lib/device_store.dart (100%) rename {packages => apps}/firmware_updater/lib/device_tile.dart (100%) rename {packages => apps}/firmware_updater/lib/firmware_app.dart (100%) rename {packages => apps}/firmware_updater/lib/fwupd_dbus_service.dart (100%) rename {packages => apps}/firmware_updater/lib/fwupd_l10n.dart (100%) rename {packages => apps}/firmware_updater/lib/fwupd_mock_service.dart (100%) rename {packages => apps}/firmware_updater/lib/fwupd_notifier.dart (100%) rename {packages => apps}/firmware_updater/lib/fwupd_service.dart (100%) rename {packages => apps}/firmware_updater/lib/fwupd_x.dart (100%) rename {packages => apps}/firmware_updater/lib/main.dart (100%) rename {packages => apps}/firmware_updater/lib/release_page.dart (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_am.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_ar.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_be.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_bg.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_bn.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_bo.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_bs.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_ca.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_cs.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_cy.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_da.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_de.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_dz.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_el.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_en.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_eo.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_es.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_et.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_eu.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_fa.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_fi.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_fr.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_ga.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_gl.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_gu.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_he.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_hi.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_hr.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_hu.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_id.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_is.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_it.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_ja.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_ka.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_kk.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_km.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_kn.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_ko.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_ku.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_lo.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_lt.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_lv.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_mk.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_ml.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_mr.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_my.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_nb.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_ne.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_nl.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_nn.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_oc.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_pa.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_pl.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_pt.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_pt_BR.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_ro.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_ru.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_se.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_si.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_sk.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_sl.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_sq.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_sr.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_sv.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_ta.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_te.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_tg.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_th.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_tl.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_tr.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_ug.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_uk.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_vi.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_zh.arb (100%) rename {packages => apps}/firmware_updater/lib/src/l10n/app_zh_TW.arb (100%) rename {packages => apps}/firmware_updater/lib/src/widgets/app_progress_bar.dart (100%) rename {packages => apps}/firmware_updater/lib/src/widgets/device_header.dart (100%) rename {packages => apps}/firmware_updater/lib/src/widgets/device_icon.dart (100%) rename {packages => apps}/firmware_updater/lib/src/widgets/dialogs.dart (100%) rename {packages => apps}/firmware_updater/lib/src/widgets/error_banner.dart (100%) rename {packages => apps}/firmware_updater/lib/src/widgets/option_card.dart (100%) rename {packages => apps}/firmware_updater/lib/src/widgets/refresh_button.dart (100%) rename {packages => apps}/firmware_updater/lib/src/widgets/release_card.dart (100%) rename {packages => apps}/firmware_updater/lib/src/widgets/small_chip.dart (100%) rename {packages => apps}/firmware_updater/lib/src/widgets/status_banner.dart (100%) rename {packages => apps}/firmware_updater/lib/src/widgets/status_bar.dart (100%) rename {packages => apps}/firmware_updater/lib/widgets.dart (100%) rename {packages => apps}/firmware_updater/linux/.gitignore (100%) rename {packages => apps}/firmware_updater/linux/CMakeLists.txt (100%) rename {packages => apps}/firmware_updater/linux/flutter/CMakeLists.txt (100%) rename {packages => apps}/firmware_updater/linux/main.cc (100%) rename {packages => apps}/firmware_updater/linux/my_application.cc (100%) rename {packages => apps}/firmware_updater/linux/my_application.h (100%) rename {packages => apps}/firmware_updater/pubspec.yaml (100%) rename {packages => apps}/firmware_updater/test/device_model_test.dart (100%) rename {packages => apps}/firmware_updater/test/device_page_test.dart (100%) rename {packages => apps}/firmware_updater/test/device_store_test.dart (100%) rename {packages => apps}/firmware_updater/test/firmware_app_test.dart (100%) rename {packages => apps}/firmware_updater/test/firmware_app_test.mocks.dart (100%) rename {packages => apps}/firmware_updater/test/fwupd_dbus_service_test.dart (100%) rename {packages => apps}/firmware_updater/test/fwupd_dbus_service_test.mocks.dart (100%) rename {packages => apps}/firmware_updater/test/fwupd_mock_service_test.dart (100%) rename {packages => apps}/firmware_updater/test/fwupd_notifier_test.dart (100%) rename {packages => apps}/firmware_updater/test/release_page_test.dart (100%) rename {packages => apps}/firmware_updater/test/test_utils.dart (100%) rename {packages => apps}/firmware_updater/test/test_utils.mocks.dart (100%) rename {packages => apps}/firmware_updater/test/widgets/app_progress_bar_test.dart (100%) rename {packages => apps}/firmware_updater/test/widgets/message_dialog_test.dart (100%) rename {packages => apps}/firmware_updater/test/widgets/status_banner_test.dart (100%) diff --git a/packages/firmware_notifier/.fvmrc b/apps/firmware_notifier/.fvmrc similarity index 100% rename from packages/firmware_notifier/.fvmrc rename to apps/firmware_notifier/.fvmrc diff --git a/packages/firmware_notifier/README.md b/apps/firmware_notifier/README.md similarity index 100% rename from packages/firmware_notifier/README.md rename to apps/firmware_notifier/README.md diff --git a/packages/firmware_notifier/analysis_options.yaml b/apps/firmware_notifier/analysis_options.yaml similarity index 100% rename from packages/firmware_notifier/analysis_options.yaml rename to apps/firmware_notifier/analysis_options.yaml diff --git a/packages/firmware_notifier/bin/firmware_notifier.dart b/apps/firmware_notifier/bin/firmware_notifier.dart similarity index 100% rename from packages/firmware_notifier/bin/firmware_notifier.dart rename to apps/firmware_notifier/bin/firmware_notifier.dart diff --git a/packages/firmware_notifier/lib/firmware_notifier.dart b/apps/firmware_notifier/lib/firmware_notifier.dart similarity index 100% rename from packages/firmware_notifier/lib/firmware_notifier.dart rename to apps/firmware_notifier/lib/firmware_notifier.dart diff --git a/packages/firmware_notifier/pubspec.yaml b/apps/firmware_notifier/pubspec.yaml similarity index 100% rename from packages/firmware_notifier/pubspec.yaml rename to apps/firmware_notifier/pubspec.yaml diff --git a/packages/firmware_notifier/test/firmware_notifier_test.dart b/apps/firmware_notifier/test/firmware_notifier_test.dart similarity index 100% rename from packages/firmware_notifier/test/firmware_notifier_test.dart rename to apps/firmware_notifier/test/firmware_notifier_test.dart diff --git a/packages/firmware_notifier/test/firmware_notifier_test.mocks.dart b/apps/firmware_notifier/test/firmware_notifier_test.mocks.dart similarity index 100% rename from packages/firmware_notifier/test/firmware_notifier_test.mocks.dart rename to apps/firmware_notifier/test/firmware_notifier_test.mocks.dart diff --git a/packages/firmware_updater/.fvmrc b/apps/firmware_updater/.fvmrc similarity index 100% rename from packages/firmware_updater/.fvmrc rename to apps/firmware_updater/.fvmrc diff --git a/packages/firmware_updater/analysis_options.yaml b/apps/firmware_updater/analysis_options.yaml similarity index 100% rename from packages/firmware_updater/analysis_options.yaml rename to apps/firmware_updater/analysis_options.yaml diff --git a/packages/firmware_updater/assets/firmware-updater.desktop b/apps/firmware_updater/assets/firmware-updater.desktop similarity index 100% rename from packages/firmware_updater/assets/firmware-updater.desktop rename to apps/firmware_updater/assets/firmware-updater.desktop diff --git a/packages/firmware_updater/firmware-updater.png b/apps/firmware_updater/firmware-updater.png similarity index 100% rename from packages/firmware_updater/firmware-updater.png rename to apps/firmware_updater/firmware-updater.png diff --git a/packages/firmware_updater/integration_test/README.md b/apps/firmware_updater/integration_test/README.md similarity index 100% rename from packages/firmware_updater/integration_test/README.md rename to apps/firmware_updater/integration_test/README.md diff --git a/packages/firmware_updater/integration_test/firmware_updater_test.dart b/apps/firmware_updater/integration_test/firmware_updater_test.dart similarity index 100% rename from packages/firmware_updater/integration_test/firmware_updater_test.dart rename to apps/firmware_updater/integration_test/firmware_updater_test.dart diff --git a/packages/firmware_updater/l10n.yaml b/apps/firmware_updater/l10n.yaml similarity index 100% rename from packages/firmware_updater/l10n.yaml rename to apps/firmware_updater/l10n.yaml diff --git a/packages/firmware_updater/lib/detail_page.dart b/apps/firmware_updater/lib/detail_page.dart similarity index 100% rename from packages/firmware_updater/lib/detail_page.dart rename to apps/firmware_updater/lib/detail_page.dart diff --git a/packages/firmware_updater/lib/device_model.dart b/apps/firmware_updater/lib/device_model.dart similarity index 100% rename from packages/firmware_updater/lib/device_model.dart rename to apps/firmware_updater/lib/device_model.dart diff --git a/packages/firmware_updater/lib/device_page.dart b/apps/firmware_updater/lib/device_page.dart similarity index 100% rename from packages/firmware_updater/lib/device_page.dart rename to apps/firmware_updater/lib/device_page.dart diff --git a/packages/firmware_updater/lib/device_store.dart b/apps/firmware_updater/lib/device_store.dart similarity index 100% rename from packages/firmware_updater/lib/device_store.dart rename to apps/firmware_updater/lib/device_store.dart diff --git a/packages/firmware_updater/lib/device_tile.dart b/apps/firmware_updater/lib/device_tile.dart similarity index 100% rename from packages/firmware_updater/lib/device_tile.dart rename to apps/firmware_updater/lib/device_tile.dart diff --git a/packages/firmware_updater/lib/firmware_app.dart b/apps/firmware_updater/lib/firmware_app.dart similarity index 100% rename from packages/firmware_updater/lib/firmware_app.dart rename to apps/firmware_updater/lib/firmware_app.dart diff --git a/packages/firmware_updater/lib/fwupd_dbus_service.dart b/apps/firmware_updater/lib/fwupd_dbus_service.dart similarity index 100% rename from packages/firmware_updater/lib/fwupd_dbus_service.dart rename to apps/firmware_updater/lib/fwupd_dbus_service.dart diff --git a/packages/firmware_updater/lib/fwupd_l10n.dart b/apps/firmware_updater/lib/fwupd_l10n.dart similarity index 100% rename from packages/firmware_updater/lib/fwupd_l10n.dart rename to apps/firmware_updater/lib/fwupd_l10n.dart diff --git a/packages/firmware_updater/lib/fwupd_mock_service.dart b/apps/firmware_updater/lib/fwupd_mock_service.dart similarity index 100% rename from packages/firmware_updater/lib/fwupd_mock_service.dart rename to apps/firmware_updater/lib/fwupd_mock_service.dart diff --git a/packages/firmware_updater/lib/fwupd_notifier.dart b/apps/firmware_updater/lib/fwupd_notifier.dart similarity index 100% rename from packages/firmware_updater/lib/fwupd_notifier.dart rename to apps/firmware_updater/lib/fwupd_notifier.dart diff --git a/packages/firmware_updater/lib/fwupd_service.dart b/apps/firmware_updater/lib/fwupd_service.dart similarity index 100% rename from packages/firmware_updater/lib/fwupd_service.dart rename to apps/firmware_updater/lib/fwupd_service.dart diff --git a/packages/firmware_updater/lib/fwupd_x.dart b/apps/firmware_updater/lib/fwupd_x.dart similarity index 100% rename from packages/firmware_updater/lib/fwupd_x.dart rename to apps/firmware_updater/lib/fwupd_x.dart diff --git a/packages/firmware_updater/lib/main.dart b/apps/firmware_updater/lib/main.dart similarity index 100% rename from packages/firmware_updater/lib/main.dart rename to apps/firmware_updater/lib/main.dart diff --git a/packages/firmware_updater/lib/release_page.dart b/apps/firmware_updater/lib/release_page.dart similarity index 100% rename from packages/firmware_updater/lib/release_page.dart rename to apps/firmware_updater/lib/release_page.dart diff --git a/packages/firmware_updater/lib/src/l10n/app_am.arb b/apps/firmware_updater/lib/src/l10n/app_am.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_am.arb rename to apps/firmware_updater/lib/src/l10n/app_am.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_ar.arb b/apps/firmware_updater/lib/src/l10n/app_ar.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_ar.arb rename to apps/firmware_updater/lib/src/l10n/app_ar.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_be.arb b/apps/firmware_updater/lib/src/l10n/app_be.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_be.arb rename to apps/firmware_updater/lib/src/l10n/app_be.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_bg.arb b/apps/firmware_updater/lib/src/l10n/app_bg.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_bg.arb rename to apps/firmware_updater/lib/src/l10n/app_bg.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_bn.arb b/apps/firmware_updater/lib/src/l10n/app_bn.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_bn.arb rename to apps/firmware_updater/lib/src/l10n/app_bn.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_bo.arb b/apps/firmware_updater/lib/src/l10n/app_bo.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_bo.arb rename to apps/firmware_updater/lib/src/l10n/app_bo.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_bs.arb b/apps/firmware_updater/lib/src/l10n/app_bs.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_bs.arb rename to apps/firmware_updater/lib/src/l10n/app_bs.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_ca.arb b/apps/firmware_updater/lib/src/l10n/app_ca.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_ca.arb rename to apps/firmware_updater/lib/src/l10n/app_ca.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_cs.arb b/apps/firmware_updater/lib/src/l10n/app_cs.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_cs.arb rename to apps/firmware_updater/lib/src/l10n/app_cs.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_cy.arb b/apps/firmware_updater/lib/src/l10n/app_cy.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_cy.arb rename to apps/firmware_updater/lib/src/l10n/app_cy.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_da.arb b/apps/firmware_updater/lib/src/l10n/app_da.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_da.arb rename to apps/firmware_updater/lib/src/l10n/app_da.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_de.arb b/apps/firmware_updater/lib/src/l10n/app_de.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_de.arb rename to apps/firmware_updater/lib/src/l10n/app_de.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_dz.arb b/apps/firmware_updater/lib/src/l10n/app_dz.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_dz.arb rename to apps/firmware_updater/lib/src/l10n/app_dz.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_el.arb b/apps/firmware_updater/lib/src/l10n/app_el.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_el.arb rename to apps/firmware_updater/lib/src/l10n/app_el.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_en.arb b/apps/firmware_updater/lib/src/l10n/app_en.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_en.arb rename to apps/firmware_updater/lib/src/l10n/app_en.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_eo.arb b/apps/firmware_updater/lib/src/l10n/app_eo.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_eo.arb rename to apps/firmware_updater/lib/src/l10n/app_eo.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_es.arb b/apps/firmware_updater/lib/src/l10n/app_es.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_es.arb rename to apps/firmware_updater/lib/src/l10n/app_es.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_et.arb b/apps/firmware_updater/lib/src/l10n/app_et.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_et.arb rename to apps/firmware_updater/lib/src/l10n/app_et.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_eu.arb b/apps/firmware_updater/lib/src/l10n/app_eu.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_eu.arb rename to apps/firmware_updater/lib/src/l10n/app_eu.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_fa.arb b/apps/firmware_updater/lib/src/l10n/app_fa.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_fa.arb rename to apps/firmware_updater/lib/src/l10n/app_fa.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_fi.arb b/apps/firmware_updater/lib/src/l10n/app_fi.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_fi.arb rename to apps/firmware_updater/lib/src/l10n/app_fi.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_fr.arb b/apps/firmware_updater/lib/src/l10n/app_fr.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_fr.arb rename to apps/firmware_updater/lib/src/l10n/app_fr.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_ga.arb b/apps/firmware_updater/lib/src/l10n/app_ga.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_ga.arb rename to apps/firmware_updater/lib/src/l10n/app_ga.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_gl.arb b/apps/firmware_updater/lib/src/l10n/app_gl.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_gl.arb rename to apps/firmware_updater/lib/src/l10n/app_gl.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_gu.arb b/apps/firmware_updater/lib/src/l10n/app_gu.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_gu.arb rename to apps/firmware_updater/lib/src/l10n/app_gu.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_he.arb b/apps/firmware_updater/lib/src/l10n/app_he.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_he.arb rename to apps/firmware_updater/lib/src/l10n/app_he.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_hi.arb b/apps/firmware_updater/lib/src/l10n/app_hi.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_hi.arb rename to apps/firmware_updater/lib/src/l10n/app_hi.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_hr.arb b/apps/firmware_updater/lib/src/l10n/app_hr.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_hr.arb rename to apps/firmware_updater/lib/src/l10n/app_hr.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_hu.arb b/apps/firmware_updater/lib/src/l10n/app_hu.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_hu.arb rename to apps/firmware_updater/lib/src/l10n/app_hu.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_id.arb b/apps/firmware_updater/lib/src/l10n/app_id.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_id.arb rename to apps/firmware_updater/lib/src/l10n/app_id.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_is.arb b/apps/firmware_updater/lib/src/l10n/app_is.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_is.arb rename to apps/firmware_updater/lib/src/l10n/app_is.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_it.arb b/apps/firmware_updater/lib/src/l10n/app_it.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_it.arb rename to apps/firmware_updater/lib/src/l10n/app_it.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_ja.arb b/apps/firmware_updater/lib/src/l10n/app_ja.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_ja.arb rename to apps/firmware_updater/lib/src/l10n/app_ja.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_ka.arb b/apps/firmware_updater/lib/src/l10n/app_ka.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_ka.arb rename to apps/firmware_updater/lib/src/l10n/app_ka.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_kk.arb b/apps/firmware_updater/lib/src/l10n/app_kk.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_kk.arb rename to apps/firmware_updater/lib/src/l10n/app_kk.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_km.arb b/apps/firmware_updater/lib/src/l10n/app_km.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_km.arb rename to apps/firmware_updater/lib/src/l10n/app_km.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_kn.arb b/apps/firmware_updater/lib/src/l10n/app_kn.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_kn.arb rename to apps/firmware_updater/lib/src/l10n/app_kn.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_ko.arb b/apps/firmware_updater/lib/src/l10n/app_ko.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_ko.arb rename to apps/firmware_updater/lib/src/l10n/app_ko.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_ku.arb b/apps/firmware_updater/lib/src/l10n/app_ku.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_ku.arb rename to apps/firmware_updater/lib/src/l10n/app_ku.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_lo.arb b/apps/firmware_updater/lib/src/l10n/app_lo.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_lo.arb rename to apps/firmware_updater/lib/src/l10n/app_lo.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_lt.arb b/apps/firmware_updater/lib/src/l10n/app_lt.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_lt.arb rename to apps/firmware_updater/lib/src/l10n/app_lt.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_lv.arb b/apps/firmware_updater/lib/src/l10n/app_lv.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_lv.arb rename to apps/firmware_updater/lib/src/l10n/app_lv.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_mk.arb b/apps/firmware_updater/lib/src/l10n/app_mk.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_mk.arb rename to apps/firmware_updater/lib/src/l10n/app_mk.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_ml.arb b/apps/firmware_updater/lib/src/l10n/app_ml.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_ml.arb rename to apps/firmware_updater/lib/src/l10n/app_ml.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_mr.arb b/apps/firmware_updater/lib/src/l10n/app_mr.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_mr.arb rename to apps/firmware_updater/lib/src/l10n/app_mr.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_my.arb b/apps/firmware_updater/lib/src/l10n/app_my.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_my.arb rename to apps/firmware_updater/lib/src/l10n/app_my.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_nb.arb b/apps/firmware_updater/lib/src/l10n/app_nb.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_nb.arb rename to apps/firmware_updater/lib/src/l10n/app_nb.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_ne.arb b/apps/firmware_updater/lib/src/l10n/app_ne.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_ne.arb rename to apps/firmware_updater/lib/src/l10n/app_ne.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_nl.arb b/apps/firmware_updater/lib/src/l10n/app_nl.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_nl.arb rename to apps/firmware_updater/lib/src/l10n/app_nl.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_nn.arb b/apps/firmware_updater/lib/src/l10n/app_nn.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_nn.arb rename to apps/firmware_updater/lib/src/l10n/app_nn.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_oc.arb b/apps/firmware_updater/lib/src/l10n/app_oc.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_oc.arb rename to apps/firmware_updater/lib/src/l10n/app_oc.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_pa.arb b/apps/firmware_updater/lib/src/l10n/app_pa.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_pa.arb rename to apps/firmware_updater/lib/src/l10n/app_pa.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_pl.arb b/apps/firmware_updater/lib/src/l10n/app_pl.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_pl.arb rename to apps/firmware_updater/lib/src/l10n/app_pl.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_pt.arb b/apps/firmware_updater/lib/src/l10n/app_pt.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_pt.arb rename to apps/firmware_updater/lib/src/l10n/app_pt.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_pt_BR.arb b/apps/firmware_updater/lib/src/l10n/app_pt_BR.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_pt_BR.arb rename to apps/firmware_updater/lib/src/l10n/app_pt_BR.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_ro.arb b/apps/firmware_updater/lib/src/l10n/app_ro.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_ro.arb rename to apps/firmware_updater/lib/src/l10n/app_ro.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_ru.arb b/apps/firmware_updater/lib/src/l10n/app_ru.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_ru.arb rename to apps/firmware_updater/lib/src/l10n/app_ru.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_se.arb b/apps/firmware_updater/lib/src/l10n/app_se.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_se.arb rename to apps/firmware_updater/lib/src/l10n/app_se.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_si.arb b/apps/firmware_updater/lib/src/l10n/app_si.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_si.arb rename to apps/firmware_updater/lib/src/l10n/app_si.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_sk.arb b/apps/firmware_updater/lib/src/l10n/app_sk.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_sk.arb rename to apps/firmware_updater/lib/src/l10n/app_sk.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_sl.arb b/apps/firmware_updater/lib/src/l10n/app_sl.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_sl.arb rename to apps/firmware_updater/lib/src/l10n/app_sl.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_sq.arb b/apps/firmware_updater/lib/src/l10n/app_sq.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_sq.arb rename to apps/firmware_updater/lib/src/l10n/app_sq.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_sr.arb b/apps/firmware_updater/lib/src/l10n/app_sr.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_sr.arb rename to apps/firmware_updater/lib/src/l10n/app_sr.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_sv.arb b/apps/firmware_updater/lib/src/l10n/app_sv.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_sv.arb rename to apps/firmware_updater/lib/src/l10n/app_sv.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_ta.arb b/apps/firmware_updater/lib/src/l10n/app_ta.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_ta.arb rename to apps/firmware_updater/lib/src/l10n/app_ta.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_te.arb b/apps/firmware_updater/lib/src/l10n/app_te.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_te.arb rename to apps/firmware_updater/lib/src/l10n/app_te.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_tg.arb b/apps/firmware_updater/lib/src/l10n/app_tg.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_tg.arb rename to apps/firmware_updater/lib/src/l10n/app_tg.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_th.arb b/apps/firmware_updater/lib/src/l10n/app_th.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_th.arb rename to apps/firmware_updater/lib/src/l10n/app_th.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_tl.arb b/apps/firmware_updater/lib/src/l10n/app_tl.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_tl.arb rename to apps/firmware_updater/lib/src/l10n/app_tl.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_tr.arb b/apps/firmware_updater/lib/src/l10n/app_tr.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_tr.arb rename to apps/firmware_updater/lib/src/l10n/app_tr.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_ug.arb b/apps/firmware_updater/lib/src/l10n/app_ug.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_ug.arb rename to apps/firmware_updater/lib/src/l10n/app_ug.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_uk.arb b/apps/firmware_updater/lib/src/l10n/app_uk.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_uk.arb rename to apps/firmware_updater/lib/src/l10n/app_uk.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_vi.arb b/apps/firmware_updater/lib/src/l10n/app_vi.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_vi.arb rename to apps/firmware_updater/lib/src/l10n/app_vi.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_zh.arb b/apps/firmware_updater/lib/src/l10n/app_zh.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_zh.arb rename to apps/firmware_updater/lib/src/l10n/app_zh.arb diff --git a/packages/firmware_updater/lib/src/l10n/app_zh_TW.arb b/apps/firmware_updater/lib/src/l10n/app_zh_TW.arb similarity index 100% rename from packages/firmware_updater/lib/src/l10n/app_zh_TW.arb rename to apps/firmware_updater/lib/src/l10n/app_zh_TW.arb diff --git a/packages/firmware_updater/lib/src/widgets/app_progress_bar.dart b/apps/firmware_updater/lib/src/widgets/app_progress_bar.dart similarity index 100% rename from packages/firmware_updater/lib/src/widgets/app_progress_bar.dart rename to apps/firmware_updater/lib/src/widgets/app_progress_bar.dart diff --git a/packages/firmware_updater/lib/src/widgets/device_header.dart b/apps/firmware_updater/lib/src/widgets/device_header.dart similarity index 100% rename from packages/firmware_updater/lib/src/widgets/device_header.dart rename to apps/firmware_updater/lib/src/widgets/device_header.dart diff --git a/packages/firmware_updater/lib/src/widgets/device_icon.dart b/apps/firmware_updater/lib/src/widgets/device_icon.dart similarity index 100% rename from packages/firmware_updater/lib/src/widgets/device_icon.dart rename to apps/firmware_updater/lib/src/widgets/device_icon.dart diff --git a/packages/firmware_updater/lib/src/widgets/dialogs.dart b/apps/firmware_updater/lib/src/widgets/dialogs.dart similarity index 100% rename from packages/firmware_updater/lib/src/widgets/dialogs.dart rename to apps/firmware_updater/lib/src/widgets/dialogs.dart diff --git a/packages/firmware_updater/lib/src/widgets/error_banner.dart b/apps/firmware_updater/lib/src/widgets/error_banner.dart similarity index 100% rename from packages/firmware_updater/lib/src/widgets/error_banner.dart rename to apps/firmware_updater/lib/src/widgets/error_banner.dart diff --git a/packages/firmware_updater/lib/src/widgets/option_card.dart b/apps/firmware_updater/lib/src/widgets/option_card.dart similarity index 100% rename from packages/firmware_updater/lib/src/widgets/option_card.dart rename to apps/firmware_updater/lib/src/widgets/option_card.dart diff --git a/packages/firmware_updater/lib/src/widgets/refresh_button.dart b/apps/firmware_updater/lib/src/widgets/refresh_button.dart similarity index 100% rename from packages/firmware_updater/lib/src/widgets/refresh_button.dart rename to apps/firmware_updater/lib/src/widgets/refresh_button.dart diff --git a/packages/firmware_updater/lib/src/widgets/release_card.dart b/apps/firmware_updater/lib/src/widgets/release_card.dart similarity index 100% rename from packages/firmware_updater/lib/src/widgets/release_card.dart rename to apps/firmware_updater/lib/src/widgets/release_card.dart diff --git a/packages/firmware_updater/lib/src/widgets/small_chip.dart b/apps/firmware_updater/lib/src/widgets/small_chip.dart similarity index 100% rename from packages/firmware_updater/lib/src/widgets/small_chip.dart rename to apps/firmware_updater/lib/src/widgets/small_chip.dart diff --git a/packages/firmware_updater/lib/src/widgets/status_banner.dart b/apps/firmware_updater/lib/src/widgets/status_banner.dart similarity index 100% rename from packages/firmware_updater/lib/src/widgets/status_banner.dart rename to apps/firmware_updater/lib/src/widgets/status_banner.dart diff --git a/packages/firmware_updater/lib/src/widgets/status_bar.dart b/apps/firmware_updater/lib/src/widgets/status_bar.dart similarity index 100% rename from packages/firmware_updater/lib/src/widgets/status_bar.dart rename to apps/firmware_updater/lib/src/widgets/status_bar.dart diff --git a/packages/firmware_updater/lib/widgets.dart b/apps/firmware_updater/lib/widgets.dart similarity index 100% rename from packages/firmware_updater/lib/widgets.dart rename to apps/firmware_updater/lib/widgets.dart diff --git a/packages/firmware_updater/linux/.gitignore b/apps/firmware_updater/linux/.gitignore similarity index 100% rename from packages/firmware_updater/linux/.gitignore rename to apps/firmware_updater/linux/.gitignore diff --git a/packages/firmware_updater/linux/CMakeLists.txt b/apps/firmware_updater/linux/CMakeLists.txt similarity index 100% rename from packages/firmware_updater/linux/CMakeLists.txt rename to apps/firmware_updater/linux/CMakeLists.txt diff --git a/packages/firmware_updater/linux/flutter/CMakeLists.txt b/apps/firmware_updater/linux/flutter/CMakeLists.txt similarity index 100% rename from packages/firmware_updater/linux/flutter/CMakeLists.txt rename to apps/firmware_updater/linux/flutter/CMakeLists.txt diff --git a/packages/firmware_updater/linux/main.cc b/apps/firmware_updater/linux/main.cc similarity index 100% rename from packages/firmware_updater/linux/main.cc rename to apps/firmware_updater/linux/main.cc diff --git a/packages/firmware_updater/linux/my_application.cc b/apps/firmware_updater/linux/my_application.cc similarity index 100% rename from packages/firmware_updater/linux/my_application.cc rename to apps/firmware_updater/linux/my_application.cc diff --git a/packages/firmware_updater/linux/my_application.h b/apps/firmware_updater/linux/my_application.h similarity index 100% rename from packages/firmware_updater/linux/my_application.h rename to apps/firmware_updater/linux/my_application.h diff --git a/packages/firmware_updater/pubspec.yaml b/apps/firmware_updater/pubspec.yaml similarity index 100% rename from packages/firmware_updater/pubspec.yaml rename to apps/firmware_updater/pubspec.yaml diff --git a/packages/firmware_updater/test/device_model_test.dart b/apps/firmware_updater/test/device_model_test.dart similarity index 100% rename from packages/firmware_updater/test/device_model_test.dart rename to apps/firmware_updater/test/device_model_test.dart diff --git a/packages/firmware_updater/test/device_page_test.dart b/apps/firmware_updater/test/device_page_test.dart similarity index 100% rename from packages/firmware_updater/test/device_page_test.dart rename to apps/firmware_updater/test/device_page_test.dart diff --git a/packages/firmware_updater/test/device_store_test.dart b/apps/firmware_updater/test/device_store_test.dart similarity index 100% rename from packages/firmware_updater/test/device_store_test.dart rename to apps/firmware_updater/test/device_store_test.dart diff --git a/packages/firmware_updater/test/firmware_app_test.dart b/apps/firmware_updater/test/firmware_app_test.dart similarity index 100% rename from packages/firmware_updater/test/firmware_app_test.dart rename to apps/firmware_updater/test/firmware_app_test.dart diff --git a/packages/firmware_updater/test/firmware_app_test.mocks.dart b/apps/firmware_updater/test/firmware_app_test.mocks.dart similarity index 100% rename from packages/firmware_updater/test/firmware_app_test.mocks.dart rename to apps/firmware_updater/test/firmware_app_test.mocks.dart diff --git a/packages/firmware_updater/test/fwupd_dbus_service_test.dart b/apps/firmware_updater/test/fwupd_dbus_service_test.dart similarity index 100% rename from packages/firmware_updater/test/fwupd_dbus_service_test.dart rename to apps/firmware_updater/test/fwupd_dbus_service_test.dart diff --git a/packages/firmware_updater/test/fwupd_dbus_service_test.mocks.dart b/apps/firmware_updater/test/fwupd_dbus_service_test.mocks.dart similarity index 100% rename from packages/firmware_updater/test/fwupd_dbus_service_test.mocks.dart rename to apps/firmware_updater/test/fwupd_dbus_service_test.mocks.dart diff --git a/packages/firmware_updater/test/fwupd_mock_service_test.dart b/apps/firmware_updater/test/fwupd_mock_service_test.dart similarity index 100% rename from packages/firmware_updater/test/fwupd_mock_service_test.dart rename to apps/firmware_updater/test/fwupd_mock_service_test.dart diff --git a/packages/firmware_updater/test/fwupd_notifier_test.dart b/apps/firmware_updater/test/fwupd_notifier_test.dart similarity index 100% rename from packages/firmware_updater/test/fwupd_notifier_test.dart rename to apps/firmware_updater/test/fwupd_notifier_test.dart diff --git a/packages/firmware_updater/test/release_page_test.dart b/apps/firmware_updater/test/release_page_test.dart similarity index 100% rename from packages/firmware_updater/test/release_page_test.dart rename to apps/firmware_updater/test/release_page_test.dart diff --git a/packages/firmware_updater/test/test_utils.dart b/apps/firmware_updater/test/test_utils.dart similarity index 100% rename from packages/firmware_updater/test/test_utils.dart rename to apps/firmware_updater/test/test_utils.dart diff --git a/packages/firmware_updater/test/test_utils.mocks.dart b/apps/firmware_updater/test/test_utils.mocks.dart similarity index 100% rename from packages/firmware_updater/test/test_utils.mocks.dart rename to apps/firmware_updater/test/test_utils.mocks.dart diff --git a/packages/firmware_updater/test/widgets/app_progress_bar_test.dart b/apps/firmware_updater/test/widgets/app_progress_bar_test.dart similarity index 100% rename from packages/firmware_updater/test/widgets/app_progress_bar_test.dart rename to apps/firmware_updater/test/widgets/app_progress_bar_test.dart diff --git a/packages/firmware_updater/test/widgets/message_dialog_test.dart b/apps/firmware_updater/test/widgets/message_dialog_test.dart similarity index 100% rename from packages/firmware_updater/test/widgets/message_dialog_test.dart rename to apps/firmware_updater/test/widgets/message_dialog_test.dart diff --git a/packages/firmware_updater/test/widgets/status_banner_test.dart b/apps/firmware_updater/test/widgets/status_banner_test.dart similarity index 100% rename from packages/firmware_updater/test/widgets/status_banner_test.dart rename to apps/firmware_updater/test/widgets/status_banner_test.dart diff --git a/melos.yaml b/melos.yaml index 17b453b5..4ec6ccd3 100644 --- a/melos.yaml +++ b/melos.yaml @@ -2,7 +2,7 @@ name: firmware_updater_workspace sdkPath: .fvm/flutter_sdk packages: - - packages/* + - apps/* command: bootstrap: @@ -14,12 +14,12 @@ command: ubuntu_lints: ^0.4.0 scripts: - # build all packages + # build all apps build: > melos exec -c 1 --fail-fast --flutter --dir-exists=linux -- \ fvm flutter build linux - # collect coverage information for all packages + # collect coverage information for all apps coverage: > melos exec -c 1 --fail-fast --dir-exists=test -- \ fvm flutter test --coverage && melos run coverage:cleanup @@ -35,7 +35,7 @@ scripts: '**/*.pb*.dart' \ -o coverage/lcov.info - # format all packages + # format all apps format:exclude: > find . -name '*.dart' \ ! -name '*.freezed.dart' \ @@ -46,28 +46,28 @@ scripts: ! -path '*/.*/*' \ | xargs fvm dart format --set-exit-if-changed - # run build_runner to generate code in all packages + # run build_runner to generate code in all apps generate: > melos exec -c 1 --fail-fast --depends-on=build_runner -- \ fvm dart run build_runner build --delete-conflicting-outputs - # run gen-l10n to generate localizations in all packages + # run gen-l10n to generate localizations in all apps gen-l10n: > melos exec -c 1 --fail-fast --depends-on=flutter_localizations -- \ fvm flutter gen-l10n - # run integration tests in all packages + # run integration tests in all apps integration_test: > melos exec -c 1 --fail-fast --dir-exists=integration_test -- \ fvm flutter test integration_test - # runs "flutter pub " in all packages + # runs "flutter pub " in all apps pub: melos exec -c 1 -- fvm flutter pub "$@" - # run tests in all packages + # run tests in all apps test: > melos exec -c 1 --fail-fast --dir-exists=test -- \ fvm flutter test - # run pub upgrade in all packages + # run pub upgrade in all apps upgrade: melos pub upgrade diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 603a4e76..d128fc6e 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -52,7 +52,7 @@ parts: fvm dart pub global run melos bootstrap set -e - cd packages/firmware_updater + cd apps/firmware_updater fvm flutter build linux --release -v mkdir -p $CRAFT_PART_INSTALL/bin/ cp -r build/linux/*/release/bundle/* $CRAFT_PART_INSTALL/bin/ @@ -75,7 +75,7 @@ parts: fvm dart pub global run melos bootstrap set -e - cd packages/firmware_notifier + cd apps/firmware_notifier mkdir -p $CRAFT_PART_INSTALL/bin/ fvm dart compile exe bin/firmware_notifier.dart -o $CRAFT_PART_INSTALL/bin/firmware-notifier From c7b52319a66e6a4c951cf1148f32200c3ce0cbc7 Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Thu, 14 Nov 2024 16:05:12 +0200 Subject: [PATCH 02/16] refactor: moving widgets up a directory --- apps/firmware_updater/lib/release_page.dart | 2 +- apps/firmware_updater/lib/widgets.dart | 22 +++++++++---------- .../{src => }/widgets/app_progress_bar.dart | 0 .../lib/{src => }/widgets/device_header.dart | 2 +- .../lib/{src => }/widgets/device_icon.dart | 0 .../lib/{src => }/widgets/dialogs.dart | 0 .../lib/{src => }/widgets/error_banner.dart | 0 .../lib/{src => }/widgets/option_card.dart | 0 .../lib/{src => }/widgets/refresh_button.dart | 0 .../lib/{src => }/widgets/release_card.dart | 2 +- .../lib/{src => }/widgets/small_chip.dart | 0 .../lib/{src => }/widgets/status_banner.dart | 0 .../lib/{src => }/widgets/status_bar.dart | 0 13 files changed, 14 insertions(+), 14 deletions(-) rename apps/firmware_updater/lib/{src => }/widgets/app_progress_bar.dart (100%) rename apps/firmware_updater/lib/{src => }/widgets/device_header.dart (91%) rename apps/firmware_updater/lib/{src => }/widgets/device_icon.dart (100%) rename apps/firmware_updater/lib/{src => }/widgets/dialogs.dart (100%) rename apps/firmware_updater/lib/{src => }/widgets/error_banner.dart (100%) rename apps/firmware_updater/lib/{src => }/widgets/option_card.dart (100%) rename apps/firmware_updater/lib/{src => }/widgets/refresh_button.dart (100%) rename apps/firmware_updater/lib/{src => }/widgets/release_card.dart (98%) rename apps/firmware_updater/lib/{src => }/widgets/small_chip.dart (100%) rename apps/firmware_updater/lib/{src => }/widgets/status_banner.dart (100%) rename apps/firmware_updater/lib/{src => }/widgets/status_bar.dart (100%) diff --git a/apps/firmware_updater/lib/release_page.dart b/apps/firmware_updater/lib/release_page.dart index 7bb4e150..f4900c6f 100644 --- a/apps/firmware_updater/lib/release_page.dart +++ b/apps/firmware_updater/lib/release_page.dart @@ -2,7 +2,7 @@ import 'package:firmware_updater/device_model.dart'; import 'package:firmware_updater/device_store.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; import 'package:firmware_updater/fwupd_x.dart'; -import 'package:firmware_updater/src/widgets/release_card.dart'; +import 'package:firmware_updater/widgets/release_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:fwupd/fwupd.dart'; diff --git a/apps/firmware_updater/lib/widgets.dart b/apps/firmware_updater/lib/widgets.dart index f92706a6..84eb0d43 100644 --- a/apps/firmware_updater/lib/widgets.dart +++ b/apps/firmware_updater/lib/widgets.dart @@ -1,11 +1,11 @@ -export 'src/widgets/app_progress_bar.dart'; -export 'src/widgets/device_header.dart'; -export 'src/widgets/device_icon.dart'; -export 'src/widgets/dialogs.dart'; -export 'src/widgets/error_banner.dart'; -export 'src/widgets/option_card.dart'; -export 'src/widgets/refresh_button.dart'; -export 'src/widgets/release_card.dart'; -export 'src/widgets/small_chip.dart'; -export 'src/widgets/status_banner.dart'; -export 'src/widgets/status_bar.dart'; +export 'widgets/app_progress_bar.dart'; +export 'widgets/device_header.dart'; +export 'widgets/device_icon.dart'; +export 'widgets/dialogs.dart'; +export 'widgets/error_banner.dart'; +export 'widgets/option_card.dart'; +export 'widgets/refresh_button.dart'; +export 'widgets/release_card.dart'; +export 'widgets/small_chip.dart'; +export 'widgets/status_banner.dart'; +export 'widgets/status_bar.dart'; diff --git a/apps/firmware_updater/lib/src/widgets/app_progress_bar.dart b/apps/firmware_updater/lib/widgets/app_progress_bar.dart similarity index 100% rename from apps/firmware_updater/lib/src/widgets/app_progress_bar.dart rename to apps/firmware_updater/lib/widgets/app_progress_bar.dart diff --git a/apps/firmware_updater/lib/src/widgets/device_header.dart b/apps/firmware_updater/lib/widgets/device_header.dart similarity index 91% rename from apps/firmware_updater/lib/src/widgets/device_header.dart rename to apps/firmware_updater/lib/widgets/device_header.dart index 355e3a90..ea3520b6 100644 --- a/apps/firmware_updater/lib/src/widgets/device_header.dart +++ b/apps/firmware_updater/lib/widgets/device_header.dart @@ -1,5 +1,5 @@ import 'package:collection/collection.dart'; -import 'package:firmware_updater/src/widgets/device_icon.dart'; +import 'package:firmware_updater/widgets.dart'; import 'package:flutter/material.dart'; import 'package:fwupd/fwupd.dart'; import 'package:yaru/yaru.dart'; diff --git a/apps/firmware_updater/lib/src/widgets/device_icon.dart b/apps/firmware_updater/lib/widgets/device_icon.dart similarity index 100% rename from apps/firmware_updater/lib/src/widgets/device_icon.dart rename to apps/firmware_updater/lib/widgets/device_icon.dart diff --git a/apps/firmware_updater/lib/src/widgets/dialogs.dart b/apps/firmware_updater/lib/widgets/dialogs.dart similarity index 100% rename from apps/firmware_updater/lib/src/widgets/dialogs.dart rename to apps/firmware_updater/lib/widgets/dialogs.dart diff --git a/apps/firmware_updater/lib/src/widgets/error_banner.dart b/apps/firmware_updater/lib/widgets/error_banner.dart similarity index 100% rename from apps/firmware_updater/lib/src/widgets/error_banner.dart rename to apps/firmware_updater/lib/widgets/error_banner.dart diff --git a/apps/firmware_updater/lib/src/widgets/option_card.dart b/apps/firmware_updater/lib/widgets/option_card.dart similarity index 100% rename from apps/firmware_updater/lib/src/widgets/option_card.dart rename to apps/firmware_updater/lib/widgets/option_card.dart diff --git a/apps/firmware_updater/lib/src/widgets/refresh_button.dart b/apps/firmware_updater/lib/widgets/refresh_button.dart similarity index 100% rename from apps/firmware_updater/lib/src/widgets/refresh_button.dart rename to apps/firmware_updater/lib/widgets/refresh_button.dart diff --git a/apps/firmware_updater/lib/src/widgets/release_card.dart b/apps/firmware_updater/lib/widgets/release_card.dart similarity index 98% rename from apps/firmware_updater/lib/src/widgets/release_card.dart rename to apps/firmware_updater/lib/widgets/release_card.dart index 48e23b58..9aa39fa3 100644 --- a/apps/firmware_updater/lib/src/widgets/release_card.dart +++ b/apps/firmware_updater/lib/widgets/release_card.dart @@ -1,5 +1,5 @@ import 'package:firmware_updater/fwupd_x.dart'; -import 'package:firmware_updater/src/widgets/dialogs.dart'; +import 'package:firmware_updater/widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_html/flutter_html.dart'; diff --git a/apps/firmware_updater/lib/src/widgets/small_chip.dart b/apps/firmware_updater/lib/widgets/small_chip.dart similarity index 100% rename from apps/firmware_updater/lib/src/widgets/small_chip.dart rename to apps/firmware_updater/lib/widgets/small_chip.dart diff --git a/apps/firmware_updater/lib/src/widgets/status_banner.dart b/apps/firmware_updater/lib/widgets/status_banner.dart similarity index 100% rename from apps/firmware_updater/lib/src/widgets/status_banner.dart rename to apps/firmware_updater/lib/widgets/status_banner.dart diff --git a/apps/firmware_updater/lib/src/widgets/status_bar.dart b/apps/firmware_updater/lib/widgets/status_bar.dart similarity index 100% rename from apps/firmware_updater/lib/src/widgets/status_bar.dart rename to apps/firmware_updater/lib/widgets/status_bar.dart From 9e19cb5a595780fac1c96b5b5236f09a9433f634 Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Thu, 14 Nov 2024 16:12:13 +0200 Subject: [PATCH 03/16] refactor: moving paegs into a directory --- .../firmware_updater_test.dart | 54 ++++----- apps/firmware_updater/lib/firmware_app.dart | 110 +++++++++--------- apps/firmware_updater/lib/pages.dart | 3 + .../lib/{ => pages}/detail_page.dart | 21 ++-- .../lib/{ => pages}/device_page.dart | 0 .../lib/{ => pages}/release_page.dart | 0 .../test/device_page_test.dart | 2 +- .../test/release_page_test.dart | 2 +- 8 files changed, 97 insertions(+), 95 deletions(-) create mode 100644 apps/firmware_updater/lib/pages.dart rename apps/firmware_updater/lib/{ => pages}/detail_page.dart (94%) rename apps/firmware_updater/lib/{ => pages}/device_page.dart (100%) rename apps/firmware_updater/lib/{ => pages}/release_page.dart (100%) diff --git a/apps/firmware_updater/integration_test/firmware_updater_test.dart b/apps/firmware_updater/integration_test/firmware_updater_test.dart index 8d8bfcbd..f8d0be2b 100644 --- a/apps/firmware_updater/integration_test/firmware_updater_test.dart +++ b/apps/firmware_updater/integration_test/firmware_updater_test.dart @@ -1,7 +1,7 @@ import 'package:collection/collection.dart'; -import 'package:firmware_updater/device_page.dart'; import 'package:firmware_updater/fwupd_x.dart'; import 'package:firmware_updater/main.dart' as app; +import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -204,17 +204,22 @@ extension IntegrationClient on FwupdClient { } } +extension IntegrationFinder on CommonFinders { + Finder deviceHeader(String text) => find.widgetWithText(DeviceHeader, text); + Finder devicePage(String text) => find.widgetWithText(DevicePage, text); +} + extension IntegrationTester on WidgetTester { + Future pumpAndTapButton(String text) { + return _pumpAndTapButtonOfFinder(find.text(text)); + } + Future pumpAndTapDeviceHeader(String text) async { final header = find.deviceHeader(text); await pumpUntil(header); return tap(header); } - Future pumpAndTapButton(String text) { - return _pumpAndTapButtonOfFinder(find.text(text)); - } - Future pumpAndTapDialogButton(String text) { return _pumpAndTapButtonOfFinder( find.descendant( @@ -224,18 +229,13 @@ extension IntegrationTester on WidgetTester { ); } - Future _pumpAndTapButtonOfFinder(Finder finder) async { - final button = find.ancestor( - of: finder, - matching: find.byWidgetPredicate((widget) => widget is ButtonStyleButton), + Future pumpAndTapExpandable() async { + final expandable = find.descendant( + of: find.byType(YaruExpandable), + matching: find.text(lang.olderVersions), ); - if (button.evaluate().length > 1) { - debugPrint( - 'WARNING: Found multiple buttons in $finder. Assuming the first.', - ); - } - await pumpUntil(button.first); - return tap(button.first); + await pumpUntil(expandable); + return tap(expandable); } Future pumpAndTapReleaseButton(String version) async { @@ -247,17 +247,17 @@ extension IntegrationTester on WidgetTester { return tap(button); } - Future pumpAndTapExpandable() async { - final expandable = find.descendant( - of: find.byType(YaruExpandable), - matching: find.text(lang.olderVersions), + Future _pumpAndTapButtonOfFinder(Finder finder) async { + final button = find.ancestor( + of: finder, + matching: find.byWidgetPredicate((widget) => widget is ButtonStyleButton), ); - await pumpUntil(expandable); - return tap(expandable); + if (button.evaluate().length > 1) { + debugPrint( + 'WARNING: Found multiple buttons in $finder. Assuming the first.', + ); + } + await pumpUntil(button.first); + return tap(button.first); } } - -extension IntegrationFinder on CommonFinders { - Finder deviceHeader(String text) => find.widgetWithText(DeviceHeader, text); - Finder devicePage(String text) => find.widgetWithText(DevicePage, text); -} diff --git a/apps/firmware_updater/lib/firmware_app.dart b/apps/firmware_updater/lib/firmware_app.dart index 5878eeb9..e2c00ac3 100644 --- a/apps/firmware_updater/lib/firmware_app.dart +++ b/apps/firmware_updater/lib/firmware_app.dart @@ -1,11 +1,11 @@ import 'package:collection/collection.dart'; -import 'package:firmware_updater/detail_page.dart'; import 'package:firmware_updater/device_store.dart'; import 'package:firmware_updater/device_tile.dart'; import 'package:firmware_updater/fwupd_dbus_service.dart'; import 'package:firmware_updater/fwupd_l10n.dart'; import 'package:firmware_updater/fwupd_mock_service.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; +import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; @@ -18,6 +18,9 @@ import 'package:yaru/yaru.dart'; class FirmwareApp extends StatefulWidget { const FirmwareApp({super.key}); + @override + State createState() => _FirmwareAppState(); + static Widget create(BuildContext context) { final service = hasService() ? getService() @@ -31,15 +34,49 @@ class FirmwareApp extends StatefulWidget { child: const FirmwareApp(), ); } - - @override - State createState() => _FirmwareAppState(); } class _FirmwareAppState extends State { YaruPageController? _controller; bool _initialized = false; + @override + Widget build(BuildContext context) { + final store = context.watch(); + final l10n = AppLocalizations.of(context); + return _initialized + ? ErrorBanner( + message: context.select( + (notifier) => notifier.onBattery, + ) + ? l10n.batteryWarning + : null, + child: YaruMasterDetailPage( + appBar: YaruWindowTitleBar(title: Text(l10n.appTitle)), + controller: _controller, + onSelected: (value) { + store.showReleases = false; + }, + pageBuilder: (context, index) => + DetailPage.create(context, device: store.devices[index]), + tileBuilder: (context, index, selected, availableWidth) => + DeviceTile.create(context, device: store.devices[index]), + emptyBuilder: (_) => Scaffold( + appBar: YaruWindowTitleBar(title: Text(l10n.appTitle)), + body: Center(child: Text(l10n.noDevicesFound)), + ), + ), + ) + : const Center(child: YaruCircularProgressIndicator()); + } + + @override + void dispose() { + final gtkNotifier = getService(); + gtkNotifier.removeCommandLineListener(_commandLineListener); + super.dispose(); + } + @override void initState() { super.initState(); @@ -62,35 +99,12 @@ class _FirmwareAppState extends State { gtkNotifier.addCommandLineListener(_commandLineListener); } - @override - void dispose() { - final gtkNotifier = getService(); - gtkNotifier.removeCommandLineListener(_commandLineListener); - super.dispose(); - } - void _commandLineListener(List args) { final store = context.read(); _controller?.index = store.indexOf(args.firstOrNull); store.showReleases = args.isNotEmpty; } - void _showRequest(FwupdDevice device) { - showDeviceRequestDialog( - context, - message: device.updateMessage, - imageUrl: device.updateImage, - ); - } - - void _showError(Exception e) { - showErrorDialog( - context, - title: AppLocalizations.of(context).installError, - message: e is FwupdException ? e.localize(context) : e.toString(), - ); - } - Future _getConfirmation() async { final l10n = AppLocalizations.of(context); final response = await showConfirmationDialog( @@ -105,33 +119,19 @@ class _FirmwareAppState extends State { return response == DialogAction.secondaryAction; } - @override - Widget build(BuildContext context) { - final store = context.watch(); - final l10n = AppLocalizations.of(context); - return _initialized - ? ErrorBanner( - message: context.select( - (notifier) => notifier.onBattery, - ) - ? l10n.batteryWarning - : null, - child: YaruMasterDetailPage( - appBar: YaruWindowTitleBar(title: Text(l10n.appTitle)), - controller: _controller, - onSelected: (value) { - store.showReleases = false; - }, - pageBuilder: (context, index) => - DetailPage.create(context, device: store.devices[index]), - tileBuilder: (context, index, selected, availableWidth) => - DeviceTile.create(context, device: store.devices[index]), - emptyBuilder: (_) => Scaffold( - appBar: YaruWindowTitleBar(title: Text(l10n.appTitle)), - body: Center(child: Text(l10n.noDevicesFound)), - ), - ), - ) - : const Center(child: YaruCircularProgressIndicator()); + void _showError(Exception e) { + showErrorDialog( + context, + title: AppLocalizations.of(context).installError, + message: e is FwupdException ? e.localize(context) : e.toString(), + ); + } + + void _showRequest(FwupdDevice device) { + showDeviceRequestDialog( + context, + message: device.updateMessage, + imageUrl: device.updateImage, + ); } } diff --git a/apps/firmware_updater/lib/pages.dart b/apps/firmware_updater/lib/pages.dart new file mode 100644 index 00000000..1f9dc754 --- /dev/null +++ b/apps/firmware_updater/lib/pages.dart @@ -0,0 +1,3 @@ +export 'pages/detail_page.dart'; +export 'pages/device_page.dart'; +export 'pages/release_page.dart'; diff --git a/apps/firmware_updater/lib/detail_page.dart b/apps/firmware_updater/lib/pages/detail_page.dart similarity index 94% rename from apps/firmware_updater/lib/detail_page.dart rename to apps/firmware_updater/lib/pages/detail_page.dart index eacf570d..ee97b119 100644 --- a/apps/firmware_updater/lib/detail_page.dart +++ b/apps/firmware_updater/lib/pages/detail_page.dart @@ -1,9 +1,8 @@ import 'package:firmware_updater/device_model.dart'; -import 'package:firmware_updater/device_page.dart'; import 'package:firmware_updater/device_store.dart'; import 'package:firmware_updater/fwupd_dbus_service.dart'; import 'package:firmware_updater/fwupd_mock_service.dart'; -import 'package:firmware_updater/release_page.dart'; +import 'package:firmware_updater/pages.dart'; import 'package:flutter/material.dart'; import 'package:fwupd/fwupd.dart'; import 'package:provider/provider.dart'; @@ -15,6 +14,9 @@ class DetailPage extends StatefulWidget { super.key, }); + @override + State createState() => _DetailPageState(); + static Widget create( BuildContext context, { required FwupdDevice device, @@ -30,18 +32,9 @@ class DetailPage extends StatefulWidget { child: const DetailPage(), ); } - - @override - State createState() => _DetailPageState(); } class _DetailPageState extends State { - @override - void initState() { - super.initState(); - context.read().init(); - } - @override Widget build(BuildContext context) { final navigator = Navigator.of(context); @@ -68,4 +61,10 @@ class _DetailPageState extends State { ), ); } + + @override + void initState() { + super.initState(); + context.read().init(); + } } diff --git a/apps/firmware_updater/lib/device_page.dart b/apps/firmware_updater/lib/pages/device_page.dart similarity index 100% rename from apps/firmware_updater/lib/device_page.dart rename to apps/firmware_updater/lib/pages/device_page.dart diff --git a/apps/firmware_updater/lib/release_page.dart b/apps/firmware_updater/lib/pages/release_page.dart similarity index 100% rename from apps/firmware_updater/lib/release_page.dart rename to apps/firmware_updater/lib/pages/release_page.dart diff --git a/apps/firmware_updater/test/device_page_test.dart b/apps/firmware_updater/test/device_page_test.dart index 261ad681..621f68b4 100644 --- a/apps/firmware_updater/test/device_page_test.dart +++ b/apps/firmware_updater/test/device_page_test.dart @@ -1,7 +1,7 @@ import 'package:firmware_updater/device_model.dart'; -import 'package:firmware_updater/device_page.dart'; import 'package:firmware_updater/device_store.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; +import 'package:firmware_updater/pages.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:fwupd/fwupd.dart'; diff --git a/apps/firmware_updater/test/release_page_test.dart b/apps/firmware_updater/test/release_page_test.dart index d8709fb5..e929aec8 100644 --- a/apps/firmware_updater/test/release_page_test.dart +++ b/apps/firmware_updater/test/release_page_test.dart @@ -1,7 +1,7 @@ import 'package:firmware_updater/device_model.dart'; import 'package:firmware_updater/device_store.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; -import 'package:firmware_updater/release_page.dart'; +import 'package:firmware_updater/pages.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:fwupd/fwupd.dart'; From 8ce9a1b116adc6e20407d9d8240d64f6af8fe185 Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Fri, 15 Nov 2024 10:21:31 +0200 Subject: [PATCH 04/16] refactor: move services into dir --- apps/firmware_updater/lib/device_model.dart | 52 +- apps/firmware_updater/lib/device_store.dart | 26 +- apps/firmware_updater/lib/device_tile.dart | 3 +- apps/firmware_updater/lib/firmware_app.dart | 4 +- apps/firmware_updater/lib/fwupd_notifier.dart | 2 +- apps/firmware_updater/lib/main.dart | 4 +- .../lib/pages/detail_page.dart | 4 +- apps/firmware_updater/lib/services.dart | 5 + .../{ => services}/fwupd_dbus_service.dart | 2 +- .../{ => services}/fwupd_mock_service.dart | 2 +- .../lib/{ => services}/fwupd_service.dart | 0 .../test/firmware_app_test.dart | 3 +- .../test/firmware_app_test.mocks.dart | 32 +- .../test/fwupd_dbus_service_test.dart | 2 +- .../test/fwupd_mock_service_test.dart | 2 +- apps/firmware_updater/test/test_utils.dart | 106 +-- .../test/test_utils.mocks.dart | 634 +++++++++--------- 17 files changed, 440 insertions(+), 443 deletions(-) create mode 100644 apps/firmware_updater/lib/services.dart rename apps/firmware_updater/lib/{ => services}/fwupd_dbus_service.dart (99%) rename apps/firmware_updater/lib/{ => services}/fwupd_mock_service.dart (98%) rename apps/firmware_updater/lib/{ => services}/fwupd_service.dart (100%) diff --git a/apps/firmware_updater/lib/device_model.dart b/apps/firmware_updater/lib/device_model.dart index ded1bcaa..b619414b 100644 --- a/apps/firmware_updater/lib/device_model.dart +++ b/apps/firmware_updater/lib/device_model.dart @@ -1,44 +1,55 @@ import 'dart:async'; import 'package:collection/collection.dart'; -import 'package:firmware_updater/fwupd_service.dart'; import 'package:firmware_updater/fwupd_x.dart'; +import 'package:firmware_updater/services.dart'; import 'package:fwupd/fwupd.dart'; import 'package:safe_change_notifier/safe_change_notifier.dart'; class DeviceModel extends SafeChangeNotifier { - DeviceModel(this._device, this._service); - final FwupdService _service; + FwupdDevice _device; List? _releases; StreamSubscription? _sub; + DeviceModel(this._device, this._service); - Future init() async { - _sub = - _service.deviceChanged.where((d) => d.id == _device.id).listen(update); - return update(device); - } + FwupdDevice get device => _device; + bool get hasUpgrade => _releases?.any((r) => r.isUpgrade) ?? false; + + FwupdRelease? get latestRelease => _releases?.firstOrNull; + + // TODO: ensure releases are in the correct order - it might be necessary to + // implement version comparison + + bool get onBattery => _service.onBattery; + List? get releases => _releases; @override Future dispose() async { await _sub?.cancel(); super.dispose(); } + FwupdRelease? findRelease(String? version) => + releases?.singleWhereOrNull((r) => r.version == version); + + Future init() async { + _sub = + _service.deviceChanged.where((d) => d.id == _device.id).listen(update); + return update(device); + } + + Future install(FwupdRelease release) => + _service.install(device, release); Future update(FwupdDevice device) async { _device = device; _releases = await _fetchReleases(); notifyListeners(); } + Future verify() => _service.verify(_device); - FwupdDevice get device => _device; - List? get releases => _releases; - FwupdRelease? get latestRelease => _releases?.firstOrNull; - // TODO: ensure releases are in the correct order - it might be necessary to - // implement version comparison - - bool get onBattery => _service.onBattery; + Future verifyUpdate() => _service.verifyUpdate(_device); Future> _fetchReleases() { return _service.getReleases(_device).catchError( @@ -47,15 +58,4 @@ class DeviceModel extends SafeChangeNotifier { e is FwupdNothingToDoException || e is FwupdNotSupportedException, ); } - - FwupdRelease? findRelease(String? version) => - releases?.singleWhereOrNull((r) => r.version == version); - - Future verify() => _service.verify(_device); - Future verifyUpdate() => _service.verifyUpdate(_device); - - Future install(FwupdRelease release) => - _service.install(device, release); - - bool get hasUpgrade => _releases?.any((r) => r.isUpgrade) ?? false; } diff --git a/apps/firmware_updater/lib/device_store.dart b/apps/firmware_updater/lib/device_store.dart index e95f8046..7b49295b 100644 --- a/apps/firmware_updater/lib/device_store.dart +++ b/apps/firmware_updater/lib/device_store.dart @@ -1,7 +1,7 @@ import 'dart:async'; -import 'package:firmware_updater/fwupd_service.dart'; import 'package:firmware_updater/fwupd_x.dart'; +import 'package:firmware_updater/services.dart'; import 'package:fwupd/fwupd.dart'; import 'package:safe_change_notifier/safe_change_notifier.dart'; import 'package:ubuntu_logger/ubuntu_logger.dart'; @@ -9,22 +9,31 @@ import 'package:ubuntu_logger/ubuntu_logger.dart'; final log = Logger('device_store'); class DeviceStore extends SafeChangeNotifier { - DeviceStore(this._service); - final FwupdService _service; + var _devices = []; StreamSubscription? _deviceAdded; StreamSubscription? _deviceRemoved; bool _showReleases = false; + DeviceStore(this._service); + List get devices => _devices; bool get showReleases => _showReleases; + set showReleases(bool value) { if (value == _showReleases) return; _showReleases = value; notifyListeners(); } + @override + Future dispose() async { + await _deviceAdded?.cancel(); + await _deviceRemoved?.cancel(); + _deviceAdded = null; + _deviceRemoved = null; + super.dispose(); + } - List get devices => _devices; int indexOf(String? deviceId) => _devices.indexWhere((d) => d.deviceId == deviceId); @@ -63,15 +72,6 @@ class DeviceStore extends SafeChangeNotifier { }, ); } - - @override - Future dispose() async { - await _deviceAdded?.cancel(); - await _deviceRemoved?.cancel(); - _deviceAdded = null; - _deviceRemoved = null; - super.dispose(); - } } extension DeviceStoreWhen on DeviceStore { diff --git a/apps/firmware_updater/lib/device_tile.dart b/apps/firmware_updater/lib/device_tile.dart index e4ce0f4e..76bb018a 100644 --- a/apps/firmware_updater/lib/device_tile.dart +++ b/apps/firmware_updater/lib/device_tile.dart @@ -1,10 +1,9 @@ import 'package:firmware_updater/device_model.dart'; -import 'package:firmware_updater/fwupd_dbus_service.dart'; +import 'package:firmware_updater/services.dart'; import 'package:firmware_updater/widgets.dart'; import 'package:flutter/material.dart'; import 'package:fwupd/fwupd.dart'; import 'package:provider/provider.dart'; -import 'package:ubuntu_service/ubuntu_service.dart'; class DeviceTile extends StatefulWidget { const DeviceTile({ diff --git a/apps/firmware_updater/lib/firmware_app.dart b/apps/firmware_updater/lib/firmware_app.dart index e2c00ac3..039a77e1 100644 --- a/apps/firmware_updater/lib/firmware_app.dart +++ b/apps/firmware_updater/lib/firmware_app.dart @@ -1,18 +1,16 @@ import 'package:collection/collection.dart'; import 'package:firmware_updater/device_store.dart'; import 'package:firmware_updater/device_tile.dart'; -import 'package:firmware_updater/fwupd_dbus_service.dart'; import 'package:firmware_updater/fwupd_l10n.dart'; -import 'package:firmware_updater/fwupd_mock_service.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; import 'package:firmware_updater/pages.dart'; +import 'package:firmware_updater/services.dart'; import 'package:firmware_updater/widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:fwupd/fwupd.dart'; import 'package:gtk/gtk.dart'; import 'package:provider/provider.dart'; -import 'package:ubuntu_service/ubuntu_service.dart'; import 'package:yaru/yaru.dart'; class FirmwareApp extends StatefulWidget { diff --git a/apps/firmware_updater/lib/fwupd_notifier.dart b/apps/firmware_updater/lib/fwupd_notifier.dart index 016fa132..5b8f5edb 100644 --- a/apps/firmware_updater/lib/fwupd_notifier.dart +++ b/apps/firmware_updater/lib/fwupd_notifier.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:firmware_updater/fwupd_service.dart'; +import 'package:firmware_updater/services.dart'; import 'package:fwupd/fwupd.dart'; import 'package:safe_change_notifier/safe_change_notifier.dart'; import 'package:ubuntu_logger/ubuntu_logger.dart'; diff --git a/apps/firmware_updater/lib/main.dart b/apps/firmware_updater/lib/main.dart index a835e024..7d06c1d7 100644 --- a/apps/firmware_updater/lib/main.dart +++ b/apps/firmware_updater/lib/main.dart @@ -1,14 +1,12 @@ import 'dart:io'; import 'package:firmware_updater/firmware_app.dart'; -import 'package:firmware_updater/fwupd_dbus_service.dart'; -import 'package:firmware_updater/fwupd_mock_service.dart'; +import 'package:firmware_updater/services.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:gtk/gtk.dart'; import 'package:path/path.dart' as p; import 'package:ubuntu_logger/ubuntu_logger.dart'; -import 'package:ubuntu_service/ubuntu_service.dart'; import 'package:xdg_directories/xdg_directories.dart' as xdg; import 'package:yaru/yaru.dart'; diff --git a/apps/firmware_updater/lib/pages/detail_page.dart b/apps/firmware_updater/lib/pages/detail_page.dart index ee97b119..f5948244 100644 --- a/apps/firmware_updater/lib/pages/detail_page.dart +++ b/apps/firmware_updater/lib/pages/detail_page.dart @@ -1,12 +1,10 @@ import 'package:firmware_updater/device_model.dart'; import 'package:firmware_updater/device_store.dart'; -import 'package:firmware_updater/fwupd_dbus_service.dart'; -import 'package:firmware_updater/fwupd_mock_service.dart'; import 'package:firmware_updater/pages.dart'; +import 'package:firmware_updater/services.dart'; import 'package:flutter/material.dart'; import 'package:fwupd/fwupd.dart'; import 'package:provider/provider.dart'; -import 'package:ubuntu_service/ubuntu_service.dart'; import 'package:yaru/yaru.dart'; class DetailPage extends StatefulWidget { diff --git a/apps/firmware_updater/lib/services.dart b/apps/firmware_updater/lib/services.dart new file mode 100644 index 00000000..d454f256 --- /dev/null +++ b/apps/firmware_updater/lib/services.dart @@ -0,0 +1,5 @@ +export 'package:ubuntu_service/ubuntu_service.dart'; + +export 'services/fwupd_dbus_service.dart'; +export 'services/fwupd_service.dart'; +export 'services/fwupd_mock_service.dart' hide log; diff --git a/apps/firmware_updater/lib/fwupd_dbus_service.dart b/apps/firmware_updater/lib/services/fwupd_dbus_service.dart similarity index 99% rename from apps/firmware_updater/lib/fwupd_dbus_service.dart rename to apps/firmware_updater/lib/services/fwupd_dbus_service.dart index 98d1b6bc..affd37f7 100644 --- a/apps/firmware_updater/lib/fwupd_dbus_service.dart +++ b/apps/firmware_updater/lib/services/fwupd_dbus_service.dart @@ -6,7 +6,7 @@ import 'package:dbus/dbus.dart'; import 'package:dio/dio.dart'; import 'package:file/file.dart'; import 'package:file/local.dart'; -import 'package:firmware_updater/fwupd_service.dart'; +import 'package:firmware_updater/services.dart'; import 'package:firmware_updater/fwupd_x.dart'; import 'package:fwupd/fwupd.dart'; import 'package:meta/meta.dart'; diff --git a/apps/firmware_updater/lib/fwupd_mock_service.dart b/apps/firmware_updater/lib/services/fwupd_mock_service.dart similarity index 98% rename from apps/firmware_updater/lib/fwupd_mock_service.dart rename to apps/firmware_updater/lib/services/fwupd_mock_service.dart index f8dbf8c3..52875afc 100644 --- a/apps/firmware_updater/lib/fwupd_mock_service.dart +++ b/apps/firmware_updater/lib/services/fwupd_mock_service.dart @@ -1,6 +1,6 @@ import 'dart:io'; -import 'package:firmware_updater/fwupd_service.dart'; +import 'package:firmware_updater/services/fwupd_service.dart'; import 'package:fwupd/fwupd.dart'; import 'package:ubuntu_logger/ubuntu_logger.dart'; import 'package:yaml/yaml.dart'; diff --git a/apps/firmware_updater/lib/fwupd_service.dart b/apps/firmware_updater/lib/services/fwupd_service.dart similarity index 100% rename from apps/firmware_updater/lib/fwupd_service.dart rename to apps/firmware_updater/lib/services/fwupd_service.dart diff --git a/apps/firmware_updater/test/firmware_app_test.dart b/apps/firmware_updater/test/firmware_app_test.dart index c58d44b6..cc973876 100644 --- a/apps/firmware_updater/test/firmware_app_test.dart +++ b/apps/firmware_updater/test/firmware_app_test.dart @@ -1,8 +1,8 @@ import 'package:firmware_updater/device_store.dart'; import 'package:firmware_updater/firmware_app.dart'; -import 'package:firmware_updater/fwupd_dbus_service.dart'; import 'package:firmware_updater/fwupd_l10n.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; +import 'package:firmware_updater/services.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:fwupd/fwupd.dart'; @@ -10,7 +10,6 @@ import 'package:gtk/gtk.dart'; import 'package:mockito/annotations.dart'; import 'package:mockito/mockito.dart'; import 'package:provider/provider.dart'; -import 'package:ubuntu_service/ubuntu_service.dart'; import 'package:yaru/yaru.dart'; import 'firmware_app_test.mocks.dart'; diff --git a/apps/firmware_updater/test/firmware_app_test.mocks.dart b/apps/firmware_updater/test/firmware_app_test.mocks.dart index e95786cd..7bf4958f 100644 --- a/apps/firmware_updater/test/firmware_app_test.mocks.dart +++ b/apps/firmware_updater/test/firmware_app_test.mocks.dart @@ -32,6 +32,12 @@ class MockDeviceStore extends _i1.Mock implements _i2.DeviceStore { _i1.throwOnMissingStub(this); } + @override + List<_i3.FwupdDevice> get devices => (super.noSuchMethod( + Invocation.getter(#devices), + returnValue: <_i3.FwupdDevice>[], + ) as List<_i3.FwupdDevice>); + @override bool get showReleases => (super.noSuchMethod( Invocation.getter(#showReleases), @@ -47,12 +53,6 @@ class MockDeviceStore extends _i1.Mock implements _i2.DeviceStore { returnValueForMissingStub: null, ); - @override - List<_i3.FwupdDevice> get devices => (super.noSuchMethod( - Invocation.getter(#devices), - returnValue: <_i3.FwupdDevice>[], - ) as List<_i3.FwupdDevice>); - @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), @@ -65,6 +65,16 @@ class MockDeviceStore extends _i1.Mock implements _i2.DeviceStore { returnValue: false, ) as bool); + @override + _i4.Future dispose() => (super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override int indexOf(String? deviceId) => (super.noSuchMethod( Invocation.method( @@ -94,16 +104,6 @@ class MockDeviceStore extends _i1.Mock implements _i2.DeviceStore { returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); - @override - _i4.Future dispose() => (super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); - @override void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( diff --git a/apps/firmware_updater/test/fwupd_dbus_service_test.dart b/apps/firmware_updater/test/fwupd_dbus_service_test.dart index 7e037c61..fc0f1527 100644 --- a/apps/firmware_updater/test/fwupd_dbus_service_test.dart +++ b/apps/firmware_updater/test/fwupd_dbus_service_test.dart @@ -4,7 +4,7 @@ import 'dart:io'; import 'package:dbus/dbus.dart'; import 'package:dio/dio.dart'; import 'package:file/memory.dart'; -import 'package:firmware_updater/fwupd_dbus_service.dart'; +import 'package:firmware_updater/services.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:fwupd/fwupd.dart'; import 'package:mockito/annotations.dart'; diff --git a/apps/firmware_updater/test/fwupd_mock_service_test.dart b/apps/firmware_updater/test/fwupd_mock_service_test.dart index 42006590..71ca7378 100644 --- a/apps/firmware_updater/test/fwupd_mock_service_test.dart +++ b/apps/firmware_updater/test/fwupd_mock_service_test.dart @@ -1,6 +1,6 @@ import 'dart:io'; -import 'package:firmware_updater/fwupd_mock_service.dart'; +import 'package:firmware_updater/services.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { diff --git a/apps/firmware_updater/test/test_utils.dart b/apps/firmware_updater/test/test_utils.dart index 305d262b..ace84b36 100644 --- a/apps/firmware_updater/test/test_utils.dart +++ b/apps/firmware_updater/test/test_utils.dart @@ -1,7 +1,7 @@ import 'package:firmware_updater/device_model.dart'; import 'package:firmware_updater/device_store.dart'; -import 'package:firmware_updater/fwupd_dbus_service.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; +import 'package:firmware_updater/services.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_test/flutter_test.dart'; @@ -11,31 +11,34 @@ import 'package:mockito/mockito.dart'; import 'test_utils.mocks.dart'; -FwupdDevice testDevice({ - required String id, - String? name, - String? summary, - String? icon, - List? guid, - String? vendor, +@GenerateMocks([DeviceModel]) +DeviceModel mockModel({ + required FwupdDevice device, + bool? hasUpgrade, + List? releases, + FwupdException? error, +}) { + final model = MockDeviceModel(); + when(model.device).thenReturn(device); + when(model.hasUpgrade).thenReturn(hasUpgrade ?? false); + when(model.releases).thenReturn(releases ?? []); + when(model.latestRelease).thenReturn(releases?.firstOrNull); + return model; +} + +@GenerateMocks([FwupdNotifier]) +MockFwupdNotifier mockNotifier({ + FwupdStatus? status, + int? percentage, String? version, - String? versionLowest, - String? checksum, - Set? flags, + bool? onBattery, }) { - return FwupdDevice( - deviceId: id, - name: name ?? '', - summary: summary, - icon: icon != null ? [icon] : [], - guid: guid ?? [], - vendor: vendor, - version: version, - versionLowest: versionLowest, - checksum: checksum, - plugin: '', - flags: flags ?? {FwupdDeviceFlag.updatable}, - ); + final notifier = MockFwupdNotifier(); + when(notifier.status).thenReturn(status ?? FwupdStatus.idle); + when(notifier.percentage).thenReturn(percentage ?? 0); + when(notifier.version).thenReturn(version ?? 'v1.2.3'); + when(notifier.onBattery).thenReturn(onBattery ?? false); + return notifier; } @GenerateMocks([FwupdDbusService]) @@ -63,39 +66,36 @@ MockFwupdDbusService mockService({ return service; } -@GenerateMocks([FwupdNotifier]) -MockFwupdNotifier mockNotifier({ - FwupdStatus? status, - int? percentage, - String? version, - bool? onBattery, -}) { - final notifier = MockFwupdNotifier(); - when(notifier.status).thenReturn(status ?? FwupdStatus.idle); - when(notifier.percentage).thenReturn(percentage ?? 0); - when(notifier.version).thenReturn(version ?? 'v1.2.3'); - when(notifier.onBattery).thenReturn(onBattery ?? false); - return notifier; -} +@GenerateMocks([DeviceStore]) +DeviceStore mockStore() => MockDeviceStore(); -@GenerateMocks([DeviceModel]) -DeviceModel mockModel({ - required FwupdDevice device, - bool? hasUpgrade, - List? releases, - FwupdException? error, +FwupdDevice testDevice({ + required String id, + String? name, + String? summary, + String? icon, + List? guid, + String? vendor, + String? version, + String? versionLowest, + String? checksum, + Set? flags, }) { - final model = MockDeviceModel(); - when(model.device).thenReturn(device); - when(model.hasUpgrade).thenReturn(hasUpgrade ?? false); - when(model.releases).thenReturn(releases ?? []); - when(model.latestRelease).thenReturn(releases?.firstOrNull); - return model; + return FwupdDevice( + deviceId: id, + name: name ?? '', + summary: summary, + icon: icon != null ? [icon] : [], + guid: guid ?? [], + vendor: vendor, + version: version, + versionLowest: versionLowest, + checksum: checksum, + plugin: '', + flags: flags ?? {FwupdDeviceFlag.updatable}, + ); } -@GenerateMocks([DeviceStore]) -DeviceStore mockStore() => MockDeviceStore(); - extension WidgetTesterX on WidgetTester { BuildContext get context => element(find.byType(Scaffold).first); AppLocalizations get lang => AppLocalizations.of(context); diff --git a/apps/firmware_updater/test/test_utils.mocks.dart b/apps/firmware_updater/test/test_utils.mocks.dart index 04a0e4a9..2dae19e2 100644 --- a/apps/firmware_updater/test/test_utils.mocks.dart +++ b/apps/firmware_updater/test/test_utils.mocks.dart @@ -3,17 +3,17 @@ // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes -import 'dart:async' as _i5; -import 'dart:io' as _i6; -import 'dart:ui' as _i8; +import 'dart:async' as _i4; +import 'dart:io' as _i9; +import 'dart:ui' as _i5; -import 'package:firmware_updater/device_model.dart' as _i9; +import 'package:firmware_updater/device_model.dart' as _i3; import 'package:firmware_updater/device_store.dart' as _i10; -import 'package:firmware_updater/fwupd_dbus_service.dart' as _i3; -import 'package:firmware_updater/fwupd_notifier.dart' as _i7; +import 'package:firmware_updater/fwupd_notifier.dart' as _i6; +import 'package:firmware_updater/services.dart' as _i8; import 'package:fwupd/fwupd.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; -import 'package:mockito/src/dummies.dart' as _i4; +import 'package:mockito/src/dummies.dart' as _i7; // ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values @@ -38,73 +38,28 @@ class _FakeFwupdDevice_0 extends _i1.SmartFake implements _i2.FwupdDevice { ); } -/// A class which mocks [FwupdDbusService]. +/// A class which mocks [DeviceModel]. /// /// See the documentation for Mockito's code generation for more information. -class MockFwupdDbusService extends _i1.Mock implements _i3.FwupdDbusService { - MockFwupdDbusService() { +class MockDeviceModel extends _i1.Mock implements _i3.DeviceModel { + MockDeviceModel() { _i1.throwOnMissingStub(this); } @override - String get userAgent => (super.noSuchMethod( - Invocation.getter(#userAgent), - returnValue: _i4.dummyValue( - this, - Invocation.getter(#userAgent), - ), - ) as String); - - @override - _i2.FwupdStatus get status => (super.noSuchMethod( - Invocation.getter(#status), - returnValue: _i2.FwupdStatus.unknown, - ) as _i2.FwupdStatus); - - @override - int get percentage => (super.noSuchMethod( - Invocation.getter(#percentage), - returnValue: 0, - ) as int); - - @override - String get daemonVersion => (super.noSuchMethod( - Invocation.getter(#daemonVersion), - returnValue: _i4.dummyValue( + _i2.FwupdDevice get device => (super.noSuchMethod( + Invocation.getter(#device), + returnValue: _FakeFwupdDevice_0( this, - Invocation.getter(#daemonVersion), + Invocation.getter(#device), ), - ) as String); - - @override - _i5.Stream<_i2.FwupdDevice> get deviceAdded => (super.noSuchMethod( - Invocation.getter(#deviceAdded), - returnValue: _i5.Stream<_i2.FwupdDevice>.empty(), - ) as _i5.Stream<_i2.FwupdDevice>); - - @override - _i5.Stream<_i2.FwupdDevice> get deviceChanged => (super.noSuchMethod( - Invocation.getter(#deviceChanged), - returnValue: _i5.Stream<_i2.FwupdDevice>.empty(), - ) as _i5.Stream<_i2.FwupdDevice>); - - @override - _i5.Stream<_i2.FwupdDevice> get deviceRemoved => (super.noSuchMethod( - Invocation.getter(#deviceRemoved), - returnValue: _i5.Stream<_i2.FwupdDevice>.empty(), - ) as _i5.Stream<_i2.FwupdDevice>); - - @override - _i5.Stream<_i2.FwupdDevice> get deviceRequest => (super.noSuchMethod( - Invocation.getter(#deviceRequest), - returnValue: _i5.Stream<_i2.FwupdDevice>.empty(), - ) as _i5.Stream<_i2.FwupdDevice>); + ) as _i2.FwupdDevice); @override - _i5.Stream> get propertiesChanged => (super.noSuchMethod( - Invocation.getter(#propertiesChanged), - returnValue: _i5.Stream>.empty(), - ) as _i5.Stream>); + bool get hasUpgrade => (super.noSuchMethod( + Invocation.getter(#hasUpgrade), + returnValue: false, + ) as bool); @override bool get onBattery => (super.noSuchMethod( @@ -113,203 +68,109 @@ class MockFwupdDbusService extends _i1.Mock implements _i3.FwupdDbusService { ) as bool); @override - void registerErrorListener(dynamic Function(Exception)? errorListener) => - super.noSuchMethod( - Invocation.method( - #registerErrorListener, - [errorListener], - ), - returnValueForMissingStub: null, - ); - - @override - void registerConfirmationListener( - _i5.Future Function()? confirmationListener) => - super.noSuchMethod( - Invocation.method( - #registerConfirmationListener, - [confirmationListener], - ), - returnValueForMissingStub: null, - ); + bool get hasListeners => (super.noSuchMethod( + Invocation.getter(#hasListeners), + returnValue: false, + ) as bool); @override - _i5.Future init() => (super.noSuchMethod( - Invocation.method( - #init, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + bool get isDisposed => (super.noSuchMethod( + Invocation.getter(#isDisposed), + returnValue: false, + ) as bool); @override - _i5.Future dispose() => (super.noSuchMethod( + _i4.Future dispose() => (super.noSuchMethod( Invocation.method( #dispose, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i5.Future refreshProperties() => (super.noSuchMethod( + _i4.Future init() => (super.noSuchMethod( Invocation.method( - #refreshProperties, + #init, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future activate(_i2.FwupdDevice? device) => (super.noSuchMethod( - Invocation.method( - #activate, - [device], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i5.Future clearResults(_i2.FwupdDevice? device) => (super.noSuchMethod( + _i4.Future install(_i2.FwupdRelease? release) => (super.noSuchMethod( Invocation.method( - #clearResults, - [device], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future> getDevices() => (super.noSuchMethod( - Invocation.method( - #getDevices, - [], + #install, + [release], ), - returnValue: - _i5.Future>.value(<_i2.FwupdDevice>[]), - ) as _i5.Future>); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i5.Future> getDowngrades(_i2.FwupdDevice? device) => - (super.noSuchMethod( + _i4.Future update(_i2.FwupdDevice? device) => (super.noSuchMethod( Invocation.method( - #getDowngrades, + #update, [device], ), - returnValue: - _i5.Future>.value(<_i2.FwupdRelease>[]), - ) as _i5.Future>); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i5.Future> getPlugins() => (super.noSuchMethod( + _i4.Future verify() => (super.noSuchMethod( Invocation.method( - #getPlugins, + #verify, [], ), - returnValue: - _i5.Future>.value(<_i2.FwupdPlugin>[]), - ) as _i5.Future>); - - @override - _i5.Future> getReleases(_i2.FwupdDevice? device) => - (super.noSuchMethod( - Invocation.method( - #getReleases, - [device], - ), - returnValue: - _i5.Future>.value(<_i2.FwupdRelease>[]), - ) as _i5.Future>); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i5.Future> getRemotes() => (super.noSuchMethod( + _i4.Future verifyUpdate() => (super.noSuchMethod( Invocation.method( - #getRemotes, + #verifyUpdate, [], ), - returnValue: - _i5.Future>.value(<_i2.FwupdRemote>[]), - ) as _i5.Future>); - - @override - _i5.Future> getUpgrades(_i2.FwupdDevice? device) => - (super.noSuchMethod( - Invocation.method( - #getUpgrades, - [device], - ), - returnValue: - _i5.Future>.value(<_i2.FwupdRelease>[]), - ) as _i5.Future>); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i5.Future install( - _i2.FwupdDevice? device, - _i2.FwupdRelease? release, [ - _i6.ResourceHandle Function(_i6.RandomAccessFile)? resourceHandleFromFile, - ]) => - (super.noSuchMethod( + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( - #install, - [ - device, - release, - resourceHandleFromFile, - ], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future unlock(_i2.FwupdDevice? device) => (super.noSuchMethod( - Invocation.method( - #unlock, - [device], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future verify(_i2.FwupdDevice? device) => (super.noSuchMethod( - Invocation.method( - #verify, - [device], + #addListener, + [listener], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValueForMissingStub: null, + ); @override - _i5.Future verifyUpdate(_i2.FwupdDevice? device) => (super.noSuchMethod( + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( - #verifyUpdate, - [device], + #removeListener, + [listener], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValueForMissingStub: null, + ); @override - _i5.Future reboot() => (super.noSuchMethod( + void notifyListeners() => super.noSuchMethod( Invocation.method( - #reboot, + #notifyListeners, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValueForMissingStub: null, + ); } /// A class which mocks [FwupdNotifier]. /// /// See the documentation for Mockito's code generation for more information. -class MockFwupdNotifier extends _i1.Mock implements _i7.FwupdNotifier { +class MockFwupdNotifier extends _i1.Mock implements _i6.FwupdNotifier { MockFwupdNotifier() { _i1.throwOnMissingStub(this); } @@ -329,7 +190,7 @@ class MockFwupdNotifier extends _i1.Mock implements _i7.FwupdNotifier { @override String get version => (super.noSuchMethod( Invocation.getter(#version), - returnValue: _i4.dummyValue( + returnValue: _i7.dummyValue( this, Invocation.getter(#version), ), @@ -354,14 +215,14 @@ class MockFwupdNotifier extends _i1.Mock implements _i7.FwupdNotifier { ) as bool); @override - _i5.Future init() => (super.noSuchMethod( + _i4.Future init() => (super.noSuchMethod( Invocation.method( #init, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override void registerErrorListener(dynamic Function(Exception)? errorListener) => @@ -375,7 +236,7 @@ class MockFwupdNotifier extends _i1.Mock implements _i7.FwupdNotifier { @override void registerConfirmationListener( - _i5.Future Function()? confirmationListener) => + _i4.Future Function()? confirmationListener) => super.noSuchMethod( Invocation.method( #registerConfirmationListener, @@ -396,27 +257,27 @@ class MockFwupdNotifier extends _i1.Mock implements _i7.FwupdNotifier { ); @override - _i5.Future refresh() => (super.noSuchMethod( + _i4.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i5.Future dispose() => (super.noSuchMethod( + _i4.Future dispose() => (super.noSuchMethod( Invocation.method( #dispose, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -425,7 +286,7 @@ class MockFwupdNotifier extends _i1.Mock implements _i7.FwupdNotifier { ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], @@ -443,133 +304,272 @@ class MockFwupdNotifier extends _i1.Mock implements _i7.FwupdNotifier { ); } -/// A class which mocks [DeviceModel]. +/// A class which mocks [FwupdDbusService]. /// /// See the documentation for Mockito's code generation for more information. -class MockDeviceModel extends _i1.Mock implements _i9.DeviceModel { - MockDeviceModel() { +class MockFwupdDbusService extends _i1.Mock implements _i8.FwupdDbusService { + MockFwupdDbusService() { _i1.throwOnMissingStub(this); } @override - _i2.FwupdDevice get device => (super.noSuchMethod( - Invocation.getter(#device), - returnValue: _FakeFwupdDevice_0( + String get userAgent => (super.noSuchMethod( + Invocation.getter(#userAgent), + returnValue: _i7.dummyValue( this, - Invocation.getter(#device), + Invocation.getter(#userAgent), ), - ) as _i2.FwupdDevice); + ) as String); @override - bool get onBattery => (super.noSuchMethod( - Invocation.getter(#onBattery), - returnValue: false, - ) as bool); + _i2.FwupdStatus get status => (super.noSuchMethod( + Invocation.getter(#status), + returnValue: _i2.FwupdStatus.unknown, + ) as _i2.FwupdStatus); @override - bool get hasUpgrade => (super.noSuchMethod( - Invocation.getter(#hasUpgrade), - returnValue: false, - ) as bool); + int get percentage => (super.noSuchMethod( + Invocation.getter(#percentage), + returnValue: 0, + ) as int); @override - bool get hasListeners => (super.noSuchMethod( - Invocation.getter(#hasListeners), - returnValue: false, - ) as bool); + String get daemonVersion => (super.noSuchMethod( + Invocation.getter(#daemonVersion), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#daemonVersion), + ), + ) as String); @override - bool get isDisposed => (super.noSuchMethod( - Invocation.getter(#isDisposed), + _i4.Stream<_i2.FwupdDevice> get deviceAdded => (super.noSuchMethod( + Invocation.getter(#deviceAdded), + returnValue: _i4.Stream<_i2.FwupdDevice>.empty(), + ) as _i4.Stream<_i2.FwupdDevice>); + + @override + _i4.Stream<_i2.FwupdDevice> get deviceChanged => (super.noSuchMethod( + Invocation.getter(#deviceChanged), + returnValue: _i4.Stream<_i2.FwupdDevice>.empty(), + ) as _i4.Stream<_i2.FwupdDevice>); + + @override + _i4.Stream<_i2.FwupdDevice> get deviceRemoved => (super.noSuchMethod( + Invocation.getter(#deviceRemoved), + returnValue: _i4.Stream<_i2.FwupdDevice>.empty(), + ) as _i4.Stream<_i2.FwupdDevice>); + + @override + _i4.Stream<_i2.FwupdDevice> get deviceRequest => (super.noSuchMethod( + Invocation.getter(#deviceRequest), + returnValue: _i4.Stream<_i2.FwupdDevice>.empty(), + ) as _i4.Stream<_i2.FwupdDevice>); + + @override + _i4.Stream> get propertiesChanged => (super.noSuchMethod( + Invocation.getter(#propertiesChanged), + returnValue: _i4.Stream>.empty(), + ) as _i4.Stream>); + + @override + bool get onBattery => (super.noSuchMethod( + Invocation.getter(#onBattery), returnValue: false, ) as bool); @override - _i5.Future init() => (super.noSuchMethod( + void registerErrorListener(dynamic Function(Exception)? errorListener) => + super.noSuchMethod( + Invocation.method( + #registerErrorListener, + [errorListener], + ), + returnValueForMissingStub: null, + ); + + @override + void registerConfirmationListener( + _i4.Future Function()? confirmationListener) => + super.noSuchMethod( + Invocation.method( + #registerConfirmationListener, + [confirmationListener], + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future init() => (super.noSuchMethod( Invocation.method( #init, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i5.Future dispose() => (super.noSuchMethod( + _i4.Future dispose() => (super.noSuchMethod( Invocation.method( #dispose, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i5.Future update(_i2.FwupdDevice? device) => (super.noSuchMethod( + _i4.Future refreshProperties() => (super.noSuchMethod( Invocation.method( - #update, + #refreshProperties, + [], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future activate(_i2.FwupdDevice? device) => (super.noSuchMethod( + Invocation.method( + #activate, [device], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i5.Future verify() => (super.noSuchMethod( + _i4.Future clearResults(_i2.FwupdDevice? device) => (super.noSuchMethod( Invocation.method( - #verify, + #clearResults, + [device], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future> getDevices() => (super.noSuchMethod( + Invocation.method( + #getDevices, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: + _i4.Future>.value(<_i2.FwupdDevice>[]), + ) as _i4.Future>); @override - _i5.Future verifyUpdate() => (super.noSuchMethod( + _i4.Future> getDowngrades(_i2.FwupdDevice? device) => + (super.noSuchMethod( Invocation.method( - #verifyUpdate, + #getDowngrades, + [device], + ), + returnValue: + _i4.Future>.value(<_i2.FwupdRelease>[]), + ) as _i4.Future>); + + @override + _i4.Future> getPlugins() => (super.noSuchMethod( + Invocation.method( + #getPlugins, + [], + ), + returnValue: + _i4.Future>.value(<_i2.FwupdPlugin>[]), + ) as _i4.Future>); + + @override + _i4.Future> getReleases(_i2.FwupdDevice? device) => + (super.noSuchMethod( + Invocation.method( + #getReleases, + [device], + ), + returnValue: + _i4.Future>.value(<_i2.FwupdRelease>[]), + ) as _i4.Future>); + + @override + _i4.Future> getRemotes() => (super.noSuchMethod( + Invocation.method( + #getRemotes, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: + _i4.Future>.value(<_i2.FwupdRemote>[]), + ) as _i4.Future>); + + @override + _i4.Future> getUpgrades(_i2.FwupdDevice? device) => + (super.noSuchMethod( + Invocation.method( + #getUpgrades, + [device], + ), + returnValue: + _i4.Future>.value(<_i2.FwupdRelease>[]), + ) as _i4.Future>); @override - _i5.Future install(_i2.FwupdRelease? release) => (super.noSuchMethod( + _i4.Future install( + _i2.FwupdDevice? device, + _i2.FwupdRelease? release, [ + _i9.ResourceHandle Function(_i9.RandomAccessFile)? resourceHandleFromFile, + ]) => + (super.noSuchMethod( Invocation.method( #install, - [release], + [ + device, + release, + resourceHandleFromFile, + ], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + _i4.Future unlock(_i2.FwupdDevice? device) => (super.noSuchMethod( Invocation.method( - #addListener, - [listener], + #unlock, + [device], ), - returnValueForMissingStub: null, - ); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + _i4.Future verify(_i2.FwupdDevice? device) => (super.noSuchMethod( Invocation.method( - #removeListener, - [listener], + #verify, + [device], ), - returnValueForMissingStub: null, - ); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - void notifyListeners() => super.noSuchMethod( + _i4.Future verifyUpdate(_i2.FwupdDevice? device) => (super.noSuchMethod( Invocation.method( - #notifyListeners, + #verifyUpdate, + [device], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + _i4.Future reboot() => (super.noSuchMethod( + Invocation.method( + #reboot, [], ), - returnValueForMissingStub: null, - ); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); } /// A class which mocks [DeviceStore]. @@ -580,6 +580,12 @@ class MockDeviceStore extends _i1.Mock implements _i10.DeviceStore { _i1.throwOnMissingStub(this); } + @override + List<_i2.FwupdDevice> get devices => (super.noSuchMethod( + Invocation.getter(#devices), + returnValue: <_i2.FwupdDevice>[], + ) as List<_i2.FwupdDevice>); + @override bool get showReleases => (super.noSuchMethod( Invocation.getter(#showReleases), @@ -595,12 +601,6 @@ class MockDeviceStore extends _i1.Mock implements _i10.DeviceStore { returnValueForMissingStub: null, ); - @override - List<_i2.FwupdDevice> get devices => (super.noSuchMethod( - Invocation.getter(#devices), - returnValue: <_i2.FwupdDevice>[], - ) as List<_i2.FwupdDevice>); - @override bool get hasListeners => (super.noSuchMethod( Invocation.getter(#hasListeners), @@ -613,6 +613,16 @@ class MockDeviceStore extends _i1.Mock implements _i10.DeviceStore { returnValue: false, ) as bool); + @override + _i4.Future dispose() => (super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override int indexOf(String? deviceId) => (super.noSuchMethod( Invocation.method( @@ -623,37 +633,27 @@ class MockDeviceStore extends _i1.Mock implements _i10.DeviceStore { ) as int); @override - _i5.Future init() => (super.noSuchMethod( + _i4.Future init() => (super.noSuchMethod( Invocation.method( #init, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - _i5.Future refresh() => (super.noSuchMethod( + _i4.Future refresh() => (super.noSuchMethod( Invocation.method( #refresh, [], ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); - - @override - _i5.Future dispose() => (super.noSuchMethod( - Invocation.method( - #dispose, - [], - ), - returnValue: _i5.Future.value(), - returnValueForMissingStub: _i5.Future.value(), - ) as _i5.Future); + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); @override - void addListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void addListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #addListener, [listener], @@ -662,7 +662,7 @@ class MockDeviceStore extends _i1.Mock implements _i10.DeviceStore { ); @override - void removeListener(_i8.VoidCallback? listener) => super.noSuchMethod( + void removeListener(_i5.VoidCallback? listener) => super.noSuchMethod( Invocation.method( #removeListener, [listener], From b81c6dc83264f89ba6fcc7095b5e9567344ed829 Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Fri, 15 Nov 2024 10:58:45 +0200 Subject: [PATCH 05/16] refactor: move device_model and device_store into pages --- apps/firmware_updater/lib/device_tile.dart | 2 +- apps/firmware_updater/lib/firmware_app.dart | 1 - apps/firmware_updater/lib/pages.dart | 2 + .../lib/pages/detail_page.dart | 2 - .../lib/{ => pages}/device_model.dart | 0 .../lib/pages/device_page.dart | 257 +++++++++--------- .../lib/{ => pages}/device_store.dart | 0 .../lib/pages/release_page.dart | 3 +- .../test/device_model_test.dart | 2 +- .../test/device_page_test.dart | 2 - .../test/device_store_test.dart | 2 +- .../test/firmware_app_test.dart | 2 +- .../test/firmware_app_test.mocks.dart | 2 +- .../test/release_page_test.dart | 2 - apps/firmware_updater/test/test_utils.dart | 3 +- .../test/test_utils.mocks.dart | 4 +- 16 files changed, 139 insertions(+), 147 deletions(-) rename apps/firmware_updater/lib/{ => pages}/device_model.dart (100%) rename apps/firmware_updater/lib/{ => pages}/device_store.dart (100%) diff --git a/apps/firmware_updater/lib/device_tile.dart b/apps/firmware_updater/lib/device_tile.dart index 76bb018a..c8e22485 100644 --- a/apps/firmware_updater/lib/device_tile.dart +++ b/apps/firmware_updater/lib/device_tile.dart @@ -1,4 +1,4 @@ -import 'package:firmware_updater/device_model.dart'; +import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/services.dart'; import 'package:firmware_updater/widgets.dart'; import 'package:flutter/material.dart'; diff --git a/apps/firmware_updater/lib/firmware_app.dart b/apps/firmware_updater/lib/firmware_app.dart index 039a77e1..88a76f05 100644 --- a/apps/firmware_updater/lib/firmware_app.dart +++ b/apps/firmware_updater/lib/firmware_app.dart @@ -1,5 +1,4 @@ import 'package:collection/collection.dart'; -import 'package:firmware_updater/device_store.dart'; import 'package:firmware_updater/device_tile.dart'; import 'package:firmware_updater/fwupd_l10n.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; diff --git a/apps/firmware_updater/lib/pages.dart b/apps/firmware_updater/lib/pages.dart index 1f9dc754..3425d5a7 100644 --- a/apps/firmware_updater/lib/pages.dart +++ b/apps/firmware_updater/lib/pages.dart @@ -1,3 +1,5 @@ export 'pages/detail_page.dart'; +export 'pages/device_model.dart'; export 'pages/device_page.dart'; +export 'pages/device_store.dart'; export 'pages/release_page.dart'; diff --git a/apps/firmware_updater/lib/pages/detail_page.dart b/apps/firmware_updater/lib/pages/detail_page.dart index f5948244..eb5a9bfb 100644 --- a/apps/firmware_updater/lib/pages/detail_page.dart +++ b/apps/firmware_updater/lib/pages/detail_page.dart @@ -1,5 +1,3 @@ -import 'package:firmware_updater/device_model.dart'; -import 'package:firmware_updater/device_store.dart'; import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/services.dart'; import 'package:flutter/material.dart'; diff --git a/apps/firmware_updater/lib/device_model.dart b/apps/firmware_updater/lib/pages/device_model.dart similarity index 100% rename from apps/firmware_updater/lib/device_model.dart rename to apps/firmware_updater/lib/pages/device_model.dart diff --git a/apps/firmware_updater/lib/pages/device_page.dart b/apps/firmware_updater/lib/pages/device_page.dart index 5145fb8c..1d912d87 100644 --- a/apps/firmware_updater/lib/pages/device_page.dart +++ b/apps/firmware_updater/lib/pages/device_page.dart @@ -1,9 +1,8 @@ import 'package:collection/collection.dart'; -import 'package:firmware_updater/device_model.dart'; -import 'package:firmware_updater/device_store.dart'; import 'package:firmware_updater/fwupd_l10n.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; import 'package:firmware_updater/fwupd_x.dart'; +import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; @@ -12,135 +11,9 @@ import 'package:provider/provider.dart'; import 'package:yaru/yaru.dart'; class DevicePage extends StatelessWidget { - const DevicePage({super.key, this.parentNavigator}); - final NavigatorState? parentNavigator; - static Widget _buildPadding(Widget child) { - return Padding( - padding: const EdgeInsets.symmetric(vertical: 4), - child: child, - ); - } - - static Widget _buildHeader(BuildContext context, String text) { - return _buildPadding( - Text( - text, - textAlign: TextAlign.end, - style: Theme.of(context).textTheme.bodySmall, - ), - ); - } - - static Widget _buildLabel( - BuildContext context, - String text, [ - String? chipLabel, - ]) { - final lightChipLabelColor = Theme.of(context).colorScheme.secondary; - final darkChipLabelColor = lightChipLabelColor.copyWith(lightness: .65); - - final lightChipBackgroundColor = Theme.of(context) - .colorScheme - .secondary - .adjust(lightness: 0.64, saturation: 1); - - final darkChipBackgroundColor = - lightChipBackgroundColor.copyWith(lightness: .4, alpha: 0.3); - - return _buildPadding( - chipLabel == null - ? Text(text) - : Row( - children: [ - Text(text), - const SizedBox(width: 8), - Chip( - materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, - label: Text(chipLabel), - labelStyle: Theme.of(context).textTheme.labelMedium?.copyWith( - color: Theme.of(context).brightness == Brightness.light - ? lightChipLabelColor - : darkChipLabelColor, - ), - labelPadding: EdgeInsets.zero, - visualDensity: const VisualDensity(vertical: -4), - backgroundColor: - Theme.of(context).brightness == Brightness.light - ? lightChipBackgroundColor - : darkChipBackgroundColor, - side: BorderSide.none, - ), - ], - ), - ); - } - - static Widget _buildAppBarTitle( - BuildContext context, - String title, - String? subtitle, - ) { - return Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(title), - if (subtitle != null) - Text( - subtitle, - style: Theme.of(context).textTheme.bodySmall, - ), - ], - ); - } - - static Widget _buildButtonBar({ - required BuildContext context, - bool enabled = true, - }) { - final model = context.read(); - final l10n = AppLocalizations.of(context); - return Padding( - padding: const EdgeInsets.only(top: 8.0, bottom: 8.0), - child: OverflowBar( - alignment: MainAxisAlignment.start, - children: [ - if (model.hasUpgrade) - Padding( - padding: const EdgeInsets.only(right: 8.0), - child: ElevatedButton( - onPressed: enabled - ? () => showConfirmationDialog( - context, - title: l10n.updateConfirm( - model.device.name, - model.latestRelease?.version ?? '', - ), - icon: YaruIcons.update_available, - message: model.device.flags - .contains(FwupdDeviceFlag.usableDuringUpdate) - ? null - : l10n.deviceUnavailable, - actionText: l10n.update, - onConfirm: () => model.install(model.latestRelease!), - onCancel: () {}, - ) - : null, - child: Text(l10n.updateToLatest), - ), - ), - if (model.releases?.isNotEmpty ?? false) - FilledButton( - onPressed: enabled - ? () => context.read().showReleases = true - : null, - child: Text(l10n.allVersions), - ), - ], - ), - ); - } + const DevicePage({super.key, this.parentNavigator}); @override Widget build(BuildContext context) { @@ -316,4 +189,130 @@ class DevicePage extends StatelessWidget { ), ); } + + static Widget _buildAppBarTitle( + BuildContext context, + String title, + String? subtitle, + ) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(title), + if (subtitle != null) + Text( + subtitle, + style: Theme.of(context).textTheme.bodySmall, + ), + ], + ); + } + + static Widget _buildButtonBar({ + required BuildContext context, + bool enabled = true, + }) { + final model = context.read(); + final l10n = AppLocalizations.of(context); + return Padding( + padding: const EdgeInsets.only(top: 8.0, bottom: 8.0), + child: OverflowBar( + alignment: MainAxisAlignment.start, + children: [ + if (model.hasUpgrade) + Padding( + padding: const EdgeInsets.only(right: 8.0), + child: ElevatedButton( + onPressed: enabled + ? () => showConfirmationDialog( + context, + title: l10n.updateConfirm( + model.device.name, + model.latestRelease?.version ?? '', + ), + icon: YaruIcons.update_available, + message: model.device.flags + .contains(FwupdDeviceFlag.usableDuringUpdate) + ? null + : l10n.deviceUnavailable, + actionText: l10n.update, + onConfirm: () => model.install(model.latestRelease!), + onCancel: () {}, + ) + : null, + child: Text(l10n.updateToLatest), + ), + ), + if (model.releases?.isNotEmpty ?? false) + FilledButton( + onPressed: enabled + ? () => context.read().showReleases = true + : null, + child: Text(l10n.allVersions), + ), + ], + ), + ); + } + + static Widget _buildHeader(BuildContext context, String text) { + return _buildPadding( + Text( + text, + textAlign: TextAlign.end, + style: Theme.of(context).textTheme.bodySmall, + ), + ); + } + + static Widget _buildLabel( + BuildContext context, + String text, [ + String? chipLabel, + ]) { + final lightChipLabelColor = Theme.of(context).colorScheme.secondary; + final darkChipLabelColor = lightChipLabelColor.copyWith(lightness: .65); + + final lightChipBackgroundColor = Theme.of(context) + .colorScheme + .secondary + .adjust(lightness: 0.64, saturation: 1); + + final darkChipBackgroundColor = + lightChipBackgroundColor.copyWith(lightness: .4, alpha: 0.3); + + return _buildPadding( + chipLabel == null + ? Text(text) + : Row( + children: [ + Text(text), + const SizedBox(width: 8), + Chip( + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + label: Text(chipLabel), + labelStyle: Theme.of(context).textTheme.labelMedium?.copyWith( + color: Theme.of(context).brightness == Brightness.light + ? lightChipLabelColor + : darkChipLabelColor, + ), + labelPadding: EdgeInsets.zero, + visualDensity: const VisualDensity(vertical: -4), + backgroundColor: + Theme.of(context).brightness == Brightness.light + ? lightChipBackgroundColor + : darkChipBackgroundColor, + side: BorderSide.none, + ), + ], + ), + ); + } + + static Widget _buildPadding(Widget child) { + return Padding( + padding: const EdgeInsets.symmetric(vertical: 4), + child: child, + ); + } } diff --git a/apps/firmware_updater/lib/device_store.dart b/apps/firmware_updater/lib/pages/device_store.dart similarity index 100% rename from apps/firmware_updater/lib/device_store.dart rename to apps/firmware_updater/lib/pages/device_store.dart diff --git a/apps/firmware_updater/lib/pages/release_page.dart b/apps/firmware_updater/lib/pages/release_page.dart index f4900c6f..4745cdd3 100644 --- a/apps/firmware_updater/lib/pages/release_page.dart +++ b/apps/firmware_updater/lib/pages/release_page.dart @@ -1,7 +1,6 @@ -import 'package:firmware_updater/device_model.dart'; -import 'package:firmware_updater/device_store.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; import 'package:firmware_updater/fwupd_x.dart'; +import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/widgets/release_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; diff --git a/apps/firmware_updater/test/device_model_test.dart b/apps/firmware_updater/test/device_model_test.dart index b5c5a836..35e77f81 100644 --- a/apps/firmware_updater/test/device_model_test.dart +++ b/apps/firmware_updater/test/device_model_test.dart @@ -1,4 +1,4 @@ -import 'package:firmware_updater/device_model.dart'; +import 'package:firmware_updater/pages.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:fwupd/fwupd.dart'; import 'package:mockito/mockito.dart'; diff --git a/apps/firmware_updater/test/device_page_test.dart b/apps/firmware_updater/test/device_page_test.dart index 621f68b4..afaf4a1e 100644 --- a/apps/firmware_updater/test/device_page_test.dart +++ b/apps/firmware_updater/test/device_page_test.dart @@ -1,5 +1,3 @@ -import 'package:firmware_updater/device_model.dart'; -import 'package:firmware_updater/device_store.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; import 'package:firmware_updater/pages.dart'; import 'package:flutter/material.dart'; diff --git a/apps/firmware_updater/test/device_store_test.dart b/apps/firmware_updater/test/device_store_test.dart index 1d109a49..41e4e91c 100644 --- a/apps/firmware_updater/test/device_store_test.dart +++ b/apps/firmware_updater/test/device_store_test.dart @@ -2,7 +2,7 @@ import 'dart:async'; -import 'package:firmware_updater/device_store.dart'; +import 'package:firmware_updater/pages.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:fwupd/fwupd.dart'; import 'package:mockito/mockito.dart'; diff --git a/apps/firmware_updater/test/firmware_app_test.dart b/apps/firmware_updater/test/firmware_app_test.dart index cc973876..86e1b2f5 100644 --- a/apps/firmware_updater/test/firmware_app_test.dart +++ b/apps/firmware_updater/test/firmware_app_test.dart @@ -1,7 +1,7 @@ -import 'package:firmware_updater/device_store.dart'; import 'package:firmware_updater/firmware_app.dart'; import 'package:firmware_updater/fwupd_l10n.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; +import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/services.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/apps/firmware_updater/test/firmware_app_test.mocks.dart b/apps/firmware_updater/test/firmware_app_test.mocks.dart index 7bf4958f..cd4e0d21 100644 --- a/apps/firmware_updater/test/firmware_app_test.mocks.dart +++ b/apps/firmware_updater/test/firmware_app_test.mocks.dart @@ -6,7 +6,7 @@ import 'dart:async' as _i4; import 'dart:ui' as _i5; -import 'package:firmware_updater/device_store.dart' as _i2; +import 'package:firmware_updater/pages/device_store.dart' as _i2; import 'package:fwupd/fwupd.dart' as _i3; import 'package:gtk/src/gtk_application_notifier.dart' as _i6; import 'package:mockito/mockito.dart' as _i1; diff --git a/apps/firmware_updater/test/release_page_test.dart b/apps/firmware_updater/test/release_page_test.dart index e929aec8..fdfd0642 100644 --- a/apps/firmware_updater/test/release_page_test.dart +++ b/apps/firmware_updater/test/release_page_test.dart @@ -1,5 +1,3 @@ -import 'package:firmware_updater/device_model.dart'; -import 'package:firmware_updater/device_store.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; import 'package:firmware_updater/pages.dart'; import 'package:flutter/material.dart'; diff --git a/apps/firmware_updater/test/test_utils.dart b/apps/firmware_updater/test/test_utils.dart index ace84b36..4b6c8483 100644 --- a/apps/firmware_updater/test/test_utils.dart +++ b/apps/firmware_updater/test/test_utils.dart @@ -1,5 +1,4 @@ -import 'package:firmware_updater/device_model.dart'; -import 'package:firmware_updater/device_store.dart'; +import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; import 'package:firmware_updater/services.dart'; import 'package:flutter/material.dart'; diff --git a/apps/firmware_updater/test/test_utils.mocks.dart b/apps/firmware_updater/test/test_utils.mocks.dart index 2dae19e2..32c88aa0 100644 --- a/apps/firmware_updater/test/test_utils.mocks.dart +++ b/apps/firmware_updater/test/test_utils.mocks.dart @@ -7,9 +7,9 @@ import 'dart:async' as _i4; import 'dart:io' as _i9; import 'dart:ui' as _i5; -import 'package:firmware_updater/device_model.dart' as _i3; -import 'package:firmware_updater/device_store.dart' as _i10; import 'package:firmware_updater/fwupd_notifier.dart' as _i6; +import 'package:firmware_updater/pages/device_model.dart' as _i3; +import 'package:firmware_updater/pages/device_store.dart' as _i10; import 'package:firmware_updater/services.dart' as _i8; import 'package:fwupd/fwupd.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; From df3c35bfa5ec7f0c5358beee4ebd48f8a345bd64 Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Fri, 15 Nov 2024 11:00:26 +0200 Subject: [PATCH 06/16] refactor: move device_tile into widgets --- apps/firmware_updater/lib/firmware_app.dart | 1 - apps/firmware_updater/lib/widgets.dart | 1 + apps/firmware_updater/lib/{ => widgets}/device_tile.dart | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename apps/firmware_updater/lib/{ => widgets}/device_tile.dart (100%) diff --git a/apps/firmware_updater/lib/firmware_app.dart b/apps/firmware_updater/lib/firmware_app.dart index 88a76f05..159e1983 100644 --- a/apps/firmware_updater/lib/firmware_app.dart +++ b/apps/firmware_updater/lib/firmware_app.dart @@ -1,5 +1,4 @@ import 'package:collection/collection.dart'; -import 'package:firmware_updater/device_tile.dart'; import 'package:firmware_updater/fwupd_l10n.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; import 'package:firmware_updater/pages.dart'; diff --git a/apps/firmware_updater/lib/widgets.dart b/apps/firmware_updater/lib/widgets.dart index 84eb0d43..54b0cf55 100644 --- a/apps/firmware_updater/lib/widgets.dart +++ b/apps/firmware_updater/lib/widgets.dart @@ -1,6 +1,7 @@ export 'widgets/app_progress_bar.dart'; export 'widgets/device_header.dart'; export 'widgets/device_icon.dart'; +export 'widgets/device_tile.dart'; export 'widgets/dialogs.dart'; export 'widgets/error_banner.dart'; export 'widgets/option_card.dart'; diff --git a/apps/firmware_updater/lib/device_tile.dart b/apps/firmware_updater/lib/widgets/device_tile.dart similarity index 100% rename from apps/firmware_updater/lib/device_tile.dart rename to apps/firmware_updater/lib/widgets/device_tile.dart From 235b3caf39fa1eb30b19cef48365f37e597b32fa Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Fri, 15 Nov 2024 11:21:01 +0200 Subject: [PATCH 07/16] refactor: move l10n/ out of src/ --- apps/firmware_updater/l10n.yaml | 2 +- apps/firmware_updater/lib/{src => }/l10n/app_am.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_ar.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_be.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_bg.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_bn.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_bo.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_bs.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_ca.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_cs.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_cy.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_da.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_de.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_dz.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_el.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_en.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_eo.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_es.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_et.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_eu.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_fa.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_fi.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_fr.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_ga.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_gl.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_gu.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_he.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_hi.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_hr.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_hu.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_id.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_is.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_it.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_ja.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_ka.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_kk.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_km.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_kn.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_ko.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_ku.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_lo.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_lt.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_lv.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_mk.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_ml.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_mr.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_my.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_nb.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_ne.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_nl.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_nn.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_oc.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_pa.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_pl.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_pt.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_pt_BR.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_ro.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_ru.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_se.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_si.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_sk.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_sl.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_sq.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_sr.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_sv.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_ta.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_te.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_tg.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_th.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_tl.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_tr.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_ug.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_uk.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_vi.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_zh.arb | 0 apps/firmware_updater/lib/{src => }/l10n/app_zh_TW.arb | 0 76 files changed, 1 insertion(+), 1 deletion(-) rename apps/firmware_updater/lib/{src => }/l10n/app_am.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_ar.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_be.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_bg.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_bn.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_bo.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_bs.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_ca.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_cs.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_cy.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_da.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_de.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_dz.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_el.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_en.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_eo.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_es.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_et.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_eu.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_fa.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_fi.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_fr.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_ga.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_gl.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_gu.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_he.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_hi.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_hr.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_hu.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_id.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_is.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_it.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_ja.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_ka.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_kk.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_km.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_kn.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_ko.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_ku.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_lo.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_lt.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_lv.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_mk.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_ml.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_mr.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_my.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_nb.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_ne.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_nl.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_nn.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_oc.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_pa.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_pl.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_pt.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_pt_BR.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_ro.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_ru.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_se.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_si.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_sk.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_sl.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_sq.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_sr.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_sv.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_ta.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_te.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_tg.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_th.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_tl.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_tr.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_ug.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_uk.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_vi.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_zh.arb (100%) rename apps/firmware_updater/lib/{src => }/l10n/app_zh_TW.arb (100%) diff --git a/apps/firmware_updater/l10n.yaml b/apps/firmware_updater/l10n.yaml index f49d6e7a..b1cc1414 100644 --- a/apps/firmware_updater/l10n.yaml +++ b/apps/firmware_updater/l10n.yaml @@ -1,4 +1,4 @@ -arb-dir: lib/src/l10n +arb-dir: lib/l10n template-arb-file: app_en.arb output-localization-file: app_localizations.dart nullable-getter: false diff --git a/apps/firmware_updater/lib/src/l10n/app_am.arb b/apps/firmware_updater/lib/l10n/app_am.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_am.arb rename to apps/firmware_updater/lib/l10n/app_am.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_ar.arb b/apps/firmware_updater/lib/l10n/app_ar.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_ar.arb rename to apps/firmware_updater/lib/l10n/app_ar.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_be.arb b/apps/firmware_updater/lib/l10n/app_be.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_be.arb rename to apps/firmware_updater/lib/l10n/app_be.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_bg.arb b/apps/firmware_updater/lib/l10n/app_bg.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_bg.arb rename to apps/firmware_updater/lib/l10n/app_bg.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_bn.arb b/apps/firmware_updater/lib/l10n/app_bn.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_bn.arb rename to apps/firmware_updater/lib/l10n/app_bn.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_bo.arb b/apps/firmware_updater/lib/l10n/app_bo.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_bo.arb rename to apps/firmware_updater/lib/l10n/app_bo.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_bs.arb b/apps/firmware_updater/lib/l10n/app_bs.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_bs.arb rename to apps/firmware_updater/lib/l10n/app_bs.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_ca.arb b/apps/firmware_updater/lib/l10n/app_ca.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_ca.arb rename to apps/firmware_updater/lib/l10n/app_ca.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_cs.arb b/apps/firmware_updater/lib/l10n/app_cs.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_cs.arb rename to apps/firmware_updater/lib/l10n/app_cs.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_cy.arb b/apps/firmware_updater/lib/l10n/app_cy.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_cy.arb rename to apps/firmware_updater/lib/l10n/app_cy.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_da.arb b/apps/firmware_updater/lib/l10n/app_da.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_da.arb rename to apps/firmware_updater/lib/l10n/app_da.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_de.arb b/apps/firmware_updater/lib/l10n/app_de.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_de.arb rename to apps/firmware_updater/lib/l10n/app_de.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_dz.arb b/apps/firmware_updater/lib/l10n/app_dz.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_dz.arb rename to apps/firmware_updater/lib/l10n/app_dz.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_el.arb b/apps/firmware_updater/lib/l10n/app_el.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_el.arb rename to apps/firmware_updater/lib/l10n/app_el.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_en.arb b/apps/firmware_updater/lib/l10n/app_en.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_en.arb rename to apps/firmware_updater/lib/l10n/app_en.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_eo.arb b/apps/firmware_updater/lib/l10n/app_eo.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_eo.arb rename to apps/firmware_updater/lib/l10n/app_eo.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_es.arb b/apps/firmware_updater/lib/l10n/app_es.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_es.arb rename to apps/firmware_updater/lib/l10n/app_es.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_et.arb b/apps/firmware_updater/lib/l10n/app_et.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_et.arb rename to apps/firmware_updater/lib/l10n/app_et.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_eu.arb b/apps/firmware_updater/lib/l10n/app_eu.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_eu.arb rename to apps/firmware_updater/lib/l10n/app_eu.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_fa.arb b/apps/firmware_updater/lib/l10n/app_fa.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_fa.arb rename to apps/firmware_updater/lib/l10n/app_fa.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_fi.arb b/apps/firmware_updater/lib/l10n/app_fi.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_fi.arb rename to apps/firmware_updater/lib/l10n/app_fi.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_fr.arb b/apps/firmware_updater/lib/l10n/app_fr.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_fr.arb rename to apps/firmware_updater/lib/l10n/app_fr.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_ga.arb b/apps/firmware_updater/lib/l10n/app_ga.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_ga.arb rename to apps/firmware_updater/lib/l10n/app_ga.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_gl.arb b/apps/firmware_updater/lib/l10n/app_gl.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_gl.arb rename to apps/firmware_updater/lib/l10n/app_gl.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_gu.arb b/apps/firmware_updater/lib/l10n/app_gu.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_gu.arb rename to apps/firmware_updater/lib/l10n/app_gu.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_he.arb b/apps/firmware_updater/lib/l10n/app_he.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_he.arb rename to apps/firmware_updater/lib/l10n/app_he.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_hi.arb b/apps/firmware_updater/lib/l10n/app_hi.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_hi.arb rename to apps/firmware_updater/lib/l10n/app_hi.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_hr.arb b/apps/firmware_updater/lib/l10n/app_hr.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_hr.arb rename to apps/firmware_updater/lib/l10n/app_hr.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_hu.arb b/apps/firmware_updater/lib/l10n/app_hu.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_hu.arb rename to apps/firmware_updater/lib/l10n/app_hu.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_id.arb b/apps/firmware_updater/lib/l10n/app_id.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_id.arb rename to apps/firmware_updater/lib/l10n/app_id.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_is.arb b/apps/firmware_updater/lib/l10n/app_is.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_is.arb rename to apps/firmware_updater/lib/l10n/app_is.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_it.arb b/apps/firmware_updater/lib/l10n/app_it.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_it.arb rename to apps/firmware_updater/lib/l10n/app_it.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_ja.arb b/apps/firmware_updater/lib/l10n/app_ja.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_ja.arb rename to apps/firmware_updater/lib/l10n/app_ja.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_ka.arb b/apps/firmware_updater/lib/l10n/app_ka.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_ka.arb rename to apps/firmware_updater/lib/l10n/app_ka.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_kk.arb b/apps/firmware_updater/lib/l10n/app_kk.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_kk.arb rename to apps/firmware_updater/lib/l10n/app_kk.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_km.arb b/apps/firmware_updater/lib/l10n/app_km.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_km.arb rename to apps/firmware_updater/lib/l10n/app_km.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_kn.arb b/apps/firmware_updater/lib/l10n/app_kn.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_kn.arb rename to apps/firmware_updater/lib/l10n/app_kn.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_ko.arb b/apps/firmware_updater/lib/l10n/app_ko.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_ko.arb rename to apps/firmware_updater/lib/l10n/app_ko.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_ku.arb b/apps/firmware_updater/lib/l10n/app_ku.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_ku.arb rename to apps/firmware_updater/lib/l10n/app_ku.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_lo.arb b/apps/firmware_updater/lib/l10n/app_lo.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_lo.arb rename to apps/firmware_updater/lib/l10n/app_lo.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_lt.arb b/apps/firmware_updater/lib/l10n/app_lt.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_lt.arb rename to apps/firmware_updater/lib/l10n/app_lt.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_lv.arb b/apps/firmware_updater/lib/l10n/app_lv.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_lv.arb rename to apps/firmware_updater/lib/l10n/app_lv.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_mk.arb b/apps/firmware_updater/lib/l10n/app_mk.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_mk.arb rename to apps/firmware_updater/lib/l10n/app_mk.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_ml.arb b/apps/firmware_updater/lib/l10n/app_ml.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_ml.arb rename to apps/firmware_updater/lib/l10n/app_ml.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_mr.arb b/apps/firmware_updater/lib/l10n/app_mr.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_mr.arb rename to apps/firmware_updater/lib/l10n/app_mr.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_my.arb b/apps/firmware_updater/lib/l10n/app_my.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_my.arb rename to apps/firmware_updater/lib/l10n/app_my.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_nb.arb b/apps/firmware_updater/lib/l10n/app_nb.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_nb.arb rename to apps/firmware_updater/lib/l10n/app_nb.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_ne.arb b/apps/firmware_updater/lib/l10n/app_ne.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_ne.arb rename to apps/firmware_updater/lib/l10n/app_ne.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_nl.arb b/apps/firmware_updater/lib/l10n/app_nl.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_nl.arb rename to apps/firmware_updater/lib/l10n/app_nl.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_nn.arb b/apps/firmware_updater/lib/l10n/app_nn.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_nn.arb rename to apps/firmware_updater/lib/l10n/app_nn.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_oc.arb b/apps/firmware_updater/lib/l10n/app_oc.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_oc.arb rename to apps/firmware_updater/lib/l10n/app_oc.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_pa.arb b/apps/firmware_updater/lib/l10n/app_pa.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_pa.arb rename to apps/firmware_updater/lib/l10n/app_pa.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_pl.arb b/apps/firmware_updater/lib/l10n/app_pl.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_pl.arb rename to apps/firmware_updater/lib/l10n/app_pl.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_pt.arb b/apps/firmware_updater/lib/l10n/app_pt.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_pt.arb rename to apps/firmware_updater/lib/l10n/app_pt.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_pt_BR.arb b/apps/firmware_updater/lib/l10n/app_pt_BR.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_pt_BR.arb rename to apps/firmware_updater/lib/l10n/app_pt_BR.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_ro.arb b/apps/firmware_updater/lib/l10n/app_ro.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_ro.arb rename to apps/firmware_updater/lib/l10n/app_ro.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_ru.arb b/apps/firmware_updater/lib/l10n/app_ru.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_ru.arb rename to apps/firmware_updater/lib/l10n/app_ru.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_se.arb b/apps/firmware_updater/lib/l10n/app_se.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_se.arb rename to apps/firmware_updater/lib/l10n/app_se.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_si.arb b/apps/firmware_updater/lib/l10n/app_si.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_si.arb rename to apps/firmware_updater/lib/l10n/app_si.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_sk.arb b/apps/firmware_updater/lib/l10n/app_sk.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_sk.arb rename to apps/firmware_updater/lib/l10n/app_sk.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_sl.arb b/apps/firmware_updater/lib/l10n/app_sl.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_sl.arb rename to apps/firmware_updater/lib/l10n/app_sl.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_sq.arb b/apps/firmware_updater/lib/l10n/app_sq.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_sq.arb rename to apps/firmware_updater/lib/l10n/app_sq.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_sr.arb b/apps/firmware_updater/lib/l10n/app_sr.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_sr.arb rename to apps/firmware_updater/lib/l10n/app_sr.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_sv.arb b/apps/firmware_updater/lib/l10n/app_sv.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_sv.arb rename to apps/firmware_updater/lib/l10n/app_sv.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_ta.arb b/apps/firmware_updater/lib/l10n/app_ta.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_ta.arb rename to apps/firmware_updater/lib/l10n/app_ta.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_te.arb b/apps/firmware_updater/lib/l10n/app_te.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_te.arb rename to apps/firmware_updater/lib/l10n/app_te.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_tg.arb b/apps/firmware_updater/lib/l10n/app_tg.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_tg.arb rename to apps/firmware_updater/lib/l10n/app_tg.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_th.arb b/apps/firmware_updater/lib/l10n/app_th.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_th.arb rename to apps/firmware_updater/lib/l10n/app_th.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_tl.arb b/apps/firmware_updater/lib/l10n/app_tl.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_tl.arb rename to apps/firmware_updater/lib/l10n/app_tl.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_tr.arb b/apps/firmware_updater/lib/l10n/app_tr.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_tr.arb rename to apps/firmware_updater/lib/l10n/app_tr.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_ug.arb b/apps/firmware_updater/lib/l10n/app_ug.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_ug.arb rename to apps/firmware_updater/lib/l10n/app_ug.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_uk.arb b/apps/firmware_updater/lib/l10n/app_uk.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_uk.arb rename to apps/firmware_updater/lib/l10n/app_uk.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_vi.arb b/apps/firmware_updater/lib/l10n/app_vi.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_vi.arb rename to apps/firmware_updater/lib/l10n/app_vi.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_zh.arb b/apps/firmware_updater/lib/l10n/app_zh.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_zh.arb rename to apps/firmware_updater/lib/l10n/app_zh.arb diff --git a/apps/firmware_updater/lib/src/l10n/app_zh_TW.arb b/apps/firmware_updater/lib/l10n/app_zh_TW.arb similarity index 100% rename from apps/firmware_updater/lib/src/l10n/app_zh_TW.arb rename to apps/firmware_updater/lib/l10n/app_zh_TW.arb From 9f052e0b51141793efdf60a64facfb7fda60a068 Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Fri, 15 Nov 2024 15:07:10 +0200 Subject: [PATCH 08/16] refactor: move l10n into dir --- apps/firmware_updater/lib/firmware_app.dart | 2 +- apps/firmware_updater/lib/l10n.dart | 1 + apps/firmware_updater/lib/{ => l10n}/fwupd_l10n.dart | 0 apps/firmware_updater/lib/pages/device_page.dart | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 apps/firmware_updater/lib/l10n.dart rename apps/firmware_updater/lib/{ => l10n}/fwupd_l10n.dart (100%) diff --git a/apps/firmware_updater/lib/firmware_app.dart b/apps/firmware_updater/lib/firmware_app.dart index 159e1983..bed95bb4 100644 --- a/apps/firmware_updater/lib/firmware_app.dart +++ b/apps/firmware_updater/lib/firmware_app.dart @@ -1,6 +1,6 @@ import 'package:collection/collection.dart'; -import 'package:firmware_updater/fwupd_l10n.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; +import 'package:firmware_updater/l10n.dart'; import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/services.dart'; import 'package:firmware_updater/widgets.dart'; diff --git a/apps/firmware_updater/lib/l10n.dart b/apps/firmware_updater/lib/l10n.dart new file mode 100644 index 00000000..20712e9e --- /dev/null +++ b/apps/firmware_updater/lib/l10n.dart @@ -0,0 +1 @@ +export 'l10n/fwupd_l10n.dart'; diff --git a/apps/firmware_updater/lib/fwupd_l10n.dart b/apps/firmware_updater/lib/l10n/fwupd_l10n.dart similarity index 100% rename from apps/firmware_updater/lib/fwupd_l10n.dart rename to apps/firmware_updater/lib/l10n/fwupd_l10n.dart diff --git a/apps/firmware_updater/lib/pages/device_page.dart b/apps/firmware_updater/lib/pages/device_page.dart index 1d912d87..ba4a9872 100644 --- a/apps/firmware_updater/lib/pages/device_page.dart +++ b/apps/firmware_updater/lib/pages/device_page.dart @@ -1,7 +1,7 @@ import 'package:collection/collection.dart'; -import 'package:firmware_updater/fwupd_l10n.dart'; import 'package:firmware_updater/fwupd_notifier.dart'; import 'package:firmware_updater/fwupd_x.dart'; +import 'package:firmware_updater/l10n.dart'; import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/widgets.dart'; import 'package:flutter/material.dart'; From d2cd9e6a118b7fd7b243bf92962424270b066e1c Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Fri, 15 Nov 2024 15:15:59 +0200 Subject: [PATCH 09/16] refactor: move remaining files into app dir --- .../firmware_updater_test.dart | 2 +- apps/firmware_updater/lib/app.dart | 3 + .../lib/{ => app}/firmware_app.dart | 2 +- .../lib/{ => app}/fwupd_notifier.dart | 0 .../lib/{ => app}/fwupd_x.dart | 0 apps/firmware_updater/lib/main.dart | 2 +- .../lib/pages/device_model.dart | 2 +- .../lib/pages/device_page.dart | 3 +- .../lib/pages/device_store.dart | 2 +- .../lib/pages/release_page.dart | 3 +- .../lib/services/fwupd_dbus_service.dart | 294 +++++++++--------- .../lib/widgets/release_card.dart | 2 +- .../test/device_page_test.dart | 2 +- .../test/firmware_app_test.dart | 5 +- .../test/fwupd_notifier_test.dart | 2 +- .../test/release_page_test.dart | 2 +- apps/firmware_updater/test/test_utils.dart | 2 +- .../test/test_utils.mocks.dart | 156 +++++----- 18 files changed, 242 insertions(+), 242 deletions(-) create mode 100644 apps/firmware_updater/lib/app.dart rename apps/firmware_updater/lib/{ => app}/firmware_app.dart (98%) rename apps/firmware_updater/lib/{ => app}/fwupd_notifier.dart (100%) rename apps/firmware_updater/lib/{ => app}/fwupd_x.dart (100%) diff --git a/apps/firmware_updater/integration_test/firmware_updater_test.dart b/apps/firmware_updater/integration_test/firmware_updater_test.dart index f8d0be2b..2ad55972 100644 --- a/apps/firmware_updater/integration_test/firmware_updater_test.dart +++ b/apps/firmware_updater/integration_test/firmware_updater_test.dart @@ -1,5 +1,5 @@ import 'package:collection/collection.dart'; -import 'package:firmware_updater/fwupd_x.dart'; +import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/main.dart' as app; import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/widgets.dart'; diff --git a/apps/firmware_updater/lib/app.dart b/apps/firmware_updater/lib/app.dart new file mode 100644 index 00000000..0919da63 --- /dev/null +++ b/apps/firmware_updater/lib/app.dart @@ -0,0 +1,3 @@ +export 'app/firmware_app.dart'; +export 'app/fwupd_notifier.dart'; +export 'app/fwupd_x.dart'; diff --git a/apps/firmware_updater/lib/firmware_app.dart b/apps/firmware_updater/lib/app/firmware_app.dart similarity index 98% rename from apps/firmware_updater/lib/firmware_app.dart rename to apps/firmware_updater/lib/app/firmware_app.dart index bed95bb4..459271e7 100644 --- a/apps/firmware_updater/lib/firmware_app.dart +++ b/apps/firmware_updater/lib/app/firmware_app.dart @@ -1,5 +1,5 @@ import 'package:collection/collection.dart'; -import 'package:firmware_updater/fwupd_notifier.dart'; +import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/l10n.dart'; import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/services.dart'; diff --git a/apps/firmware_updater/lib/fwupd_notifier.dart b/apps/firmware_updater/lib/app/fwupd_notifier.dart similarity index 100% rename from apps/firmware_updater/lib/fwupd_notifier.dart rename to apps/firmware_updater/lib/app/fwupd_notifier.dart diff --git a/apps/firmware_updater/lib/fwupd_x.dart b/apps/firmware_updater/lib/app/fwupd_x.dart similarity index 100% rename from apps/firmware_updater/lib/fwupd_x.dart rename to apps/firmware_updater/lib/app/fwupd_x.dart diff --git a/apps/firmware_updater/lib/main.dart b/apps/firmware_updater/lib/main.dart index 7d06c1d7..090d29d8 100644 --- a/apps/firmware_updater/lib/main.dart +++ b/apps/firmware_updater/lib/main.dart @@ -1,6 +1,6 @@ import 'dart:io'; -import 'package:firmware_updater/firmware_app.dart'; +import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/services.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; diff --git a/apps/firmware_updater/lib/pages/device_model.dart b/apps/firmware_updater/lib/pages/device_model.dart index b619414b..a22806f8 100644 --- a/apps/firmware_updater/lib/pages/device_model.dart +++ b/apps/firmware_updater/lib/pages/device_model.dart @@ -1,7 +1,7 @@ import 'dart:async'; import 'package:collection/collection.dart'; -import 'package:firmware_updater/fwupd_x.dart'; +import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/services.dart'; import 'package:fwupd/fwupd.dart'; import 'package:safe_change_notifier/safe_change_notifier.dart'; diff --git a/apps/firmware_updater/lib/pages/device_page.dart b/apps/firmware_updater/lib/pages/device_page.dart index ba4a9872..8eca1c01 100644 --- a/apps/firmware_updater/lib/pages/device_page.dart +++ b/apps/firmware_updater/lib/pages/device_page.dart @@ -1,6 +1,5 @@ import 'package:collection/collection.dart'; -import 'package:firmware_updater/fwupd_notifier.dart'; -import 'package:firmware_updater/fwupd_x.dart'; +import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/l10n.dart'; import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/widgets.dart'; diff --git a/apps/firmware_updater/lib/pages/device_store.dart b/apps/firmware_updater/lib/pages/device_store.dart index 7b49295b..fd843c97 100644 --- a/apps/firmware_updater/lib/pages/device_store.dart +++ b/apps/firmware_updater/lib/pages/device_store.dart @@ -1,6 +1,6 @@ import 'dart:async'; -import 'package:firmware_updater/fwupd_x.dart'; +import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/services.dart'; import 'package:fwupd/fwupd.dart'; import 'package:safe_change_notifier/safe_change_notifier.dart'; diff --git a/apps/firmware_updater/lib/pages/release_page.dart b/apps/firmware_updater/lib/pages/release_page.dart index 4745cdd3..e2243899 100644 --- a/apps/firmware_updater/lib/pages/release_page.dart +++ b/apps/firmware_updater/lib/pages/release_page.dart @@ -1,5 +1,4 @@ -import 'package:firmware_updater/fwupd_notifier.dart'; -import 'package:firmware_updater/fwupd_x.dart'; +import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/widgets/release_card.dart'; import 'package:flutter/material.dart'; diff --git a/apps/firmware_updater/lib/services/fwupd_dbus_service.dart b/apps/firmware_updater/lib/services/fwupd_dbus_service.dart index affd37f7..e390195b 100644 --- a/apps/firmware_updater/lib/services/fwupd_dbus_service.dart +++ b/apps/firmware_updater/lib/services/fwupd_dbus_service.dart @@ -6,8 +6,8 @@ import 'package:dbus/dbus.dart'; import 'package:dio/dio.dart'; import 'package:file/file.dart'; import 'package:file/local.dart'; +import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/services.dart'; -import 'package:firmware_updater/fwupd_x.dart'; import 'package:fwupd/fwupd.dart'; import 'package:meta/meta.dart'; import 'package:path/path.dart' as p; @@ -17,6 +17,25 @@ import 'package:upower/upower.dart'; final log = Logger('fwupd_service'); class FwupdDbusService extends FwupdService { + final Dio _dio; + + final FileSystem _fs; + final FwupdClient _fwupd; + final UPowerClient _upower; + final DBusClient _dbus; + final String _localeName; + final Map _env; + final Future Function(String, List) _runProcess; + int? _downloadProgress; + final _propertiesChanged = StreamController>(); + StreamSubscription>? _fwupdPropertiesSubscription; + StreamSubscription>? _upowerPropertiesSubscription; + late String _userAgent; + + Function(Exception)? _errorListener; + + Future Function()? _confirmationListener; + FwupdDbusService({ @visibleForTesting FwupdClient? fwupd, @visibleForTesting Dio? dio, @@ -35,35 +54,11 @@ class FwupdDbusService extends FwupdService { _localeName = localeName ?? Platform.localeName, _env = env ?? Platform.environment, _runProcess = runProcess ?? Process.run; - - final Dio _dio; - final FileSystem _fs; - final FwupdClient _fwupd; - final UPowerClient _upower; - final DBusClient _dbus; - final String _localeName; - final Map _env; - final Future Function(String, List) _runProcess; - int? _downloadProgress; - final _propertiesChanged = StreamController>(); - StreamSubscription>? _fwupdPropertiesSubscription; - StreamSubscription>? _upowerPropertiesSubscription; - - late String _userAgent; - - @visibleForTesting - String get userAgent => _userAgent; - - @override - FwupdStatus get status => - _downloadProgress != null ? FwupdStatus.downloading : _fwupd.status; - @override - int get percentage => _downloadProgress ?? _fwupd.percentage; @override String get daemonVersion => _fwupd.daemonVersion; - @override Stream get deviceAdded => _fwupd.deviceAdded; + @override Stream get deviceChanged => _fwupd.deviceChanged; @override @@ -71,122 +66,18 @@ class FwupdDbusService extends FwupdService { @override Stream get deviceRequest => _fwupd.deviceRequest; @override - Stream> get propertiesChanged => _propertiesChanged.stream; - - Function(Exception)? _errorListener; - Future Function()? _confirmationListener; - - @override - void registerErrorListener(Function(Exception e) errorListener) { - _errorListener = errorListener; - } - - @override - void registerConfirmationListener( - Future Function() confirmationListener, - ) { - _confirmationListener = confirmationListener; - } - + bool get onBattery => _upower.onBattery; @override - Future init() async { - await _fwupd.connect(); - _fwupdPropertiesSubscription ??= - _fwupd.propertiesChanged.listen(_propertiesChanged.add); - await _upower.connect(); - _upowerPropertiesSubscription ??= - _upower.propertiesChanged.listen(_propertiesChanged.add); - _propertiesChanged.add(['OnBattery']); - _userAgent = await _generateUserAgent(); - } + int get percentage => _downloadProgress ?? _fwupd.percentage; @override - Future dispose() async { - _dio.close(); - await _fwupdPropertiesSubscription?.cancel(); - await _upowerPropertiesSubscription?.cancel(); - await _upower.close(); - return _fwupd.close(); - } - + Stream> get propertiesChanged => _propertiesChanged.stream; @override - Future refreshProperties() => _fwupd.refreshPropertyCache(); - - Future _generateUserAgent() async { - const releaseFilePath = '/etc/lsb-release'; - final parsedLocale = _localeName.split('.').first.replaceFirst('_', '-'); - final snapName = _env['SNAP_NAME'] ?? 'firmware-updater'; - final snapVersion = _env['SNAP_VERSION'] ?? 'dev'; - final lsbRelease = - await _fs.file(releaseFilePath).readAsLines().onError((error, _) { - log.error('Could not read $releaseFilePath: $error'); - return []; - }).then( - (lines) => lines - .singleWhereOrNull( - (line) => line.startsWith('DISTRIB_DESCRIPTION'), - ) - ?.split('=') - .last - .replaceAll('"', ''), - ) ?? - 'Unknown Distribution'; - final uname = await _runProcess('uname', ['-smr']).then((result) { - final fields = (result.stdout as String).trim().split(' '); - if (result.exitCode != 0 || fields.length != 3) return null; - return '${fields[0]} ${fields[2]} ${fields[1]}'; - }) ?? - 'Linux'; - - return '$snapName/$snapVersion ($uname; $parsedLocale; $lsbRelease) fwupd/$daemonVersion'; - } - - Future _fetchRelease(FwupdRelease release) async { - final remote = await _fwupd.getRemotes().then((remotes) { - return remotes.firstWhere((remote) => remote.id == release.remoteId); - }); - - assert(release.locations.isNotEmpty, 'TODO: handle multiple locations'); - - late final File file; - switch (remote.kind) { - case FwupdRemoteKind.download: - // TODO: - // - should the .cab be stored in the cache directory? - file = await _downloadRelease(release.locations.first); - break; - case FwupdRemoteKind.local: - final cache = p.dirname(remote.filenameCache ?? ''); - file = _fs.file(p.join(cache, release.locations.first)); - break; - default: - throw UnimplementedError('Remote kind ${remote.kind} not implemented'); - } - return file; - } - - Future _downloadRelease(String url) async { - final path = p.join(_fs.systemTempDirectory.path, p.basename(url)); - log.debug('download $url to $path'); - try { - return await _dio.download( - url, - path, - onReceiveProgress: (recvd, total) { - _setDownloadProgress(100 * recvd ~/ total); - }, - options: Options(headers: {HttpHeaders.userAgentHeader: _userAgent}), - ).then((response) => _fs.file(path)); - } finally { - _setDownloadProgress(null); - } - } + FwupdStatus get status => + _downloadProgress != null ? FwupdStatus.downloading : _fwupd.status; - void _setDownloadProgress(int? progress) { - if (_downloadProgress == progress) return; - _downloadProgress = progress; - _propertiesChanged.add(['Percentage']); - } + @visibleForTesting + String get userAgent => _userAgent; @override Future activate(FwupdDevice device) { @@ -200,6 +91,15 @@ class FwupdDbusService extends FwupdService { return _fwupd.clearResults(device.id); } + @override + Future dispose() async { + _dio.close(); + await _fwupdPropertiesSubscription?.cancel(); + await _upowerPropertiesSubscription?.cancel(); + await _upower.close(); + return _fwupd.close(); + } + @override Future> getDevices() => _fwupd.getDevices(); @@ -224,6 +124,18 @@ class FwupdDbusService extends FwupdService { return _fwupd.getUpgrades(device.id); } + @override + Future init() async { + await _fwupd.connect(); + _fwupdPropertiesSubscription ??= + _fwupd.propertiesChanged.listen(_propertiesChanged.add); + await _upower.connect(); + _upowerPropertiesSubscription ??= + _upower.propertiesChanged.listen(_propertiesChanged.add); + _propertiesChanged.add(['OnBattery']); + _userAgent = await _generateUserAgent(); + } + @override Future install( FwupdDevice device, @@ -255,7 +167,29 @@ class FwupdDbusService extends FwupdService { } @override - bool get onBattery => _upower.onBattery; + Future reboot() => _dbus.callMethod( + destination: 'org.freedesktop.login1', + path: DBusObjectPath('/org/freedesktop/login1'), + interface: 'org.freedesktop.login1.Manager', + name: 'Reboot', + values: [const DBusBoolean(true)], + replySignature: DBusSignature(''), + ); + + @override + Future refreshProperties() => _fwupd.refreshPropertyCache(); + + @override + void registerConfirmationListener( + Future Function() confirmationListener, + ) { + _confirmationListener = confirmationListener; + } + + @override + void registerErrorListener(Function(Exception e) errorListener) { + _errorListener = errorListener; + } @override Future unlock(FwupdDevice device) { @@ -275,13 +209,79 @@ class FwupdDbusService extends FwupdService { return _fwupd.verifyUpdate(device.id); } - @override - Future reboot() => _dbus.callMethod( - destination: 'org.freedesktop.login1', - path: DBusObjectPath('/org/freedesktop/login1'), - interface: 'org.freedesktop.login1.Manager', - name: 'Reboot', - values: [const DBusBoolean(true)], - replySignature: DBusSignature(''), - ); + Future _downloadRelease(String url) async { + final path = p.join(_fs.systemTempDirectory.path, p.basename(url)); + log.debug('download $url to $path'); + try { + return await _dio.download( + url, + path, + onReceiveProgress: (recvd, total) { + _setDownloadProgress(100 * recvd ~/ total); + }, + options: Options(headers: {HttpHeaders.userAgentHeader: _userAgent}), + ).then((response) => _fs.file(path)); + } finally { + _setDownloadProgress(null); + } + } + + Future _fetchRelease(FwupdRelease release) async { + final remote = await _fwupd.getRemotes().then((remotes) { + return remotes.firstWhere((remote) => remote.id == release.remoteId); + }); + + assert(release.locations.isNotEmpty, 'TODO: handle multiple locations'); + + late final File file; + switch (remote.kind) { + case FwupdRemoteKind.download: + // TODO: + // - should the .cab be stored in the cache directory? + file = await _downloadRelease(release.locations.first); + break; + case FwupdRemoteKind.local: + final cache = p.dirname(remote.filenameCache ?? ''); + file = _fs.file(p.join(cache, release.locations.first)); + break; + default: + throw UnimplementedError('Remote kind ${remote.kind} not implemented'); + } + return file; + } + + Future _generateUserAgent() async { + const releaseFilePath = '/etc/lsb-release'; + final parsedLocale = _localeName.split('.').first.replaceFirst('_', '-'); + final snapName = _env['SNAP_NAME'] ?? 'firmware-updater'; + final snapVersion = _env['SNAP_VERSION'] ?? 'dev'; + final lsbRelease = + await _fs.file(releaseFilePath).readAsLines().onError((error, _) { + log.error('Could not read $releaseFilePath: $error'); + return []; + }).then( + (lines) => lines + .singleWhereOrNull( + (line) => line.startsWith('DISTRIB_DESCRIPTION'), + ) + ?.split('=') + .last + .replaceAll('"', ''), + ) ?? + 'Unknown Distribution'; + final uname = await _runProcess('uname', ['-smr']).then((result) { + final fields = (result.stdout as String).trim().split(' '); + if (result.exitCode != 0 || fields.length != 3) return null; + return '${fields[0]} ${fields[2]} ${fields[1]}'; + }) ?? + 'Linux'; + + return '$snapName/$snapVersion ($uname; $parsedLocale; $lsbRelease) fwupd/$daemonVersion'; + } + + void _setDownloadProgress(int? progress) { + if (_downloadProgress == progress) return; + _downloadProgress = progress; + _propertiesChanged.add(['Percentage']); + } } diff --git a/apps/firmware_updater/lib/widgets/release_card.dart b/apps/firmware_updater/lib/widgets/release_card.dart index 9aa39fa3..61d5d2d2 100644 --- a/apps/firmware_updater/lib/widgets/release_card.dart +++ b/apps/firmware_updater/lib/widgets/release_card.dart @@ -1,4 +1,4 @@ -import 'package:firmware_updater/fwupd_x.dart'; +import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; diff --git a/apps/firmware_updater/test/device_page_test.dart b/apps/firmware_updater/test/device_page_test.dart index afaf4a1e..bb6e1985 100644 --- a/apps/firmware_updater/test/device_page_test.dart +++ b/apps/firmware_updater/test/device_page_test.dart @@ -1,4 +1,4 @@ -import 'package:firmware_updater/fwupd_notifier.dart'; +import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/pages.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/apps/firmware_updater/test/firmware_app_test.dart b/apps/firmware_updater/test/firmware_app_test.dart index 86e1b2f5..76cb4e30 100644 --- a/apps/firmware_updater/test/firmware_app_test.dart +++ b/apps/firmware_updater/test/firmware_app_test.dart @@ -1,6 +1,5 @@ -import 'package:firmware_updater/firmware_app.dart'; -import 'package:firmware_updater/fwupd_l10n.dart'; -import 'package:firmware_updater/fwupd_notifier.dart'; +import 'package:firmware_updater/app.dart'; +import 'package:firmware_updater/l10n.dart'; import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/services.dart'; import 'package:flutter/material.dart'; diff --git a/apps/firmware_updater/test/fwupd_notifier_test.dart b/apps/firmware_updater/test/fwupd_notifier_test.dart index b4a44d76..f7412792 100644 --- a/apps/firmware_updater/test/fwupd_notifier_test.dart +++ b/apps/firmware_updater/test/fwupd_notifier_test.dart @@ -2,7 +2,7 @@ import 'dart:async'; -import 'package:firmware_updater/fwupd_notifier.dart'; +import 'package:firmware_updater/app.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:fwupd/fwupd.dart'; import 'package:mockito/mockito.dart'; diff --git a/apps/firmware_updater/test/release_page_test.dart b/apps/firmware_updater/test/release_page_test.dart index fdfd0642..c47b8455 100644 --- a/apps/firmware_updater/test/release_page_test.dart +++ b/apps/firmware_updater/test/release_page_test.dart @@ -1,4 +1,4 @@ -import 'package:firmware_updater/fwupd_notifier.dart'; +import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/pages.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/apps/firmware_updater/test/test_utils.dart b/apps/firmware_updater/test/test_utils.dart index 4b6c8483..027f71b8 100644 --- a/apps/firmware_updater/test/test_utils.dart +++ b/apps/firmware_updater/test/test_utils.dart @@ -1,5 +1,5 @@ +import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/pages.dart'; -import 'package:firmware_updater/fwupd_notifier.dart'; import 'package:firmware_updater/services.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; diff --git a/apps/firmware_updater/test/test_utils.mocks.dart b/apps/firmware_updater/test/test_utils.mocks.dart index 32c88aa0..59f9c27b 100644 --- a/apps/firmware_updater/test/test_utils.mocks.dart +++ b/apps/firmware_updater/test/test_utils.mocks.dart @@ -7,7 +7,7 @@ import 'dart:async' as _i4; import 'dart:io' as _i9; import 'dart:ui' as _i5; -import 'package:firmware_updater/fwupd_notifier.dart' as _i6; +import 'package:firmware_updater/app.dart' as _i6; import 'package:firmware_updater/pages/device_model.dart' as _i3; import 'package:firmware_updater/pages/device_store.dart' as _i10; import 'package:firmware_updater/services.dart' as _i8; @@ -312,27 +312,6 @@ class MockFwupdDbusService extends _i1.Mock implements _i8.FwupdDbusService { _i1.throwOnMissingStub(this); } - @override - String get userAgent => (super.noSuchMethod( - Invocation.getter(#userAgent), - returnValue: _i7.dummyValue( - this, - Invocation.getter(#userAgent), - ), - ) as String); - - @override - _i2.FwupdStatus get status => (super.noSuchMethod( - Invocation.getter(#status), - returnValue: _i2.FwupdStatus.unknown, - ) as _i2.FwupdStatus); - - @override - int get percentage => (super.noSuchMethod( - Invocation.getter(#percentage), - returnValue: 0, - ) as int); - @override String get daemonVersion => (super.noSuchMethod( Invocation.getter(#daemonVersion), @@ -366,12 +345,6 @@ class MockFwupdDbusService extends _i1.Mock implements _i8.FwupdDbusService { returnValue: _i4.Stream<_i2.FwupdDevice>.empty(), ) as _i4.Stream<_i2.FwupdDevice>); - @override - _i4.Stream> get propertiesChanged => (super.noSuchMethod( - Invocation.getter(#propertiesChanged), - returnValue: _i4.Stream>.empty(), - ) as _i4.Stream>); - @override bool get onBattery => (super.noSuchMethod( Invocation.getter(#onBattery), @@ -379,60 +352,46 @@ class MockFwupdDbusService extends _i1.Mock implements _i8.FwupdDbusService { ) as bool); @override - void registerErrorListener(dynamic Function(Exception)? errorListener) => - super.noSuchMethod( - Invocation.method( - #registerErrorListener, - [errorListener], - ), - returnValueForMissingStub: null, - ); + int get percentage => (super.noSuchMethod( + Invocation.getter(#percentage), + returnValue: 0, + ) as int); @override - void registerConfirmationListener( - _i4.Future Function()? confirmationListener) => - super.noSuchMethod( - Invocation.method( - #registerConfirmationListener, - [confirmationListener], - ), - returnValueForMissingStub: null, - ); + _i4.Stream> get propertiesChanged => (super.noSuchMethod( + Invocation.getter(#propertiesChanged), + returnValue: _i4.Stream>.empty(), + ) as _i4.Stream>); @override - _i4.Future init() => (super.noSuchMethod( - Invocation.method( - #init, - [], - ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + _i2.FwupdStatus get status => (super.noSuchMethod( + Invocation.getter(#status), + returnValue: _i2.FwupdStatus.unknown, + ) as _i2.FwupdStatus); @override - _i4.Future dispose() => (super.noSuchMethod( - Invocation.method( - #dispose, - [], + String get userAgent => (super.noSuchMethod( + Invocation.getter(#userAgent), + returnValue: _i7.dummyValue( + this, + Invocation.getter(#userAgent), ), - returnValue: _i4.Future.value(), - returnValueForMissingStub: _i4.Future.value(), - ) as _i4.Future); + ) as String); @override - _i4.Future refreshProperties() => (super.noSuchMethod( + _i4.Future activate(_i2.FwupdDevice? device) => (super.noSuchMethod( Invocation.method( - #refreshProperties, - [], + #activate, + [device], ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @override - _i4.Future activate(_i2.FwupdDevice? device) => (super.noSuchMethod( + _i4.Future clearResults(_i2.FwupdDevice? device) => (super.noSuchMethod( Invocation.method( - #activate, + #clearResults, [device], ), returnValue: _i4.Future.value(), @@ -440,10 +399,10 @@ class MockFwupdDbusService extends _i1.Mock implements _i8.FwupdDbusService { ) as _i4.Future); @override - _i4.Future clearResults(_i2.FwupdDevice? device) => (super.noSuchMethod( + _i4.Future dispose() => (super.noSuchMethod( Invocation.method( - #clearResults, - [device], + #dispose, + [], ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), @@ -512,6 +471,16 @@ class MockFwupdDbusService extends _i1.Mock implements _i8.FwupdDbusService { _i4.Future>.value(<_i2.FwupdRelease>[]), ) as _i4.Future>); + @override + _i4.Future init() => (super.noSuchMethod( + Invocation.method( + #init, + [], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + @override _i4.Future install( _i2.FwupdDevice? device, @@ -532,19 +501,50 @@ class MockFwupdDbusService extends _i1.Mock implements _i8.FwupdDbusService { ) as _i4.Future); @override - _i4.Future unlock(_i2.FwupdDevice? device) => (super.noSuchMethod( + _i4.Future reboot() => (super.noSuchMethod( Invocation.method( - #unlock, - [device], + #reboot, + [], ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), ) as _i4.Future); @override - _i4.Future verify(_i2.FwupdDevice? device) => (super.noSuchMethod( + _i4.Future refreshProperties() => (super.noSuchMethod( Invocation.method( - #verify, + #refreshProperties, + [], + ), + returnValue: _i4.Future.value(), + returnValueForMissingStub: _i4.Future.value(), + ) as _i4.Future); + + @override + void registerConfirmationListener( + _i4.Future Function()? confirmationListener) => + super.noSuchMethod( + Invocation.method( + #registerConfirmationListener, + [confirmationListener], + ), + returnValueForMissingStub: null, + ); + + @override + void registerErrorListener(dynamic Function(Exception)? errorListener) => + super.noSuchMethod( + Invocation.method( + #registerErrorListener, + [errorListener], + ), + returnValueForMissingStub: null, + ); + + @override + _i4.Future unlock(_i2.FwupdDevice? device) => (super.noSuchMethod( + Invocation.method( + #unlock, [device], ), returnValue: _i4.Future.value(), @@ -552,9 +552,9 @@ class MockFwupdDbusService extends _i1.Mock implements _i8.FwupdDbusService { ) as _i4.Future); @override - _i4.Future verifyUpdate(_i2.FwupdDevice? device) => (super.noSuchMethod( + _i4.Future verify(_i2.FwupdDevice? device) => (super.noSuchMethod( Invocation.method( - #verifyUpdate, + #verify, [device], ), returnValue: _i4.Future.value(), @@ -562,10 +562,10 @@ class MockFwupdDbusService extends _i1.Mock implements _i8.FwupdDbusService { ) as _i4.Future); @override - _i4.Future reboot() => (super.noSuchMethod( + _i4.Future verifyUpdate(_i2.FwupdDevice? device) => (super.noSuchMethod( Invocation.method( - #reboot, - [], + #verifyUpdate, + [device], ), returnValue: _i4.Future.value(), returnValueForMissingStub: _i4.Future.value(), From e3713967bbae9017166213f39072f860158f5164 Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Fri, 15 Nov 2024 15:27:10 +0200 Subject: [PATCH 10/16] refactor: lints and formatting --- .../lib/pages/device_model.dart | 4 ++- .../lib/pages/device_page.dart | 2 +- .../lib/pages/device_store.dart | 3 +- apps/firmware_updater/lib/services.dart | 2 +- .../lib/services/fwupd_dbus_service.dart | 36 +++++++++---------- 5 files changed, 25 insertions(+), 22 deletions(-) diff --git a/apps/firmware_updater/lib/pages/device_model.dart b/apps/firmware_updater/lib/pages/device_model.dart index a22806f8..cf5e956b 100644 --- a/apps/firmware_updater/lib/pages/device_model.dart +++ b/apps/firmware_updater/lib/pages/device_model.dart @@ -7,12 +7,12 @@ import 'package:fwupd/fwupd.dart'; import 'package:safe_change_notifier/safe_change_notifier.dart'; class DeviceModel extends SafeChangeNotifier { + DeviceModel(this._device, this._service); final FwupdService _service; FwupdDevice _device; List? _releases; StreamSubscription? _sub; - DeviceModel(this._device, this._service); FwupdDevice get device => _device; @@ -30,6 +30,7 @@ class DeviceModel extends SafeChangeNotifier { await _sub?.cancel(); super.dispose(); } + FwupdRelease? findRelease(String? version) => releases?.singleWhereOrNull((r) => r.version == version); @@ -47,6 +48,7 @@ class DeviceModel extends SafeChangeNotifier { _releases = await _fetchReleases(); notifyListeners(); } + Future verify() => _service.verify(_device); Future verifyUpdate() => _service.verifyUpdate(_device); diff --git a/apps/firmware_updater/lib/pages/device_page.dart b/apps/firmware_updater/lib/pages/device_page.dart index 8eca1c01..7790a04f 100644 --- a/apps/firmware_updater/lib/pages/device_page.dart +++ b/apps/firmware_updater/lib/pages/device_page.dart @@ -10,9 +10,9 @@ import 'package:provider/provider.dart'; import 'package:yaru/yaru.dart'; class DevicePage extends StatelessWidget { - final NavigatorState? parentNavigator; const DevicePage({super.key, this.parentNavigator}); + final NavigatorState? parentNavigator; @override Widget build(BuildContext context) { diff --git a/apps/firmware_updater/lib/pages/device_store.dart b/apps/firmware_updater/lib/pages/device_store.dart index fd843c97..f62ad6b1 100644 --- a/apps/firmware_updater/lib/pages/device_store.dart +++ b/apps/firmware_updater/lib/pages/device_store.dart @@ -9,13 +9,13 @@ import 'package:ubuntu_logger/ubuntu_logger.dart'; final log = Logger('device_store'); class DeviceStore extends SafeChangeNotifier { + DeviceStore(this._service); final FwupdService _service; var _devices = []; StreamSubscription? _deviceAdded; StreamSubscription? _deviceRemoved; bool _showReleases = false; - DeviceStore(this._service); List get devices => _devices; bool get showReleases => _showReleases; @@ -25,6 +25,7 @@ class DeviceStore extends SafeChangeNotifier { _showReleases = value; notifyListeners(); } + @override Future dispose() async { await _deviceAdded?.cancel(); diff --git a/apps/firmware_updater/lib/services.dart b/apps/firmware_updater/lib/services.dart index d454f256..b8ce879a 100644 --- a/apps/firmware_updater/lib/services.dart +++ b/apps/firmware_updater/lib/services.dart @@ -1,5 +1,5 @@ export 'package:ubuntu_service/ubuntu_service.dart'; export 'services/fwupd_dbus_service.dart'; -export 'services/fwupd_service.dart'; export 'services/fwupd_mock_service.dart' hide log; +export 'services/fwupd_service.dart'; diff --git a/apps/firmware_updater/lib/services/fwupd_dbus_service.dart b/apps/firmware_updater/lib/services/fwupd_dbus_service.dart index e390195b..bbdc68d6 100644 --- a/apps/firmware_updater/lib/services/fwupd_dbus_service.dart +++ b/apps/firmware_updater/lib/services/fwupd_dbus_service.dart @@ -17,24 +17,6 @@ import 'package:upower/upower.dart'; final log = Logger('fwupd_service'); class FwupdDbusService extends FwupdService { - final Dio _dio; - - final FileSystem _fs; - final FwupdClient _fwupd; - final UPowerClient _upower; - final DBusClient _dbus; - final String _localeName; - final Map _env; - final Future Function(String, List) _runProcess; - int? _downloadProgress; - final _propertiesChanged = StreamController>(); - StreamSubscription>? _fwupdPropertiesSubscription; - StreamSubscription>? _upowerPropertiesSubscription; - late String _userAgent; - - Function(Exception)? _errorListener; - - Future Function()? _confirmationListener; FwupdDbusService({ @visibleForTesting FwupdClient? fwupd, @@ -54,6 +36,24 @@ class FwupdDbusService extends FwupdService { _localeName = localeName ?? Platform.localeName, _env = env ?? Platform.environment, _runProcess = runProcess ?? Process.run; + final Dio _dio; + + final FileSystem _fs; + final FwupdClient _fwupd; + final UPowerClient _upower; + final DBusClient _dbus; + final String _localeName; + final Map _env; + final Future Function(String, List) _runProcess; + int? _downloadProgress; + final _propertiesChanged = StreamController>(); + StreamSubscription>? _fwupdPropertiesSubscription; + StreamSubscription>? _upowerPropertiesSubscription; + late String _userAgent; + + Function(Exception)? _errorListener; + + Future Function()? _confirmationListener; @override String get daemonVersion => _fwupd.daemonVersion; @override From df54acf5e193d6a20ad9fba6e1941e00c8a06db6 Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Fri, 15 Nov 2024 15:30:27 +0200 Subject: [PATCH 11/16] ci: updating integration test path --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 93e340a0..68a67746 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -104,6 +104,6 @@ jobs: - name: Run integration tests run: | - cd packages/firmware_updater && \ + cd apps/firmware_updater && \ sudo -E env PATH=$PATH xvfb-run -a -s '-screen 0 1024x768x24 +extension GLX' \ flutter test integration_test From 3f6a4136d42baad9ccc894467619a1974631a9e6 Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Mon, 18 Nov 2024 16:00:16 +0200 Subject: [PATCH 12/16] refactor: moving fwupd_x into services/ --- .../integration_test/firmware_updater_test.dart | 3 +-- apps/firmware_updater/lib/app.dart | 1 - apps/firmware_updater/lib/pages/device_model.dart | 1 - apps/firmware_updater/lib/pages/device_page.dart | 1 + apps/firmware_updater/lib/pages/device_store.dart | 1 - apps/firmware_updater/lib/pages/release_page.dart | 1 + apps/firmware_updater/lib/services.dart | 1 + apps/firmware_updater/lib/services/fwupd_dbus_service.dart | 1 - apps/firmware_updater/lib/{app => services}/fwupd_x.dart | 0 apps/firmware_updater/lib/widgets/release_card.dart | 2 +- 10 files changed, 5 insertions(+), 7 deletions(-) rename apps/firmware_updater/lib/{app => services}/fwupd_x.dart (100%) diff --git a/apps/firmware_updater/integration_test/firmware_updater_test.dart b/apps/firmware_updater/integration_test/firmware_updater_test.dart index 2ad55972..ea350e83 100644 --- a/apps/firmware_updater/integration_test/firmware_updater_test.dart +++ b/apps/firmware_updater/integration_test/firmware_updater_test.dart @@ -1,13 +1,12 @@ import 'package:collection/collection.dart'; -import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/main.dart' as app; import 'package:firmware_updater/pages.dart'; +import 'package:firmware_updater/services.dart'; import 'package:firmware_updater/widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:fwupd/fwupd.dart'; import 'package:integration_test/integration_test.dart'; -import 'package:ubuntu_service/ubuntu_service.dart'; import 'package:ubuntu_test/ubuntu_test.dart'; import 'package:yaru/yaru.dart'; diff --git a/apps/firmware_updater/lib/app.dart b/apps/firmware_updater/lib/app.dart index 0919da63..d7a2a80c 100644 --- a/apps/firmware_updater/lib/app.dart +++ b/apps/firmware_updater/lib/app.dart @@ -1,3 +1,2 @@ export 'app/firmware_app.dart'; export 'app/fwupd_notifier.dart'; -export 'app/fwupd_x.dart'; diff --git a/apps/firmware_updater/lib/pages/device_model.dart b/apps/firmware_updater/lib/pages/device_model.dart index cf5e956b..78c0daab 100644 --- a/apps/firmware_updater/lib/pages/device_model.dart +++ b/apps/firmware_updater/lib/pages/device_model.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'package:collection/collection.dart'; -import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/services.dart'; import 'package:fwupd/fwupd.dart'; import 'package:safe_change_notifier/safe_change_notifier.dart'; diff --git a/apps/firmware_updater/lib/pages/device_page.dart b/apps/firmware_updater/lib/pages/device_page.dart index 7790a04f..59591d88 100644 --- a/apps/firmware_updater/lib/pages/device_page.dart +++ b/apps/firmware_updater/lib/pages/device_page.dart @@ -2,6 +2,7 @@ import 'package:collection/collection.dart'; import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/l10n.dart'; import 'package:firmware_updater/pages.dart'; +import 'package:firmware_updater/services.dart'; import 'package:firmware_updater/widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; diff --git a/apps/firmware_updater/lib/pages/device_store.dart b/apps/firmware_updater/lib/pages/device_store.dart index f62ad6b1..d37e801b 100644 --- a/apps/firmware_updater/lib/pages/device_store.dart +++ b/apps/firmware_updater/lib/pages/device_store.dart @@ -1,6 +1,5 @@ import 'dart:async'; -import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/services.dart'; import 'package:fwupd/fwupd.dart'; import 'package:safe_change_notifier/safe_change_notifier.dart'; diff --git a/apps/firmware_updater/lib/pages/release_page.dart b/apps/firmware_updater/lib/pages/release_page.dart index e2243899..1c187563 100644 --- a/apps/firmware_updater/lib/pages/release_page.dart +++ b/apps/firmware_updater/lib/pages/release_page.dart @@ -1,5 +1,6 @@ import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/pages.dart'; +import 'package:firmware_updater/services.dart'; import 'package:firmware_updater/widgets/release_card.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; diff --git a/apps/firmware_updater/lib/services.dart b/apps/firmware_updater/lib/services.dart index b8ce879a..e2d1b8fd 100644 --- a/apps/firmware_updater/lib/services.dart +++ b/apps/firmware_updater/lib/services.dart @@ -3,3 +3,4 @@ export 'package:ubuntu_service/ubuntu_service.dart'; export 'services/fwupd_dbus_service.dart'; export 'services/fwupd_mock_service.dart' hide log; export 'services/fwupd_service.dart'; +export 'services/fwupd_x.dart'; diff --git a/apps/firmware_updater/lib/services/fwupd_dbus_service.dart b/apps/firmware_updater/lib/services/fwupd_dbus_service.dart index bbdc68d6..a78550d1 100644 --- a/apps/firmware_updater/lib/services/fwupd_dbus_service.dart +++ b/apps/firmware_updater/lib/services/fwupd_dbus_service.dart @@ -6,7 +6,6 @@ import 'package:dbus/dbus.dart'; import 'package:dio/dio.dart'; import 'package:file/file.dart'; import 'package:file/local.dart'; -import 'package:firmware_updater/app.dart'; import 'package:firmware_updater/services.dart'; import 'package:fwupd/fwupd.dart'; import 'package:meta/meta.dart'; diff --git a/apps/firmware_updater/lib/app/fwupd_x.dart b/apps/firmware_updater/lib/services/fwupd_x.dart similarity index 100% rename from apps/firmware_updater/lib/app/fwupd_x.dart rename to apps/firmware_updater/lib/services/fwupd_x.dart diff --git a/apps/firmware_updater/lib/widgets/release_card.dart b/apps/firmware_updater/lib/widgets/release_card.dart index 61d5d2d2..dc2d27e5 100644 --- a/apps/firmware_updater/lib/widgets/release_card.dart +++ b/apps/firmware_updater/lib/widgets/release_card.dart @@ -1,4 +1,4 @@ -import 'package:firmware_updater/app.dart'; +import 'package:firmware_updater/services.dart'; import 'package:firmware_updater/widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; From b8421f83126f2960d3456cd007c4ff1d130b2af6 Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Mon, 18 Nov 2024 16:04:26 +0200 Subject: [PATCH 13/16] refactor: moving fwupd_110n into widgets/ --- apps/firmware_updater/lib/app/firmware_app.dart | 1 - apps/firmware_updater/lib/l10n.dart | 1 - apps/firmware_updater/lib/pages/device_page.dart | 1 - apps/firmware_updater/lib/widgets.dart | 1 + apps/firmware_updater/lib/{l10n => widgets}/fwupd_l10n.dart | 0 apps/firmware_updater/test/firmware_app_test.dart | 2 +- 6 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 apps/firmware_updater/lib/l10n.dart rename apps/firmware_updater/lib/{l10n => widgets}/fwupd_l10n.dart (100%) diff --git a/apps/firmware_updater/lib/app/firmware_app.dart b/apps/firmware_updater/lib/app/firmware_app.dart index 459271e7..42bca028 100644 --- a/apps/firmware_updater/lib/app/firmware_app.dart +++ b/apps/firmware_updater/lib/app/firmware_app.dart @@ -1,6 +1,5 @@ import 'package:collection/collection.dart'; import 'package:firmware_updater/app.dart'; -import 'package:firmware_updater/l10n.dart'; import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/services.dart'; import 'package:firmware_updater/widgets.dart'; diff --git a/apps/firmware_updater/lib/l10n.dart b/apps/firmware_updater/lib/l10n.dart deleted file mode 100644 index 20712e9e..00000000 --- a/apps/firmware_updater/lib/l10n.dart +++ /dev/null @@ -1 +0,0 @@ -export 'l10n/fwupd_l10n.dart'; diff --git a/apps/firmware_updater/lib/pages/device_page.dart b/apps/firmware_updater/lib/pages/device_page.dart index 59591d88..99aa56ca 100644 --- a/apps/firmware_updater/lib/pages/device_page.dart +++ b/apps/firmware_updater/lib/pages/device_page.dart @@ -1,6 +1,5 @@ import 'package:collection/collection.dart'; import 'package:firmware_updater/app.dart'; -import 'package:firmware_updater/l10n.dart'; import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/services.dart'; import 'package:firmware_updater/widgets.dart'; diff --git a/apps/firmware_updater/lib/widgets.dart b/apps/firmware_updater/lib/widgets.dart index 54b0cf55..9be8162e 100644 --- a/apps/firmware_updater/lib/widgets.dart +++ b/apps/firmware_updater/lib/widgets.dart @@ -4,6 +4,7 @@ export 'widgets/device_icon.dart'; export 'widgets/device_tile.dart'; export 'widgets/dialogs.dart'; export 'widgets/error_banner.dart'; +export 'widgets/fwupd_l10n.dart'; export 'widgets/option_card.dart'; export 'widgets/refresh_button.dart'; export 'widgets/release_card.dart'; diff --git a/apps/firmware_updater/lib/l10n/fwupd_l10n.dart b/apps/firmware_updater/lib/widgets/fwupd_l10n.dart similarity index 100% rename from apps/firmware_updater/lib/l10n/fwupd_l10n.dart rename to apps/firmware_updater/lib/widgets/fwupd_l10n.dart diff --git a/apps/firmware_updater/test/firmware_app_test.dart b/apps/firmware_updater/test/firmware_app_test.dart index 76cb4e30..d97c828f 100644 --- a/apps/firmware_updater/test/firmware_app_test.dart +++ b/apps/firmware_updater/test/firmware_app_test.dart @@ -1,7 +1,7 @@ import 'package:firmware_updater/app.dart'; -import 'package:firmware_updater/l10n.dart'; import 'package:firmware_updater/pages.dart'; import 'package:firmware_updater/services.dart'; +import 'package:firmware_updater/widgets.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:fwupd/fwupd.dart'; From ced4e7fbe9b9e3bff0bb0f50367ad9aad82330e7 Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Mon, 18 Nov 2024 16:06:31 +0200 Subject: [PATCH 14/16] refactor: commiting pubspec.yaml files --- .gitignore | 1 - apps/firmware_notifier/pubspec.lock | 618 +++++++++++++++ apps/firmware_updater/pubspec.lock | 1108 +++++++++++++++++++++++++++ pubspec.lock | 325 ++++++++ 4 files changed, 2051 insertions(+), 1 deletion(-) create mode 100644 apps/firmware_notifier/pubspec.lock create mode 100644 apps/firmware_updater/pubspec.lock create mode 100644 pubspec.lock diff --git a/.gitignore b/.gitignore index aaa9f3a2..58a99d39 100644 --- a/.gitignore +++ b/.gitignore @@ -31,7 +31,6 @@ .pub/ */**/build/ /coverage/ -pubspec.lock # Linux related generated_plugin_registrant.* diff --git a/apps/firmware_notifier/pubspec.lock b/apps/firmware_notifier/pubspec.lock new file mode 100644 index 00000000..1d3991bd --- /dev/null +++ b/apps/firmware_notifier/pubspec.lock @@ -0,0 +1,618 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "45cfa8471b89fb6643fe9bf51bd7931a76b8f5ec2d65de4fb176dba8d4f22c77" + url: "https://pub.dev" + source: hosted + version: "73.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.2" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "4959fec185fe70cce007c57e9ab6983101dbe593d2bf8bbfb4453aaec0cf470a" + url: "https://pub.dev" + source: hosted + version: "6.8.0" + args: + dependency: transitive + description: + name: args + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + url: "https://pub.dev" + source: hosted + version: "2.6.0" + async: + dependency: transitive + description: + name: async + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://pub.dev" + source: hosted + version: "2.12.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d" + url: "https://pub.dev" + source: hosted + version: "2.4.13" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 + url: "https://pub.dev" + source: hosted + version: "7.3.2" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" + url: "https://pub.dev" + source: hosted + version: "4.10.1" + collection: + dependency: "direct main" + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + coverage: + dependency: transitive + description: + name: coverage + sha256: "4b03e11f6d5b8f6e5bb5e9f7889a56fe6c5cbe942da5378ea4d4d7f73ef9dfe5" + url: "https://pub.dev" + source: hosted + version: "1.11.0" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" + url: "https://pub.dev" + source: hosted + version: "2.3.7" + dbus: + dependency: "direct main" + description: + name: dbus + sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" + url: "https://pub.dev" + source: hosted + version: "0.7.10" + desktop_notifications: + dependency: "direct main" + description: + name: desktop_notifications + sha256: "6d92694ad6e9297a862c5ff7dd6b8ff64c819972557754769f819d2209612927" + url: "https://pub.dev" + source: hosted + version: "0.6.3" + ffi: + dependency: transitive + description: + name: ffi + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter_lints: + dependency: transitive + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + fwupd: + dependency: "direct main" + description: + name: fwupd + sha256: "2a1d0200b03524bddb940592cb4da542dd86f0bbd678e0346a0eb2ded59f638c" + url: "https://pub.dev" + source: hosted + version: "0.2.2" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "76d306a1c3afb33fe82e2bbacad62a61f409b5634c915fceb0d799de1a913360" + url: "https://pub.dev" + source: hosted + version: "4.1.1" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + js: + dependency: transitive + description: + name: js + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.dev" + source: hosted + version: "0.7.1" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + lints: + dependency: transitive + description: + name: lints + sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + macros: + dependency: transitive + description: + name: macros + sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + url: "https://pub.dev" + source: hosted + version: "0.1.2-main.4" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + meta: + dependency: "direct main" + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + mockito: + dependency: "direct dev" + description: + name: mockito + sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" + url: "https://pub.dev" + source: hosted + version: "5.4.4" + node_preamble: + dependency: transitive + description: + name: node_preamble + sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" + url: "https://pub.dev" + source: hosted + version: "2.0.2" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.dev" + source: hosted + version: "6.0.2" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 + url: "https://pub.dev" + source: hosted + version: "1.4.2" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + shelf_static: + dependency: transitive + description: + name: shelf_static + sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 + url: "https://pub.dev" + source: hosted + version: "1.1.3" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b + url: "https://pub.dev" + source: hosted + version: "2.1.2" + source_maps: + dependency: transitive + description: + name: source_maps + sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703" + url: "https://pub.dev" + source: hosted + version: "0.10.12" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" + url: "https://pub.dev" + source: hosted + version: "1.12.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "0bd04f5bb74fcd6ff0606a888a30e917af9bd52820b178eaa464beb11dca84b6" + url: "https://pub.dev" + source: hosted + version: "1.4.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test: + dependency: "direct dev" + description: + name: test + sha256: "713a8789d62f3233c46b4a90b174737b2c04cb6ae4500f2aa8b1be8f03f5e67f" + url: "https://pub.dev" + source: hosted + version: "1.25.8" + test_api: + dependency: transitive + description: + name: test_api + sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" + url: "https://pub.dev" + source: hosted + version: "0.7.3" + test_core: + dependency: transitive + description: + name: test_core + sha256: "12391302411737c176b0b5d6491f466b0dd56d4763e347b6714efbaa74d7953d" + url: "https://pub.dev" + source: hosted + version: "0.6.5" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + ubuntu_lints: + dependency: "direct dev" + description: + name: ubuntu_lints + sha256: "10057f0c4fbd8e5962d030ed1ef24d99a35d1f79a2ca40197333b081b33856fa" + url: "https://pub.dev" + source: hosted + version: "0.4.1" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + url: "https://pub.dev" + source: hosted + version: "14.3.1" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" + url: "https://pub.dev" + source: hosted + version: "1.2.1" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" + source: hosted + version: "6.5.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.5.0 <4.0.0" diff --git a/apps/firmware_updater/pubspec.lock b/apps/firmware_updater/pubspec.lock new file mode 100644 index 00000000..e64f63f9 --- /dev/null +++ b/apps/firmware_updater/pubspec.lock @@ -0,0 +1,1108 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 + url: "https://pub.dev" + source: hosted + version: "72.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.2" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 + url: "https://pub.dev" + source: hosted + version: "6.7.0" + animated_vector: + dependency: transitive + description: + name: animated_vector + sha256: f1beb10e6fcfd8bd15abb788e20345def786d1c7391d7c1426bb2a1f2adf2132 + url: "https://pub.dev" + source: hosted + version: "0.2.2" + animated_vector_annotations: + dependency: transitive + description: + name: animated_vector_annotations + sha256: "07c1ea603a2096f7eb6f1c2b8f16c3c330c680843ea78b7782a3217c3c53f979" + url: "https://pub.dev" + source: hosted + version: "0.2.2" + archive: + dependency: transitive + description: + name: archive + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + url: "https://pub.dev" + source: hosted + version: "3.6.1" + args: + dependency: transitive + description: + name: args + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + url: "https://pub.dev" + source: hosted + version: "2.6.0" + assorted_layout_widgets: + dependency: transitive + description: + name: assorted_layout_widgets + sha256: "5b7f7c76a1a4c7cf95edfb854c3ed09ce9cb7f25a372f2d9a8d4c1569d42ecfb" + url: "https://pub.dev" + source: hosted + version: "9.0.2" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d" + url: "https://pub.dev" + source: hosted + version: "2.4.13" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "30859c90e9ddaccc484f56303931f477b1f1ba2bab74aa32ed5d6ce15870f8cf" + url: "https://pub.dev" + source: hosted + version: "7.2.8" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" + url: "https://pub.dev" + source: hosted + version: "4.10.1" + collection: + dependency: "direct main" + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + csslib: + dependency: transitive + description: + name: csslib + sha256: "831883fb353c8bdc1d71979e5b342c7d88acfbc643113c14ae51e2442ea0f20f" + url: "https://pub.dev" + source: hosted + version: "0.17.3" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" + url: "https://pub.dev" + source: hosted + version: "2.3.7" + dbus: + dependency: "direct main" + description: + name: dbus + sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" + url: "https://pub.dev" + source: hosted + version: "0.7.10" + diacritic: + dependency: transitive + description: + name: diacritic + sha256: "12981945ec38931748836cd76f2b38773118d0baef3c68404bdfde9566147876" + url: "https://pub.dev" + source: hosted + version: "0.1.6" + dio: + dependency: "direct main" + description: + name: dio + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" + url: "https://pub.dev" + source: hosted + version: "5.7.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + file: + dependency: "direct main" + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_driver: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_html: + dependency: "direct main" + description: + name: flutter_html + sha256: "02ad69e813ecfc0728a455e4bf892b9379983e050722b1dce00192ee2e41d1ee" + url: "https://pub.dev" + source: hosted + version: "3.0.0-beta.2" + flutter_lints: + dependency: transitive + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_localizations: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_markdown: + dependency: transitive + description: + name: flutter_markdown + sha256: f0e599ba89c9946c8e051780f0ec99aba4ba15895e0380a7ab68f420046fc44e + url: "https://pub.dev" + source: hosted + version: "0.7.4+1" + flutter_svg: + dependency: transitive + description: + name: flutter_svg + sha256: "578bd8c508144fdaffd4f77b8ef2d8c523602275cd697cc3db284dbd762ef4ce" + url: "https://pub.dev" + source: hosted + version: "2.0.14" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + freezed: + dependency: "direct dev" + description: + name: freezed + sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e" + url: "https://pub.dev" + source: hosted + version: "2.5.7" + freezed_annotation: + dependency: "direct main" + description: + name: freezed_annotation + sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 + url: "https://pub.dev" + source: hosted + version: "2.4.4" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + fuchsia_remote_debug_protocol: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + fwupd: + dependency: "direct main" + description: + path: "." + ref: refresh-property-cache + resolved-ref: "22f96d558fb3b72b682758a7b55f39002cd217c2" + url: "https://github.com/d-loose/fwupd.dart" + source: git + version: "0.2.2" + get_it: + dependency: transitive + description: + name: get_it + sha256: d85128a5dae4ea777324730dc65edd9c9f43155c109d5cc0a69cab74139fbac1 + url: "https://pub.dev" + source: hosted + version: "7.7.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + gsettings: + dependency: transitive + description: + name: gsettings + sha256: "1b0ce661f5436d2db1e51f3c4295a49849f03d304003a7ba177d01e3a858249c" + url: "https://pub.dev" + source: hosted + version: "0.2.8" + gtk: + dependency: "direct main" + description: + name: gtk + sha256: e8ce9ca4b1df106e4d72dad201d345ea1a036cc12c360f1a7d5a758f78ffa42c + url: "https://pub.dev" + source: hosted + version: "2.1.0" + handy_window: + dependency: "direct main" + description: + name: handy_window + sha256: "56b813e58a68b0ee2ab22051400b8b1f1b5cfe88b8cd32288623defb3926245a" + url: "https://pub.dev" + source: hosted + version: "0.4.0" + html: + dependency: transitive + description: + name: html + sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a" + url: "https://pub.dev" + source: hosted + version: "0.15.4" + http: + dependency: transitive + description: + name: http + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + image: + dependency: transitive + description: + name: image + sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d + url: "https://pub.dev" + source: hosted + version: "4.3.0" + integration_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + intl: + dependency: transitive + description: + name: intl + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + url: "https://pub.dev" + source: hosted + version: "0.19.0" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + js: + dependency: transitive + description: + name: js + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.dev" + source: hosted + version: "0.7.1" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + list_counter: + dependency: transitive + description: + name: list_counter + sha256: c447ae3dfcd1c55f0152867090e67e219d42fe6d4f2807db4bbe8b8d69912237 + url: "https://pub.dev" + source: hosted + version: "1.0.2" + logging: + dependency: transitive + description: + name: logging + sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + logging_appenders: + dependency: transitive + description: + name: logging_appenders + sha256: c2ea00fb779a81e995943f1e3e6e6969d463de3882d134d78ad58e76f2b6f1b1 + url: "https://pub.dev" + source: hosted + version: "1.0.2" + macros: + dependency: transitive + description: + name: macros + sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + url: "https://pub.dev" + source: hosted + version: "0.1.2-main.4" + markdown: + dependency: transitive + description: + name: markdown + sha256: ef2a1298144e3f985cc736b22e0ccdaf188b5b3970648f2d9dc13efd1d9df051 + url: "https://pub.dev" + source: hosted + version: "7.2.2" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + matrix4_transform: + dependency: transitive + description: + name: matrix4_transform + sha256: "42c42610deecc382be2653f4a21358537401bd5b027c168a174c7c6a64959908" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + meta: + dependency: "direct main" + description: + name: meta + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + mockito: + dependency: "direct dev" + description: + name: mockito + sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" + url: "https://pub.dev" + source: hosted + version: "5.4.4" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + path: + dependency: "direct main" + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.dev" + source: hosted + version: "6.0.2" + platform: + dependency: transitive + description: + name: platform + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + url: "https://pub.dev" + source: hosted + version: "3.1.5" + platform_linux: + dependency: transitive + description: + name: platform_linux + sha256: "856cfc9871e3ff3df6926991729d24bba9b70d0229ae377fa08b562344baaaa8" + url: "https://pub.dev" + source: hosted + version: "0.1.2" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + process: + dependency: transitive + description: + name: process + sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" + url: "https://pub.dev" + source: hosted + version: "5.0.2" + provider: + dependency: "direct main" + description: + name: provider + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c + url: "https://pub.dev" + source: hosted + version: "6.1.2" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + safe_change_notifier: + dependency: "direct main" + description: + name: safe_change_notifier + sha256: e7cce266bfede647355866fa3bd054feda57c220d2383f4203f28d4dcdb3b82e + url: "https://pub.dev" + source: hosted + version: "0.4.0" + screen_retriever: + dependency: transitive + description: + name: screen_retriever + sha256: "570dbc8e4f70bac451e0efc9c9bb19fa2d6799a11e6ef04f946d7886d2e23d0c" + url: "https://pub.dev" + source: hosted + version: "0.2.0" + screen_retriever_linux: + dependency: transitive + description: + name: screen_retriever_linux + sha256: f7f8120c92ef0784e58491ab664d01efda79a922b025ff286e29aa123ea3dd18 + url: "https://pub.dev" + source: hosted + version: "0.2.0" + screen_retriever_macos: + dependency: transitive + description: + name: screen_retriever_macos + sha256: "71f956e65c97315dd661d71f828708bd97b6d358e776f1a30d5aa7d22d78a149" + url: "https://pub.dev" + source: hosted + version: "0.2.0" + screen_retriever_platform_interface: + dependency: transitive + description: + name: screen_retriever_platform_interface + sha256: ee197f4581ff0d5608587819af40490748e1e39e648d7680ecf95c05197240c0 + url: "https://pub.dev" + source: hosted + version: "0.2.0" + screen_retriever_windows: + dependency: transitive + description: + name: screen_retriever_windows + sha256: "449ee257f03ca98a57288ee526a301a430a344a161f9202b4fcc38576716fe13" + url: "https://pub.dev" + source: hosted + version: "0.2.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + state_notifier: + dependency: transitive + description: + name: state_notifier + sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb + url: "https://pub.dev" + source: hosted + version: "1.0.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + sync_http: + dependency: transitive + description: + name: sync_http + sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + ubuntu_lints: + dependency: "direct dev" + description: + name: ubuntu_lints + sha256: "10057f0c4fbd8e5962d030ed1ef24d99a35d1f79a2ca40197333b081b33856fa" + url: "https://pub.dev" + source: hosted + version: "0.4.1" + ubuntu_localizations: + dependency: transitive + description: + name: ubuntu_localizations + sha256: "4c0f1df29fd469aa306d50932d5c2529bc3765233d580e5c162755560b9c4991" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + ubuntu_logger: + dependency: "direct main" + description: + name: ubuntu_logger + sha256: f657ca1a3d041845723af66c49fa92381008558d75939f223cc36ff1317b2292 + url: "https://pub.dev" + source: hosted + version: "0.2.0" + ubuntu_service: + dependency: "direct main" + description: + name: ubuntu_service + sha256: af850c8927c97ba49749c262654fe84833c8f1d80b641016c8f72a18d2191379 + url: "https://pub.dev" + source: hosted + version: "0.4.0" + ubuntu_test: + dependency: "direct main" + description: + name: ubuntu_test + sha256: "617ab8343bf57d9a7a9d9ceae7599b8ae67100afab16f539fdb870aed4f21e23" + url: "https://pub.dev" + source: hosted + version: "0.2.2" + upower: + dependency: "direct main" + description: + name: upower + sha256: cf042403154751180affa1d15614db7fa50234bc2373cd21c3db666c38543ebf + url: "https://pub.dev" + source: hosted + version: "0.7.0" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "773c9522d66d523e1c7b25dfb95cc91c26a1e17b107039cfe147285e92de7878" + url: "https://pub.dev" + source: hosted + version: "1.1.14" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "2430b973a4ca3c4dbc9999b62b8c719a160100dcbae5c819bae0cacce32c9cdb" + url: "https://pub.dev" + source: hosted + version: "1.1.12" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: ab9ff38fc771e9ee1139320adbe3d18a60327370c218c60752068ebee4b49ab1 + url: "https://pub.dev" + source: hosted + version: "1.1.15" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + url: "https://pub.dev" + source: hosted + version: "14.2.5" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + webdriver: + dependency: transitive + description: + name: webdriver + sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" + url: "https://pub.dev" + source: hosted + version: "3.0.3" + window_manager: + dependency: transitive + description: + name: window_manager + sha256: "732896e1416297c63c9e3fb95aea72d0355f61390263982a47fd519169dc5059" + url: "https://pub.dev" + source: hosted + version: "0.4.3" + xdg_directories: + dependency: "direct main" + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" + source: hosted + version: "6.5.0" + yaml: + dependency: "direct main" + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" + yaru: + dependency: "direct main" + description: + name: yaru + sha256: afc659f78a0bef5e06ebbbd516979afceca7526b7703daa444bf419a54b2dc85 + url: "https://pub.dev" + source: hosted + version: "5.3.2" + yaru_test: + dependency: transitive + description: + name: yaru_test + sha256: d45f0099db88e997e69218d232fd27d9c024a4fe4d918371b3012b3b95b8e419 + url: "https://pub.dev" + source: hosted + version: "0.2.0" + yaru_window: + dependency: transitive + description: + name: yaru_window + sha256: bc2a1df3c6f33477b47f84bf0a9325df411dbb7bd483ac88e5bc1c019d2f2560 + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + yaru_window_linux: + dependency: transitive + description: + name: yaru_window_linux + sha256: "46a1a0743dfd45794cdaf8c5b3a48771ab73632b50a693f59c83b07988e96689" + url: "https://pub.dev" + source: hosted + version: "0.2.1" + yaru_window_manager: + dependency: transitive + description: + name: yaru_window_manager + sha256: b36c909fa082a7cb6e2f259d4357e16f08d3d8ab086685b81d1916e457100d1e + url: "https://pub.dev" + source: hosted + version: "0.1.2+1" + yaru_window_platform_interface: + dependency: transitive + description: + name: yaru_window_platform_interface + sha256: "93493d7e17a9e887ffa94c518bc5a4b3eb5425c009446e3294c689cb1a87b7e1" + url: "https://pub.dev" + source: hosted + version: "0.1.2+1" + yaru_window_web: + dependency: transitive + description: + name: yaru_window_web + sha256: "31468aeb515f72d5eeddcd62773094a4f48fee96f7f0494f8ce53ad3b38054f1" + url: "https://pub.dev" + source: hosted + version: "0.0.3+1" +sdks: + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.24.3" diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 00000000..56a60c18 --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,325 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + ansi_styles: + dependency: transitive + description: + name: ansi_styles + sha256: "9c656cc12b3c27b17dd982b2cc5c0cfdfbdabd7bc8f3ae5e8542d9867b47ce8a" + url: "https://pub.dev" + source: hosted + version: "0.3.2+1" + args: + dependency: transitive + description: + name: args + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + url: "https://pub.dev" + source: hosted + version: "2.6.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + url: "https://pub.dev" + source: hosted + version: "1.3.1" + cli_launcher: + dependency: transitive + description: + name: cli_launcher + sha256: "5e7e0282b79e8642edd6510ee468ae2976d847a0a29b3916e85f5fa1bfe24005" + url: "https://pub.dev" + source: hosted + version: "0.3.1" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + url: "https://pub.dev" + source: hosted + version: "0.4.1" + collection: + dependency: transitive + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + conventional_commit: + dependency: transitive + description: + name: conventional_commit + sha256: dec15ad1118f029c618651a4359eb9135d8b88f761aa24e4016d061cd45948f2 + url: "https://pub.dev" + source: hosted + version: "0.6.0+1" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" + http: + dependency: transitive + description: + name: http + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + melos: + dependency: "direct dev" + description: + name: melos + sha256: a0cb264096a315e4acdb66ae75ee594a76c97fe15ce9ae469f6c58c6c4b2be87 + url: "https://pub.dev" + source: hosted + version: "5.3.0" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + mustache_template: + dependency: transitive + description: + name: mustache_template + sha256: a46e26f91445bfb0b60519be280555b06792460b27b19e2b19ad5b9740df5d1c + url: "https://pub.dev" + source: hosted + version: "2.0.0" + path: + dependency: transitive + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + process: + dependency: transitive + description: + name: process + sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" + url: "https://pub.dev" + source: hosted + version: "5.0.3" + prompts: + dependency: transitive + description: + name: prompts + sha256: "3773b845e85a849f01e793c4fc18a45d52d7783b4cb6c0569fad19f9d0a774a1" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pub_updater: + dependency: transitive + description: + name: pub_updater + sha256: "54e8dc865349059ebe7f163d6acce7c89eb958b8047e6d6e80ce93b13d7c9e60" + url: "https://pub.dev" + source: hosted + version: "0.4.0" + pubspec: + dependency: transitive + description: + name: pubspec + sha256: f534a50a2b4d48dc3bc0ec147c8bd7c304280fff23b153f3f11803c4d49d927e + url: "https://pub.dev" + source: hosted + version: "2.3.0" + quiver: + dependency: transitive + description: + name: quiver + sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2 + url: "https://pub.dev" + source: hosted + version: "3.2.2" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "0bd04f5bb74fcd6ff0606a888a30e917af9bd52820b178eaa464beb11dca84b6" + url: "https://pub.dev" + source: hosted + version: "1.4.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + url: "https://pub.dev" + source: hosted + version: "0.7.2" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + uri: + dependency: transitive + description: + name: uri + sha256: "889eea21e953187c6099802b7b4cf5219ba8f3518f604a1033064d45b1b8268a" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" + yaml_edit: + dependency: transitive + description: + name: yaml_edit + sha256: e9c1a3543d2da0db3e90270dbb1e4eebc985ee5e3ffe468d83224472b2194a5f + url: "https://pub.dev" + source: hosted + version: "2.2.1" +sdks: + dart: ">=3.3.0 <4.0.0" From d1027b74dc520f842440fde6fed8c435588c02ad Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Mon, 18 Nov 2024 16:06:59 +0200 Subject: [PATCH 15/16] style: run the formatter --- apps/firmware_updater/lib/pages/device_page.dart | 1 - apps/firmware_updater/lib/services/fwupd_dbus_service.dart | 1 - 2 files changed, 2 deletions(-) diff --git a/apps/firmware_updater/lib/pages/device_page.dart b/apps/firmware_updater/lib/pages/device_page.dart index 99aa56ca..8fdff352 100644 --- a/apps/firmware_updater/lib/pages/device_page.dart +++ b/apps/firmware_updater/lib/pages/device_page.dart @@ -10,7 +10,6 @@ import 'package:provider/provider.dart'; import 'package:yaru/yaru.dart'; class DevicePage extends StatelessWidget { - const DevicePage({super.key, this.parentNavigator}); final NavigatorState? parentNavigator; diff --git a/apps/firmware_updater/lib/services/fwupd_dbus_service.dart b/apps/firmware_updater/lib/services/fwupd_dbus_service.dart index a78550d1..21239fe2 100644 --- a/apps/firmware_updater/lib/services/fwupd_dbus_service.dart +++ b/apps/firmware_updater/lib/services/fwupd_dbus_service.dart @@ -16,7 +16,6 @@ import 'package:upower/upower.dart'; final log = Logger('fwupd_service'); class FwupdDbusService extends FwupdService { - FwupdDbusService({ @visibleForTesting FwupdClient? fwupd, @visibleForTesting Dio? dio, From 071f6147fb32979ab736586af2430b2c2ac88df7 Mon Sep 17 00:00:00 2001 From: Matthew Hagemann Date: Mon, 18 Nov 2024 16:24:32 +0200 Subject: [PATCH 16/16] chore: regenerate the mocks --- apps/firmware_updater/test/test_utils.mocks.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/firmware_updater/test/test_utils.mocks.dart b/apps/firmware_updater/test/test_utils.mocks.dart index 59f9c27b..2306a568 100644 --- a/apps/firmware_updater/test/test_utils.mocks.dart +++ b/apps/firmware_updater/test/test_utils.mocks.dart @@ -7,7 +7,7 @@ import 'dart:async' as _i4; import 'dart:io' as _i9; import 'dart:ui' as _i5; -import 'package:firmware_updater/app.dart' as _i6; +import 'package:firmware_updater/app/fwupd_notifier.dart' as _i6; import 'package:firmware_updater/pages/device_model.dart' as _i3; import 'package:firmware_updater/pages/device_store.dart' as _i10; import 'package:firmware_updater/services.dart' as _i8;