mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 09:28:41 +00:00
fix #326
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
This commit is contained in:
parent
bc1c61c8f8
commit
25114daee2
18 changed files with 138 additions and 51 deletions
|
|
@ -1,5 +1,12 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.0.73
|
||||||
|
|
||||||
|
- Integrated QR code scanner in the main camera
|
||||||
|
- New profile share page
|
||||||
|
- New workflow for checking the security number
|
||||||
|
- Improved user interface for creating voice messages
|
||||||
|
|
||||||
## 0.0.69
|
## 0.0.69
|
||||||
|
|
||||||
- Option to export and import memories
|
- Option to export and import memories
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
PODS:
|
PODS:
|
||||||
|
- app_links (7.0.0):
|
||||||
|
- Flutter
|
||||||
- audio_waveforms (0.0.1):
|
- audio_waveforms (0.0.1):
|
||||||
- Flutter
|
- Flutter
|
||||||
- background_downloader (0.0.1):
|
- background_downloader (0.0.1):
|
||||||
|
|
@ -324,6 +326,7 @@ PODS:
|
||||||
- FlutterMacOS
|
- FlutterMacOS
|
||||||
|
|
||||||
DEPENDENCIES:
|
DEPENDENCIES:
|
||||||
|
- app_links (from `.symlinks/plugins/app_links/ios`)
|
||||||
- audio_waveforms (from `.symlinks/plugins/audio_waveforms/ios`)
|
- audio_waveforms (from `.symlinks/plugins/audio_waveforms/ios`)
|
||||||
- background_downloader (from `.symlinks/plugins/background_downloader/ios`)
|
- background_downloader (from `.symlinks/plugins/background_downloader/ios`)
|
||||||
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
|
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
|
||||||
|
|
@ -400,6 +403,8 @@ SPEC REPOS:
|
||||||
- SwiftyGif
|
- SwiftyGif
|
||||||
|
|
||||||
EXTERNAL SOURCES:
|
EXTERNAL SOURCES:
|
||||||
|
app_links:
|
||||||
|
:path: ".symlinks/plugins/app_links/ios"
|
||||||
audio_waveforms:
|
audio_waveforms:
|
||||||
:path: ".symlinks/plugins/audio_waveforms/ios"
|
:path: ".symlinks/plugins/audio_waveforms/ios"
|
||||||
background_downloader:
|
background_downloader:
|
||||||
|
|
@ -472,6 +477,7 @@ EXTERNAL SOURCES:
|
||||||
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
|
:path: ".symlinks/plugins/video_player_avfoundation/darwin"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
|
app_links: a754cbec3c255bd4bbb4d236ecc06f28cd9a7ce8
|
||||||
audio_waveforms: a6dde7fe7c0ea05f06ffbdb0f7c1b2b2ba6cedcf
|
audio_waveforms: a6dde7fe7c0ea05f06ffbdb0f7c1b2b2ba6cedcf
|
||||||
background_downloader: 50e91d979067b82081aba359d7d916b3ba5fadad
|
background_downloader: 50e91d979067b82081aba359d7d916b3ba5fadad
|
||||||
camera_avfoundation: 5675ca25298b6f81fa0a325188e7df62cc217741
|
camera_avfoundation: 5675ca25298b6f81fa0a325188e7df62cc217741
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,7 @@ class _AppMainWidgetState extends State<AppMainWidget> {
|
||||||
bool _showDatabaseMigration = false;
|
bool _showDatabaseMigration = false;
|
||||||
bool _showOnboarding = true;
|
bool _showOnboarding = true;
|
||||||
bool _isLoaded = false;
|
bool _isLoaded = false;
|
||||||
|
bool _skipBackup = false;
|
||||||
|
|
||||||
(Future<int>?, bool) _proofOfWork = (null, false);
|
(Future<int>?, bool) _proofOfWork = (null, false);
|
||||||
|
|
||||||
|
|
@ -203,9 +204,10 @@ class _AppMainWidgetState extends State<AppMainWidget> {
|
||||||
if (_showDatabaseMigration) {
|
if (_showDatabaseMigration) {
|
||||||
child = const DatabaseMigrationView();
|
child = const DatabaseMigrationView();
|
||||||
} else if (_isUserCreated) {
|
} else if (_isUserCreated) {
|
||||||
if (gUser.twonlySafeBackup == null) {
|
if (gUser.twonlySafeBackup == null && !_skipBackup) {
|
||||||
child = TwonlyIdentityBackupView(
|
child = TwonlyIdentityBackupView(
|
||||||
callBack: () {
|
callBack: () {
|
||||||
|
_skipBackup = true;
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -445,5 +445,6 @@
|
||||||
"voiceMessageSlideToCancel": "Zum Abbrechen ziehen",
|
"voiceMessageSlideToCancel": "Zum Abbrechen ziehen",
|
||||||
"voiceMessageCancel": "Abbrechen",
|
"voiceMessageCancel": "Abbrechen",
|
||||||
"shareYourProfile": "Teile dein Profil",
|
"shareYourProfile": "Teile dein Profil",
|
||||||
"scanOtherProfile": "Scanne ein anderes Profil"
|
"scanOtherProfile": "Scanne ein anderes Profil",
|
||||||
|
"skipForNow": "Vorerst überspringen"
|
||||||
}
|
}
|
||||||
|
|
@ -475,5 +475,6 @@
|
||||||
"voiceMessageSlideToCancel": "Slide to cancel",
|
"voiceMessageSlideToCancel": "Slide to cancel",
|
||||||
"voiceMessageCancel": "Cancel",
|
"voiceMessageCancel": "Cancel",
|
||||||
"shareYourProfile": "Share your profile",
|
"shareYourProfile": "Share your profile",
|
||||||
"scanOtherProfile": "Scan other profile"
|
"scanOtherProfile": "Scan other profile",
|
||||||
|
"skipForNow": "Skip for now"
|
||||||
}
|
}
|
||||||
|
|
@ -2773,6 +2773,12 @@ abstract class AppLocalizations {
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
/// **'Scan other profile'**
|
/// **'Scan other profile'**
|
||||||
String get scanOtherProfile;
|
String get scanOtherProfile;
|
||||||
|
|
||||||
|
/// No description provided for @skipForNow.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'Skip for now'**
|
||||||
|
String get skipForNow;
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AppLocalizationsDelegate
|
class _AppLocalizationsDelegate
|
||||||
|
|
|
||||||
|
|
@ -1528,4 +1528,7 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get scanOtherProfile => 'Scanne ein anderes Profil';
|
String get scanOtherProfile => 'Scanne ein anderes Profil';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get skipForNow => 'Vorerst überspringen';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1518,4 +1518,7 @@ class AppLocalizationsEn extends AppLocalizations {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get scanOtherProfile => 'Scan other profile';
|
String get scanOtherProfile => 'Scan other profile';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get skipForNow => 'Skip for now';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1408,6 +1408,7 @@ class Response_UserData extends $pb.GeneratedMessage {
|
||||||
$core.List<$core.int>? signedPrekeySignature,
|
$core.List<$core.int>? signedPrekeySignature,
|
||||||
$fixnum.Int64? signedPrekeyId,
|
$fixnum.Int64? signedPrekeyId,
|
||||||
$core.List<$core.int>? username,
|
$core.List<$core.int>? username,
|
||||||
|
$fixnum.Int64? registrationId,
|
||||||
}) {
|
}) {
|
||||||
final result = create();
|
final result = create();
|
||||||
if (userId != null) result.userId = userId;
|
if (userId != null) result.userId = userId;
|
||||||
|
|
@ -1418,6 +1419,7 @@ class Response_UserData extends $pb.GeneratedMessage {
|
||||||
result.signedPrekeySignature = signedPrekeySignature;
|
result.signedPrekeySignature = signedPrekeySignature;
|
||||||
if (signedPrekeyId != null) result.signedPrekeyId = signedPrekeyId;
|
if (signedPrekeyId != null) result.signedPrekeyId = signedPrekeyId;
|
||||||
if (username != null) result.username = username;
|
if (username != null) result.username = username;
|
||||||
|
if (registrationId != null) result.registrationId = registrationId;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1448,6 +1450,7 @@ class Response_UserData extends $pb.GeneratedMessage {
|
||||||
..aInt64(6, _omitFieldNames ? '' : 'signedPrekeyId')
|
..aInt64(6, _omitFieldNames ? '' : 'signedPrekeyId')
|
||||||
..a<$core.List<$core.int>>(
|
..a<$core.List<$core.int>>(
|
||||||
7, _omitFieldNames ? '' : 'username', $pb.PbFieldType.OY)
|
7, _omitFieldNames ? '' : 'username', $pb.PbFieldType.OY)
|
||||||
|
..aInt64(8, _omitFieldNames ? '' : 'registrationId')
|
||||||
..hasRequiredFields = false;
|
..hasRequiredFields = false;
|
||||||
|
|
||||||
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
@$core.Deprecated('See https://github.com/google/protobuf.dart/issues/998.')
|
||||||
|
|
@ -1528,6 +1531,15 @@ class Response_UserData extends $pb.GeneratedMessage {
|
||||||
$core.bool hasUsername() => $_has(6);
|
$core.bool hasUsername() => $_has(6);
|
||||||
@$pb.TagNumber(7)
|
@$pb.TagNumber(7)
|
||||||
void clearUsername() => $_clearField(7);
|
void clearUsername() => $_clearField(7);
|
||||||
|
|
||||||
|
@$pb.TagNumber(8)
|
||||||
|
$fixnum.Int64 get registrationId => $_getI64(7);
|
||||||
|
@$pb.TagNumber(8)
|
||||||
|
set registrationId($fixnum.Int64 value) => $_setInt64(7, value);
|
||||||
|
@$pb.TagNumber(8)
|
||||||
|
$core.bool hasRegistrationId() => $_has(7);
|
||||||
|
@$pb.TagNumber(8)
|
||||||
|
void clearRegistrationId() => $_clearField(8);
|
||||||
}
|
}
|
||||||
|
|
||||||
class Response_UploadToken extends $pb.GeneratedMessage {
|
class Response_UploadToken extends $pb.GeneratedMessage {
|
||||||
|
|
|
||||||
|
|
@ -498,6 +498,15 @@ const Response_UserData$json = {
|
||||||
'10': 'signedPrekeyId',
|
'10': 'signedPrekeyId',
|
||||||
'17': true
|
'17': true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'1': 'registration_id',
|
||||||
|
'3': 8,
|
||||||
|
'4': 1,
|
||||||
|
'5': 3,
|
||||||
|
'9': 5,
|
||||||
|
'10': 'registrationId',
|
||||||
|
'17': true
|
||||||
|
},
|
||||||
],
|
],
|
||||||
'8': [
|
'8': [
|
||||||
{'1': '_username'},
|
{'1': '_username'},
|
||||||
|
|
@ -505,6 +514,7 @@ const Response_UserData$json = {
|
||||||
{'1': '_signed_prekey'},
|
{'1': '_signed_prekey'},
|
||||||
{'1': '_signed_prekey_signature'},
|
{'1': '_signed_prekey_signature'},
|
||||||
{'1': '_signed_prekey_id'},
|
{'1': '_signed_prekey_id'},
|
||||||
|
{'1': '_registration_id'},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -714,36 +724,37 @@ final $typed_data.Uint8List responseDescriptor = $convert.base64Decode(
|
||||||
'aWQYASABKANSAmlkEhYKBnByZWtleRgCIAEoDFIGcHJla2V5GpUBCgxTaWduZWRQcmVLZXkSKA'
|
'aWQYASABKANSAmlkEhYKBnByZWtleRgCIAEoDFIGcHJla2V5GpUBCgxTaWduZWRQcmVLZXkSKA'
|
||||||
'oQc2lnbmVkX3ByZWtleV9pZBgBIAEoA1IOc2lnbmVkUHJla2V5SWQSIwoNc2lnbmVkX3ByZWtl'
|
'oQc2lnbmVkX3ByZWtleV9pZBgBIAEoA1IOc2lnbmVkUHJla2V5SWQSIwoNc2lnbmVkX3ByZWtl'
|
||||||
'eRgCIAEoDFIMc2lnbmVkUHJla2V5EjYKF3NpZ25lZF9wcmVrZXlfc2lnbmF0dXJlGAMgASgMUh'
|
'eRgCIAEoDFIMc2lnbmVkUHJla2V5EjYKF3NpZ25lZF9wcmVrZXlfc2lnbmF0dXJlGAMgASgMUh'
|
||||||
'VzaWduZWRQcmVrZXlTaWduYXR1cmUatAMKCFVzZXJEYXRhEhcKB3VzZXJfaWQYASABKANSBnVz'
|
'VzaWduZWRQcmVrZXlTaWduYXR1cmUa9gMKCFVzZXJEYXRhEhcKB3VzZXJfaWQYASABKANSBnVz'
|
||||||
'ZXJJZBI7CgdwcmVrZXlzGAIgA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lJlc3BvbnNlLkRvd25sb2FkVG9rZW5zSABSDmRvd25sb2FkdG9rZW5zEk'
|
||||||
'NpZ25lZHByZWtleRJKCgtwcm9vZk9mV29yaxgPIAEoCzImLnNlcnZlcl90b19jbGllbnQuUmVz'
|
'0KDHNpZ25lZHByZWtleRgOIAEoCzInLnNlcnZlcl90b19jbGllbnQuUmVzcG9uc2UuU2lnbmVk'
|
||||||
'cG9uc2UuUHJvb2ZPZldvcmtIAFILcHJvb2ZPZldvcmtCBAoCT2silgEKEFRyYW5zYWN0aW9uVH'
|
'UHJlS2V5SABSDHNpZ25lZHByZWtleRJKCgtwcm9vZk9mV29yaxgPIAEoCzImLnNlcnZlcl90b1'
|
||||||
'lwZXMSCgoGUmVmdW5kEAASEwoPVm91Y2hlclJlZGVlbWVkEAESEgoOVm91Y2hlckNyZWF0ZWQQ'
|
'9jbGllbnQuUmVzcG9uc2UuUHJvb2ZPZldvcmtIAFILcHJvb2ZPZldvcmtCBAoCT2silgEKEFRy'
|
||||||
'AhIICgRDYXNoEAMSDwoLUGxhblVwZ3JhZGUQBBILCgdVbmtub3duEAUSFAoQVGhhbmtzRm9yVG'
|
'YW5zYWN0aW9uVHlwZXMSCgoGUmVmdW5kEAASEwoPVm91Y2hlclJlZGVlbWVkEAESEgoOVm91Y2'
|
||||||
'VzdGluZxAGEg8KC0F1dG9SZW5ld2FsEAdCCgoIUmVzcG9uc2U=');
|
'hlckNyZWF0ZWQQAhIICgRDYXNoEAMSDwoLUGxhblVwZ3JhZGUQBBILCgdVbmtub3duEAUSFAoQ'
|
||||||
|
'VGhhbmtzRm9yVGVzdGluZxAGEg8KC0F1dG9SZW5ld2FsEAdCCgoIUmVzcG9uc2U=');
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,9 @@ Future<void> showLocalPushNotification(
|
||||||
);
|
);
|
||||||
|
|
||||||
await flutterLocalNotificationsPlugin.show(
|
await flutterLocalNotificationsPlugin.show(
|
||||||
pushUser.userId.toInt(),
|
pushUser.userId.toInt() %
|
||||||
|
// ignore: avoid_js_rounded_ints
|
||||||
|
2373257871630019505, // Invalid argument (id): must fit within the size of a 32-bit integer
|
||||||
title,
|
title,
|
||||||
body,
|
body,
|
||||||
notificationDetails,
|
notificationDetails,
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,9 @@ Future<CiphertextMessage?> signalEncryptMessage(
|
||||||
|
|
||||||
final tempIdentityKey = await signalStore.getIdentity(address);
|
final tempIdentityKey = await signalStore.getIdentity(address);
|
||||||
if (tempIdentityKey != null) {
|
if (tempIdentityKey != null) {
|
||||||
|
final registrationId = await session.getRemoteRegistrationId();
|
||||||
final preKeyBundle = PreKeyBundle(
|
final preKeyBundle = PreKeyBundle(
|
||||||
target,
|
registrationId,
|
||||||
defaultDeviceId,
|
defaultDeviceId,
|
||||||
preKey?.preKeyId,
|
preKey?.preKeyId,
|
||||||
tempPrePublicKey,
|
tempPrePublicKey,
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ Future<bool> createNewSignalSession(Response_UserData userData) async {
|
||||||
);
|
);
|
||||||
|
|
||||||
final preKeyBundle = PreKeyBundle(
|
final preKeyBundle = PreKeyBundle(
|
||||||
userData.userId.toInt(),
|
userData.registrationId.toInt(),
|
||||||
defaultDeviceId,
|
defaultDeviceId,
|
||||||
tempPreKeyId,
|
tempPreKeyId,
|
||||||
tempPrePublicKey,
|
tempPrePublicKey,
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_image_compress/flutter_image_compress.dart';
|
import 'package:flutter_image_compress/flutter_image_compress.dart';
|
||||||
import 'package:gal/gal.dart';
|
import 'package:gal/gal.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:libsignal_protocol_dart/libsignal_protocol_dart.dart';
|
|
||||||
import 'package:local_auth/local_auth.dart';
|
import 'package:local_auth/local_auth.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:twonly/src/database/tables/mediafiles.table.dart';
|
import 'package:twonly/src/database/tables/mediafiles.table.dart';
|
||||||
|
|
@ -310,9 +309,6 @@ String getUUIDforDirectChat(int a, int b) {
|
||||||
if (a < 0 || b < 0) {
|
if (a < 0 || b < 0) {
|
||||||
throw ArgumentError('Inputs must be non-negative integers.');
|
throw ArgumentError('Inputs must be non-negative integers.');
|
||||||
}
|
}
|
||||||
if (a > integerMax || b > integerMax) {
|
|
||||||
throw ArgumentError('Inputs must be <= 0x7fffffff.');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Mask to 64 bits in case inputs exceed 64 bits
|
// Mask to 64 bits in case inputs exceed 64 bits
|
||||||
final mask64 = (BigInt.one << 64) - BigInt.one;
|
final mask64 = (BigInt.one << 64) - BigInt.one;
|
||||||
|
|
|
||||||
|
|
@ -822,6 +822,9 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
||||||
(c) {
|
(c) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
|
if (c.isLoading) return;
|
||||||
|
c.isLoading = true;
|
||||||
|
widget.mainCameraController.setState();
|
||||||
await addNewContactFromPublicProfile(c.profile);
|
await addNewContactFromPublicProfile(c.profile);
|
||||||
widget.mainCameraController.scannedNewProfiles
|
widget.mainCameraController.scannedNewProfiles
|
||||||
.remove(c.profile.userId.toInt());
|
.remove(c.profile.userId.toInt());
|
||||||
|
|
@ -838,16 +841,25 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
||||||
children: [
|
children: [
|
||||||
Text(c.profile.username),
|
Text(c.profile.username),
|
||||||
Expanded(child: Container()),
|
Expanded(child: Container()),
|
||||||
ColoredBox(
|
if (c.isLoading)
|
||||||
color: Colors.transparent,
|
const SizedBox(
|
||||||
child: FaIcon(
|
width: 12,
|
||||||
FontAwesomeIcons.userPlus,
|
height: 12,
|
||||||
color: isDarkMode(context)
|
child: CircularProgressIndicator(
|
||||||
? Colors.white
|
strokeWidth: 2,
|
||||||
: Colors.black,
|
),
|
||||||
size: 17,
|
)
|
||||||
|
else
|
||||||
|
ColoredBox(
|
||||||
|
color: Colors.transparent,
|
||||||
|
child: FaIcon(
|
||||||
|
FontAwesomeIcons.userPlus,
|
||||||
|
color: isDarkMode(context)
|
||||||
|
? Colors.white
|
||||||
|
: Colors.black,
|
||||||
|
size: 17,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,10 @@ class ScannedVerifiedContact {
|
||||||
class ScannedNewProfile {
|
class ScannedNewProfile {
|
||||||
ScannedNewProfile({
|
ScannedNewProfile({
|
||||||
required this.profile,
|
required this.profile,
|
||||||
|
this.isLoading = false,
|
||||||
});
|
});
|
||||||
PublicProfile profile;
|
PublicProfile profile;
|
||||||
|
bool isLoading;
|
||||||
}
|
}
|
||||||
|
|
||||||
class MainCameraController {
|
class MainCameraController {
|
||||||
|
|
@ -198,7 +200,7 @@ class MainCameraController {
|
||||||
final contact =
|
final contact =
|
||||||
await twonlyDB.contactsDao.getContactById(profile.userId.toInt());
|
await twonlyDB.contactsDao.getContactById(profile.userId.toInt());
|
||||||
|
|
||||||
if (contact != null) {
|
if (contact != null && contact.accepted) {
|
||||||
if (contactsVerified[contact.userId] == null) {
|
if (contactsVerified[contact.userId] == null) {
|
||||||
final storedPublicKey =
|
final storedPublicKey =
|
||||||
await getPublicKeyFromContact(contact.userId);
|
await getPublicKeyFromContact(contact.userId);
|
||||||
|
|
|
||||||
|
|
@ -221,6 +221,21 @@ class _TwonlyIdentityBackupViewState extends State<TwonlyIdentityBackupView> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
if (widget.callBack != null) {
|
||||||
|
widget.callBack!();
|
||||||
|
} else {
|
||||||
|
Navigator.pop(context);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Text(
|
||||||
|
context.lang.skipForNow,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: const TextStyle(fontSize: 8, color: Colors.grey),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -57,9 +57,16 @@ void main() {
|
||||||
'00000000-1234-5678-0000-00000abcdef0',
|
'00000000-1234-5678-0000-00000abcdef0',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
test('Arbitrary within 32-bit range', () {
|
||||||
test('Reject values > 0x7fffffff', () {
|
expect(
|
||||||
expect(() => getUUIDforDirectChat(0x80000000, 0), throwsArgumentError);
|
// ignore: avoid_js_rounded_ints
|
||||||
|
getUUIDforDirectChat(0x7dc8a4f20a75de46, 0x7ffffffffffffff8),
|
||||||
|
'7fffffff-ffff-fff8-7dc8-a4f20a75de46',
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// test('Reject values > 0x7fffffff', () {
|
||||||
|
// expect(() => getUUIDforDirectChat(0x80000000, 0), throwsArgumentError);
|
||||||
|
// });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue