diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 13aa39272..89c646d0a 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -86,9 +86,10 @@ "deviceConnected": "Device Connected Successfully", "noDeviceFound": "No USB Device Found", "stepsToConnectTitle": "Steps to connect the PSLab Device", - "step1ConnectMicroUsb": "1. Connect a micro USB(Mini B) to PSLab", - "step2ConnectOtg": "2. Connect the other end of the micro USB cable to a OTG", - "step3ConnectPhone": "3. Connect the OTG to the phone", + "step1ConnectMicroUsb": "1. Connect a USB cable to PSLab.", + "step2ConnectOtg": "2. Connect the other end of the USB cable to an OTG.", + "step3ConnectPhone": "3. Connect the OTG to the phone.", + "step4ConnectWireless": "4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.", "bluetoothWifiConnection": "Connect using Bluetooth or Wi-Fi", "bluetooth": "Bluetooth", "wifi": "Wi-Fi", diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart index 575a052fc..1e7d78ab2 100644 --- a/lib/l10n/app_localizations.dart +++ b/lib/l10n/app_localizations.dart @@ -643,21 +643,27 @@ abstract class AppLocalizations { /// No description provided for @step1ConnectMicroUsb. /// /// In en, this message translates to: - /// **'1. Connect a micro USB(Mini B) to PSLab'** + /// **'1. Connect a USB cable to PSLab.'** String get step1ConnectMicroUsb; /// No description provided for @step2ConnectOtg. /// /// In en, this message translates to: - /// **'2. Connect the other end of the micro USB cable to a OTG'** + /// **'2. Connect the other end of the USB cable to an OTG.'** String get step2ConnectOtg; /// No description provided for @step3ConnectPhone. /// /// In en, this message translates to: - /// **'3. Connect the OTG to the phone'** + /// **'3. Connect the OTG to the phone.'** String get step3ConnectPhone; + /// No description provided for @step4ConnectWireless. + /// + /// In en, this message translates to: + /// **'4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.'** + String get step4ConnectWireless; + /// No description provided for @bluetoothWifiConnection. /// /// In en, this message translates to: diff --git a/lib/l10n/app_localizations_de.dart b/lib/l10n/app_localizations_de.dart index 1cfcc2870..0aaf83864 100644 --- a/lib/l10n/app_localizations_de.dart +++ b/lib/l10n/app_localizations_de.dart @@ -293,14 +293,18 @@ class AppLocalizationsDe extends AppLocalizations { String get stepsToConnectTitle => 'Steps to connect the PSLab Device'; @override - String get step1ConnectMicroUsb => '1. Connect a micro USB(Mini B) to PSLab'; + String get step1ConnectMicroUsb => '1. Connect a USB cable to PSLab.'; @override String get step2ConnectOtg => - '2. Connect the other end of the micro USB cable to a OTG'; + '2. Connect the other end of the USB cable to an OTG.'; @override - String get step3ConnectPhone => '3. Connect the OTG to the phone'; + String get step3ConnectPhone => '3. Connect the OTG to the phone.'; + + @override + String get step4ConnectWireless => + '4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.'; @override String get bluetoothWifiConnection => 'Connect using Bluetooth or Wi-Fi'; diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart index 42864c109..87be82ce9 100644 --- a/lib/l10n/app_localizations_en.dart +++ b/lib/l10n/app_localizations_en.dart @@ -293,14 +293,18 @@ class AppLocalizationsEn extends AppLocalizations { String get stepsToConnectTitle => 'Steps to connect the PSLab Device'; @override - String get step1ConnectMicroUsb => '1. Connect a micro USB(Mini B) to PSLab'; + String get step1ConnectMicroUsb => '1. Connect a USB cable to PSLab.'; @override String get step2ConnectOtg => - '2. Connect the other end of the micro USB cable to a OTG'; + '2. Connect the other end of the USB cable to an OTG.'; @override - String get step3ConnectPhone => '3. Connect the OTG to the phone'; + String get step3ConnectPhone => '3. Connect the OTG to the phone.'; + + @override + String get step4ConnectWireless => + '4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.'; @override String get bluetoothWifiConnection => 'Connect using Bluetooth or Wi-Fi'; diff --git a/lib/l10n/app_localizations_es.dart b/lib/l10n/app_localizations_es.dart index 40699ab70..b8e9c8af0 100644 --- a/lib/l10n/app_localizations_es.dart +++ b/lib/l10n/app_localizations_es.dart @@ -293,14 +293,18 @@ class AppLocalizationsEs extends AppLocalizations { String get stepsToConnectTitle => 'Steps to connect the PSLab Device'; @override - String get step1ConnectMicroUsb => '1. Connect a micro USB(Mini B) to PSLab'; + String get step1ConnectMicroUsb => '1. Connect a USB cable to PSLab.'; @override String get step2ConnectOtg => - '2. Connect the other end of the micro USB cable to a OTG'; + '2. Connect the other end of the USB cable to an OTG.'; @override - String get step3ConnectPhone => '3. Connect the OTG to the phone'; + String get step3ConnectPhone => '3. Connect the OTG to the phone.'; + + @override + String get step4ConnectWireless => + '4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.'; @override String get bluetoothWifiConnection => 'Connect using Bluetooth or Wi-Fi'; diff --git a/lib/l10n/app_localizations_fr.dart b/lib/l10n/app_localizations_fr.dart index 751ba321a..f9eb670d5 100644 --- a/lib/l10n/app_localizations_fr.dart +++ b/lib/l10n/app_localizations_fr.dart @@ -293,14 +293,18 @@ class AppLocalizationsFr extends AppLocalizations { String get stepsToConnectTitle => 'Steps to connect the PSLab Device'; @override - String get step1ConnectMicroUsb => '1. Connect a micro USB(Mini B) to PSLab'; + String get step1ConnectMicroUsb => '1. Connect a USB cable to PSLab.'; @override String get step2ConnectOtg => - '2. Connect the other end of the micro USB cable to a OTG'; + '2. Connect the other end of the USB cable to an OTG.'; @override - String get step3ConnectPhone => '3. Connect the OTG to the phone'; + String get step3ConnectPhone => '3. Connect the OTG to the phone.'; + + @override + String get step4ConnectWireless => + '4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.'; @override String get bluetoothWifiConnection => 'Connect using Bluetooth or Wi-Fi'; diff --git a/lib/l10n/app_localizations_he.dart b/lib/l10n/app_localizations_he.dart index 1916f6c5d..f92fd94fb 100644 --- a/lib/l10n/app_localizations_he.dart +++ b/lib/l10n/app_localizations_he.dart @@ -293,14 +293,18 @@ class AppLocalizationsHe extends AppLocalizations { String get stepsToConnectTitle => 'Steps to connect the PSLab Device'; @override - String get step1ConnectMicroUsb => '1. Connect a micro USB(Mini B) to PSLab'; + String get step1ConnectMicroUsb => '1. Connect a USB cable to PSLab.'; @override String get step2ConnectOtg => - '2. Connect the other end of the micro USB cable to a OTG'; + '2. Connect the other end of the USB cable to an OTG.'; @override - String get step3ConnectPhone => '3. Connect the OTG to the phone'; + String get step3ConnectPhone => '3. Connect the OTG to the phone.'; + + @override + String get step4ConnectWireless => + '4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.'; @override String get bluetoothWifiConnection => 'Connect using Bluetooth or Wi-Fi'; diff --git a/lib/l10n/app_localizations_hi.dart b/lib/l10n/app_localizations_hi.dart index fa88c0c55..ce10ef9d7 100644 --- a/lib/l10n/app_localizations_hi.dart +++ b/lib/l10n/app_localizations_hi.dart @@ -293,14 +293,18 @@ class AppLocalizationsHi extends AppLocalizations { String get stepsToConnectTitle => 'Steps to connect the PSLab Device'; @override - String get step1ConnectMicroUsb => '1. Connect a micro USB(Mini B) to PSLab'; + String get step1ConnectMicroUsb => '1. Connect a USB cable to PSLab.'; @override String get step2ConnectOtg => - '2. Connect the other end of the micro USB cable to a OTG'; + '2. Connect the other end of the USB cable to an OTG.'; @override - String get step3ConnectPhone => '3. Connect the OTG to the phone'; + String get step3ConnectPhone => '3. Connect the OTG to the phone.'; + + @override + String get step4ConnectWireless => + '4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.'; @override String get bluetoothWifiConnection => 'Connect using Bluetooth or Wi-Fi'; diff --git a/lib/l10n/app_localizations_id.dart b/lib/l10n/app_localizations_id.dart index e8c847532..ddf3a4b3b 100644 --- a/lib/l10n/app_localizations_id.dart +++ b/lib/l10n/app_localizations_id.dart @@ -293,14 +293,18 @@ class AppLocalizationsId extends AppLocalizations { String get stepsToConnectTitle => 'Steps to connect the PSLab Device'; @override - String get step1ConnectMicroUsb => '1. Connect a micro USB(Mini B) to PSLab'; + String get step1ConnectMicroUsb => '1. Connect a USB cable to PSLab.'; @override String get step2ConnectOtg => - '2. Connect the other end of the micro USB cable to a OTG'; + '2. Connect the other end of the USB cable to an OTG.'; @override - String get step3ConnectPhone => '3. Connect the OTG to the phone'; + String get step3ConnectPhone => '3. Connect the OTG to the phone.'; + + @override + String get step4ConnectWireless => + '4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.'; @override String get bluetoothWifiConnection => 'Connect using Bluetooth or Wi-Fi'; diff --git a/lib/l10n/app_localizations_ja.dart b/lib/l10n/app_localizations_ja.dart index eea0de38e..a78a7cf4c 100644 --- a/lib/l10n/app_localizations_ja.dart +++ b/lib/l10n/app_localizations_ja.dart @@ -293,14 +293,18 @@ class AppLocalizationsJa extends AppLocalizations { String get stepsToConnectTitle => 'Steps to connect the PSLab Device'; @override - String get step1ConnectMicroUsb => '1. Connect a micro USB(Mini B) to PSLab'; + String get step1ConnectMicroUsb => '1. Connect a USB cable to PSLab.'; @override String get step2ConnectOtg => - '2. Connect the other end of the micro USB cable to a OTG'; + '2. Connect the other end of the USB cable to an OTG.'; @override - String get step3ConnectPhone => '3. Connect the OTG to the phone'; + String get step3ConnectPhone => '3. Connect the OTG to the phone.'; + + @override + String get step4ConnectWireless => + '4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.'; @override String get bluetoothWifiConnection => 'Connect using Bluetooth or Wi-Fi'; diff --git a/lib/l10n/app_localizations_nb.dart b/lib/l10n/app_localizations_nb.dart index d91c4e856..9673b798e 100644 --- a/lib/l10n/app_localizations_nb.dart +++ b/lib/l10n/app_localizations_nb.dart @@ -293,14 +293,18 @@ class AppLocalizationsNb extends AppLocalizations { String get stepsToConnectTitle => 'Steps to connect the PSLab Device'; @override - String get step1ConnectMicroUsb => '1. Connect a micro USB(Mini B) to PSLab'; + String get step1ConnectMicroUsb => '1. Connect a USB cable to PSLab.'; @override String get step2ConnectOtg => - '2. Connect the other end of the micro USB cable to a OTG'; + '2. Connect the other end of the USB cable to an OTG.'; @override - String get step3ConnectPhone => '3. Connect the OTG to the phone'; + String get step3ConnectPhone => '3. Connect the OTG to the phone.'; + + @override + String get step4ConnectWireless => + '4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.'; @override String get bluetoothWifiConnection => 'Connect using Bluetooth or Wi-Fi'; diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart index 966902d63..9cbbb629a 100644 --- a/lib/l10n/app_localizations_pt.dart +++ b/lib/l10n/app_localizations_pt.dart @@ -293,14 +293,18 @@ class AppLocalizationsPt extends AppLocalizations { String get stepsToConnectTitle => 'Steps to connect the PSLab Device'; @override - String get step1ConnectMicroUsb => '1. Connect a micro USB(Mini B) to PSLab'; + String get step1ConnectMicroUsb => '1. Connect a USB cable to PSLab.'; @override String get step2ConnectOtg => - '2. Connect the other end of the micro USB cable to a OTG'; + '2. Connect the other end of the USB cable to an OTG.'; @override - String get step3ConnectPhone => '3. Connect the OTG to the phone'; + String get step3ConnectPhone => '3. Connect the OTG to the phone.'; + + @override + String get step4ConnectWireless => + '4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.'; @override String get bluetoothWifiConnection => 'Connect using Bluetooth or Wi-Fi'; diff --git a/lib/l10n/app_localizations_ru.dart b/lib/l10n/app_localizations_ru.dart index d8fb61983..a18304cb8 100644 --- a/lib/l10n/app_localizations_ru.dart +++ b/lib/l10n/app_localizations_ru.dart @@ -293,14 +293,18 @@ class AppLocalizationsRu extends AppLocalizations { String get stepsToConnectTitle => 'Steps to connect the PSLab Device'; @override - String get step1ConnectMicroUsb => '1. Connect a micro USB(Mini B) to PSLab'; + String get step1ConnectMicroUsb => '1. Connect a USB cable to PSLab.'; @override String get step2ConnectOtg => - '2. Connect the other end of the micro USB cable to a OTG'; + '2. Connect the other end of the USB cable to an OTG.'; @override - String get step3ConnectPhone => '3. Connect the OTG to the phone'; + String get step3ConnectPhone => '3. Connect the OTG to the phone.'; + + @override + String get step4ConnectWireless => + '4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.'; @override String get bluetoothWifiConnection => 'Connect using Bluetooth or Wi-Fi'; diff --git a/lib/l10n/app_localizations_uk.dart b/lib/l10n/app_localizations_uk.dart index 6a535652e..4b68ab5b0 100644 --- a/lib/l10n/app_localizations_uk.dart +++ b/lib/l10n/app_localizations_uk.dart @@ -293,14 +293,18 @@ class AppLocalizationsUk extends AppLocalizations { String get stepsToConnectTitle => 'Steps to connect the PSLab Device'; @override - String get step1ConnectMicroUsb => '1. Connect a micro USB(Mini B) to PSLab'; + String get step1ConnectMicroUsb => '1. Connect a USB cable to PSLab.'; @override String get step2ConnectOtg => - '2. Connect the other end of the micro USB cable to a OTG'; + '2. Connect the other end of the USB cable to an OTG.'; @override - String get step3ConnectPhone => '3. Connect the OTG to the phone'; + String get step3ConnectPhone => '3. Connect the OTG to the phone.'; + + @override + String get step4ConnectWireless => + '4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.'; @override String get bluetoothWifiConnection => 'Connect using Bluetooth or Wi-Fi'; diff --git a/lib/l10n/app_localizations_vi.dart b/lib/l10n/app_localizations_vi.dart index c871ce0dc..108d08d96 100644 --- a/lib/l10n/app_localizations_vi.dart +++ b/lib/l10n/app_localizations_vi.dart @@ -293,14 +293,18 @@ class AppLocalizationsVi extends AppLocalizations { String get stepsToConnectTitle => 'Steps to connect the PSLab Device'; @override - String get step1ConnectMicroUsb => '1. Connect a micro USB(Mini B) to PSLab'; + String get step1ConnectMicroUsb => '1. Connect a USB cable to PSLab.'; @override String get step2ConnectOtg => - '2. Connect the other end of the micro USB cable to a OTG'; + '2. Connect the other end of the USB cable to an OTG.'; @override - String get step3ConnectPhone => '3. Connect the OTG to the phone'; + String get step3ConnectPhone => '3. Connect the OTG to the phone.'; + + @override + String get step4ConnectWireless => + '4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.'; @override String get bluetoothWifiConnection => 'Connect using Bluetooth or Wi-Fi'; diff --git a/lib/l10n/app_localizations_zh.dart b/lib/l10n/app_localizations_zh.dart index a80bd866f..e88630fa2 100644 --- a/lib/l10n/app_localizations_zh.dart +++ b/lib/l10n/app_localizations_zh.dart @@ -293,14 +293,18 @@ class AppLocalizationsZh extends AppLocalizations { String get stepsToConnectTitle => 'Steps to connect the PSLab Device'; @override - String get step1ConnectMicroUsb => '1. Connect a micro USB(Mini B) to PSLab'; + String get step1ConnectMicroUsb => '1. Connect a USB cable to PSLab.'; @override String get step2ConnectOtg => - '2. Connect the other end of the micro USB cable to a OTG'; + '2. Connect the other end of the USB cable to an OTG.'; @override - String get step3ConnectPhone => '3. Connect the OTG to the phone'; + String get step3ConnectPhone => '3. Connect the OTG to the phone.'; + + @override + String get step4ConnectWireless => + '4. PSLab can also be connected wirelessly (Bluetooth or Wi-Fi) if the option is present.'; @override String get bluetoothWifiConnection => 'Connect using Bluetooth or Wi-Fi'; diff --git a/lib/view/connect_device_screen.dart b/lib/view/connect_device_screen.dart index 90f33e82b..1468f7fea 100644 --- a/lib/view/connect_device_screen.dart +++ b/lib/view/connect_device_screen.dart @@ -71,7 +71,7 @@ class _HomeScreenState extends State { margin: const EdgeInsets.only( left: 40, right: 40, bottom: 20), child: Column( - crossAxisAlignment: CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, children: [ Center( child: Text( @@ -87,18 +87,28 @@ class _HomeScreenState extends State { const SizedBox(height: 20), Text( appLocalizations.step1ConnectMicroUsb, + textAlign: TextAlign.center, style: const TextStyle( fontSize: 16, ), ), Text( appLocalizations.step2ConnectOtg, + textAlign: TextAlign.center, style: const TextStyle( fontSize: 16, ), ), Text( appLocalizations.step3ConnectPhone, + textAlign: TextAlign.center, + style: const TextStyle( + fontSize: 16, + ), + ), + Text( + appLocalizations.step4ConnectWireless, + textAlign: TextAlign.center, style: const TextStyle( fontSize: 16, ), diff --git a/lib/view/widgets/main_scaffold_widget.dart b/lib/view/widgets/main_scaffold_widget.dart index d281aeadd..416f82c12 100644 --- a/lib/view/widgets/main_scaffold_widget.dart +++ b/lib/view/widgets/main_scaffold_widget.dart @@ -177,7 +177,19 @@ class _MainScaffoldState extends State height: 24, ), onPressed: () { - /**/ + provider.initialize(); + if (Navigator.canPop(context) && + ModalRoute.of(context)?.settings.name == + '/connectDevice') { + Navigator.popUntil( + context, ModalRoute.withName('/connectDevice')); + } else { + Navigator.pushNamedAndRemoveUntil( + context, + '/connectDevice', + (route) => route.isFirst, + ); + } }, ); },