From 1ab842d5b0a16248fde125a4ebbb8258517b8750 Mon Sep 17 00:00:00 2001 From: Arsen Latipov Date: Mon, 6 Oct 2025 17:44:26 +0300 Subject: [PATCH 1/5] [wave-5] WaveFlowerLoader added to app code --- .../foreground_switch_screen/copy_code_screen.dart | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/src/screens/foreground_switch_screen/copy_code_screen.dart b/lib/src/screens/foreground_switch_screen/copy_code_screen.dart index 757895d..35d2600 100644 --- a/lib/src/screens/foreground_switch_screen/copy_code_screen.dart +++ b/lib/src/screens/foreground_switch_screen/copy_code_screen.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:md_ui_kit/_core/colors.dart'; +import 'package:md_ui_kit/widgets/wave_flower_loader.dart'; import 'package:provider/provider.dart'; import 'package:md_ui_kit/md_ui_kit.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -48,7 +49,10 @@ class _CopyCodeScreenState extends State { const SizedBox(height: 27), if (_creating) ...[ // TODO change - const CircularProgressIndicator(), + const SizedBox( + height: 200, + child: WaveFlowerLoader(), + ), ] else if (_offerId != null) ...[ WaveTextButton( label: _offerId!, @@ -58,7 +62,9 @@ class _CopyCodeScreenState extends State { // TODO change const Text('Failed to create code'), ], - const SizedBox(height: 135), + if (!_creating) ...[ + const SizedBox(height: 135), + ], // Check pair: enabled когда пришёл answer WaveSimpleButton( label: 'Check pair', From 449fb86d92b0ac6b34b50209a0f9cdfc8e7f3230 Mon Sep 17 00:00:00 2001 From: Temity <127617131+AnisimovTema@users.noreply.github.com> Date: Wed, 8 Oct 2025 21:00:02 -0700 Subject: [PATCH 2/5] [wave-5] code refactored --- lib/src/localization/app_localizations.dart | 23 +++++++++---------- .../copy_code_screen.dart | 13 ++++------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/lib/src/localization/app_localizations.dart b/lib/src/localization/app_localizations.dart index c3a351e..2112a3d 100644 --- a/lib/src/localization/app_localizations.dart +++ b/lib/src/localization/app_localizations.dart @@ -63,7 +63,7 @@ import 'app_localizations_ru.dart'; /// property. abstract class AppLocalizations { AppLocalizations(String locale) - : localeName = intl.Intl.canonicalizedLocale(locale.toString()); + : localeName = intl.Intl.canonicalizedLocale(locale.toString()); final String localeName; @@ -86,16 +86,16 @@ abstract class AppLocalizations { /// of delegates is preferred or required. static const List> localizationsDelegates = >[ - delegate, - GlobalMaterialLocalizations.delegate, - GlobalCupertinoLocalizations.delegate, - GlobalWidgetsLocalizations.delegate, - ]; + delegate, + GlobalMaterialLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + ]; /// A list of this localizations delegate's supported locales. static const List supportedLocales = [ Locale('en'), - Locale('ru'), + Locale('ru') ]; /// The title of the application @@ -132,9 +132,8 @@ AppLocalizations lookupAppLocalizations(Locale locale) { } throw FlutterError( - 'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' - 'an issue with the localizations generation tool. Please file an issue ' - 'on GitHub with a reproducible sample app and the gen-l10n configuration ' - 'that was used.', - ); + 'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' + 'an issue with the localizations generation tool. Please file an issue ' + 'on GitHub with a reproducible sample app and the gen-l10n configuration ' + 'that was used.'); } diff --git a/lib/src/screens/foreground_switch_screen/copy_code_screen.dart b/lib/src/screens/foreground_switch_screen/copy_code_screen.dart index 35d2600..f76bda2 100644 --- a/lib/src/screens/foreground_switch_screen/copy_code_screen.dart +++ b/lib/src/screens/foreground_switch_screen/copy_code_screen.dart @@ -46,25 +46,22 @@ class _CopyCodeScreenState extends State { textAlign: TextAlign.center, ), ), - const SizedBox(height: 27), + if (_creating) ...[ - // TODO change const SizedBox( - height: 200, + height: 64, child: WaveFlowerLoader(), ), ] else if (_offerId != null) ...[ + const SizedBox(height: 18), WaveTextButton( label: _offerId!, onPressed: _onCopyCodePressed, ), ] else ...[ - // TODO change const Text('Failed to create code'), ], - if (!_creating) ...[ - const SizedBox(height: 135), - ], + SizedBox(height: _creating ? 127 : 135), // Check pair: enabled когда пришёл answer WaveSimpleButton( label: 'Check pair', @@ -91,7 +88,7 @@ class _CopyCodeScreenState extends State { final manager = context.read(); final id = await manager.createOfferLink(); -// сохраняем в памяти localId two-word code + // сохраняем в памяти localId two-word code final prefs = await SharedPreferences.getInstance(); await prefs.setString(currentPeerLocalIdKey, id); From 6bd51f0f2f009b49467073fb4ca7673458545f78 Mon Sep 17 00:00:00 2001 From: Arsen Latipov Date: Wed, 22 Oct 2025 22:41:13 +0300 Subject: [PATCH 3/5] [wave-5] docs fix --- CHANGELOG.md | 4 ++++ pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d7c4a5..dc5cd39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.3 + +- WaveFlowerLoader added + ## 1.0.2 - Offer creation and answering implemented diff --git a/pubspec.yaml b/pubspec.yaml index 0eaba63..88f9a06 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ description: "Peer-to-peer calls and chat application" # Prevent accidental publishing to pub.dev. publish_to: "none" -version: 1.0.2 +version: 1.0.3 environment: sdk: ^3.6.2 From 4e5f558c3bc6ac4475b3926b0819473b831ca039 Mon Sep 17 00:00:00 2001 From: Arsen Latipov Date: Wed, 22 Oct 2025 22:43:56 +0300 Subject: [PATCH 4/5] [wave-5] docs fix --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc5cd39..817b0c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## 1.0.3 -- WaveFlowerLoader added +[Wave-5] WaveFlowerLoader added ## 1.0.2 From 4b4341cb57b80756ee0b9d2dfcf3b7ee26e882cc Mon Sep 17 00:00:00 2001 From: Arsen Latipov Date: Wed, 22 Oct 2025 22:45:39 +0300 Subject: [PATCH 5/5] [wave-5] docs fix --- CHANGELOG.md | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 817b0c0..cb2c2fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.0.3 +## 1.0.4 [Wave-5] WaveFlowerLoader added diff --git a/pubspec.yaml b/pubspec.yaml index 88f9a06..9be2914 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ description: "Peer-to-peer calls and chat application" # Prevent accidental publishing to pub.dev. publish_to: "none" -version: 1.0.3 +version: 1.0.4 environment: sdk: ^3.6.2