Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.4

[Wave-5] WaveFlowerLoader added

## 1.0.2

- Offer creation and answering implemented
Expand Down
23 changes: 11 additions & 12 deletions lib/src/localization/app_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -86,16 +86,16 @@ abstract class AppLocalizations {
/// of delegates is preferred or required.
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates =
<LocalizationsDelegate<dynamic>>[
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<Locale> supportedLocales = <Locale>[
Locale('en'),
Locale('ru'),
Locale('ru')
];

/// The title of the application
Expand Down Expand Up @@ -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.');
}
15 changes: 9 additions & 6 deletions lib/src/screens/foreground_switch_screen/copy_code_screen.dart
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -45,20 +46,22 @@ class _CopyCodeScreenState extends State<CopyCodeScreen> {
textAlign: TextAlign.center,
),
),
const SizedBox(height: 27),

if (_creating) ...[
// TODO change
const CircularProgressIndicator(),
const SizedBox(
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'),
],
const SizedBox(height: 135),
SizedBox(height: _creating ? 127 : 135),
// Check pair: enabled когда пришёл answer
WaveSimpleButton(
label: 'Check pair',
Expand All @@ -85,7 +88,7 @@ class _CopyCodeScreenState extends State<CopyCodeScreen> {
final manager = context.read<WebRTCManager>();
final id = await manager.createOfferLink();

// сохраняем в памяти localId two-word code
// сохраняем в памяти localId two-word code
final prefs = await SharedPreferences.getInstance();
await prefs.setString(currentPeerLocalIdKey, id);

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.4

environment:
sdk: ^3.6.2
Expand Down