mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 13:08:42 +00:00
rename files
This commit is contained in:
parent
0d2533e9a6
commit
ede9888515
30 changed files with 125 additions and 145 deletions
|
|
@ -21,8 +21,8 @@ import 'package:twonly/src/services/api/utils.dart';
|
||||||
import 'package:twonly/src/services/api/media_received.dart';
|
import 'package:twonly/src/services/api/media_received.dart';
|
||||||
import 'package:twonly/src/services/api/media_send.dart';
|
import 'package:twonly/src/services/api/media_send.dart';
|
||||||
import 'package:twonly/src/services/api/server_messages.dart';
|
import 'package:twonly/src/services/api/server_messages.dart';
|
||||||
import 'package:twonly/src/services/signal/encryption.signal.dart';
|
|
||||||
import 'package:twonly/src/services/signal/identity.signal.dart';
|
import 'package:twonly/src/services/signal/identity.signal.dart';
|
||||||
|
import 'package:twonly/src/services/signal/prekeys.signal.dart';
|
||||||
import 'package:twonly/src/services/signal/utils.signal.dart';
|
import 'package:twonly/src/services/signal/utils.signal.dart';
|
||||||
import 'package:twonly/src/utils/hive.dart';
|
import 'package:twonly/src/utils/hive.dart';
|
||||||
import 'package:twonly/src/services/fcm.service.dart';
|
import 'package:twonly/src/services/fcm.service.dart';
|
||||||
|
|
|
||||||
|
|
@ -1,120 +1,15 @@
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
import 'package:drift/drift.dart';
|
|
||||||
import 'package:libsignal_protocol_dart/libsignal_protocol_dart.dart';
|
import 'package:libsignal_protocol_dart/libsignal_protocol_dart.dart';
|
||||||
import 'package:twonly/globals.dart';
|
|
||||||
import 'package:twonly/src/database/twonly_database.dart';
|
import 'package:twonly/src/database/twonly_database.dart';
|
||||||
import 'package:twonly/src/model/json/message.dart';
|
import 'package:twonly/src/model/json/message.dart';
|
||||||
import 'package:twonly/src/database/signal/connect_signal_protocol_store.dart';
|
import 'package:twonly/src/database/signal/connect_signal_protocol_store.dart';
|
||||||
import 'package:twonly/src/services/signal/consts.signal.dart';
|
import 'package:twonly/src/services/signal/consts.signal.dart';
|
||||||
|
import 'package:twonly/src/services/signal/prekeys.signal.dart';
|
||||||
import 'package:twonly/src/services/signal/utils.signal.dart';
|
import 'package:twonly/src/services/signal/utils.signal.dart';
|
||||||
import 'package:twonly/src/utils/log.dart';
|
import 'package:twonly/src/utils/log.dart';
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
import 'package:twonly/src/utils/misc.dart';
|
||||||
import 'package:twonly/src/model/protobuf/api/server_to_client.pb.dart'
|
|
||||||
as server;
|
|
||||||
|
|
||||||
class OtherPreKeys {
|
|
||||||
OtherPreKeys({
|
|
||||||
required this.preKeys,
|
|
||||||
required this.signedPreKey,
|
|
||||||
required this.signedPreKeyId,
|
|
||||||
required this.signedPreKeySignature,
|
|
||||||
});
|
|
||||||
final List<server.Response_PreKey> preKeys;
|
|
||||||
final int signedPreKeyId;
|
|
||||||
final List<int> signedPreKey;
|
|
||||||
final List<int> signedPreKeySignature;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Future<void> deleteSession(String userId) async {
|
|
||||||
// await mixinSignalProtocolStore.sessionStore.sessionDao
|
|
||||||
// .deleteSessionsByAddress(userId);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Future<void> processSession(String userId, PreKeyBundle preKeyBundle) async {
|
|
||||||
// final signalProtocolAddress = SignalProtocolAddress(
|
|
||||||
// userId,
|
|
||||||
// preKeyBundle.getDeviceId(),
|
|
||||||
// );
|
|
||||||
// final sessionBuilder = SessionBuilder.fromSignalStore(
|
|
||||||
// mixinSignalProtocolStore,
|
|
||||||
// signalProtocolAddress,
|
|
||||||
// );
|
|
||||||
// try {
|
|
||||||
// await sessionBuilder.processPreKeyBundle(preKeyBundle);
|
|
||||||
// } on UntrustedIdentityException {
|
|
||||||
// await mixinSignalProtocolStore.removeIdentity(signalProtocolAddress);
|
|
||||||
// await sessionBuilder.processPreKeyBundle(preKeyBundle);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
Future requestNewPrekeysForContact(int contactId) async {
|
|
||||||
final otherKeys = await apiService.getPreKeysByUserId(contactId);
|
|
||||||
if (otherKeys != null) {
|
|
||||||
Log.info("got fresh pre keys from other $contactId!");
|
|
||||||
final preKeys = otherKeys.preKeys
|
|
||||||
.map(
|
|
||||||
(preKey) => SignalContactPreKeysCompanion(
|
|
||||||
contactId: Value(contactId),
|
|
||||||
preKey: Value(Uint8List.fromList(preKey.prekey)),
|
|
||||||
preKeyId: Value(preKey.id.toInt()),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
.toList();
|
|
||||||
await twonlyDB.signalDao.insertPreKeys(preKeys);
|
|
||||||
} else {
|
|
||||||
Log.error("could not load new pre keys for user $contactId");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<SignalContactPreKey?> getPreKeyByContactId(int contactId) async {
|
|
||||||
int count = await twonlyDB.signalDao.countPreKeysByContactId(contactId);
|
|
||||||
if (count < 10) {
|
|
||||||
Log.info(
|
|
||||||
"There are $count < 10 prekeys for $contactId. Loading fresh once from the server.",
|
|
||||||
);
|
|
||||||
requestNewPrekeysForContact(contactId);
|
|
||||||
}
|
|
||||||
return twonlyDB.signalDao.popPreKeyByContactId(contactId);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future requestNewSignedPreKeyForContact(int contactId) async {
|
|
||||||
final signedPreKey = await apiService.getSignedKeyByUserId(contactId);
|
|
||||||
if (signedPreKey != null) {
|
|
||||||
Log.info("got fresh signed pre keys from other $contactId!");
|
|
||||||
await twonlyDB.signalDao.insertOrUpdateSignedPreKeyByContactId(
|
|
||||||
SignalContactSignedPreKeysCompanion(
|
|
||||||
contactId: Value(contactId),
|
|
||||||
signedPreKey: Value(Uint8List.fromList(signedPreKey.signedPrekey)),
|
|
||||||
signedPreKeySignature:
|
|
||||||
Value(Uint8List.fromList(signedPreKey.signedPrekeySignature)),
|
|
||||||
signedPreKeyId: Value(signedPreKey.signedPrekeyId.toInt()),
|
|
||||||
));
|
|
||||||
} else {
|
|
||||||
Log.error("could not load new signed pre key for user $contactId");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<SignalContactSignedPreKey?> getSignedPreKeyByContactId(
|
|
||||||
int contactId,
|
|
||||||
) async {
|
|
||||||
SignalContactSignedPreKey? signedPreKey =
|
|
||||||
await twonlyDB.signalDao.getSignedPreKeyByContactId(contactId);
|
|
||||||
|
|
||||||
if (signedPreKey != null) {
|
|
||||||
DateTime fortyEightHoursAgo = DateTime.now().subtract(Duration(hours: 48));
|
|
||||||
bool isOlderThan48Hours =
|
|
||||||
(signedPreKey.createdAt).isBefore(fortyEightHoursAgo);
|
|
||||||
if (isOlderThan48Hours) {
|
|
||||||
requestNewSignedPreKeyForContact(contactId);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
requestNewSignedPreKeyForContact(contactId);
|
|
||||||
Log.error("Contact $contactId does not have a signed pre key!");
|
|
||||||
}
|
|
||||||
return signedPreKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<Uint8List?> signalEncryptMessage(int target, MessageJson msg) async {
|
Future<Uint8List?> signalEncryptMessage(int target, MessageJson msg) async {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
86
lib/src/services/signal/prekeys.signal.dart
Normal file
86
lib/src/services/signal/prekeys.signal.dart
Normal file
|
|
@ -0,0 +1,86 @@
|
||||||
|
import 'package:drift/drift.dart';
|
||||||
|
import 'package:twonly/globals.dart';
|
||||||
|
import 'package:twonly/src/database/twonly_database.dart';
|
||||||
|
import 'package:twonly/src/utils/log.dart';
|
||||||
|
import 'package:twonly/src/model/protobuf/api/server_to_client.pb.dart'
|
||||||
|
as server;
|
||||||
|
|
||||||
|
class OtherPreKeys {
|
||||||
|
OtherPreKeys({
|
||||||
|
required this.preKeys,
|
||||||
|
required this.signedPreKey,
|
||||||
|
required this.signedPreKeyId,
|
||||||
|
required this.signedPreKeySignature,
|
||||||
|
});
|
||||||
|
final List<server.Response_PreKey> preKeys;
|
||||||
|
final int signedPreKeyId;
|
||||||
|
final List<int> signedPreKey;
|
||||||
|
final List<int> signedPreKeySignature;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future requestNewPrekeysForContact(int contactId) async {
|
||||||
|
final otherKeys = await apiService.getPreKeysByUserId(contactId);
|
||||||
|
if (otherKeys != null) {
|
||||||
|
Log.info("got fresh pre keys from other $contactId!");
|
||||||
|
final preKeys = otherKeys.preKeys
|
||||||
|
.map(
|
||||||
|
(preKey) => SignalContactPreKeysCompanion(
|
||||||
|
contactId: Value(contactId),
|
||||||
|
preKey: Value(Uint8List.fromList(preKey.prekey)),
|
||||||
|
preKeyId: Value(preKey.id.toInt()),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.toList();
|
||||||
|
await twonlyDB.signalDao.insertPreKeys(preKeys);
|
||||||
|
} else {
|
||||||
|
Log.error("could not load new pre keys for user $contactId");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<SignalContactPreKey?> getPreKeyByContactId(int contactId) async {
|
||||||
|
int count = await twonlyDB.signalDao.countPreKeysByContactId(contactId);
|
||||||
|
if (count < 10) {
|
||||||
|
Log.info(
|
||||||
|
"There are $count < 10 prekeys for $contactId. Loading fresh once from the server.",
|
||||||
|
);
|
||||||
|
requestNewPrekeysForContact(contactId);
|
||||||
|
}
|
||||||
|
return twonlyDB.signalDao.popPreKeyByContactId(contactId);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future requestNewSignedPreKeyForContact(int contactId) async {
|
||||||
|
final signedPreKey = await apiService.getSignedKeyByUserId(contactId);
|
||||||
|
if (signedPreKey != null) {
|
||||||
|
Log.info("got fresh signed pre keys from other $contactId!");
|
||||||
|
await twonlyDB.signalDao.insertOrUpdateSignedPreKeyByContactId(
|
||||||
|
SignalContactSignedPreKeysCompanion(
|
||||||
|
contactId: Value(contactId),
|
||||||
|
signedPreKey: Value(Uint8List.fromList(signedPreKey.signedPrekey)),
|
||||||
|
signedPreKeySignature:
|
||||||
|
Value(Uint8List.fromList(signedPreKey.signedPrekeySignature)),
|
||||||
|
signedPreKeyId: Value(signedPreKey.signedPrekeyId.toInt()),
|
||||||
|
));
|
||||||
|
} else {
|
||||||
|
Log.error("could not load new signed pre key for user $contactId");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<SignalContactSignedPreKey?> getSignedPreKeyByContactId(
|
||||||
|
int contactId,
|
||||||
|
) async {
|
||||||
|
SignalContactSignedPreKey? signedPreKey =
|
||||||
|
await twonlyDB.signalDao.getSignedPreKeyByContactId(contactId);
|
||||||
|
|
||||||
|
if (signedPreKey != null) {
|
||||||
|
DateTime fortyEightHoursAgo = DateTime.now().subtract(Duration(hours: 48));
|
||||||
|
bool isOlderThan48Hours =
|
||||||
|
(signedPreKey.createdAt).isBefore(fortyEightHoursAgo);
|
||||||
|
if (isOlderThan48Hours) {
|
||||||
|
requestNewSignedPreKeyForContact(contactId);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
requestNewSignedPreKeyForContact(contactId);
|
||||||
|
Log.error("Contact $contactId does not have a signed pre key!");
|
||||||
|
}
|
||||||
|
return signedPreKey;
|
||||||
|
}
|
||||||
|
|
@ -23,7 +23,7 @@ import 'package:twonly/src/views/camera/image_editor/data/layer.dart';
|
||||||
import 'package:twonly/src/views/camera/image_editor/layers_viewer.dart';
|
import 'package:twonly/src/views/camera/image_editor/layers_viewer.dart';
|
||||||
import 'package:twonly/src/views/camera/image_editor/modules/all_emojis.dart';
|
import 'package:twonly/src/views/camera/image_editor/modules/all_emojis.dart';
|
||||||
import 'package:screenshot/screenshot.dart';
|
import 'package:screenshot/screenshot.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/subscription_view.dart';
|
import 'package:twonly/src/views/settings/subscription/subscription.view.dart';
|
||||||
import 'package:video_player/video_player.dart';
|
import 'package:video_player/video_player.dart';
|
||||||
|
|
||||||
List<Layer> layers = [];
|
List<Layer> layers = [];
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import 'package:twonly/src/views/components/verified_shield.dart';
|
||||||
import 'package:twonly/src/database/daos/contacts_dao.dart';
|
import 'package:twonly/src/database/daos/contacts_dao.dart';
|
||||||
import 'package:twonly/src/database/twonly_database.dart';
|
import 'package:twonly/src/database/twonly_database.dart';
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
import 'package:twonly/src/utils/misc.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/subscription_view.dart';
|
import 'package:twonly/src/views/settings/subscription/subscription.view.dart';
|
||||||
|
|
||||||
class ShareImageView extends StatefulWidget {
|
class ShareImageView extends StatefulWidget {
|
||||||
const ShareImageView(
|
const ShareImageView(
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ import 'package:twonly/src/views/components/initialsavatar.dart';
|
||||||
import 'package:twonly/src/model/json/message.dart';
|
import 'package:twonly/src/model/json/message.dart';
|
||||||
import 'package:twonly/src/services/api/messages.dart';
|
import 'package:twonly/src/services/api/messages.dart';
|
||||||
import 'package:twonly/src/utils/storage.dart';
|
import 'package:twonly/src/utils/storage.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/subscription_view.dart';
|
import 'package:twonly/src/views/settings/subscription/subscription.view.dart';
|
||||||
|
|
||||||
class AddNewUserView extends StatefulWidget {
|
class AddNewUserView extends StatefulWidget {
|
||||||
const AddNewUserView({super.key});
|
const AddNewUserView({super.key});
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,10 @@ import 'package:twonly/src/views/camera/camera_send_to_view.dart';
|
||||||
import 'package:twonly/src/views/chats/chat_messages.view.dart';
|
import 'package:twonly/src/views/chats/chat_messages.view.dart';
|
||||||
import 'package:twonly/src/views/chats/media_viewer.view.dart';
|
import 'package:twonly/src/views/chats/media_viewer.view.dart';
|
||||||
import 'package:twonly/src/views/chats/start_new_chat.view.dart';
|
import 'package:twonly/src/views/chats/start_new_chat.view.dart';
|
||||||
import 'package:twonly/src/views/settings/settings_main_view.dart';
|
import 'package:twonly/src/views/settings/settings_main.view.dart';
|
||||||
import 'package:twonly/src/views/chats/add_new_user.view.dart';
|
import 'package:twonly/src/views/chats/add_new_user.view.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/subscription_view.dart';
|
import 'package:twonly/src/views/settings/subscription/subscription.view.dart';
|
||||||
|
|
||||||
class ChatListView extends StatefulWidget {
|
class ChatListView extends StatefulWidget {
|
||||||
const ChatListView({super.key});
|
const ChatListView({super.key});
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
import 'package:twonly/src/utils/misc.dart';
|
||||||
import 'package:twonly/src/views/settings/chat/chat_reactions_view.dart';
|
import 'package:twonly/src/views/settings/chat/chat_reactions.view.dart';
|
||||||
|
|
||||||
class ChatSettingsView extends StatefulWidget {
|
class ChatSettingsView extends StatefulWidget {
|
||||||
const ChatSettingsView({super.key});
|
const ChatSettingsView({super.key});
|
||||||
|
|
@ -5,14 +5,14 @@ import 'package:logging/logging.dart';
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
import 'package:twonly/src/utils/misc.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
class FAQPage extends StatefulWidget {
|
class FaqView extends StatefulWidget {
|
||||||
const FAQPage({super.key});
|
const FaqView({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<FAQPage> createState() => _FAQPageState();
|
State<FaqView> createState() => _FaqViewState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _FAQPageState extends State<FAQPage> {
|
class _FaqViewState extends State<FaqView> {
|
||||||
Map<String, dynamic>? _faqData;
|
Map<String, dynamic>? _faqData;
|
||||||
String? _locale;
|
String? _locale;
|
||||||
late String domain;
|
late String domain;
|
||||||
|
|
@ -2,10 +2,10 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:package_info_plus/package_info_plus.dart';
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
import 'package:twonly/src/utils/misc.dart';
|
||||||
import 'package:twonly/src/views/settings/help/contact_us_view.dart';
|
import 'package:twonly/src/views/settings/help/contact_us.view.dart';
|
||||||
import 'package:twonly/src/views/settings/help/credits_view.dart';
|
import 'package:twonly/src/views/settings/help/credits.view.dart';
|
||||||
import 'package:twonly/src/views/settings/help/diagnostics_view.dart';
|
import 'package:twonly/src/views/settings/help/diagnostics.view.dart';
|
||||||
import 'package:twonly/src/views/settings/help/faq.dart';
|
import 'package:twonly/src/views/settings/help/faq.view.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
class HelpView extends StatelessWidget {
|
class HelpView extends StatelessWidget {
|
||||||
|
|
@ -22,10 +22,9 @@ class HelpView extends StatelessWidget {
|
||||||
title: Text(context.lang.settingsHelpFAQ),
|
title: Text(context.lang.settingsHelpFAQ),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(context, MaterialPageRoute(builder: (context) {
|
Navigator.push(context, MaterialPageRoute(builder: (context) {
|
||||||
return FAQPage();
|
return FaqView();
|
||||||
}));
|
}));
|
||||||
},
|
},
|
||||||
// trailing: FaIcon(FontAwesomeIcons.arrowUpRightFromSquare, size: 15),
|
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(context.lang.settingsHelpContactUs),
|
title: Text(context.lang.settingsHelpContactUs),
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:twonly/globals.dart';
|
import 'package:twonly/globals.dart';
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
import 'package:twonly/src/utils/misc.dart';
|
||||||
import 'package:twonly/src/views/settings/privacy_view_block_users.dart';
|
import 'package:twonly/src/views/settings/privacy_view_block.users.dart';
|
||||||
|
|
||||||
class PrivacyView extends StatefulWidget {
|
class PrivacyView extends StatefulWidget {
|
||||||
const PrivacyView({super.key});
|
const PrivacyView({super.key});
|
||||||
|
|
@ -6,7 +6,7 @@ import 'package:twonly/src/model/json/userdata.dart';
|
||||||
import 'package:twonly/src/services/api/messages.dart';
|
import 'package:twonly/src/services/api/messages.dart';
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
import 'package:twonly/src/utils/misc.dart';
|
||||||
import 'package:twonly/src/utils/storage.dart';
|
import 'package:twonly/src/utils/storage.dart';
|
||||||
import 'package:twonly/src/views/settings/profile/modify_avatar_view.dart';
|
import 'package:twonly/src/views/settings/profile/modify_avatar.view.dart';
|
||||||
|
|
||||||
class ProfileView extends StatefulWidget {
|
class ProfileView extends StatefulWidget {
|
||||||
const ProfileView({super.key});
|
const ProfileView({super.key});
|
||||||
|
|
@ -5,15 +5,15 @@ import 'package:twonly/src/model/json/userdata.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
import 'package:twonly/src/utils/misc.dart';
|
||||||
import 'package:twonly/src/utils/storage.dart';
|
import 'package:twonly/src/utils/storage.dart';
|
||||||
import 'package:twonly/src/views/settings/account_view.dart';
|
import 'package:twonly/src/views/settings/account.view.dart';
|
||||||
import 'package:twonly/src/views/settings/appearance_view.dart';
|
import 'package:twonly/src/views/settings/appearance.view.dart';
|
||||||
import 'package:twonly/src/views/settings/chat/chat_settings_view.dart';
|
import 'package:twonly/src/views/settings/chat/chat_settings.view.dart';
|
||||||
import 'package:twonly/src/views/settings/data_and_storage_view.dart';
|
import 'package:twonly/src/views/settings/data_and_storage.view.dart';
|
||||||
import 'package:twonly/src/views/settings/notification_view.dart';
|
import 'package:twonly/src/views/settings/notification.view.dart';
|
||||||
import 'package:twonly/src/views/settings/profile/profile_view.dart';
|
import 'package:twonly/src/views/settings/profile/profile.view.dart';
|
||||||
import 'package:twonly/src/views/settings/help/help_view.dart';
|
import 'package:twonly/src/views/settings/help/help.view.dart';
|
||||||
import 'package:twonly/src/views/settings/privacy_view.dart';
|
import 'package:twonly/src/views/settings/privacy.view.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/subscription_view.dart';
|
import 'package:twonly/src/views/settings/subscription/subscription.view.dart';
|
||||||
|
|
||||||
class SettingsMainView extends StatefulWidget {
|
class SettingsMainView extends StatefulWidget {
|
||||||
const SettingsMainView({super.key});
|
const SettingsMainView({super.key});
|
||||||
|
|
@ -11,7 +11,7 @@ import 'package:twonly/src/services/api/utils.dart';
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
import 'package:twonly/src/utils/misc.dart';
|
||||||
import 'package:twonly/src/utils/storage.dart';
|
import 'package:twonly/src/utils/storage.dart';
|
||||||
import 'package:twonly/src/views/components/alert_dialog.dart';
|
import 'package:twonly/src/views/components/alert_dialog.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/subscription_view.dart';
|
import 'package:twonly/src/views/settings/subscription/subscription.view.dart';
|
||||||
|
|
||||||
Future<List<Response_AddAccountsInvite>?> loadAdditionalUserInvites() async {
|
Future<List<Response_AddAccountsInvite>?> loadAdditionalUserInvites() async {
|
||||||
List<Response_AddAccountsInvite>? ballance;
|
List<Response_AddAccountsInvite>? ballance;
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
import 'package:twonly/src/utils/misc.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/select_payment.dart';
|
import 'package:twonly/src/views/settings/subscription/select_payment.view.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/subscription_view.dart';
|
import 'package:twonly/src/views/settings/subscription/subscription.view.dart';
|
||||||
|
|
||||||
class CheckoutView extends StatefulWidget {
|
class CheckoutView extends StatefulWidget {
|
||||||
const CheckoutView(
|
const CheckoutView(
|
||||||
|
|
@ -6,7 +6,7 @@ import 'package:twonly/src/model/protobuf/api/server_to_client.pb.dart';
|
||||||
import 'package:twonly/src/services/api/utils.dart';
|
import 'package:twonly/src/services/api/utils.dart';
|
||||||
import 'package:twonly/src/providers/connection.provider.dart';
|
import 'package:twonly/src/providers/connection.provider.dart';
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
import 'package:twonly/src/utils/misc.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/subscription_view.dart';
|
import 'package:twonly/src/views/settings/subscription/subscription.view.dart';
|
||||||
|
|
||||||
class ManageSubscriptionView extends StatefulWidget {
|
class ManageSubscriptionView extends StatefulWidget {
|
||||||
const ManageSubscriptionView(
|
const ManageSubscriptionView(
|
||||||
|
|
@ -5,8 +5,8 @@ import 'package:twonly/globals.dart';
|
||||||
import 'package:twonly/src/providers/connection.provider.dart';
|
import 'package:twonly/src/providers/connection.provider.dart';
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
import 'package:twonly/src/utils/misc.dart';
|
||||||
import 'package:twonly/src/utils/storage.dart';
|
import 'package:twonly/src/utils/storage.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/subscription_view.dart';
|
import 'package:twonly/src/views/settings/subscription/subscription.view.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/voucher_view.dart';
|
import 'package:twonly/src/views/settings/subscription/voucher.view.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
|
||||||
class SelectPaymentView extends StatefulWidget {
|
class SelectPaymentView extends StatefulWidget {
|
||||||
|
|
@ -13,11 +13,11 @@ import 'package:twonly/src/providers/connection.provider.dart';
|
||||||
import 'package:twonly/src/utils/misc.dart';
|
import 'package:twonly/src/utils/misc.dart';
|
||||||
import 'package:twonly/src/utils/storage.dart';
|
import 'package:twonly/src/utils/storage.dart';
|
||||||
import 'package:twonly/src/views/components/better_list_title.dart';
|
import 'package:twonly/src/views/components/better_list_title.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/additional_users_view.dart';
|
import 'package:twonly/src/views/settings/subscription/additional_users.view.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/checkout_view.dart';
|
import 'package:twonly/src/views/settings/subscription/checkout.view.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/manage_subscription_view.dart';
|
import 'package:twonly/src/views/settings/subscription/manage_subscription.view.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/transaction_view.dart';
|
import 'package:twonly/src/views/settings/subscription/transaction.view.dart';
|
||||||
import 'package:twonly/src/views/settings/subscription/voucher_view.dart';
|
import 'package:twonly/src/views/settings/subscription/voucher.view.dart';
|
||||||
|
|
||||||
String localePrizing(BuildContext context, int cents) {
|
String localePrizing(BuildContext context, int cents) {
|
||||||
Locale myLocale = Localizations.localeOf(context);
|
Locale myLocale = Localizations.localeOf(context);
|
||||||
Loading…
Reference in a new issue