mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2024-10-01 06:55:46 -04:00
refactor some more
This commit is contained in:
parent
2adc958128
commit
c516323e7d
4
build.sh
4
build.sh
@ -3,7 +3,5 @@ set -e
|
|||||||
dart run build_runner build --delete-conflicting-outputs
|
dart run build_runner build --delete-conflicting-outputs
|
||||||
|
|
||||||
pushd lib > /dev/null
|
pushd lib > /dev/null
|
||||||
protoc --dart_out=proto -I veilid_support/proto -I veilid_support/dht_support/proto -I proto veilidchat.proto
|
protoc --dart_out=proto -I ../packages/veilid_support/lib/proto -I ../packages/veilid_support/lib/dht_support/proto -I proto veilidchat.proto
|
||||||
protoc --dart_out=proto -I veilid_support/proto -I veilid_support/dht_support/proto dht.proto
|
|
||||||
protoc --dart_out=proto -I veilid_support/proto veilid.proto
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
3
lib/account_manager/account_manager.dart
Normal file
3
lib/account_manager/account_manager.dart
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export 'cubit/cubit.dart';
|
||||||
|
export 'repository/repository.dart';
|
||||||
|
export 'view/view.dart';
|
@ -1,14 +1,14 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:bloc/bloc.dart';
|
import 'package:bloc/bloc.dart';
|
||||||
|
import 'package:veilid_support/veilid_support.dart';
|
||||||
|
|
||||||
import '../../veilid_support/veilid_support.dart';
|
import '../../repository/account_repository/account_repository.dart';
|
||||||
import '../account_repository/account_repository.dart';
|
|
||||||
|
|
||||||
part 'active_user_login_state.dart';
|
part 'active_user_login_state.dart';
|
||||||
|
|
||||||
class ActiveUserLoginCubit extends Cubit<ActiveUserLoginState> {
|
class ActiveUserLoginCubit extends Cubit<ActiveUserLoginState> {
|
||||||
ActiveUserLoginCubit({required AccountRepository accountRepository})
|
ActiveUserLoginCubit(AccountRepository accountRepository)
|
||||||
: _accountRepository = accountRepository,
|
: _accountRepository = accountRepository,
|
||||||
super(null) {
|
super(null) {
|
||||||
// Subscribe to streams
|
// Subscribe to streams
|
@ -1,3 +1,3 @@
|
|||||||
export 'account_repository/account_repository.dart';
|
export 'active_user_login_cubit/active_user_login_cubit.dart';
|
||||||
export 'local_accounts_cubit/local_accounts_cubit.dart';
|
export 'local_accounts_cubit/local_accounts_cubit.dart';
|
||||||
export 'user_logins_cubit/user_logins_cubit.dart';
|
export 'user_logins_cubit/user_logins_cubit.dart';
|
@ -3,12 +3,12 @@ import 'dart:async';
|
|||||||
import 'package:bloc/bloc.dart';
|
import 'package:bloc/bloc.dart';
|
||||||
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
||||||
|
|
||||||
import '../account_repository/account_repository.dart';
|
import '../../repository/account_repository/account_repository.dart';
|
||||||
|
|
||||||
part 'local_accounts_state.dart';
|
part 'local_accounts_state.dart';
|
||||||
|
|
||||||
class LocalAccountsCubit extends Cubit<LocalAccountsState> {
|
class LocalAccountsCubit extends Cubit<LocalAccountsState> {
|
||||||
LocalAccountsCubit({required AccountRepository accountRepository})
|
LocalAccountsCubit(AccountRepository accountRepository)
|
||||||
: _accountRepository = accountRepository,
|
: _accountRepository = accountRepository,
|
||||||
super(LocalAccountsState()) {
|
super(LocalAccountsState()) {
|
||||||
// Subscribe to streams
|
// Subscribe to streams
|
@ -3,12 +3,12 @@ import 'dart:async';
|
|||||||
import 'package:bloc/bloc.dart';
|
import 'package:bloc/bloc.dart';
|
||||||
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
||||||
|
|
||||||
import '../account_repository/account_repository.dart';
|
import '../../repository/account_repository/account_repository.dart';
|
||||||
|
|
||||||
part 'user_logins_state.dart';
|
part 'user_logins_state.dart';
|
||||||
|
|
||||||
class UserLoginsCubit extends Cubit<UserLoginsState> {
|
class UserLoginsCubit extends Cubit<UserLoginsState> {
|
||||||
UserLoginsCubit({required AccountRepository accountRepository})
|
UserLoginsCubit(AccountRepository accountRepository)
|
||||||
: _accountRepository = accountRepository,
|
: _accountRepository = accountRepository,
|
||||||
super(UserLoginsState()) {
|
super(UserLoginsState()) {
|
||||||
// Subscribe to streams
|
// Subscribe to streams
|
@ -1,11 +1,11 @@
|
|||||||
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
||||||
|
import 'package:veilid_support/veilid_support.dart';
|
||||||
|
|
||||||
import '../../../proto/proto.dart' as proto;
|
import '../../../../proto/proto.dart' as proto;
|
||||||
import '../../tools/tools.dart';
|
|
||||||
import '../../veilid_support/veilid_support.dart';
|
|
||||||
import 'active_logins.dart';
|
import 'active_logins.dart';
|
||||||
import 'encryption_key_type.dart';
|
import 'encryption_key_type.dart';
|
||||||
import 'local_account.dart';
|
import 'local_account.dart';
|
||||||
|
import 'new_profile_spec.dart';
|
||||||
import 'user_login.dart';
|
import 'user_login.dart';
|
||||||
|
|
||||||
export 'active_logins.dart';
|
export 'active_logins.dart';
|
||||||
@ -45,15 +45,7 @@ class AccountRepository {
|
|||||||
//////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////
|
||||||
/// Singleton initialization
|
/// Singleton initialization
|
||||||
|
|
||||||
static AccountRepository? _instance;
|
static AccountRepository instance = AccountRepository._();
|
||||||
static Future<AccountRepository> get instance async {
|
|
||||||
if (_instance == null) {
|
|
||||||
final accountRepository = AccountRepository._();
|
|
||||||
await accountRepository.init();
|
|
||||||
_instance = accountRepository;
|
|
||||||
}
|
|
||||||
return _instance!;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> init() async {
|
Future<void> init() async {
|
||||||
await _localAccounts.load();
|
await _localAccounts.load();
|
||||||
@ -104,13 +96,33 @@ class AccountRepository {
|
|||||||
await _localAccounts.set(updated);
|
await _localAccounts.set(updated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Creates a new master identity, an account associated with the master
|
||||||
|
/// identity, stores the account in the identity key and then logs into
|
||||||
|
/// that account with no password set at this time
|
||||||
|
Future<void> createMasterIdentity(NewProfileSpec newProfileSpec) async {
|
||||||
|
final imws = await IdentityMasterWithSecrets.create();
|
||||||
|
try {
|
||||||
|
final localAccount = await _newLocalAccount(
|
||||||
|
identityMaster: imws.identityMaster,
|
||||||
|
identitySecret: imws.identitySecret,
|
||||||
|
newProfileSpec: newProfileSpec);
|
||||||
|
|
||||||
|
// Log in the new account by default with no pin
|
||||||
|
final ok = await login(localAccount.identityMaster.masterRecordKey,
|
||||||
|
EncryptionKeyType.none, '');
|
||||||
|
assert(ok, 'login with none should never fail');
|
||||||
|
} on Exception catch (_) {
|
||||||
|
await imws.delete();
|
||||||
|
rethrow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// Creates a new Account associated with master identity
|
/// Creates a new Account associated with master identity
|
||||||
/// Adds a logged-out LocalAccount to track its existence on this device
|
/// Adds a logged-out LocalAccount to track its existence on this device
|
||||||
Future<LocalAccount> newLocalAccount(
|
Future<LocalAccount> _newLocalAccount(
|
||||||
{required IdentityMaster identityMaster,
|
{required IdentityMaster identityMaster,
|
||||||
required SecretKey identitySecret,
|
required SecretKey identitySecret,
|
||||||
required String name,
|
required NewProfileSpec newProfileSpec,
|
||||||
required String pronouns,
|
|
||||||
EncryptionKeyType encryptionKeyType = EncryptionKeyType.none,
|
EncryptionKeyType encryptionKeyType = EncryptionKeyType.none,
|
||||||
String encryptionKey = ''}) async {
|
String encryptionKey = ''}) async {
|
||||||
final localAccounts = await _localAccounts.get();
|
final localAccounts = await _localAccounts.get();
|
||||||
@ -136,8 +148,8 @@ class AccountRepository {
|
|||||||
// Make account object
|
// Make account object
|
||||||
final account = proto.Account()
|
final account = proto.Account()
|
||||||
..profile = (proto.Profile()
|
..profile = (proto.Profile()
|
||||||
..name = name
|
..name = newProfileSpec.name
|
||||||
..pronouns = pronouns)
|
..pronouns = newProfileSpec.pronouns)
|
||||||
..contactList = contactList.toProto()
|
..contactList = contactList.toProto()
|
||||||
..contactInvitationRecords = contactInvitationRecords.toProto()
|
..contactInvitationRecords = contactInvitationRecords.toProto()
|
||||||
..chatList = chatRecords.toProto();
|
..chatList = chatRecords.toProto();
|
||||||
@ -145,11 +157,11 @@ class AccountRepository {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Encrypt identitySecret with key
|
// Encrypt identitySecret with key
|
||||||
final identitySecretBytes = await encryptSecretToBytes(
|
final identitySecretBytes = await encryptionKeyType.encryptSecretToBytes(
|
||||||
secret: identitySecret,
|
secret: identitySecret,
|
||||||
cryptoKind: identityMaster.identityRecordKey.kind,
|
cryptoKind: identityMaster.identityRecordKey.kind,
|
||||||
encryptionKey: encryptionKey,
|
encryptionKey: encryptionKey,
|
||||||
encryptionKeyType: encryptionKeyType);
|
);
|
||||||
|
|
||||||
// Create local account object
|
// Create local account object
|
||||||
// Does not contain the account key or its secret
|
// Does not contain the account key or its secret
|
||||||
@ -161,7 +173,7 @@ class AccountRepository {
|
|||||||
encryptionKeyType: encryptionKeyType,
|
encryptionKeyType: encryptionKeyType,
|
||||||
biometricsEnabled: false,
|
biometricsEnabled: false,
|
||||||
hiddenAccount: false,
|
hiddenAccount: false,
|
||||||
name: name,
|
name: newProfileSpec.name,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add local account object to internal store
|
// Add local account object to internal store
|
||||||
@ -257,10 +269,10 @@ class AccountRepository {
|
|||||||
throw Exception('Wrong authentication type');
|
throw Exception('Wrong authentication type');
|
||||||
}
|
}
|
||||||
|
|
||||||
final identitySecret = await decryptSecretFromBytes(
|
final identitySecret =
|
||||||
|
await localAccount.encryptionKeyType.decryptSecretFromBytes(
|
||||||
secretBytes: localAccount.identitySecretBytes,
|
secretBytes: localAccount.identitySecretBytes,
|
||||||
cryptoKind: localAccount.identityMaster.identityRecordKey.kind,
|
cryptoKind: localAccount.identityMaster.identityRecordKey.kind,
|
||||||
encryptionKeyType: localAccount.encryptionKeyType,
|
|
||||||
encryptionKey: encryptionKey,
|
encryptionKey: encryptionKey,
|
||||||
);
|
);
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
// Represents a set of user logins and the currently selected account
|
// Represents a set of user logins and the currently selected account
|
||||||
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
||||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
import 'package:veilid_support/veilid_support.dart';
|
||||||
|
|
||||||
import '../../veilid_support/veilid_support.dart';
|
|
||||||
import 'user_login.dart';
|
import 'user_login.dart';
|
||||||
|
|
||||||
part 'active_logins.g.dart';
|
part 'active_logins.g.dart';
|
@ -4,9 +4,12 @@
|
|||||||
// * Pin : Code is a numeric pin (4-256 numeric digits) hashed with Argon2
|
// * Pin : Code is a numeric pin (4-256 numeric digits) hashed with Argon2
|
||||||
// * Password: Code is a UTF-8 string that is hashed with Argon2
|
// * Password: Code is a UTF-8 string that is hashed with Argon2
|
||||||
|
|
||||||
import 'package:change_case/change_case.dart';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import '../../../proto/proto.dart' as proto;
|
import 'package:change_case/change_case.dart';
|
||||||
|
import 'package:veilid_support/veilid_support.dart';
|
||||||
|
|
||||||
|
import '../../../../proto/proto.dart' as proto;
|
||||||
|
|
||||||
enum EncryptionKeyType {
|
enum EncryptionKeyType {
|
||||||
none,
|
none,
|
||||||
@ -37,4 +40,40 @@ enum EncryptionKeyType {
|
|||||||
EncryptionKeyType.password =>
|
EncryptionKeyType.password =>
|
||||||
proto.EncryptionKeyType.ENCRYPTION_KEY_TYPE_PASSWORD,
|
proto.EncryptionKeyType.ENCRYPTION_KEY_TYPE_PASSWORD,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Future<Uint8List> encryptSecretToBytes(
|
||||||
|
{required SecretKey secret,
|
||||||
|
required CryptoKind cryptoKind,
|
||||||
|
String encryptionKey = ''}) async {
|
||||||
|
late final Uint8List secretBytes;
|
||||||
|
switch (this) {
|
||||||
|
case EncryptionKeyType.none:
|
||||||
|
secretBytes = secret.decode();
|
||||||
|
case EncryptionKeyType.pin:
|
||||||
|
case EncryptionKeyType.password:
|
||||||
|
final cs = await Veilid.instance.getCryptoSystem(cryptoKind);
|
||||||
|
|
||||||
|
secretBytes =
|
||||||
|
await cs.encryptAeadWithPassword(secret.decode(), encryptionKey);
|
||||||
|
}
|
||||||
|
return secretBytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<SecretKey> decryptSecretFromBytes(
|
||||||
|
{required Uint8List secretBytes,
|
||||||
|
required CryptoKind cryptoKind,
|
||||||
|
String encryptionKey = ''}) async {
|
||||||
|
late final SecretKey secret;
|
||||||
|
switch (this) {
|
||||||
|
case EncryptionKeyType.none:
|
||||||
|
secret = SecretKey.fromBytes(secretBytes);
|
||||||
|
case EncryptionKeyType.pin:
|
||||||
|
case EncryptionKeyType.password:
|
||||||
|
final cs = await Veilid.instance.getCryptoSystem(cryptoKind);
|
||||||
|
|
||||||
|
secret = SecretKey.fromBytes(
|
||||||
|
await cs.decryptAeadWithPassword(secretBytes, encryptionKey));
|
||||||
|
}
|
||||||
|
return secret;
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,8 +1,8 @@
|
|||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
import 'package:veilid_support/veilid_support.dart';
|
||||||
|
|
||||||
import '../../veilid_support/veilid_support.dart';
|
|
||||||
import 'encryption_key_type.dart';
|
import 'encryption_key_type.dart';
|
||||||
|
|
||||||
part 'local_account.g.dart';
|
part 'local_account.g.dart';
|
@ -0,0 +1,5 @@
|
|||||||
|
class NewProfileSpec {
|
||||||
|
NewProfileSpec({required this.name, required this.pronouns});
|
||||||
|
String name;
|
||||||
|
String pronouns;
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
|
||||||
import '../../veilid_support/veilid_support.dart';
|
import 'package:veilid_support/veilid_support.dart';
|
||||||
|
|
||||||
part 'user_login.freezed.dart';
|
part 'user_login.freezed.dart';
|
||||||
part 'user_login.g.dart';
|
part 'user_login.g.dart';
|
1
lib/account_manager/repository/repository.dart
Normal file
1
lib/account_manager/repository/repository.dart
Normal file
@ -0,0 +1 @@
|
|||||||
|
export 'account_repository/account_repository.dart';
|
@ -2,19 +2,15 @@ import 'package:awesome_extensions/awesome_extensions.dart';
|
|||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
import 'package:flutter_form_builder/flutter_form_builder.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
||||||
import 'package:flutter_translate/flutter_translate.dart';
|
import 'package:flutter_translate/flutter_translate.dart';
|
||||||
import 'package:form_builder_validators/form_builder_validators.dart';
|
import 'package:form_builder_validators/form_builder_validators.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
|
import 'package:veilid_support/veilid_support.dart';
|
||||||
|
|
||||||
import '../../components/default_app_bar.dart';
|
import '../../../components/default_app_bar.dart';
|
||||||
import '../../components/signal_strength_meter.dart';
|
import '../../../components/signal_strength_meter.dart';
|
||||||
import '../../entities/entities.dart';
|
import '../../../entities/entities.dart';
|
||||||
import '../../local_accounts/local_accounts.dart';
|
import '../../../tools/tools.dart';
|
||||||
import '../providers/logins.dart';
|
|
||||||
import '../providers/window_control.dart';
|
|
||||||
import '../../tools/tools.dart';
|
|
||||||
import '../../veilid_support/veilid_support.dart';
|
|
||||||
|
|
||||||
class NewAccountPage extends StatefulWidget {
|
class NewAccountPage extends StatefulWidget {
|
||||||
const NewAccountPage({super.key});
|
const NewAccountPage({super.key});
|
||||||
@ -23,7 +19,7 @@ class NewAccountPage extends StatefulWidget {
|
|||||||
NewAccountPageState createState() => NewAccountPageState();
|
NewAccountPageState createState() => NewAccountPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class NewAccountPageState extends ConsumerState<NewAccountPage> {
|
class NewAccountPageState extends State<NewAccountPage> {
|
||||||
final _formKey = GlobalKey<FormBuilderState>();
|
final _formKey = GlobalKey<FormBuilderState>();
|
||||||
late bool isInAsyncCall = false;
|
late bool isInAsyncCall = false;
|
||||||
static const String formFieldName = 'name';
|
static const String formFieldName = 'name';
|
||||||
@ -35,41 +31,11 @@ class NewAccountPageState extends ConsumerState<NewAccountPage> {
|
|||||||
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
WidgetsBinding.instance.addPostFrameCallback((_) async {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
await ref.read(windowControlProvider.notifier).changeWindowSetup(
|
await changeWindowSetup(
|
||||||
TitleBarStyle.normal, OrientationCapability.portraitOnly);
|
TitleBarStyle.normal, OrientationCapability.portraitOnly);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates a new master identity, an account associated with the master
|
|
||||||
/// identity, stores the account in the identity key and then logs into
|
|
||||||
/// that account with no password set at this time
|
|
||||||
Future<void> createAccount() async {
|
|
||||||
final localAccounts = ref.read(localAccountsProvider.notifier);
|
|
||||||
final logins = ref.read(loginsProvider.notifier);
|
|
||||||
|
|
||||||
final name = _formKey.currentState!.fields[formFieldName]!.value as String;
|
|
||||||
final pronouns =
|
|
||||||
_formKey.currentState!.fields[formFieldPronouns]!.value as String? ??
|
|
||||||
'';
|
|
||||||
|
|
||||||
final imws = await IdentityMasterWithSecrets.create();
|
|
||||||
try {
|
|
||||||
final localAccount = await localAccounts.newLocalAccount(
|
|
||||||
identityMaster: imws.identityMaster,
|
|
||||||
identitySecret: imws.identitySecret,
|
|
||||||
name: name,
|
|
||||||
pronouns: pronouns);
|
|
||||||
|
|
||||||
// Log in the new account by default with no pin
|
|
||||||
final ok = await logins.login(localAccount.identityMaster.masterRecordKey,
|
|
||||||
EncryptionKeyType.none, '');
|
|
||||||
assert(ok, 'login with none should never fail');
|
|
||||||
} on Exception catch (_) {
|
|
||||||
await imws.delete();
|
|
||||||
rethrow;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget _newAccountForm(BuildContext context,
|
Widget _newAccountForm(BuildContext context,
|
||||||
{required Future<void> Function(GlobalKey<FormBuilderState>)
|
{required Future<void> Function(GlobalKey<FormBuilderState>)
|
||||||
onSubmit}) =>
|
onSubmit}) =>
|
||||||
@ -129,11 +95,6 @@ class NewAccountPageState extends ConsumerState<NewAccountPage> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
ref.watch(windowControlProvider);
|
|
||||||
|
|
||||||
final localAccounts = ref.watch(localAccountsProvider);
|
|
||||||
final logins = ref.watch(loginsProvider);
|
|
||||||
|
|
||||||
final displayModalHUD =
|
final displayModalHUD =
|
||||||
isInAsyncCall || !localAccounts.hasValue || !logins.hasValue;
|
isInAsyncCall || !localAccounts.hasValue || !logins.hasValue;
|
||||||
|
|
1
lib/account_manager/view/view.dart
Normal file
1
lib/account_manager/view/view.dart
Normal file
@ -0,0 +1 @@
|
|||||||
|
export 'new_account_page/new_account_page.dart';
|
32
lib/app.dart
32
lib/app.dart
@ -6,6 +6,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
|
|||||||
import 'package:flutter_translate/flutter_translate.dart';
|
import 'package:flutter_translate/flutter_translate.dart';
|
||||||
import 'package:form_builder_validators/form_builder_validators.dart';
|
import 'package:form_builder_validators/form_builder_validators.dart';
|
||||||
|
|
||||||
|
import 'account_manager/account_manager.dart';
|
||||||
import 'router/router.dart';
|
import 'router/router.dart';
|
||||||
import 'tick.dart';
|
import 'tick.dart';
|
||||||
|
|
||||||
@ -15,6 +16,8 @@ class VeilidChatApp extends StatelessWidget {
|
|||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
static const String name = 'VeilidChat';
|
||||||
|
|
||||||
final ThemeData themeData;
|
final ThemeData themeData;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -25,14 +28,30 @@ class VeilidChatApp extends StatelessWidget {
|
|||||||
initTheme: themeData,
|
initTheme: themeData,
|
||||||
builder: (_, theme) => LocalizationProvider(
|
builder: (_, theme) => LocalizationProvider(
|
||||||
state: LocalizationProvider.of(context).state,
|
state: LocalizationProvider.of(context).state,
|
||||||
|
child: MultiBlocProvider(
|
||||||
|
providers: [
|
||||||
|
BlocProvider<RouterCubit>(
|
||||||
|
create: (context) =>
|
||||||
|
RouterCubit(AccountRepository.instance),
|
||||||
|
),
|
||||||
|
BlocProvider<LocalAccountsCubit>(
|
||||||
|
create: (context) =>
|
||||||
|
LocalAccountsCubit(AccountRepository.instance),
|
||||||
|
),
|
||||||
|
BlocProvider<UserLoginsCubit>(
|
||||||
|
create: (context) =>
|
||||||
|
UserLoginsCubit(AccountRepository.instance),
|
||||||
|
),
|
||||||
|
BlocProvider<ActiveUserLoginCubit>(
|
||||||
|
create: (context) =>
|
||||||
|
ActiveUserLoginCubit(AccountRepository.instance),
|
||||||
|
),
|
||||||
|
],
|
||||||
child: BackgroundTicker(
|
child: BackgroundTicker(
|
||||||
builder: (context) => BlocProvider(
|
builder: (context) => MaterialApp.router(
|
||||||
create: (context) => RouterCubit(),
|
|
||||||
child: MaterialApp.router(
|
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
routerConfig: router(
|
routerConfig: router(
|
||||||
routerCubit:
|
routerCubit: BlocProvider.of<RouterCubit>(context)),
|
||||||
BlocProvider.of<RouterCubit>(context)),
|
|
||||||
title: translate('app.title'),
|
title: translate('app.title'),
|
||||||
theme: theme,
|
theme: theme,
|
||||||
localizationsDelegates: [
|
localizationsDelegates: [
|
||||||
@ -41,8 +60,7 @@ class VeilidChatApp extends StatelessWidget {
|
|||||||
FormBuilderLocalizations.delegate,
|
FormBuilderLocalizations.delegate,
|
||||||
localizationDelegate
|
localizationDelegate
|
||||||
],
|
],
|
||||||
supportedLocales:
|
supportedLocales: localizationDelegate.supportedLocales,
|
||||||
localizationDelegate.supportedLocales,
|
|
||||||
locale: localizationDelegate.currentLocale,
|
locale: localizationDelegate.currentLocale,
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'local_account_manager/local_account_manager.dart';
|
import 'app.dart';
|
||||||
|
import 'local_account_manager/account_manager.dart';
|
||||||
import 'processor.dart';
|
import 'processor.dart';
|
||||||
import 'tools/tools.dart';
|
import 'tools/tools.dart';
|
||||||
import 'veilid_support/veilid_support.dart';
|
import '../packages/veilid_support/veilid_support.dart';
|
||||||
|
|
||||||
const String appName = 'VeilidChat';
|
|
||||||
|
|
||||||
final Completer<Veilid> eventualVeilid = Completer<Veilid>();
|
final Completer<Veilid> eventualVeilid = Completer<Veilid>();
|
||||||
final Processor processor = Processor();
|
final Processor processor = Processor();
|
||||||
@ -20,7 +19,8 @@ Future<void> initializeVeilid() async {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Init Veilid
|
// Init Veilid
|
||||||
Veilid.instance.initializeVeilidCore(getDefaultVeilidPlatformConfig(appName));
|
Veilid.instance
|
||||||
|
.initializeVeilidCore(getDefaultVeilidPlatformConfig(VeilidChatApp.name));
|
||||||
|
|
||||||
// Veilid logging
|
// Veilid logging
|
||||||
initVeilidLog();
|
initVeilidLog();
|
||||||
@ -34,7 +34,7 @@ Future<void> initializeVeilid() async {
|
|||||||
|
|
||||||
// Initialize repositories
|
// Initialize repositories
|
||||||
Future<void> initializeRepositories() async {
|
Future<void> initializeRepositories() async {
|
||||||
await AccountRepository.instance;
|
await AccountRepository.instance.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> initializeVeilidChat() async {
|
Future<void> initializeVeilidChat() async {
|
||||||
|
@ -8,11 +8,9 @@ import 'package:flutter_translate/flutter_translate.dart';
|
|||||||
import 'package:intl/date_symbol_data_local.dart';
|
import 'package:intl/date_symbol_data_local.dart';
|
||||||
|
|
||||||
import 'app.dart';
|
import 'app.dart';
|
||||||
import 'old_to_refactor/providers/window_control.dart';
|
import 'init.dart';
|
||||||
import 'theme/theme.dart';
|
import 'theme/theme.dart';
|
||||||
import 'tools/tools.dart';
|
import 'tools/tools.dart';
|
||||||
import 'init.dart';
|
|
||||||
|
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
// Disable all debugprints in release mode
|
// Disable all debugprints in release mode
|
||||||
@ -39,7 +37,7 @@ void main() async {
|
|||||||
final themeData = themeRepository.themeData();
|
final themeData = themeRepository.themeData();
|
||||||
|
|
||||||
// Manage window on desktop platforms
|
// Manage window on desktop platforms
|
||||||
await WindowControl.initialize();
|
await initializeWindowControl();
|
||||||
|
|
||||||
// Make localization delegate
|
// Make localization delegate
|
||||||
final delegate = await LocalizationDelegate.create(
|
final delegate = await LocalizationDelegate.create(
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
|
||||||
import 'package:signal_strength_indicator/signal_strength_indicator.dart';
|
import 'package:signal_strength_indicator/signal_strength_indicator.dart';
|
||||||
import 'package:go_router/go_router.dart';
|
import 'package:veilid_support/veilid_support.dart';
|
||||||
|
|
||||||
import '../providers/connection_state.dart';
|
import '../providers/connection_state.dart';
|
||||||
import '../tools/tools.dart';
|
import '../tools/tools.dart';
|
||||||
import '../veilid_support/veilid_support.dart';
|
|
||||||
|
|
||||||
class SignalStrengthMeterWidget extends ConsumerWidget {
|
xxx move to feature level
|
||||||
|
|
||||||
|
class SignalStrengthMeterWidget extends Widget {
|
||||||
const SignalStrengthMeterWidget({super.key});
|
const SignalStrengthMeterWidget({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'preferences.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
_$LockPreferenceImpl _$$LockPreferenceImplFromJson(Map<String, dynamic> json) =>
|
|
||||||
_$LockPreferenceImpl(
|
|
||||||
inactivityLockSecs: json['inactivity_lock_secs'] as int,
|
|
||||||
lockWhenSwitching: json['lock_when_switching'] as bool,
|
|
||||||
lockWithSystemLock: json['lock_with_system_lock'] as bool,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$$LockPreferenceImplToJson(
|
|
||||||
_$LockPreferenceImpl instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'inactivity_lock_secs': instance.inactivityLockSecs,
|
|
||||||
'lock_when_switching': instance.lockWhenSwitching,
|
|
||||||
'lock_with_system_lock': instance.lockWithSystemLock,
|
|
||||||
};
|
|
||||||
|
|
||||||
_$ThemePreferencesImpl _$$ThemePreferencesImplFromJson(
|
|
||||||
Map<String, dynamic> json) =>
|
|
||||||
_$ThemePreferencesImpl(
|
|
||||||
brightnessPreference:
|
|
||||||
BrightnessPreference.fromJson(json['brightness_preference']),
|
|
||||||
colorPreference: ColorPreference.fromJson(json['color_preference']),
|
|
||||||
displayScale: (json['display_scale'] as num).toDouble(),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$$ThemePreferencesImplToJson(
|
|
||||||
_$ThemePreferencesImpl instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'brightness_preference': instance.brightnessPreference.toJson(),
|
|
||||||
'color_preference': instance.colorPreference.toJson(),
|
|
||||||
'display_scale': instance.displayScale,
|
|
||||||
};
|
|
||||||
|
|
||||||
_$PreferencesImpl _$$PreferencesImplFromJson(Map<String, dynamic> json) =>
|
|
||||||
_$PreferencesImpl(
|
|
||||||
themePreferences: ThemePreferences.fromJson(json['theme_preferences']),
|
|
||||||
language: LanguagePreference.fromJson(json['language']),
|
|
||||||
locking: LockPreference.fromJson(json['locking']),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$$PreferencesImplToJson(_$PreferencesImpl instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'theme_preferences': instance.themePreferences.toJson(),
|
|
||||||
'language': instance.language.toJson(),
|
|
||||||
'locking': instance.locking.toJson(),
|
|
||||||
};
|
|
@ -14,7 +14,7 @@ import 'package:quickalert/quickalert.dart';
|
|||||||
import 'package:xterm/xterm.dart';
|
import 'package:xterm/xterm.dart';
|
||||||
|
|
||||||
import '../../tools/tools.dart';
|
import '../../tools/tools.dart';
|
||||||
import '../../veilid_support/veilid_support.dart';
|
import '../../../packages/veilid_support/veilid_support.dart';
|
||||||
|
|
||||||
final globalDebugTerminal = Terminal(
|
final globalDebugTerminal = Terminal(
|
||||||
maxLines: 50000,
|
maxLines: 50000,
|
||||||
|
@ -18,7 +18,7 @@ import '../../local_accounts/local_accounts.dart';
|
|||||||
import '../providers/logins.dart';
|
import '../providers/logins.dart';
|
||||||
import '../providers/window_control.dart';
|
import '../providers/window_control.dart';
|
||||||
import '../../tools/tools.dart';
|
import '../../tools/tools.dart';
|
||||||
import '../../veilid_support/veilid_support.dart';
|
import '../../../packages/veilid_support/veilid_support.dart';
|
||||||
import 'main_pager/main_pager.dart';
|
import 'main_pager/main_pager.dart';
|
||||||
|
|
||||||
class HomePage extends StatefulWidget {
|
class HomePage extends StatefulWidget {
|
||||||
|
@ -15,7 +15,7 @@ import '../../providers/contact.dart';
|
|||||||
import '../../providers/contact_invite.dart';
|
import '../../providers/contact_invite.dart';
|
||||||
import '../../../theme/theme.dart';
|
import '../../../theme/theme.dart';
|
||||||
import '../../../tools/tools.dart';
|
import '../../../tools/tools.dart';
|
||||||
import '../../../veilid_support/veilid_support.dart';
|
import '../../../../packages/veilid_support/veilid_support.dart';
|
||||||
|
|
||||||
class AccountPage extends ConsumerStatefulWidget {
|
class AccountPage extends ConsumerStatefulWidget {
|
||||||
const AccountPage({
|
const AccountPage({
|
||||||
|
@ -13,7 +13,7 @@ import '../../providers/contact.dart';
|
|||||||
import '../../../local_accounts/local_accounts.dart';
|
import '../../../local_accounts/local_accounts.dart';
|
||||||
import '../../providers/logins.dart';
|
import '../../providers/logins.dart';
|
||||||
import '../../../tools/tools.dart';
|
import '../../../tools/tools.dart';
|
||||||
import '../../../veilid_support/veilid_support.dart';
|
import '../../../../packages/veilid_support/veilid_support.dart';
|
||||||
|
|
||||||
class ChatsPage extends ConsumerStatefulWidget {
|
class ChatsPage extends ConsumerStatefulWidget {
|
||||||
const ChatsPage({super.key});
|
const ChatsPage({super.key});
|
||||||
|
@ -20,7 +20,7 @@ import '../../../components/send_invite_dialog.dart';
|
|||||||
import '../../../entities/local_account.dart';
|
import '../../../entities/local_account.dart';
|
||||||
import '../../../proto/proto.dart' as proto;
|
import '../../../proto/proto.dart' as proto;
|
||||||
import '../../../tools/tools.dart';
|
import '../../../tools/tools.dart';
|
||||||
import '../../../veilid_support/veilid_support.dart';
|
import '../../../../packages/veilid_support/veilid_support.dart';
|
||||||
import 'account.dart';
|
import 'account.dart';
|
||||||
import 'chats.dart';
|
import 'chats.dart';
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import 'package:riverpod_annotation/riverpod_annotation.dart';
|
|||||||
import '../../entities/local_account.dart';
|
import '../../entities/local_account.dart';
|
||||||
import '../../entities/user_login.dart';
|
import '../../entities/user_login.dart';
|
||||||
import '../../proto/proto.dart' as proto;
|
import '../../proto/proto.dart' as proto;
|
||||||
import '../../veilid_support/veilid_support.dart';
|
import '../../../packages/veilid_support/veilid_support.dart';
|
||||||
import '../../local_accounts/local_accounts.dart';
|
import '../../local_accounts/local_accounts.dart';
|
||||||
import 'logins.dart';
|
import 'logins.dart';
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import 'package:riverpod_annotation/riverpod_annotation.dart';
|
|||||||
|
|
||||||
import '../../proto/proto.dart' as proto;
|
import '../../proto/proto.dart' as proto;
|
||||||
|
|
||||||
import '../../veilid_support/veilid_support.dart';
|
import '../../../packages/veilid_support/veilid_support.dart';
|
||||||
import 'account.dart';
|
import 'account.dart';
|
||||||
|
|
||||||
part 'chat.g.dart';
|
part 'chat.g.dart';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
|
|
||||||
import '../../veilid_support/veilid_support.dart';
|
import '../../../packages/veilid_support/veilid_support.dart';
|
||||||
|
|
||||||
part 'connection_state.freezed.dart';
|
part 'connection_state.freezed.dart';
|
||||||
|
|
||||||
|
@ -30,8 +30,6 @@ abstract class $ConnectionStateCopyWith<$Res> {
|
|||||||
_$ConnectionStateCopyWithImpl<$Res, ConnectionState>;
|
_$ConnectionStateCopyWithImpl<$Res, ConnectionState>;
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({VeilidStateAttachment attachment});
|
$Res call({VeilidStateAttachment attachment});
|
||||||
|
|
||||||
$VeilidStateAttachmentCopyWith<$Res> get attachment;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@ -47,23 +45,15 @@ class _$ConnectionStateCopyWithImpl<$Res, $Val extends ConnectionState>
|
|||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
Object? attachment = null,
|
Object? attachment = freezed,
|
||||||
}) {
|
}) {
|
||||||
return _then(_value.copyWith(
|
return _then(_value.copyWith(
|
||||||
attachment: null == attachment
|
attachment: freezed == attachment
|
||||||
? _value.attachment
|
? _value.attachment
|
||||||
: attachment // ignore: cast_nullable_to_non_nullable
|
: attachment // ignore: cast_nullable_to_non_nullable
|
||||||
as VeilidStateAttachment,
|
as VeilidStateAttachment,
|
||||||
) as $Val);
|
) as $Val);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
$VeilidStateAttachmentCopyWith<$Res> get attachment {
|
|
||||||
return $VeilidStateAttachmentCopyWith<$Res>(_value.attachment, (value) {
|
|
||||||
return _then(_value.copyWith(attachment: value) as $Val);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@ -75,9 +65,6 @@ abstract class _$$ConnectionStateImplCopyWith<$Res>
|
|||||||
@override
|
@override
|
||||||
@useResult
|
@useResult
|
||||||
$Res call({VeilidStateAttachment attachment});
|
$Res call({VeilidStateAttachment attachment});
|
||||||
|
|
||||||
@override
|
|
||||||
$VeilidStateAttachmentCopyWith<$Res> get attachment;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @nodoc
|
/// @nodoc
|
||||||
@ -91,10 +78,10 @@ class __$$ConnectionStateImplCopyWithImpl<$Res>
|
|||||||
@pragma('vm:prefer-inline')
|
@pragma('vm:prefer-inline')
|
||||||
@override
|
@override
|
||||||
$Res call({
|
$Res call({
|
||||||
Object? attachment = null,
|
Object? attachment = freezed,
|
||||||
}) {
|
}) {
|
||||||
return _then(_$ConnectionStateImpl(
|
return _then(_$ConnectionStateImpl(
|
||||||
attachment: null == attachment
|
attachment: freezed == attachment
|
||||||
? _value.attachment
|
? _value.attachment
|
||||||
: attachment // ignore: cast_nullable_to_non_nullable
|
: attachment // ignore: cast_nullable_to_non_nullable
|
||||||
as VeilidStateAttachment,
|
as VeilidStateAttachment,
|
||||||
@ -120,12 +107,13 @@ class _$ConnectionStateImpl extends _ConnectionState {
|
|||||||
return identical(this, other) ||
|
return identical(this, other) ||
|
||||||
(other.runtimeType == runtimeType &&
|
(other.runtimeType == runtimeType &&
|
||||||
other is _$ConnectionStateImpl &&
|
other is _$ConnectionStateImpl &&
|
||||||
(identical(other.attachment, attachment) ||
|
const DeepCollectionEquality()
|
||||||
other.attachment == attachment));
|
.equals(other.attachment, attachment));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
int get hashCode => Object.hash(runtimeType, attachment);
|
int get hashCode =>
|
||||||
|
Object.hash(runtimeType, const DeepCollectionEquality().hash(attachment));
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
@JsonKey(ignore: true)
|
||||||
@override
|
@override
|
||||||
|
@ -5,7 +5,7 @@ import 'package:riverpod_annotation/riverpod_annotation.dart';
|
|||||||
|
|
||||||
import '../../proto/proto.dart' as proto;
|
import '../../proto/proto.dart' as proto;
|
||||||
|
|
||||||
import '../../veilid_support/veilid_support.dart';
|
import '../../../packages/veilid_support/veilid_support.dart';
|
||||||
import '../../tools/tools.dart';
|
import '../../tools/tools.dart';
|
||||||
import 'account.dart';
|
import 'account.dart';
|
||||||
import 'chat.dart';
|
import 'chat.dart';
|
||||||
|
@ -7,7 +7,7 @@ import 'package:mutex/mutex.dart';
|
|||||||
import '../../entities/entities.dart';
|
import '../../entities/entities.dart';
|
||||||
import '../../proto/proto.dart' as proto;
|
import '../../proto/proto.dart' as proto;
|
||||||
import '../../tools/tools.dart';
|
import '../../tools/tools.dart';
|
||||||
import '../../veilid_support/veilid_support.dart';
|
import '../../../packages/veilid_support/veilid_support.dart';
|
||||||
import 'account.dart';
|
import 'account.dart';
|
||||||
|
|
||||||
part 'contact_invitation_list_manager.g.dart';
|
part 'contact_invitation_list_manager.g.dart';
|
||||||
@ -115,11 +115,11 @@ class ContactInvitationListManager extends _$ContactInvitationListManager {
|
|||||||
final conversationWriter = _activeAccountInfo.getConversationWriter();
|
final conversationWriter = _activeAccountInfo.getConversationWriter();
|
||||||
|
|
||||||
// Encrypt the writer secret with the encryption key
|
// Encrypt the writer secret with the encryption key
|
||||||
final encryptedSecret = await encryptSecretToBytes(
|
final encryptedSecret = await encryptionKeyType.encryptSecretToBytes(
|
||||||
secret: contactRequestWriter.secret,
|
secret: contactRequestWriter.secret,
|
||||||
cryptoKind: cs.kind(),
|
cryptoKind: cs.kind(),
|
||||||
encryptionKey: encryptionKey,
|
encryptionKey: encryptionKey,
|
||||||
encryptionKeyType: encryptionKeyType);
|
);
|
||||||
|
|
||||||
// Create local chat DHT record with the account record key as its parent
|
// Create local chat DHT record with the account record key as its parent
|
||||||
// Do not set the encryption of this key yet as it will not yet be written
|
// Do not set the encryption of this key yet as it will not yet be written
|
||||||
|
@ -7,7 +7,7 @@ import 'package:riverpod_annotation/riverpod_annotation.dart';
|
|||||||
import '../../entities/local_account.dart';
|
import '../../entities/local_account.dart';
|
||||||
import '../../proto/proto.dart' as proto;
|
import '../../proto/proto.dart' as proto;
|
||||||
import '../../tools/tools.dart';
|
import '../../tools/tools.dart';
|
||||||
import '../../veilid_support/veilid_support.dart';
|
import '../../../packages/veilid_support/veilid_support.dart';
|
||||||
import 'account.dart';
|
import 'account.dart';
|
||||||
import 'conversation.dart';
|
import 'conversation.dart';
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import '../../proto/proto.dart' as proto;
|
|||||||
|
|
||||||
import '../../tools/tools.dart';
|
import '../../tools/tools.dart';
|
||||||
import '../../init.dart';
|
import '../../init.dart';
|
||||||
import '../../veilid_support/veilid_support.dart';
|
import '../../../packages/veilid_support/veilid_support.dart';
|
||||||
import 'account.dart';
|
import 'account.dart';
|
||||||
import 'chat.dart';
|
import 'chat.dart';
|
||||||
import 'contact.dart';
|
import 'contact.dart';
|
||||||
|
@ -1,83 +0,0 @@
|
|||||||
import 'dart:async';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
|
||||||
import 'package:window_manager/window_manager.dart';
|
|
||||||
|
|
||||||
import '../../tools/responsive.dart';
|
|
||||||
|
|
||||||
export 'package:window_manager/window_manager.dart' show TitleBarStyle;
|
|
||||||
|
|
||||||
part 'window_control.g.dart';
|
|
||||||
|
|
||||||
enum OrientationCapability {
|
|
||||||
normal,
|
|
||||||
portraitOnly,
|
|
||||||
landscapeOnly,
|
|
||||||
}
|
|
||||||
|
|
||||||
// Window Control
|
|
||||||
@riverpod
|
|
||||||
class WindowControl extends _$WindowControl {
|
|
||||||
/// Change window control
|
|
||||||
@override
|
|
||||||
FutureOr<bool> build() async {
|
|
||||||
await _doWindowSetup(TitleBarStyle.hidden, OrientationCapability.normal);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static Future<void> initialize() async {
|
|
||||||
if (isDesktop) {
|
|
||||||
await windowManager.ensureInitialized();
|
|
||||||
|
|
||||||
const windowOptions = WindowOptions(
|
|
||||||
size: Size(768, 1024),
|
|
||||||
//minimumSize: Size(480, 480),
|
|
||||||
center: true,
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
skipTaskbar: false,
|
|
||||||
);
|
|
||||||
await windowManager.waitUntilReadyToShow(windowOptions, () async {
|
|
||||||
await windowManager.show();
|
|
||||||
await windowManager.focus();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> _doWindowSetup(TitleBarStyle titleBarStyle,
|
|
||||||
OrientationCapability orientationCapability) async {
|
|
||||||
if (isDesktop) {
|
|
||||||
await windowManager.setTitleBarStyle(titleBarStyle);
|
|
||||||
} else {
|
|
||||||
switch (orientationCapability) {
|
|
||||||
case OrientationCapability.normal:
|
|
||||||
await SystemChrome.setPreferredOrientations([
|
|
||||||
DeviceOrientation.portraitUp,
|
|
||||||
DeviceOrientation.landscapeLeft,
|
|
||||||
DeviceOrientation.landscapeRight,
|
|
||||||
]);
|
|
||||||
case OrientationCapability.portraitOnly:
|
|
||||||
await SystemChrome.setPreferredOrientations([
|
|
||||||
DeviceOrientation.portraitUp,
|
|
||||||
]);
|
|
||||||
case OrientationCapability.landscapeOnly:
|
|
||||||
await SystemChrome.setPreferredOrientations([
|
|
||||||
DeviceOrientation.landscapeLeft,
|
|
||||||
DeviceOrientation.landscapeRight,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////
|
|
||||||
/// Mutators and Selectors
|
|
||||||
|
|
||||||
/// Reorder accounts
|
|
||||||
Future<void> changeWindowSetup(TitleBarStyle titleBarStyle,
|
|
||||||
OrientationCapability orientationCapability) async {
|
|
||||||
state = const AsyncValue.loading();
|
|
||||||
await _doWindowSetup(titleBarStyle, orientationCapability);
|
|
||||||
state = const AsyncValue.data(true);
|
|
||||||
}
|
|
||||||
}
|
|
@ -2,10 +2,11 @@ import 'dart:async';
|
|||||||
|
|
||||||
import 'package:veilid/veilid.dart';
|
import 'package:veilid/veilid.dart';
|
||||||
|
|
||||||
|
import 'app.dart';
|
||||||
import 'old_to_refactor/providers/connection_state.dart';
|
import 'old_to_refactor/providers/connection_state.dart';
|
||||||
import 'tools/tools.dart';
|
import 'tools/tools.dart';
|
||||||
import 'veilid_support/src/config.dart';
|
import '../packages/veilid_support/src/config.dart';
|
||||||
import 'veilid_support/src/veilid_log.dart';
|
import '../packages/veilid_support/src/veilid_log.dart';
|
||||||
|
|
||||||
class Processor {
|
class Processor {
|
||||||
Processor();
|
Processor();
|
||||||
@ -27,13 +28,15 @@ class Processor {
|
|||||||
|
|
||||||
log.info('Veilid version: $_veilidVersion');
|
log.info('Veilid version: $_veilidVersion');
|
||||||
|
|
||||||
// In case of hot restart shut down first
|
// HACK: In case of hot restart shut down first
|
||||||
try {
|
try {
|
||||||
await Veilid.instance.shutdownVeilidCore();
|
await Veilid.instance.shutdownVeilidCore();
|
||||||
} on Exception {}
|
} on Exception {
|
||||||
|
// Do nothing on failure here
|
||||||
|
}
|
||||||
|
|
||||||
final updateStream =
|
final updateStream = await Veilid.instance
|
||||||
await Veilid.instance.startupVeilidCore(await getVeilidConfig());
|
.startupVeilidCore(await getVeilidConfig(VeilidChatApp.name));
|
||||||
_updateStream = updateStream;
|
_updateStream = updateStream;
|
||||||
_updateProcessor = processUpdates();
|
_updateProcessor = processUpdates();
|
||||||
_startedUp = true;
|
_startedUp = true;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
export '../veilid_support/dht_support/proto/proto.dart';
|
export 'package:veilid_support/dht_support/proto/proto.dart';
|
||||||
export '../veilid_support/proto/proto.dart';
|
export 'package:veilid_support/proto/proto.dart';
|
||||||
export 'veilidchat.pb.dart';
|
export 'veilidchat.pb.dart';
|
||||||
export 'veilidchat.pbenum.dart';
|
export 'veilidchat.pbenum.dart';
|
||||||
export 'veilidchat.pbjson.dart';
|
export 'veilidchat.pbjson.dart';
|
||||||
|
@ -6,12 +6,12 @@ import 'package:freezed_annotation/freezed_annotation.dart';
|
|||||||
import 'package:go_router/go_router.dart';
|
import 'package:go_router/go_router.dart';
|
||||||
|
|
||||||
import '../../init.dart';
|
import '../../init.dart';
|
||||||
import '../../local_account_manager/account_repository/account_repository.dart';
|
import '../../local_account_manager/respository/account_repository/account_repository.dart';
|
||||||
import '../../old_to_refactor/pages/chat_only.dart';
|
import '../../old_to_refactor/pages/chat_only.dart';
|
||||||
import '../../old_to_refactor/pages/developer.dart';
|
import '../../old_to_refactor/pages/developer.dart';
|
||||||
import '../../old_to_refactor/pages/home.dart';
|
import '../../old_to_refactor/pages/home.dart';
|
||||||
import '../../old_to_refactor/pages/index.dart';
|
import '../../old_to_refactor/pages/index.dart';
|
||||||
import '../../old_to_refactor/pages/new_account.dart';
|
import '../../account_manager/view/new_account_page/new_account_page.dart';
|
||||||
import '../../old_to_refactor/pages/settings.dart';
|
import '../../old_to_refactor/pages/settings.dart';
|
||||||
import '../../tools/tools.dart';
|
import '../../tools/tools.dart';
|
||||||
|
|
||||||
|
@ -1,193 +0,0 @@
|
|||||||
// coverage:ignore-file
|
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
// ignore_for_file: type=lint
|
|
||||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
|
||||||
|
|
||||||
part of 'router_cubit.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// FreezedGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
T _$identity<T>(T value) => value;
|
|
||||||
|
|
||||||
final _privateConstructorUsedError = UnsupportedError(
|
|
||||||
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
|
|
||||||
|
|
||||||
RouterState _$RouterStateFromJson(Map<String, dynamic> json) {
|
|
||||||
return _RouterState.fromJson(json);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
mixin _$RouterState {
|
|
||||||
bool get isInitialized => throw _privateConstructorUsedError;
|
|
||||||
bool get hasAnyAccount => throw _privateConstructorUsedError;
|
|
||||||
bool get hasActiveChat => throw _privateConstructorUsedError;
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
||||||
@JsonKey(ignore: true)
|
|
||||||
$RouterStateCopyWith<RouterState> get copyWith =>
|
|
||||||
throw _privateConstructorUsedError;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
abstract class $RouterStateCopyWith<$Res> {
|
|
||||||
factory $RouterStateCopyWith(
|
|
||||||
RouterState value, $Res Function(RouterState) then) =
|
|
||||||
_$RouterStateCopyWithImpl<$Res, RouterState>;
|
|
||||||
@useResult
|
|
||||||
$Res call({bool isInitialized, bool hasAnyAccount, bool hasActiveChat});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
class _$RouterStateCopyWithImpl<$Res, $Val extends RouterState>
|
|
||||||
implements $RouterStateCopyWith<$Res> {
|
|
||||||
_$RouterStateCopyWithImpl(this._value, this._then);
|
|
||||||
|
|
||||||
// ignore: unused_field
|
|
||||||
final $Val _value;
|
|
||||||
// ignore: unused_field
|
|
||||||
final $Res Function($Val) _then;
|
|
||||||
|
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
@override
|
|
||||||
$Res call({
|
|
||||||
Object? isInitialized = null,
|
|
||||||
Object? hasAnyAccount = null,
|
|
||||||
Object? hasActiveChat = null,
|
|
||||||
}) {
|
|
||||||
return _then(_value.copyWith(
|
|
||||||
isInitialized: null == isInitialized
|
|
||||||
? _value.isInitialized
|
|
||||||
: isInitialized // ignore: cast_nullable_to_non_nullable
|
|
||||||
as bool,
|
|
||||||
hasAnyAccount: null == hasAnyAccount
|
|
||||||
? _value.hasAnyAccount
|
|
||||||
: hasAnyAccount // ignore: cast_nullable_to_non_nullable
|
|
||||||
as bool,
|
|
||||||
hasActiveChat: null == hasActiveChat
|
|
||||||
? _value.hasActiveChat
|
|
||||||
: hasActiveChat // ignore: cast_nullable_to_non_nullable
|
|
||||||
as bool,
|
|
||||||
) as $Val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
abstract class _$$RouterStateImplCopyWith<$Res>
|
|
||||||
implements $RouterStateCopyWith<$Res> {
|
|
||||||
factory _$$RouterStateImplCopyWith(
|
|
||||||
_$RouterStateImpl value, $Res Function(_$RouterStateImpl) then) =
|
|
||||||
__$$RouterStateImplCopyWithImpl<$Res>;
|
|
||||||
@override
|
|
||||||
@useResult
|
|
||||||
$Res call({bool isInitialized, bool hasAnyAccount, bool hasActiveChat});
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
class __$$RouterStateImplCopyWithImpl<$Res>
|
|
||||||
extends _$RouterStateCopyWithImpl<$Res, _$RouterStateImpl>
|
|
||||||
implements _$$RouterStateImplCopyWith<$Res> {
|
|
||||||
__$$RouterStateImplCopyWithImpl(
|
|
||||||
_$RouterStateImpl _value, $Res Function(_$RouterStateImpl) _then)
|
|
||||||
: super(_value, _then);
|
|
||||||
|
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
@override
|
|
||||||
$Res call({
|
|
||||||
Object? isInitialized = null,
|
|
||||||
Object? hasAnyAccount = null,
|
|
||||||
Object? hasActiveChat = null,
|
|
||||||
}) {
|
|
||||||
return _then(_$RouterStateImpl(
|
|
||||||
isInitialized: null == isInitialized
|
|
||||||
? _value.isInitialized
|
|
||||||
: isInitialized // ignore: cast_nullable_to_non_nullable
|
|
||||||
as bool,
|
|
||||||
hasAnyAccount: null == hasAnyAccount
|
|
||||||
? _value.hasAnyAccount
|
|
||||||
: hasAnyAccount // ignore: cast_nullable_to_non_nullable
|
|
||||||
as bool,
|
|
||||||
hasActiveChat: null == hasActiveChat
|
|
||||||
? _value.hasActiveChat
|
|
||||||
: hasActiveChat // ignore: cast_nullable_to_non_nullable
|
|
||||||
as bool,
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @nodoc
|
|
||||||
@JsonSerializable()
|
|
||||||
class _$RouterStateImpl implements _RouterState {
|
|
||||||
const _$RouterStateImpl(
|
|
||||||
{required this.isInitialized,
|
|
||||||
required this.hasAnyAccount,
|
|
||||||
required this.hasActiveChat});
|
|
||||||
|
|
||||||
factory _$RouterStateImpl.fromJson(Map<String, dynamic> json) =>
|
|
||||||
_$$RouterStateImplFromJson(json);
|
|
||||||
|
|
||||||
@override
|
|
||||||
final bool isInitialized;
|
|
||||||
@override
|
|
||||||
final bool hasAnyAccount;
|
|
||||||
@override
|
|
||||||
final bool hasActiveChat;
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
return 'RouterState(isInitialized: $isInitialized, hasAnyAccount: $hasAnyAccount, hasActiveChat: $hasActiveChat)';
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool operator ==(Object other) {
|
|
||||||
return identical(this, other) ||
|
|
||||||
(other.runtimeType == runtimeType &&
|
|
||||||
other is _$RouterStateImpl &&
|
|
||||||
(identical(other.isInitialized, isInitialized) ||
|
|
||||||
other.isInitialized == isInitialized) &&
|
|
||||||
(identical(other.hasAnyAccount, hasAnyAccount) ||
|
|
||||||
other.hasAnyAccount == hasAnyAccount) &&
|
|
||||||
(identical(other.hasActiveChat, hasActiveChat) ||
|
|
||||||
other.hasActiveChat == hasActiveChat));
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
|
||||||
@override
|
|
||||||
int get hashCode =>
|
|
||||||
Object.hash(runtimeType, isInitialized, hasAnyAccount, hasActiveChat);
|
|
||||||
|
|
||||||
@JsonKey(ignore: true)
|
|
||||||
@override
|
|
||||||
@pragma('vm:prefer-inline')
|
|
||||||
_$$RouterStateImplCopyWith<_$RouterStateImpl> get copyWith =>
|
|
||||||
__$$RouterStateImplCopyWithImpl<_$RouterStateImpl>(this, _$identity);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Map<String, dynamic> toJson() {
|
|
||||||
return _$$RouterStateImplToJson(
|
|
||||||
this,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class _RouterState implements RouterState {
|
|
||||||
const factory _RouterState(
|
|
||||||
{required final bool isInitialized,
|
|
||||||
required final bool hasAnyAccount,
|
|
||||||
required final bool hasActiveChat}) = _$RouterStateImpl;
|
|
||||||
|
|
||||||
factory _RouterState.fromJson(Map<String, dynamic> json) =
|
|
||||||
_$RouterStateImpl.fromJson;
|
|
||||||
|
|
||||||
@override
|
|
||||||
bool get isInitialized;
|
|
||||||
@override
|
|
||||||
bool get hasAnyAccount;
|
|
||||||
@override
|
|
||||||
bool get hasActiveChat;
|
|
||||||
@override
|
|
||||||
@JsonKey(ignore: true)
|
|
||||||
_$$RouterStateImplCopyWith<_$RouterStateImpl> get copyWith =>
|
|
||||||
throw _privateConstructorUsedError;
|
|
||||||
}
|
|
@ -1,21 +0,0 @@
|
|||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'router_cubit.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
_$RouterStateImpl _$$RouterStateImplFromJson(Map<String, dynamic> json) =>
|
|
||||||
_$RouterStateImpl(
|
|
||||||
isInitialized: json['is_initialized'] as bool,
|
|
||||||
hasAnyAccount: json['has_any_account'] as bool,
|
|
||||||
hasActiveChat: json['has_active_chat'] as bool,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$$RouterStateImplToJson(_$RouterStateImpl instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'is_initialized': instance.isInitialized,
|
|
||||||
'has_any_account': instance.hasAnyAccount,
|
|
||||||
'has_active_chat': instance.hasActiveChat,
|
|
||||||
};
|
|
@ -1,108 +0,0 @@
|
|||||||
// ignore_for_file: always_put_required_named_parameters_first
|
|
||||||
|
|
||||||
import 'dart:convert';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
|
||||||
|
|
||||||
import '../entities/preferences.dart';
|
|
||||||
import 'radix_generator.dart';
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
class ThemeService {
|
|
||||||
ThemeService._();
|
|
||||||
static late SharedPreferences prefs;
|
|
||||||
static ThemeService? _instance;
|
|
||||||
|
|
||||||
static Future<ThemeService> get instance async {
|
|
||||||
if (_instance == null) {
|
|
||||||
prefs = await SharedPreferences.getInstance();
|
|
||||||
_instance = ThemeService._();
|
|
||||||
}
|
|
||||||
return _instance!;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool get isPlatformDark =>
|
|
||||||
WidgetsBinding.instance.platformDispatcher.platformBrightness ==
|
|
||||||
Brightness.dark;
|
|
||||||
|
|
||||||
ThemeData get initial {
|
|
||||||
final themePreferences = load();
|
|
||||||
return get(themePreferences);
|
|
||||||
}
|
|
||||||
|
|
||||||
ThemePreferences load() {
|
|
||||||
final themePreferencesJson = prefs.getString('themePreferences');
|
|
||||||
ThemePreferences? themePreferences;
|
|
||||||
if (themePreferencesJson != null) {
|
|
||||||
try {
|
|
||||||
themePreferences =
|
|
||||||
ThemePreferences.fromJson(jsonDecode(themePreferencesJson));
|
|
||||||
// ignore: avoid_catches_without_on_clauses
|
|
||||||
} catch (_) {
|
|
||||||
// ignore
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return themePreferences ??
|
|
||||||
const ThemePreferences(
|
|
||||||
colorPreference: ColorPreference.vapor,
|
|
||||||
brightnessPreference: BrightnessPreference.system,
|
|
||||||
displayScale: 1,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> save(ThemePreferences themePreferences) async {
|
|
||||||
await prefs.setString(
|
|
||||||
'themePreferences', jsonEncode(themePreferences.toJson()));
|
|
||||||
}
|
|
||||||
|
|
||||||
ThemeData get(ThemePreferences themePreferences) {
|
|
||||||
late final Brightness brightness;
|
|
||||||
switch (themePreferences.brightnessPreference) {
|
|
||||||
case BrightnessPreference.system:
|
|
||||||
if (isPlatformDark) {
|
|
||||||
brightness = Brightness.dark;
|
|
||||||
} else {
|
|
||||||
brightness = Brightness.light;
|
|
||||||
}
|
|
||||||
case BrightnessPreference.light:
|
|
||||||
brightness = Brightness.light;
|
|
||||||
case BrightnessPreference.dark:
|
|
||||||
brightness = Brightness.dark;
|
|
||||||
}
|
|
||||||
|
|
||||||
late final ThemeData themeData;
|
|
||||||
switch (themePreferences.colorPreference) {
|
|
||||||
// Special cases
|
|
||||||
case ColorPreference.contrast:
|
|
||||||
// xxx do contrastGenerator
|
|
||||||
themeData = radixGenerator(brightness, RadixThemeColor.grim);
|
|
||||||
// Generate from Radix
|
|
||||||
case ColorPreference.scarlet:
|
|
||||||
themeData = radixGenerator(brightness, RadixThemeColor.scarlet);
|
|
||||||
case ColorPreference.babydoll:
|
|
||||||
themeData = radixGenerator(brightness, RadixThemeColor.babydoll);
|
|
||||||
case ColorPreference.vapor:
|
|
||||||
themeData = radixGenerator(brightness, RadixThemeColor.vapor);
|
|
||||||
case ColorPreference.gold:
|
|
||||||
themeData = radixGenerator(brightness, RadixThemeColor.gold);
|
|
||||||
case ColorPreference.garden:
|
|
||||||
themeData = radixGenerator(brightness, RadixThemeColor.garden);
|
|
||||||
case ColorPreference.forest:
|
|
||||||
themeData = radixGenerator(brightness, RadixThemeColor.forest);
|
|
||||||
case ColorPreference.arctic:
|
|
||||||
themeData = radixGenerator(brightness, RadixThemeColor.arctic);
|
|
||||||
case ColorPreference.lapis:
|
|
||||||
themeData = radixGenerator(brightness, RadixThemeColor.lapis);
|
|
||||||
case ColorPreference.eggplant:
|
|
||||||
themeData = radixGenerator(brightness, RadixThemeColor.eggplant);
|
|
||||||
case ColorPreference.lime:
|
|
||||||
themeData = radixGenerator(brightness, RadixThemeColor.lime);
|
|
||||||
case ColorPreference.grim:
|
|
||||||
themeData = radixGenerator(brightness, RadixThemeColor.grim);
|
|
||||||
}
|
|
||||||
|
|
||||||
return themeData;
|
|
||||||
}
|
|
||||||
}
|
|
@ -5,14 +5,14 @@ import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
|||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'proto/proto.dart' as proto;
|
import 'init.dart';
|
||||||
import 'old_to_refactor/providers/account.dart';
|
import 'old_to_refactor/providers/account.dart';
|
||||||
import 'old_to_refactor/providers/chat.dart';
|
import 'old_to_refactor/providers/chat.dart';
|
||||||
import 'old_to_refactor/providers/connection_state.dart';
|
import 'old_to_refactor/providers/connection_state.dart';
|
||||||
import 'old_to_refactor/providers/contact.dart';
|
import 'old_to_refactor/providers/contact.dart';
|
||||||
import 'old_to_refactor/providers/contact_invite.dart';
|
import 'old_to_refactor/providers/contact_invite.dart';
|
||||||
import 'old_to_refactor/providers/conversation.dart';
|
import 'old_to_refactor/providers/conversation.dart';
|
||||||
import 'init.dart';
|
import 'proto/proto.dart' as proto;
|
||||||
|
|
||||||
const int ticksPerContactInvitationCheck = 5;
|
const int ticksPerContactInvitationCheck = 5;
|
||||||
const int ticksPerNewMessageCheck = 5;
|
const int ticksPerNewMessageCheck = 5;
|
||||||
|
@ -4,7 +4,7 @@ import 'package:bloc/bloc.dart';
|
|||||||
|
|
||||||
import '../../tools/tools.dart';
|
import '../../tools/tools.dart';
|
||||||
import '../init.dart';
|
import '../init.dart';
|
||||||
import '../../veilid_support/veilid_support.dart';
|
import '../../packages/veilid_support/veilid_support.dart';
|
||||||
|
|
||||||
abstract class AsyncTableDBBackedCubit<State> extends Cubit<AsyncValue<State>>
|
abstract class AsyncTableDBBackedCubit<State> extends Cubit<AsyncValue<State>>
|
||||||
with TableDBBacked<State> {
|
with TableDBBacked<State> {
|
||||||
|
@ -8,7 +8,7 @@ import 'package:intl/intl.dart';
|
|||||||
import 'package:loggy/loggy.dart';
|
import 'package:loggy/loggy.dart';
|
||||||
|
|
||||||
import '../old_to_refactor/pages/developer.dart';
|
import '../old_to_refactor/pages/developer.dart';
|
||||||
import '../veilid_support/veilid_support.dart';
|
import '../../packages/veilid_support/veilid_support.dart';
|
||||||
import 'state_logger.dart';
|
import 'state_logger.dart';
|
||||||
|
|
||||||
String wrapWithLogColor(LogLevel? level, String text) {
|
String wrapWithLogColor(LogLevel? level, String text) {
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
import 'dart:typed_data';
|
|
||||||
import '../local_accounts/local_account.dart';
|
|
||||||
import '../init.dart';
|
|
||||||
import '../veilid_support/veilid_support.dart';
|
|
||||||
|
|
||||||
Future<Uint8List> encryptSecretToBytes(
|
|
||||||
{required SecretKey secret,
|
|
||||||
required CryptoKind cryptoKind,
|
|
||||||
EncryptionKeyType encryptionKeyType = EncryptionKeyType.none,
|
|
||||||
String encryptionKey = ''}) async {
|
|
||||||
final veilid = await eventualVeilid.future;
|
|
||||||
|
|
||||||
late final Uint8List secretBytes;
|
|
||||||
switch (encryptionKeyType) {
|
|
||||||
case EncryptionKeyType.none:
|
|
||||||
secretBytes = secret.decode();
|
|
||||||
case EncryptionKeyType.pin:
|
|
||||||
case EncryptionKeyType.password:
|
|
||||||
final cs = await veilid.getCryptoSystem(cryptoKind);
|
|
||||||
|
|
||||||
secretBytes =
|
|
||||||
await cs.encryptAeadWithPassword(secret.decode(), encryptionKey);
|
|
||||||
}
|
|
||||||
return secretBytes;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<SecretKey> decryptSecretFromBytes(
|
|
||||||
{required Uint8List secretBytes,
|
|
||||||
required CryptoKind cryptoKind,
|
|
||||||
EncryptionKeyType encryptionKeyType = EncryptionKeyType.none,
|
|
||||||
String encryptionKey = ''}) async {
|
|
||||||
final veilid = await eventualVeilid.future;
|
|
||||||
|
|
||||||
late final SecretKey secret;
|
|
||||||
switch (encryptionKeyType) {
|
|
||||||
case EncryptionKeyType.none:
|
|
||||||
secret = SecretKey.fromBytes(secretBytes);
|
|
||||||
case EncryptionKeyType.pin:
|
|
||||||
case EncryptionKeyType.password:
|
|
||||||
final cs = await veilid.getCryptoSystem(cryptoKind);
|
|
||||||
|
|
||||||
secret = SecretKey.fromBytes(
|
|
||||||
await cs.decryptAeadWithPassword(secretBytes, encryptionKey));
|
|
||||||
}
|
|
||||||
return secret;
|
|
||||||
}
|
|
@ -5,6 +5,6 @@ export 'loggy.dart';
|
|||||||
export 'phono_byte.dart';
|
export 'phono_byte.dart';
|
||||||
export 'responsive.dart';
|
export 'responsive.dart';
|
||||||
export 'scanner_error_widget.dart';
|
export 'scanner_error_widget.dart';
|
||||||
export 'secret_crypto.dart';
|
|
||||||
export 'state_logger.dart';
|
export 'state_logger.dart';
|
||||||
export 'widget_helpers.dart';
|
export 'widget_helpers.dart';
|
||||||
|
export 'window_control.dart';
|
||||||
|
65
lib/tools/window_control.dart
Normal file
65
lib/tools/window_control.dart
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:window_manager/window_manager.dart';
|
||||||
|
|
||||||
|
import '../../tools/responsive.dart';
|
||||||
|
|
||||||
|
export 'package:window_manager/window_manager.dart' show TitleBarStyle;
|
||||||
|
|
||||||
|
enum OrientationCapability {
|
||||||
|
normal,
|
||||||
|
portraitOnly,
|
||||||
|
landscapeOnly,
|
||||||
|
}
|
||||||
|
|
||||||
|
// Window Control
|
||||||
|
Future<void> initializeWindowControl() async {
|
||||||
|
if (isDesktop) {
|
||||||
|
await windowManager.ensureInitialized();
|
||||||
|
|
||||||
|
const windowOptions = WindowOptions(
|
||||||
|
size: Size(768, 1024),
|
||||||
|
//minimumSize: Size(480, 480),
|
||||||
|
center: true,
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
skipTaskbar: false,
|
||||||
|
);
|
||||||
|
await windowManager.waitUntilReadyToShow(windowOptions, () async {
|
||||||
|
await _doWindowSetup(TitleBarStyle.hidden, OrientationCapability.normal);
|
||||||
|
await windowManager.show();
|
||||||
|
await windowManager.focus();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _doWindowSetup(TitleBarStyle titleBarStyle,
|
||||||
|
OrientationCapability orientationCapability) async {
|
||||||
|
if (isDesktop) {
|
||||||
|
await windowManager.setTitleBarStyle(titleBarStyle);
|
||||||
|
} else {
|
||||||
|
switch (orientationCapability) {
|
||||||
|
case OrientationCapability.normal:
|
||||||
|
await SystemChrome.setPreferredOrientations([
|
||||||
|
DeviceOrientation.portraitUp,
|
||||||
|
DeviceOrientation.landscapeLeft,
|
||||||
|
DeviceOrientation.landscapeRight,
|
||||||
|
]);
|
||||||
|
case OrientationCapability.portraitOnly:
|
||||||
|
await SystemChrome.setPreferredOrientations([
|
||||||
|
DeviceOrientation.portraitUp,
|
||||||
|
]);
|
||||||
|
case OrientationCapability.landscapeOnly:
|
||||||
|
await SystemChrome.setPreferredOrientations([
|
||||||
|
DeviceOrientation.landscapeLeft,
|
||||||
|
DeviceOrientation.landscapeRight,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> changeWindowSetup(TitleBarStyle titleBarStyle,
|
||||||
|
OrientationCapability orientationCapability) async {
|
||||||
|
await _doWindowSetup(titleBarStyle, orientationCapability);
|
||||||
|
}
|
56
packages/veilid_support/.gitignore
vendored
Normal file
56
packages/veilid_support/.gitignore
vendored
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
# Miscellaneous
|
||||||
|
*.class
|
||||||
|
*.log
|
||||||
|
*.pyc
|
||||||
|
*.swp
|
||||||
|
.DS_Store
|
||||||
|
.atom/
|
||||||
|
.buildlog/
|
||||||
|
.history
|
||||||
|
.svn/
|
||||||
|
migrate_working_dir/
|
||||||
|
|
||||||
|
# IntelliJ related
|
||||||
|
*.iml
|
||||||
|
*.ipr
|
||||||
|
*.iws
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# The .vscode folder contains launch configuration and tasks you configure in
|
||||||
|
# VS Code which you may wish to be included in version control, so this line
|
||||||
|
# is commented out by default.
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
# Flutter/Dart/Pub related
|
||||||
|
**/doc/api/
|
||||||
|
**/ios/Flutter/.last_build_id
|
||||||
|
.dart_tool/
|
||||||
|
.flutter-plugins
|
||||||
|
.flutter-plugins-dependencies
|
||||||
|
.packages
|
||||||
|
.pub-cache/
|
||||||
|
.pub/
|
||||||
|
/build/
|
||||||
|
|
||||||
|
# Flutter generated files
|
||||||
|
# Not doing this at this time: https://stackoverflow.com/questions/56110386/should-i-commit-generated-code-in-flutter-dart-to-vcs
|
||||||
|
# *.g.dart
|
||||||
|
# *.freezed.dart
|
||||||
|
# *.pb.dart
|
||||||
|
# *.pbenum.dart
|
||||||
|
# *.pbjson.dart
|
||||||
|
# *.pbserver.dart
|
||||||
|
|
||||||
|
# Symbolication related
|
||||||
|
app.*.symbols
|
||||||
|
|
||||||
|
# Obfuscation related
|
||||||
|
app.*.map.json
|
||||||
|
|
||||||
|
# Android Studio will place build artifacts here
|
||||||
|
/android/app/debug
|
||||||
|
/android/app/profile
|
||||||
|
/android/app/release
|
||||||
|
|
||||||
|
# WASM
|
||||||
|
/web/wasm/
|
15
packages/veilid_support/analysis_options.yaml
Normal file
15
packages/veilid_support/analysis_options.yaml
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
include: package:lint_hard/all.yaml
|
||||||
|
analyzer:
|
||||||
|
errors:
|
||||||
|
invalid_annotation_target: ignore
|
||||||
|
exclude:
|
||||||
|
- '**/*.g.dart'
|
||||||
|
- '**/*.freezed.dart'
|
||||||
|
- '**/*.pb.dart'
|
||||||
|
- '**/*.pbenum.dart'
|
||||||
|
- '**/*.pbjson.dart'
|
||||||
|
- '**/*.pbserver.dart'
|
||||||
|
linter:
|
||||||
|
rules:
|
||||||
|
unawaited_futures: true
|
||||||
|
avoid_positional_boolean_parameters: false
|
7
packages/veilid_support/build.bat
Normal file
7
packages/veilid_support/build.bat
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
@echo off
|
||||||
|
dart run build_runner build --delete-conflicting-outputs
|
||||||
|
|
||||||
|
pushd lib
|
||||||
|
protoc --dart_out=proto -I proto -I dht_support\proto dht.proto
|
||||||
|
protoc --dart_out=proto -I proto veilid.proto
|
||||||
|
popd
|
8
packages/veilid_support/build.sh
Executable file
8
packages/veilid_support/build.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
dart run build_runner build --delete-conflicting-outputs
|
||||||
|
|
||||||
|
pushd lib > /dev/null
|
||||||
|
protoc --dart_out=proto -I proto -I dht_support/proto dht.proto
|
||||||
|
protoc --dart_out=proto -I proto veilid.proto
|
||||||
|
popd > /dev/null
|
@ -1,11 +1,11 @@
|
|||||||
import '../../../proto/dht.pb.dart' as dhtproto;
|
import '../../proto/dht.pb.dart' as dhtproto;
|
||||||
import '../../proto/proto.dart' as veilidproto;
|
import '../../proto/proto.dart' as veilidproto;
|
||||||
import '../dht_support.dart';
|
import '../dht_support.dart';
|
||||||
|
|
||||||
export '../../../proto/dht.pb.dart';
|
export '../../proto/dht.pb.dart';
|
||||||
export '../../../proto/dht.pbenum.dart';
|
export '../../proto/dht.pbenum.dart';
|
||||||
export '../../../proto/dht.pbjson.dart';
|
export '../../proto/dht.pbjson.dart';
|
||||||
export '../../../proto/dht.pbserver.dart';
|
export '../../proto/dht.pbserver.dart';
|
||||||
export '../../proto/proto.dart';
|
export '../../proto/proto.dart';
|
||||||
|
|
||||||
/// OwnedDHTRecordPointer protobuf marshaling
|
/// OwnedDHTRecordPointer protobuf marshaling
|
@ -3,7 +3,7 @@ import 'dart:typed_data';
|
|||||||
|
|
||||||
import 'package:protobuf/protobuf.dart';
|
import 'package:protobuf/protobuf.dart';
|
||||||
|
|
||||||
import '../../veilid_support.dart';
|
import '../../../../veilid_support.dart';
|
||||||
|
|
||||||
class DHTRecord {
|
class DHTRecord {
|
||||||
DHTRecord(
|
DHTRecord(
|
@ -1,6 +1,6 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
import '../../veilid_support.dart';
|
import '../../../../veilid_support.dart';
|
||||||
|
|
||||||
abstract class DHTRecordCrypto {
|
abstract class DHTRecordCrypto {
|
||||||
FutureOr<Uint8List> encrypt(Uint8List data, int subkey);
|
FutureOr<Uint8List> encrypt(Uint8List data, int subkey);
|
@ -2,7 +2,7 @@ import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
|||||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
import 'package:mutex/mutex.dart';
|
import 'package:mutex/mutex.dart';
|
||||||
|
|
||||||
import '../../veilid_support.dart';
|
import '../../../../veilid_support.dart';
|
||||||
|
|
||||||
part 'dht_record_pool.freezed.dart';
|
part 'dht_record_pool.freezed.dart';
|
||||||
part 'dht_record_pool.g.dart';
|
part 'dht_record_pool.g.dart';
|
@ -11,47 +11,47 @@ _$DHTRecordPoolAllocationsImpl _$$DHTRecordPoolAllocationsImplFromJson(
|
|||||||
_$DHTRecordPoolAllocationsImpl(
|
_$DHTRecordPoolAllocationsImpl(
|
||||||
childrenByParent:
|
childrenByParent:
|
||||||
IMap<String, ISet<Typed<FixedEncodedString43>>>.fromJson(
|
IMap<String, ISet<Typed<FixedEncodedString43>>>.fromJson(
|
||||||
json['children_by_parent'] as Map<String, dynamic>,
|
json['childrenByParent'] as Map<String, dynamic>,
|
||||||
(value) => value as String,
|
(value) => value as String,
|
||||||
(value) => ISet<Typed<FixedEncodedString43>>.fromJson(value,
|
(value) => ISet<Typed<FixedEncodedString43>>.fromJson(value,
|
||||||
(value) => Typed<FixedEncodedString43>.fromJson(value))),
|
(value) => Typed<FixedEncodedString43>.fromJson(value))),
|
||||||
parentByChild: IMap<String, Typed<FixedEncodedString43>>.fromJson(
|
parentByChild: IMap<String, Typed<FixedEncodedString43>>.fromJson(
|
||||||
json['parent_by_child'] as Map<String, dynamic>,
|
json['parentByChild'] as Map<String, dynamic>,
|
||||||
(value) => value as String,
|
(value) => value as String,
|
||||||
(value) => Typed<FixedEncodedString43>.fromJson(value)),
|
(value) => Typed<FixedEncodedString43>.fromJson(value)),
|
||||||
rootRecords: ISet<Typed<FixedEncodedString43>>.fromJson(
|
rootRecords: ISet<Typed<FixedEncodedString43>>.fromJson(
|
||||||
json['root_records'],
|
json['rootRecords'],
|
||||||
(value) => Typed<FixedEncodedString43>.fromJson(value)),
|
(value) => Typed<FixedEncodedString43>.fromJson(value)),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$DHTRecordPoolAllocationsImplToJson(
|
Map<String, dynamic> _$$DHTRecordPoolAllocationsImplToJson(
|
||||||
_$DHTRecordPoolAllocationsImpl instance) =>
|
_$DHTRecordPoolAllocationsImpl instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'children_by_parent': instance.childrenByParent.toJson(
|
'childrenByParent': instance.childrenByParent.toJson(
|
||||||
(value) => value,
|
(value) => value,
|
||||||
(value) => value.toJson(
|
(value) => value.toJson(
|
||||||
(value) => value.toJson(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
'parent_by_child': instance.parentByChild.toJson(
|
|
||||||
(value) => value,
|
(value) => value,
|
||||||
(value) => value.toJson(),
|
|
||||||
),
|
),
|
||||||
'root_records': instance.rootRecords.toJson(
|
),
|
||||||
(value) => value.toJson(),
|
'parentByChild': instance.parentByChild.toJson(
|
||||||
|
(value) => value,
|
||||||
|
(value) => value,
|
||||||
|
),
|
||||||
|
'rootRecords': instance.rootRecords.toJson(
|
||||||
|
(value) => value,
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
_$OwnedDHTRecordPointerImpl _$$OwnedDHTRecordPointerImplFromJson(
|
_$OwnedDHTRecordPointerImpl _$$OwnedDHTRecordPointerImplFromJson(
|
||||||
Map<String, dynamic> json) =>
|
Map<String, dynamic> json) =>
|
||||||
_$OwnedDHTRecordPointerImpl(
|
_$OwnedDHTRecordPointerImpl(
|
||||||
recordKey: Typed<FixedEncodedString43>.fromJson(json['record_key']),
|
recordKey: Typed<FixedEncodedString43>.fromJson(json['recordKey']),
|
||||||
owner: KeyPair.fromJson(json['owner']),
|
owner: KeyPair.fromJson(json['owner']),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$OwnedDHTRecordPointerImplToJson(
|
Map<String, dynamic> _$$OwnedDHTRecordPointerImplToJson(
|
||||||
_$OwnedDHTRecordPointerImpl instance) =>
|
_$OwnedDHTRecordPointerImpl instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'record_key': instance.recordKey.toJson(),
|
'recordKey': instance.recordKey,
|
||||||
'owner': instance.owner.toJson(),
|
'owner': instance.owner,
|
||||||
};
|
};
|
@ -3,7 +3,7 @@ import 'dart:typed_data';
|
|||||||
|
|
||||||
import 'package:protobuf/protobuf.dart';
|
import 'package:protobuf/protobuf.dart';
|
||||||
|
|
||||||
import '../../veilid_support.dart';
|
import '../../../../veilid_support.dart';
|
||||||
import '../proto/proto.dart' as proto;
|
import '../proto/proto.dart' as proto;
|
||||||
|
|
||||||
class _DHTShortArrayCache {
|
class _DHTShortArrayCache {
|
@ -1,16 +1,16 @@
|
|||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
import '../../proto/veilid.pb.dart' as proto;
|
import '../veilid_support.dart' as veilid;
|
||||||
import '../veilid_support.dart';
|
import 'veilid.pb.dart' as proto;
|
||||||
|
|
||||||
export '../../proto/veilid.pb.dart';
|
export 'veilid.pb.dart';
|
||||||
export '../../proto/veilid.pbenum.dart';
|
export 'veilid.pbenum.dart';
|
||||||
export '../../proto/veilid.pbjson.dart';
|
export 'veilid.pbjson.dart';
|
||||||
export '../../proto/veilid.pbserver.dart';
|
export 'veilid.pbserver.dart';
|
||||||
|
|
||||||
/// CryptoKey protobuf marshaling
|
/// CryptoKey protobuf marshaling
|
||||||
///
|
///
|
||||||
extension CryptoKeyProto on CryptoKey {
|
extension CryptoKeyProto on veilid.CryptoKey {
|
||||||
proto.CryptoKey toProto() {
|
proto.CryptoKey toProto() {
|
||||||
final b = decode().buffer.asByteData();
|
final b = decode().buffer.asByteData();
|
||||||
final out = proto.CryptoKey()
|
final out = proto.CryptoKey()
|
||||||
@ -25,7 +25,7 @@ extension CryptoKeyProto on CryptoKey {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CryptoKey fromProto(proto.CryptoKey p) {
|
static veilid.CryptoKey fromProto(proto.CryptoKey p) {
|
||||||
final b = ByteData(32)
|
final b = ByteData(32)
|
||||||
..setUint32(0 * 4, p.u0)
|
..setUint32(0 * 4, p.u0)
|
||||||
..setUint32(1 * 4, p.u1)
|
..setUint32(1 * 4, p.u1)
|
||||||
@ -35,13 +35,13 @@ extension CryptoKeyProto on CryptoKey {
|
|||||||
..setUint32(5 * 4, p.u5)
|
..setUint32(5 * 4, p.u5)
|
||||||
..setUint32(6 * 4, p.u6)
|
..setUint32(6 * 4, p.u6)
|
||||||
..setUint32(7 * 4, p.u7);
|
..setUint32(7 * 4, p.u7);
|
||||||
return CryptoKey.fromBytes(Uint8List.view(b.buffer));
|
return veilid.CryptoKey.fromBytes(Uint8List.view(b.buffer));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Signature protobuf marshaling
|
/// Signature protobuf marshaling
|
||||||
///
|
///
|
||||||
extension SignatureProto on Signature {
|
extension SignatureProto on veilid.Signature {
|
||||||
proto.Signature toProto() {
|
proto.Signature toProto() {
|
||||||
final b = decode().buffer.asByteData();
|
final b = decode().buffer.asByteData();
|
||||||
final out = proto.Signature()
|
final out = proto.Signature()
|
||||||
@ -64,7 +64,7 @@ extension SignatureProto on Signature {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Signature fromProto(proto.Signature p) {
|
static veilid.Signature fromProto(proto.Signature p) {
|
||||||
final b = ByteData(64)
|
final b = ByteData(64)
|
||||||
..setUint32(0 * 4, p.u0)
|
..setUint32(0 * 4, p.u0)
|
||||||
..setUint32(1 * 4, p.u1)
|
..setUint32(1 * 4, p.u1)
|
||||||
@ -82,13 +82,13 @@ extension SignatureProto on Signature {
|
|||||||
..setUint32(13 * 4, p.u13)
|
..setUint32(13 * 4, p.u13)
|
||||||
..setUint32(14 * 4, p.u14)
|
..setUint32(14 * 4, p.u14)
|
||||||
..setUint32(15 * 4, p.u15);
|
..setUint32(15 * 4, p.u15);
|
||||||
return Signature.fromBytes(Uint8List.view(b.buffer));
|
return veilid.Signature.fromBytes(Uint8List.view(b.buffer));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Nonce protobuf marshaling
|
/// Nonce protobuf marshaling
|
||||||
///
|
///
|
||||||
extension NonceProto on Nonce {
|
extension NonceProto on veilid.Nonce {
|
||||||
proto.Nonce toProto() {
|
proto.Nonce toProto() {
|
||||||
final b = decode().buffer.asByteData();
|
final b = decode().buffer.asByteData();
|
||||||
final out = proto.Nonce()
|
final out = proto.Nonce()
|
||||||
@ -101,7 +101,7 @@ extension NonceProto on Nonce {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Nonce fromProto(proto.Nonce p) {
|
static veilid.Nonce fromProto(proto.Nonce p) {
|
||||||
final b = ByteData(24)
|
final b = ByteData(24)
|
||||||
..setUint32(0 * 4, p.u0)
|
..setUint32(0 * 4, p.u0)
|
||||||
..setUint32(1 * 4, p.u1)
|
..setUint32(1 * 4, p.u1)
|
||||||
@ -109,13 +109,13 @@ extension NonceProto on Nonce {
|
|||||||
..setUint32(3 * 4, p.u3)
|
..setUint32(3 * 4, p.u3)
|
||||||
..setUint32(4 * 4, p.u4)
|
..setUint32(4 * 4, p.u4)
|
||||||
..setUint32(5 * 4, p.u5);
|
..setUint32(5 * 4, p.u5);
|
||||||
return Nonce.fromBytes(Uint8List.view(b.buffer));
|
return veilid.Nonce.fromBytes(Uint8List.view(b.buffer));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TypedKey protobuf marshaling
|
/// TypedKey protobuf marshaling
|
||||||
///
|
///
|
||||||
extension TypedKeyProto on TypedKey {
|
extension TypedKeyProto on veilid.TypedKey {
|
||||||
proto.TypedKey toProto() {
|
proto.TypedKey toProto() {
|
||||||
final out = proto.TypedKey()
|
final out = proto.TypedKey()
|
||||||
..kind = kind
|
..kind = kind
|
||||||
@ -123,13 +123,13 @@ extension TypedKeyProto on TypedKey {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
static TypedKey fromProto(proto.TypedKey p) =>
|
static veilid.TypedKey fromProto(proto.TypedKey p) =>
|
||||||
TypedKey(kind: p.kind, value: CryptoKeyProto.fromProto(p.value));
|
veilid.TypedKey(kind: p.kind, value: CryptoKeyProto.fromProto(p.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// KeyPair protobuf marshaling
|
/// KeyPair protobuf marshaling
|
||||||
///
|
///
|
||||||
extension KeyPairProto on KeyPair {
|
extension KeyPairProto on veilid.KeyPair {
|
||||||
proto.KeyPair toProto() {
|
proto.KeyPair toProto() {
|
||||||
final out = proto.KeyPair()
|
final out = proto.KeyPair()
|
||||||
..key = key.toProto()
|
..key = key.toProto()
|
||||||
@ -137,7 +137,7 @@ extension KeyPairProto on KeyPair {
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
static KeyPair fromProto(proto.KeyPair p) => KeyPair(
|
static veilid.KeyPair fromProto(proto.KeyPair p) => veilid.KeyPair(
|
||||||
key: CryptoKeyProto.fromProto(p.key),
|
key: CryptoKeyProto.fromProto(p.key),
|
||||||
secret: CryptoKeyProto.fromProto(p.secret));
|
secret: CryptoKeyProto.fromProto(p.secret));
|
||||||
}
|
}
|
@ -1,8 +1,8 @@
|
|||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:veilid/veilid.dart';
|
import 'package:veilid/veilid.dart';
|
||||||
|
|
||||||
Map<String, dynamic> getDefaultVeilidPlatformConfig(String appName) {
|
Map<String, dynamic> getDefaultVeilidPlatformConfig(
|
||||||
if (kIsWeb) {
|
bool isWeb, String appName) {
|
||||||
|
if (isWeb) {
|
||||||
return const VeilidWASMConfig(
|
return const VeilidWASMConfig(
|
||||||
logging: VeilidWASMConfigLogging(
|
logging: VeilidWASMConfigLogging(
|
||||||
performance: VeilidWASMConfigLoggingPerformance(
|
performance: VeilidWASMConfigLoggingPerformance(
|
||||||
@ -30,7 +30,7 @@ Map<String, dynamic> getDefaultVeilidPlatformConfig(String appName) {
|
|||||||
.toJson();
|
.toJson();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<VeilidConfig> getVeilidConfig(String appName) async {
|
Future<VeilidConfig> getVeilidConfig(bool isWeb, String appName) async {
|
||||||
var config = await getDefaultVeilidConfig(appName);
|
var config = await getDefaultVeilidConfig(appName);
|
||||||
// ignore: do_not_use_environment
|
// ignore: do_not_use_environment
|
||||||
if (const String.fromEnvironment('DELETE_TABLE_STORE') == '1') {
|
if (const String.fromEnvironment('DELETE_TABLE_STORE') == '1') {
|
||||||
@ -51,7 +51,7 @@ Future<VeilidConfig> getVeilidConfig(String appName) async {
|
|||||||
// ignore: do_not_use_environment
|
// ignore: do_not_use_environment
|
||||||
const envNetwork = String.fromEnvironment('NETWORK');
|
const envNetwork = String.fromEnvironment('NETWORK');
|
||||||
if (envNetwork.isNotEmpty) {
|
if (envNetwork.isNotEmpty) {
|
||||||
final bootstrap = kIsWeb
|
final bootstrap = isWeb
|
||||||
? ['ws://bootstrap.$envNetwork.veilid.net:5150/ws']
|
? ['ws://bootstrap.$envNetwork.veilid.net:5150/ws']
|
||||||
: ['bootstrap.$envNetwork.veilid.net'];
|
: ['bootstrap.$envNetwork.veilid.net'];
|
||||||
config = config.copyWith(
|
config = config.copyWith(
|
@ -3,8 +3,9 @@ import 'dart:typed_data';
|
|||||||
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
import 'package:fast_immutable_collections/fast_immutable_collections.dart';
|
||||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||||
import 'package:protobuf/protobuf.dart';
|
import 'package:protobuf/protobuf.dart';
|
||||||
|
import 'package:veilid/veilid.dart';
|
||||||
|
|
||||||
import '../veilid_support.dart';
|
import '../dht_support/dht_support.dart';
|
||||||
|
|
||||||
part 'identity.freezed.dart';
|
part 'identity.freezed.dart';
|
||||||
part 'identity.g.dart';
|
part 'identity.g.dart';
|
@ -9,19 +9,19 @@ part of 'identity.dart';
|
|||||||
_$AccountRecordInfoImpl _$$AccountRecordInfoImplFromJson(
|
_$AccountRecordInfoImpl _$$AccountRecordInfoImplFromJson(
|
||||||
Map<String, dynamic> json) =>
|
Map<String, dynamic> json) =>
|
||||||
_$AccountRecordInfoImpl(
|
_$AccountRecordInfoImpl(
|
||||||
accountRecord: OwnedDHTRecordPointer.fromJson(json['account_record']),
|
accountRecord: OwnedDHTRecordPointer.fromJson(json['accountRecord']),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$AccountRecordInfoImplToJson(
|
Map<String, dynamic> _$$AccountRecordInfoImplToJson(
|
||||||
_$AccountRecordInfoImpl instance) =>
|
_$AccountRecordInfoImpl instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'account_record': instance.accountRecord.toJson(),
|
'accountRecord': instance.accountRecord,
|
||||||
};
|
};
|
||||||
|
|
||||||
_$IdentityImpl _$$IdentityImplFromJson(Map<String, dynamic> json) =>
|
_$IdentityImpl _$$IdentityImplFromJson(Map<String, dynamic> json) =>
|
||||||
_$IdentityImpl(
|
_$IdentityImpl(
|
||||||
accountRecords: IMap<String, ISet<AccountRecordInfo>>.fromJson(
|
accountRecords: IMap<String, ISet<AccountRecordInfo>>.fromJson(
|
||||||
json['account_records'] as Map<String, dynamic>,
|
json['accountRecords'] as Map<String, dynamic>,
|
||||||
(value) => value as String,
|
(value) => value as String,
|
||||||
(value) => ISet<AccountRecordInfo>.fromJson(
|
(value) => ISet<AccountRecordInfo>.fromJson(
|
||||||
value, (value) => AccountRecordInfo.fromJson(value))),
|
value, (value) => AccountRecordInfo.fromJson(value))),
|
||||||
@ -29,10 +29,10 @@ _$IdentityImpl _$$IdentityImplFromJson(Map<String, dynamic> json) =>
|
|||||||
|
|
||||||
Map<String, dynamic> _$$IdentityImplToJson(_$IdentityImpl instance) =>
|
Map<String, dynamic> _$$IdentityImplToJson(_$IdentityImpl instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'account_records': instance.accountRecords.toJson(
|
'accountRecords': instance.accountRecords.toJson(
|
||||||
(value) => value,
|
(value) => value,
|
||||||
(value) => value.toJson(
|
(value) => value.toJson(
|
||||||
(value) => value.toJson(),
|
(value) => value,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
@ -40,24 +40,24 @@ Map<String, dynamic> _$$IdentityImplToJson(_$IdentityImpl instance) =>
|
|||||||
_$IdentityMasterImpl _$$IdentityMasterImplFromJson(Map<String, dynamic> json) =>
|
_$IdentityMasterImpl _$$IdentityMasterImplFromJson(Map<String, dynamic> json) =>
|
||||||
_$IdentityMasterImpl(
|
_$IdentityMasterImpl(
|
||||||
identityRecordKey:
|
identityRecordKey:
|
||||||
Typed<FixedEncodedString43>.fromJson(json['identity_record_key']),
|
Typed<FixedEncodedString43>.fromJson(json['identityRecordKey']),
|
||||||
identityPublicKey:
|
identityPublicKey:
|
||||||
FixedEncodedString43.fromJson(json['identity_public_key']),
|
FixedEncodedString43.fromJson(json['identityPublicKey']),
|
||||||
masterRecordKey:
|
masterRecordKey:
|
||||||
Typed<FixedEncodedString43>.fromJson(json['master_record_key']),
|
Typed<FixedEncodedString43>.fromJson(json['masterRecordKey']),
|
||||||
masterPublicKey: FixedEncodedString43.fromJson(json['master_public_key']),
|
masterPublicKey: FixedEncodedString43.fromJson(json['masterPublicKey']),
|
||||||
identitySignature:
|
identitySignature:
|
||||||
FixedEncodedString86.fromJson(json['identity_signature']),
|
FixedEncodedString86.fromJson(json['identitySignature']),
|
||||||
masterSignature: FixedEncodedString86.fromJson(json['master_signature']),
|
masterSignature: FixedEncodedString86.fromJson(json['masterSignature']),
|
||||||
);
|
);
|
||||||
|
|
||||||
Map<String, dynamic> _$$IdentityMasterImplToJson(
|
Map<String, dynamic> _$$IdentityMasterImplToJson(
|
||||||
_$IdentityMasterImpl instance) =>
|
_$IdentityMasterImpl instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
'identity_record_key': instance.identityRecordKey.toJson(),
|
'identityRecordKey': instance.identityRecordKey,
|
||||||
'identity_public_key': instance.identityPublicKey.toJson(),
|
'identityPublicKey': instance.identityPublicKey,
|
||||||
'master_record_key': instance.masterRecordKey.toJson(),
|
'masterRecordKey': instance.masterRecordKey,
|
||||||
'master_public_key': instance.masterPublicKey.toJson(),
|
'masterPublicKey': instance.masterPublicKey,
|
||||||
'identity_signature': instance.identitySignature.toJson(),
|
'identitySignature': instance.identitySignature,
|
||||||
'master_signature': instance.masterSignature.toJson(),
|
'masterSignature': instance.masterSignature,
|
||||||
};
|
};
|
@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:loggy/loggy.dart';
|
import 'package:loggy/loggy.dart';
|
||||||
import 'package:veilid/veilid.dart';
|
import 'package:veilid/veilid.dart';
|
||||||
|
|
||||||
@ -68,14 +67,14 @@ Future<void> processLog(VeilidLog log) async {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void initVeilidLog() {
|
void initVeilidLog(bool debugMode) {
|
||||||
// ignore: do_not_use_environment
|
// ignore: do_not_use_environment
|
||||||
const isTrace = String.fromEnvironment('LOG_TRACE') != '';
|
const isTrace = String.fromEnvironment('LOG_TRACE') != '';
|
||||||
LogLevel logLevel;
|
LogLevel logLevel;
|
||||||
if (isTrace) {
|
if (isTrace) {
|
||||||
logLevel = traceLevel;
|
logLevel = traceLevel;
|
||||||
} else {
|
} else {
|
||||||
logLevel = kDebugMode ? LogLevel.debug : LogLevel.info;
|
logLevel = debugMode ? LogLevel.debug : LogLevel.info;
|
||||||
}
|
}
|
||||||
setVeilidLogLevel(logLevel);
|
setVeilidLogLevel(logLevel);
|
||||||
}
|
}
|
780
packages/veilid_support/pubspec.lock
Normal file
780
packages/veilid_support/pubspec.lock
Normal file
@ -0,0 +1,780 @@
|
|||||||
|
# Generated by pub
|
||||||
|
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||||
|
packages:
|
||||||
|
_fe_analyzer_shared:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: _fe_analyzer_shared
|
||||||
|
sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "64.0.0"
|
||||||
|
analyzer:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: analyzer
|
||||||
|
sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.2.0"
|
||||||
|
args:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: args
|
||||||
|
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.2"
|
||||||
|
async:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: async
|
||||||
|
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.11.0"
|
||||||
|
boolean_selector:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: boolean_selector
|
||||||
|
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.1"
|
||||||
|
build:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: build
|
||||||
|
sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.1"
|
||||||
|
build_config:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: build_config
|
||||||
|
sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.1"
|
||||||
|
build_daemon:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: build_daemon
|
||||||
|
sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.0.1"
|
||||||
|
build_resolvers:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: build_resolvers
|
||||||
|
sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.2"
|
||||||
|
build_runner:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description:
|
||||||
|
name: build_runner
|
||||||
|
sha256: "67d591d602906ef9201caf93452495ad1812bea2074f04e25dbd7c133785821b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.7"
|
||||||
|
build_runner_core:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: build_runner_core
|
||||||
|
sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "7.2.11"
|
||||||
|
built_collection:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: built_collection
|
||||||
|
sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "5.1.1"
|
||||||
|
built_value:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: built_value
|
||||||
|
sha256: c9aabae0718ec394e5bc3c7272e6bb0dc0b32201a08fe185ec1d8401d3e39309
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "8.8.1"
|
||||||
|
change_case:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: change_case
|
||||||
|
sha256: f4e08feaa845e75e4f5ad2b0e15f24813d7ea6c27e7b78252f0c17f752cf1157
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.0"
|
||||||
|
characters:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: characters
|
||||||
|
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.0"
|
||||||
|
charcode:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: charcode
|
||||||
|
sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.1"
|
||||||
|
checked_yaml:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: checked_yaml
|
||||||
|
sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.3"
|
||||||
|
code_builder:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: code_builder
|
||||||
|
sha256: feee43a5c05e7b3199bb375a86430b8ada1b04104f2923d0e03cc01ca87b6d84
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.9.0"
|
||||||
|
collection:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: collection
|
||||||
|
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.18.0"
|
||||||
|
convert:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: convert
|
||||||
|
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.1"
|
||||||
|
coverage:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: coverage
|
||||||
|
sha256: "8acabb8306b57a409bf4c83522065672ee13179297a6bb0cb9ead73948df7c76"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.7.2"
|
||||||
|
crypto:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: crypto
|
||||||
|
sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.3"
|
||||||
|
dart_style:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: dart_style
|
||||||
|
sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.3.4"
|
||||||
|
equatable:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: equatable
|
||||||
|
sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.5"
|
||||||
|
fast_immutable_collections:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: fast_immutable_collections
|
||||||
|
sha256: "3eb1d7495c70598964add20e10666003fad6e855b108fe684ebcbf8ad0c8e120"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "9.2.0"
|
||||||
|
ffi:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: ffi
|
||||||
|
sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.0"
|
||||||
|
file:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file
|
||||||
|
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "7.0.0"
|
||||||
|
file_utils:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: file_utils
|
||||||
|
sha256: d1e64389a22649095c8405c9e177272caf05139255931c9ff30d53b5c9bcaa34
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.1"
|
||||||
|
fixnum:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: fixnum
|
||||||
|
sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.0"
|
||||||
|
flutter:
|
||||||
|
dependency: transitive
|
||||||
|
description: flutter
|
||||||
|
source: sdk
|
||||||
|
version: "0.0.0"
|
||||||
|
flutter_web_plugins:
|
||||||
|
dependency: transitive
|
||||||
|
description: flutter
|
||||||
|
source: sdk
|
||||||
|
version: "0.0.0"
|
||||||
|
freezed:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description:
|
||||||
|
name: freezed
|
||||||
|
sha256: "6c5031daae12c7072b3a87eff98983076434b4889ef2a44384d0cae3f82372ba"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.6"
|
||||||
|
freezed_annotation:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: freezed_annotation
|
||||||
|
sha256: c3fd9336eb55a38cc1bbd79ab17573113a8deccd0ecbbf926cca3c62803b5c2d
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.1"
|
||||||
|
frontend_server_client:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: frontend_server_client
|
||||||
|
sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.2.0"
|
||||||
|
glob:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: glob
|
||||||
|
sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.2"
|
||||||
|
globbing:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: globbing
|
||||||
|
sha256: "4f89cfaf6fa74c9c1740a96259da06bd45411ede56744e28017cc534a12b6e2d"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.0"
|
||||||
|
graphs:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: graphs
|
||||||
|
sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.3.1"
|
||||||
|
http_multi_server:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: http_multi_server
|
||||||
|
sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.2.1"
|
||||||
|
http_parser:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: http_parser
|
||||||
|
sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.0.2"
|
||||||
|
io:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: io
|
||||||
|
sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.4"
|
||||||
|
js:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: js
|
||||||
|
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.6.7"
|
||||||
|
json_annotation:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: json_annotation
|
||||||
|
sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.8.1"
|
||||||
|
json_serializable:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description:
|
||||||
|
name: json_serializable
|
||||||
|
sha256: aa1f5a8912615733e0fdc7a02af03308933c93235bdc8d50d0b0c8a8ccb0b969
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "6.7.1"
|
||||||
|
lint_hard:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description:
|
||||||
|
name: lint_hard
|
||||||
|
sha256: "44d15ec309b1a8e1aff99069df9dcb1597f49d5f588f32811ca28fb7b38c32fe"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "4.0.0"
|
||||||
|
logging:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: logging
|
||||||
|
sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.0"
|
||||||
|
loggy:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: loggy
|
||||||
|
sha256: "981e03162bbd3a5a843026f75f73d26e4a0d8aa035ae060456ca7b30dfd1e339"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.3"
|
||||||
|
matcher:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: matcher
|
||||||
|
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.12.16+1"
|
||||||
|
material_color_utilities:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: material_color_utilities
|
||||||
|
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.5.0"
|
||||||
|
meta:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: meta
|
||||||
|
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.10.0"
|
||||||
|
mime:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: mime
|
||||||
|
sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.4"
|
||||||
|
mutex:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: mutex
|
||||||
|
sha256: "8827da25de792088eb33e572115a5eb0d61d61a3c01acbc8bcbe76ed78f1a1f2"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.0"
|
||||||
|
node_preamble:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: node_preamble
|
||||||
|
sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.0.2"
|
||||||
|
package_config:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: package_config
|
||||||
|
sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.0"
|
||||||
|
path:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path
|
||||||
|
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.9.0"
|
||||||
|
path_provider:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider
|
||||||
|
sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.1"
|
||||||
|
path_provider_android:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_android
|
||||||
|
sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.2.2"
|
||||||
|
path_provider_foundation:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_foundation
|
||||||
|
sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.3.1"
|
||||||
|
path_provider_linux:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_linux
|
||||||
|
sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.2.1"
|
||||||
|
path_provider_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_platform_interface
|
||||||
|
sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.1"
|
||||||
|
path_provider_windows:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: path_provider_windows
|
||||||
|
sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.2.1"
|
||||||
|
platform:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: platform
|
||||||
|
sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.3"
|
||||||
|
plugin_platform_interface:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: plugin_platform_interface
|
||||||
|
sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.7"
|
||||||
|
pool:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: pool
|
||||||
|
sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.5.1"
|
||||||
|
protobuf:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: protobuf
|
||||||
|
sha256: "68645b24e0716782e58948f8467fd42a880f255096a821f9e7d0ec625b00c84d"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.0"
|
||||||
|
pub_semver:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: pub_semver
|
||||||
|
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.4"
|
||||||
|
pubspec_parse:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: pubspec_parse
|
||||||
|
sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.3"
|
||||||
|
shelf:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shelf
|
||||||
|
sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.4.1"
|
||||||
|
shelf_packages_handler:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shelf_packages_handler
|
||||||
|
sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.2"
|
||||||
|
shelf_static:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shelf_static
|
||||||
|
sha256: a41d3f53c4adf0f57480578c1d61d90342cd617de7fc8077b1304643c2d85c1e
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.2"
|
||||||
|
shelf_web_socket:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: shelf_web_socket
|
||||||
|
sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.4"
|
||||||
|
sky_engine:
|
||||||
|
dependency: transitive
|
||||||
|
description: flutter
|
||||||
|
source: sdk
|
||||||
|
version: "0.0.99"
|
||||||
|
source_gen:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: source_gen
|
||||||
|
sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.5.0"
|
||||||
|
source_helper:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: source_helper
|
||||||
|
sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.4"
|
||||||
|
source_map_stack_trace:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: source_map_stack_trace
|
||||||
|
sha256: "84cf769ad83aa6bb61e0aa5a18e53aea683395f196a6f39c4c881fb90ed4f7ae"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.1"
|
||||||
|
source_maps:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: source_maps
|
||||||
|
sha256: "708b3f6b97248e5781f493b765c3337db11c5d2c81c3094f10904bfa8004c703"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.10.12"
|
||||||
|
source_span:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: source_span
|
||||||
|
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.10.0"
|
||||||
|
stack_trace:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: stack_trace
|
||||||
|
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.11.1"
|
||||||
|
stream_channel:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: stream_channel
|
||||||
|
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.2"
|
||||||
|
stream_transform:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: stream_transform
|
||||||
|
sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.0"
|
||||||
|
string_scanner:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: string_scanner
|
||||||
|
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.0"
|
||||||
|
system_info2:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: system_info2
|
||||||
|
sha256: af2f948e3f31a3367a049932a8ad59faf0063ecf836a020d975b9f41566d8bc9
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.0.2"
|
||||||
|
system_info_plus:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: system_info_plus
|
||||||
|
sha256: b915c811c6605b802f3988859bc2bb79c95f735762a75b5451741f7a2b949d1b
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.0.5"
|
||||||
|
term_glyph:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: term_glyph
|
||||||
|
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.1"
|
||||||
|
test:
|
||||||
|
dependency: "direct dev"
|
||||||
|
description:
|
||||||
|
name: test
|
||||||
|
sha256: "3d028996109ad5c253674c7f347822fb994a087614d6f353e6039704b4661ff2"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.25.0"
|
||||||
|
test_api:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: test_api
|
||||||
|
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.7.0"
|
||||||
|
test_core:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: test_core
|
||||||
|
sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.6.0"
|
||||||
|
timing:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: timing
|
||||||
|
sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.1"
|
||||||
|
typed_data:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: typed_data
|
||||||
|
sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.3.2"
|
||||||
|
vector_math:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: vector_math
|
||||||
|
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.1.4"
|
||||||
|
veilid:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
path: "../../../veilid/veilid-flutter"
|
||||||
|
relative: true
|
||||||
|
source: path
|
||||||
|
version: "0.2.5"
|
||||||
|
vm_service:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: vm_service
|
||||||
|
sha256: a2662fb1f114f4296cf3f5a50786a2d888268d7776cf681aa17d660ffa23b246
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "14.0.0"
|
||||||
|
watcher:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: watcher
|
||||||
|
sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.1.0"
|
||||||
|
web:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: web
|
||||||
|
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.3.0"
|
||||||
|
web_socket_channel:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: web_socket_channel
|
||||||
|
sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.4.0"
|
||||||
|
webkit_inspection_protocol:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: webkit_inspection_protocol
|
||||||
|
sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.1"
|
||||||
|
win32:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: win32
|
||||||
|
sha256: b0f37db61ba2f2e9b7a78a1caece0052564d1bc70668156cf3a29d676fe4e574
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "5.1.1"
|
||||||
|
xdg_directories:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: xdg_directories
|
||||||
|
sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "1.0.3"
|
||||||
|
yaml:
|
||||||
|
dependency: transitive
|
||||||
|
description:
|
||||||
|
name: yaml
|
||||||
|
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "3.1.2"
|
||||||
|
sdks:
|
||||||
|
dart: ">=3.2.0-194.0.dev <4.0.0"
|
||||||
|
flutter: ">=3.10.6"
|
26
packages/veilid_support/pubspec.yaml
Normal file
26
packages/veilid_support/pubspec.yaml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
name: veilid_support
|
||||||
|
description: Veilid Support Library
|
||||||
|
publish_to: 'none'
|
||||||
|
version: 1.0.2+0
|
||||||
|
|
||||||
|
environment:
|
||||||
|
sdk: '>=3.0.5 <4.0.0'
|
||||||
|
flutter: ">=3.10.0"
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
fast_immutable_collections: ^9.1.5
|
||||||
|
freezed_annotation: ^2.2.0
|
||||||
|
json_annotation: ^4.8.1
|
||||||
|
loggy: ^2.0.3
|
||||||
|
mutex: ^3.1.0
|
||||||
|
protobuf: ^3.0.0
|
||||||
|
veilid:
|
||||||
|
# veilid: ^0.0.1
|
||||||
|
path: ../../../veilid/veilid-flutter
|
||||||
|
|
||||||
|
dev_dependencies:
|
||||||
|
build_runner: ^2.4.6
|
||||||
|
test: ^1.25.0
|
||||||
|
freezed: ^2.3.5
|
||||||
|
json_serializable: ^6.7.1
|
||||||
|
lint_hard: ^4.0.0
|
19
pubspec.lock
19
pubspec.lock
@ -21,10 +21,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: animated_theme_switcher
|
name: animated_theme_switcher
|
||||||
sha256: de8ce9872d6e6676ab1140f76ff00cd0084a9dfee62168044062629927949652
|
sha256: "24ccd74437b8db78f6d1ec701804702817bced5f925b1b3419c7a93071e3d3e9"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.9"
|
version: "2.0.10"
|
||||||
ansicolor:
|
ansicolor:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -61,10 +61,10 @@ packages:
|
|||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: awesome_extensions
|
name: awesome_extensions
|
||||||
sha256: "79bb5a24f1224795e599c75ec047ca6f4718e17be535544350d213bb37bc88cd"
|
sha256: a8b68d567119b9be85bc62d8dc2ab6712d74c0130bdc31a52c53d1058c4fe33a
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.10"
|
version: "2.0.11"
|
||||||
badges:
|
badges:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@ -897,10 +897,10 @@ packages:
|
|||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: path_provider_android
|
name: path_provider_android
|
||||||
sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72
|
sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668"
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.1"
|
version: "2.2.2"
|
||||||
path_provider_foundation:
|
path_provider_foundation:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@ -1505,6 +1505,13 @@ packages:
|
|||||||
relative: true
|
relative: true
|
||||||
source: path
|
source: path
|
||||||
version: "0.2.5"
|
version: "0.2.5"
|
||||||
|
veilid_support:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
path: "packages/veilid_support"
|
||||||
|
relative: true
|
||||||
|
source: path
|
||||||
|
version: "1.0.2+0"
|
||||||
visibility_detector:
|
visibility_detector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
@ -75,6 +75,8 @@ dependencies:
|
|||||||
veilid:
|
veilid:
|
||||||
# veilid: ^0.0.1
|
# veilid: ^0.0.1
|
||||||
path: ../veilid/veilid-flutter
|
path: ../veilid/veilid-flutter
|
||||||
|
veilid_support:
|
||||||
|
path: packages/veilid_support
|
||||||
window_manager: ^0.3.5
|
window_manager: ^0.3.5
|
||||||
xterm: ^3.5.0
|
xterm: ^3.5.0
|
||||||
zxing2: ^0.2.0
|
zxing2: ^0.2.0
|
||||||
|
Loading…
Reference in New Issue
Block a user