debugging and cleanup

This commit is contained in:
Christien Rioux 2025-03-13 21:34:12 -04:00
parent 604ec9cfdd
commit d460a0388c
69 changed files with 2306 additions and 790 deletions

1
android/app/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.cxx

View File

@ -65,8 +65,9 @@
"destroy_account_confirm_message": "This action is PERMANENT, and your VeilidChat account will no longer be recoverable with the recovery key. Restoring from backups will not recover your account!",
"destroy_account_confirm_message_details": "You will lose access to:\n • Your entire message history\n • Your contacts\n • This will not remove your messages you have sent from other people's devices\n",
"confirm_are_you_sure": "Are you sure you want to do this?",
"failed_to_remove": "Failed to remove account.\n\nTry again when you have a more stable network connection.",
"failed_to_destroy": "Failed to destroy account.\n\nTry again when you have a more stable network connection.",
"failed_to_remove_title": "Failed to remove account",
"try_again_network": "Try again when you have a more stable network connection",
"failed_to_destroy_title": "Failed to destroy account",
"account_removed": "Account removed successfully",
"account_destroyed": "Account destroyed successfully"
},

View File

@ -1,6 +1,9 @@
targets:
$default:
builders:
freezed:
options:
generic_argument_factories: true
json_serializable:
options:
explicit_to_json: true

View File

@ -48,6 +48,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">

View File

@ -37,8 +37,12 @@ mixin _$LocalAccount {
throw _privateConstructorUsedError; // Display name for account until it is unlocked
String get name => throw _privateConstructorUsedError;
/// Serializes this LocalAccount to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of LocalAccount
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$LocalAccountCopyWith<LocalAccount> get copyWith =>
throw _privateConstructorUsedError;
}
@ -70,6 +74,8 @@ class _$LocalAccountCopyWithImpl<$Res, $Val extends LocalAccount>
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of LocalAccount
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -108,6 +114,8 @@ class _$LocalAccountCopyWithImpl<$Res, $Val extends LocalAccount>
) as $Val);
}
/// Create a copy of LocalAccount
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$SuperIdentityCopyWith<$Res> get superIdentity {
@ -145,6 +153,8 @@ class __$$LocalAccountImplCopyWithImpl<$Res>
_$LocalAccountImpl _value, $Res Function(_$LocalAccountImpl) _then)
: super(_value, _then);
/// Create a copy of LocalAccount
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -244,7 +254,7 @@ class _$LocalAccountImpl implements _LocalAccount {
(identical(other.name, name) || other.name == name));
}
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
@ -255,7 +265,9 @@ class _$LocalAccountImpl implements _LocalAccount {
hiddenAccount,
name);
@JsonKey(ignore: true)
/// Create a copy of LocalAccount
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$LocalAccountImplCopyWith<_$LocalAccountImpl> get copyWith =>
@ -281,24 +293,32 @@ abstract class _LocalAccount implements LocalAccount {
factory _LocalAccount.fromJson(Map<String, dynamic> json) =
_$LocalAccountImpl.fromJson;
@override // The super identity key record for the account,
// The super identity key record for the account,
// containing the publicKey in the currentIdentity
SuperIdentity get superIdentity;
@override // The encrypted currentIdentity secret that goes with
// the identityPublicKey with appended salt
@Uint8ListJsonConverter()
Uint8List get identitySecretBytes;
@override // The kind of encryption input used on the account
EncryptionKeyType get encryptionKeyType;
@override // If account is not hidden, password can be retrieved via
bool get biometricsEnabled;
@override // Keep account hidden unless account password is entered
// (tries all hidden accounts with auth method (no biometrics))
bool get hiddenAccount;
@override // Display name for account until it is unlocked
String get name;
@override
@JsonKey(ignore: true)
SuperIdentity
get superIdentity; // The encrypted currentIdentity secret that goes with
// the identityPublicKey with appended salt
@override
@Uint8ListJsonConverter()
Uint8List
get identitySecretBytes; // The kind of encryption input used on the account
@override
EncryptionKeyType
get encryptionKeyType; // If account is not hidden, password can be retrieved via
@override
bool
get biometricsEnabled; // Keep account hidden unless account password is entered
// (tries all hidden accounts with auth method (no biometrics))
@override
bool get hiddenAccount; // Display name for account until it is unlocked
@override
String get name;
/// Create a copy of LocalAccount
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$LocalAccountImplCopyWith<_$LocalAccountImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -35,7 +35,9 @@ mixin _$PerAccountCollectionState {
get activeSingleContactChatBlocMapCubit =>
throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of PerAccountCollectionState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PerAccountCollectionStateCopyWith<PerAccountCollectionState> get copyWith =>
throw _privateConstructorUsedError;
}
@ -74,6 +76,8 @@ class _$PerAccountCollectionStateCopyWithImpl<$Res,
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of PerAccountCollectionState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -139,6 +143,8 @@ class _$PerAccountCollectionStateCopyWithImpl<$Res,
) as $Val);
}
/// Create a copy of PerAccountCollectionState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AsyncValueCopyWith<Account, $Res>? get avAccountRecordState {
@ -190,6 +196,8 @@ class __$$PerAccountCollectionStateImplCopyWithImpl<$Res>
$Res Function(_$PerAccountCollectionStateImpl) _then)
: super(_value, _then);
/// Create a copy of PerAccountCollectionState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -353,7 +361,9 @@ class _$PerAccountCollectionStateImpl implements _PerAccountCollectionState {
activeConversationsBlocMapCubit,
activeSingleContactChatBlocMapCubit);
@JsonKey(ignore: true)
/// Create a copy of PerAccountCollectionState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PerAccountCollectionStateImplCopyWith<_$PerAccountCollectionStateImpl>
@ -401,8 +411,11 @@ abstract class _PerAccountCollectionState implements PerAccountCollectionState {
ActiveConversationsBlocMapCubit? get activeConversationsBlocMapCubit;
@override
ActiveSingleContactChatBlocMapCubit? get activeSingleContactChatBlocMapCubit;
/// Create a copy of PerAccountCollectionState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PerAccountCollectionStateImplCopyWith<_$PerAccountCollectionStateImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@ -30,8 +30,12 @@ mixin _$UserLogin {
throw _privateConstructorUsedError; // The time this login was most recently used
Timestamp get lastActive => throw _privateConstructorUsedError;
/// Serializes this UserLogin to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of UserLogin
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$UserLoginCopyWith<UserLogin> get copyWith =>
throw _privateConstructorUsedError;
}
@ -60,6 +64,8 @@ class _$UserLoginCopyWithImpl<$Res, $Val extends UserLogin>
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of UserLogin
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -88,6 +94,8 @@ class _$UserLoginCopyWithImpl<$Res, $Val extends UserLogin>
) as $Val);
}
/// Create a copy of UserLogin
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AccountRecordInfoCopyWith<$Res> get accountRecordInfo {
@ -123,6 +131,8 @@ class __$$UserLoginImplCopyWithImpl<$Res>
_$UserLoginImpl _value, $Res Function(_$UserLoginImpl) _then)
: super(_value, _then);
/// Create a copy of UserLogin
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -198,12 +208,14 @@ class _$UserLoginImpl implements _UserLogin {
other.lastActive == lastActive));
}
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, superIdentityRecordKey,
identitySecret, accountRecordInfo, lastActive);
@JsonKey(ignore: true)
/// Create a copy of UserLogin
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$UserLoginImplCopyWith<_$UserLoginImpl> get copyWith =>
@ -227,17 +239,24 @@ abstract class _UserLogin implements UserLogin {
factory _UserLogin.fromJson(Map<String, dynamic> json) =
_$UserLoginImpl.fromJson;
@override // SuperIdentity record key for the user
// SuperIdentity record key for the user
// used to index the local accounts table
Typed<FixedEncodedString43> get superIdentityRecordKey;
@override // The identity secret as unlocked from the local accounts table
Typed<FixedEncodedString43> get identitySecret;
@override // The account record key, owner key and secret pulled from the identity
AccountRecordInfo get accountRecordInfo;
@override // The time this login was most recently used
Timestamp get lastActive;
@override
@JsonKey(ignore: true)
Typed<FixedEncodedString43>
get superIdentityRecordKey; // The identity secret as unlocked from the local accounts table
@override
Typed<FixedEncodedString43>
get identitySecret; // The account record key, owner key and secret pulled from the identity
@override
AccountRecordInfo
get accountRecordInfo; // The time this login was most recently used
@override
Timestamp get lastActive;
/// Create a copy of UserLogin
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$UserLoginImplCopyWith<_$UserLoginImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -127,9 +127,9 @@ class _EditAccountPageState extends WindowSetupState<EditAccountPage> {
.info(text: translate('edit_account_page.account_removed'));
GoRouterHelper(context).pop();
} else {
context
.read<NotificationsCubit>()
.error(text: translate('edit_account_page.failed_to_remove'));
context.read<NotificationsCubit>().error(
title: translate('edit_account_page.failed_to_remove_title'),
text: translate('edit_account_page.try_again_network'));
}
}
} finally {
@ -196,7 +196,8 @@ class _EditAccountPageState extends WindowSetupState<EditAccountPage> {
GoRouterHelper(context).pop();
} else {
context.read<NotificationsCubit>().error(
text: translate('edit_account_page.failed_to_destroy'));
title: translate('edit_account_page.failed_to_destroy_title'),
text: translate('edit_account_page.try_again_network'));
}
}
} finally {

View File

@ -135,9 +135,10 @@ class _NewAccountPageState extends WindowSetupState<NewAccountPage> {
})
]),
body: SingleChildScrollView(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
child: _newAccountForm(
context,
)).paddingSymmetric(horizontal: 24, vertical: 8),
context,
)).paddingAll(2),
).withModalHUD(context, displayModalHUD);
}

View File

@ -1,11 +1,11 @@
import 'dart:async';
import 'dart:io';
import 'dart:math';
import 'dart:typed_data';
import 'package:async_tools/async_tools.dart';
import 'package:awesome_extensions/awesome_extensions.dart';
import 'package:file_saver/file_saver.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_translate/flutter_translate.dart';
import 'package:go_router/go_router.dart';
@ -61,7 +61,7 @@ class _ShowRecoveryKeyPageState extends WindowSetupState<ShowRecoveryKeyPage> {
_isInAsyncCall = false;
});
if (Platform.isLinux) {
if (!kIsWeb && Platform.isLinux) {
// Share plus doesn't do Linux yet
await FileSaver.instance.saveFile(name: 'recovery_key.png', bytes: bytes);
} else {

View File

@ -35,7 +35,9 @@ mixin _$ChatComponentState {
throw _privateConstructorUsedError; // Title of the chat
String get title => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of ChatComponentState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ChatComponentStateCopyWith<ChatComponentState> get copyWith =>
throw _privateConstructorUsedError;
}
@ -70,6 +72,8 @@ class _$ChatComponentStateCopyWithImpl<$Res, $Val extends ChatComponentState>
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ChatComponentState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -123,6 +127,8 @@ class _$ChatComponentStateCopyWithImpl<$Res, $Val extends ChatComponentState>
) as $Val);
}
/// Create a copy of ChatComponentState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AsyncValueCopyWith<WindowState<Message>, $Res> get messageWindow {
@ -164,6 +170,8 @@ class __$$ChatComponentStateImplCopyWithImpl<$Res>
$Res Function(_$ChatComponentStateImpl) _then)
: super(_value, _then);
/// Create a copy of ChatComponentState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -301,7 +309,9 @@ class _$ChatComponentStateImpl implements _ChatComponentState {
messageWindow,
title);
@JsonKey(ignore: true)
/// Create a copy of ChatComponentState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ChatComponentStateImplCopyWith<_$ChatComponentStateImpl> get copyWith =>
@ -322,26 +332,33 @@ abstract class _ChatComponentState implements ChatComponentState {
required final AsyncValue<WindowState<Message>> messageWindow,
required final String title}) = _$ChatComponentStateImpl;
@override // GlobalKey for the chat
GlobalKey<ChatState> get chatKey;
@override // ScrollController for the chat
AutoScrollController get scrollController;
@override // TextEditingController for the chat
InputTextFieldController get textEditingController;
@override // Local user
User? get localUser;
@override // Active remote users
IMap<Typed<FixedEncodedString43>, User> get remoteUsers;
@override // Historical remote users
IMap<Typed<FixedEncodedString43>, User> get historicalRemoteUsers;
@override // Unknown users
IMap<Typed<FixedEncodedString43>, User> get unknownUsers;
@override // Messages state
AsyncValue<WindowState<Message>> get messageWindow;
@override // Title of the chat
String get title;
// GlobalKey for the chat
@override
@JsonKey(ignore: true)
GlobalKey<ChatState> get chatKey; // ScrollController for the chat
@override
AutoScrollController
get scrollController; // TextEditingController for the chat
@override
InputTextFieldController get textEditingController; // Local user
@override
User? get localUser; // Active remote users
@override
IMap<Typed<FixedEncodedString43>, User>
get remoteUsers; // Historical remote users
@override
IMap<Typed<FixedEncodedString43>, User>
get historicalRemoteUsers; // Unknown users
@override
IMap<Typed<FixedEncodedString43>, User> get unknownUsers; // Messages state
@override
AsyncValue<WindowState<Message>> get messageWindow; // Title of the chat
@override
String get title;
/// Create a copy of ChatComponentState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChatComponentStateImplCopyWith<_$ChatComponentStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -30,8 +30,12 @@ mixin _$MessageState {
throw _privateConstructorUsedError; // The state of the message
MessageSendState? get sendState => throw _privateConstructorUsedError;
/// Serializes this MessageState to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of MessageState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$MessageStateCopyWith<MessageState> get copyWith =>
throw _privateConstructorUsedError;
}
@ -60,6 +64,8 @@ class _$MessageStateCopyWithImpl<$Res, $Val extends MessageState>
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of MessageState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -113,6 +119,8 @@ class __$$MessageStateImplCopyWithImpl<$Res>
_$MessageStateImpl _value, $Res Function(_$MessageStateImpl) _then)
: super(_value, _then);
/// Create a copy of MessageState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -199,12 +207,14 @@ class _$MessageStateImpl with DiagnosticableTreeMixin implements _MessageState {
other.sendState == sendState));
}
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, content, sentTimestamp, reconciledTimestamp, sendState);
@JsonKey(ignore: true)
/// Create a copy of MessageState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$MessageStateImplCopyWith<_$MessageStateImpl> get copyWith =>
@ -229,17 +239,21 @@ abstract class _MessageState implements MessageState {
factory _MessageState.fromJson(Map<String, dynamic> json) =
_$MessageStateImpl.fromJson;
@override // Content of the message
@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
proto.Message get content;
@override // Sent timestamp
Timestamp get sentTimestamp;
@override // Reconciled timestamp
Timestamp? get reconciledTimestamp;
@override // The state of the message
MessageSendState? get sendState;
// Content of the message
@override
@JsonKey(ignore: true)
@JsonKey(fromJson: messageFromJson, toJson: messageToJson)
proto.Message get content; // Sent timestamp
@override
Timestamp get sentTimestamp; // Reconciled timestamp
@override
Timestamp? get reconciledTimestamp; // The state of the message
@override
MessageSendState? get sendState;
/// Create a copy of MessageState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$MessageStateImplCopyWith<_$MessageStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -27,7 +27,9 @@ mixin _$WindowState<T> {
throw _privateConstructorUsedError; // If we should have the tail following the array
bool get follow => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of WindowState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$WindowStateCopyWith<T, WindowState<T>> get copyWith =>
throw _privateConstructorUsedError;
}
@ -56,6 +58,8 @@ class _$WindowStateCopyWithImpl<T, $Res, $Val extends WindowState<T>>
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of WindowState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -114,6 +118,8 @@ class __$$WindowStateImplCopyWithImpl<T, $Res>
_$WindowStateImpl<T> _value, $Res Function(_$WindowStateImpl<T>) _then)
: super(_value, _then);
/// Create a copy of WindowState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -216,7 +222,9 @@ class _$WindowStateImpl<T>
windowCount,
follow);
@JsonKey(ignore: true)
/// Create a copy of WindowState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$WindowStateImplCopyWith<T, _$WindowStateImpl<T>> get copyWith =>
@ -232,18 +240,22 @@ abstract class _WindowState<T> implements WindowState<T> {
required final int windowCount,
required final bool follow}) = _$WindowStateImpl<T>;
@override // List of objects in the window
IList<T> get window;
@override // Total number of objects (windowTail max)
int get length;
@override // One past the end of the last element
int get windowTail;
@override // The total number of elements to try to keep in the window
int get windowCount;
@override // If we should have the tail following the array
bool get follow;
// List of objects in the window
@override
@JsonKey(ignore: true)
IList<T> get window; // Total number of objects (windowTail max)
@override
int get length; // One past the end of the last element
@override
int get windowTail; // The total number of elements to try to keep in the window
@override
int get windowCount; // If we should have the tail following the array
@override
bool get follow;
/// Create a copy of WindowState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$WindowStateImplCopyWith<T, _$WindowStateImpl<T>> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_translate/flutter_translate.dart';
import '../../theme/models/scale_scheme.dart';
import '../../theme/models/scale_theme/scale_scheme.dart';
class NoConversationWidget extends StatelessWidget {
const NoConversationWidget({super.key});

View File

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_translate/flutter_translate.dart';
import '../../theme/models/scale_scheme.dart';
import '../../theme/models/scale_theme/scale_scheme.dart';
class NoContactWidget extends StatelessWidget {
const NoContactWidget({super.key});

View File

@ -6,6 +6,7 @@ class DefaultAppBar extends AppBar {
DefaultAppBar(
{required super.title, super.key, Widget? leading, super.actions})
: super(
titleSpacing: 0,
leading: leading ??
Container(
margin: const EdgeInsets.all(4),

View File

@ -35,8 +35,12 @@ mixin _$NotificationsPreference {
SoundEffect get onMessageReceivedSound => throw _privateConstructorUsedError;
SoundEffect get onMessageSentSound => throw _privateConstructorUsedError;
/// Serializes this NotificationsPreference to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of NotificationsPreference
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$NotificationsPreferenceCopyWith<NotificationsPreference> get copyWith =>
throw _privateConstructorUsedError;
}
@ -70,6 +74,8 @@ class _$NotificationsPreferenceCopyWithImpl<$Res,
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of NotificationsPreference
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -155,6 +161,8 @@ class __$$NotificationsPreferenceImplCopyWithImpl<$Res>
$Res Function(_$NotificationsPreferenceImpl) _then)
: super(_value, _then);
/// Create a copy of NotificationsPreference
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -289,7 +297,7 @@ class _$NotificationsPreferenceImpl implements _NotificationsPreference {
other.onMessageSentSound == onMessageSentSound));
}
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
@ -303,7 +311,9 @@ class _$NotificationsPreferenceImpl implements _NotificationsPreference {
onMessageReceivedSound,
onMessageSentSound);
@JsonKey(ignore: true)
/// Create a copy of NotificationsPreference
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$NotificationsPreferenceImplCopyWith<_$NotificationsPreferenceImpl>
@ -351,8 +361,11 @@ abstract class _NotificationsPreference implements NotificationsPreference {
SoundEffect get onMessageReceivedSound;
@override
SoundEffect get onMessageSentSound;
/// Create a copy of NotificationsPreference
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$NotificationsPreferenceImplCopyWith<_$NotificationsPreferenceImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@ -20,7 +20,9 @@ mixin _$NotificationItem {
String get text => throw _privateConstructorUsedError;
String? get title => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of NotificationItem
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$NotificationItemCopyWith<NotificationItem> get copyWith =>
throw _privateConstructorUsedError;
}
@ -44,6 +46,8 @@ class _$NotificationItemCopyWithImpl<$Res, $Val extends NotificationItem>
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of NotificationItem
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -87,6 +91,8 @@ class __$$NotificationItemImplCopyWithImpl<$Res>
$Res Function(_$NotificationItemImpl) _then)
: super(_value, _then);
/// Create a copy of NotificationItem
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -142,7 +148,9 @@ class _$NotificationItemImpl implements _NotificationItem {
@override
int get hashCode => Object.hash(runtimeType, type, text, title);
@JsonKey(ignore: true)
/// Create a copy of NotificationItem
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$NotificationItemImplCopyWith<_$NotificationItemImpl> get copyWith =>
@ -162,8 +170,11 @@ abstract class _NotificationItem implements NotificationItem {
String get text;
@override
String? get title;
/// Create a copy of NotificationItem
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$NotificationItemImplCopyWith<_$NotificationItemImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@ -172,7 +183,9 @@ abstract class _NotificationItem implements NotificationItem {
mixin _$NotificationsState {
IList<NotificationItem> get queue => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of NotificationsState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$NotificationsStateCopyWith<NotificationsState> get copyWith =>
throw _privateConstructorUsedError;
}
@ -196,6 +209,8 @@ class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState>
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of NotificationsState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -229,6 +244,8 @@ class __$$NotificationsStateImplCopyWithImpl<$Res>
$Res Function(_$NotificationsStateImpl) _then)
: super(_value, _then);
/// Create a copy of NotificationsState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -268,7 +285,9 @@ class _$NotificationsStateImpl implements _NotificationsState {
int get hashCode =>
Object.hash(runtimeType, const DeepCollectionEquality().hash(queue));
@JsonKey(ignore: true)
/// Create a copy of NotificationsState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$NotificationsStateImplCopyWith<_$NotificationsStateImpl> get copyWith =>
@ -283,8 +302,11 @@ abstract class _NotificationsState implements NotificationsState {
@override
IList<NotificationItem> get queue;
/// Create a copy of NotificationsState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$NotificationsStateImplCopyWith<_$NotificationsStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -1,6 +1,7 @@
import 'package:awesome_extensions/awesome_extensions.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:motion_toast/motion_toast.dart';
import 'package:toastification/toastification.dart';
import '../../theme/theme.dart';
import '../notifications.dart';
@ -43,46 +44,47 @@ class NotificationsWidget extends StatelessWidget {
////////////////////////////////////////////////////////////////////////////
// Private Implementation
void _toast(
{required BuildContext context,
required String text,
required ScaleToastTheme toastTheme,
String? title}) {
toastification.show(
context: context,
title: title != null
? Text(title)
.copyWith(style: toastTheme.titleTextStyle)
.paddingLTRB(0, 0, 0, 8)
: null,
description: Text(text).copyWith(style: toastTheme.descriptionTextStyle),
icon: toastTheme.icon,
primaryColor: toastTheme.primaryColor,
backgroundColor: toastTheme.backgroundColor,
foregroundColor: toastTheme.foregroundColor,
padding: toastTheme.padding,
borderRadius: toastTheme.borderRadius,
borderSide: toastTheme.borderSide,
autoCloseDuration: const Duration(seconds: 2),
animationDuration: const Duration(milliseconds: 500),
);
}
void _info(
{required BuildContext context, required String text, String? title}) {
final theme = Theme.of(context);
final scale = theme.extension<ScaleScheme>()!;
final scaleConfig = theme.extension<ScaleConfig>()!;
final toastTheme =
theme.extension<ScaleTheme>()!.toastTheme(ScaleToastKind.info);
MotionToast(
title: title != null ? Text(title) : null,
description: Text(text),
constraints: BoxConstraints.loose(const Size(400, 100)),
contentPadding: const EdgeInsets.all(16),
primaryColor: scale.tertiaryScale.elementBackground,
secondaryColor: scale.tertiaryScale.calloutBackground,
borderRadius: 12 * scaleConfig.borderRadiusScale,
toastDuration: const Duration(seconds: 2),
animationDuration: const Duration(milliseconds: 500),
displayBorder: scaleConfig.useVisualIndicators,
icon: Icons.info,
).show(context);
_toast(context: context, text: text, toastTheme: toastTheme, title: title);
}
void _error(
{required BuildContext context, required String text, String? title}) {
final theme = Theme.of(context);
final scale = theme.extension<ScaleScheme>()!;
final scaleConfig = theme.extension<ScaleConfig>()!;
final toastTheme =
theme.extension<ScaleTheme>()!.toastTheme(ScaleToastKind.error);
MotionToast(
title: title != null ? Text(title) : null,
description: Text(text),
constraints: BoxConstraints.loose(const Size(400, 100)),
contentPadding: const EdgeInsets.all(16),
primaryColor: scale.errorScale.elementBackground,
secondaryColor: scale.errorScale.calloutBackground,
borderRadius: 12 * scaleConfig.borderRadiusScale,
toastDuration: const Duration(seconds: 4),
animationDuration: const Duration(milliseconds: 1000),
displayBorder: scaleConfig.useVisualIndicators,
icon: Icons.error,
).show(context);
_toast(context: context, text: text, toastTheme: toastTheme, title: title);
}
////////////////////////////////////////////////////////////////////////////

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@
//
// @dart = 2.12
// ignore_for_file: annotate_overrides, camel_case_types
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
@ -13,6 +13,7 @@ import 'dart:core' as $core;
import 'package:protobuf/protobuf.dart' as $pb;
/// Contact availability
class Availability extends $pb.ProtobufEnum {
static const Availability AVAILABILITY_UNSPECIFIED = Availability._(0, _omitEnumNames ? '' : 'AVAILABILITY_UNSPECIFIED');
static const Availability AVAILABILITY_OFFLINE = Availability._(1, _omitEnumNames ? '' : 'AVAILABILITY_OFFLINE');
@ -34,6 +35,7 @@ class Availability extends $pb.ProtobufEnum {
const Availability._($core.int v, $core.String n) : super(v, n);
}
/// Encryption used on secret keys
class EncryptionKeyType extends $pb.ProtobufEnum {
static const EncryptionKeyType ENCRYPTION_KEY_TYPE_UNSPECIFIED = EncryptionKeyType._(0, _omitEnumNames ? '' : 'ENCRYPTION_KEY_TYPE_UNSPECIFIED');
static const EncryptionKeyType ENCRYPTION_KEY_TYPE_NONE = EncryptionKeyType._(1, _omitEnumNames ? '' : 'ENCRYPTION_KEY_TYPE_NONE');
@ -53,6 +55,7 @@ class EncryptionKeyType extends $pb.ProtobufEnum {
const EncryptionKeyType._($core.int v, $core.String n) : super(v, n);
}
/// Scope of a chat
class Scope extends $pb.ProtobufEnum {
static const Scope WATCHERS = Scope._(0, _omitEnumNames ? '' : 'WATCHERS');
static const Scope MODERATED = Scope._(1, _omitEnumNames ? '' : 'MODERATED');

View File

@ -4,7 +4,7 @@
//
// @dart = 2.12
// ignore_for_file: annotate_overrides, camel_case_types
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import

View File

@ -4,7 +4,7 @@
//
// @dart = 2.12
// ignore_for_file: annotate_overrides, camel_case_types
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields

View File

@ -22,8 +22,12 @@ RouterState _$RouterStateFromJson(Map<String, dynamic> json) {
mixin _$RouterState {
bool get hasAnyAccount => throw _privateConstructorUsedError;
/// Serializes this RouterState to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of RouterState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$RouterStateCopyWith<RouterState> get copyWith =>
throw _privateConstructorUsedError;
}
@ -47,6 +51,8 @@ class _$RouterStateCopyWithImpl<$Res, $Val extends RouterState>
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of RouterState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -80,6 +86,8 @@ class __$$RouterStateImplCopyWithImpl<$Res>
_$RouterStateImpl _value, $Res Function(_$RouterStateImpl) _then)
: super(_value, _then);
/// Create a copy of RouterState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -127,11 +135,13 @@ class _$RouterStateImpl with DiagnosticableTreeMixin implements _RouterState {
other.hasAnyAccount == hasAnyAccount));
}
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, hasAnyAccount);
@JsonKey(ignore: true)
/// Create a copy of RouterState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$RouterStateImplCopyWith<_$RouterStateImpl> get copyWith =>
@ -154,8 +164,11 @@ abstract class _RouterState implements RouterState {
@override
bool get hasAnyAccount;
/// Create a copy of RouterState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$RouterStateImplCopyWith<_$RouterStateImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -24,8 +24,12 @@ mixin _$LockPreference {
bool get lockWhenSwitching => throw _privateConstructorUsedError;
bool get lockWithSystemLock => throw _privateConstructorUsedError;
/// Serializes this LockPreference to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of LockPreference
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$LockPreferenceCopyWith<LockPreference> get copyWith =>
throw _privateConstructorUsedError;
}
@ -52,6 +56,8 @@ class _$LockPreferenceCopyWithImpl<$Res, $Val extends LockPreference>
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of LockPreference
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -98,6 +104,8 @@ class __$$LockPreferenceImplCopyWithImpl<$Res>
_$LockPreferenceImpl _value, $Res Function(_$LockPreferenceImpl) _then)
: super(_value, _then);
/// Create a copy of LockPreference
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -161,12 +169,14 @@ class _$LockPreferenceImpl implements _LockPreference {
other.lockWithSystemLock == lockWithSystemLock));
}
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, inactivityLockSecs, lockWhenSwitching, lockWithSystemLock);
@JsonKey(ignore: true)
/// Create a copy of LockPreference
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$LockPreferenceImplCopyWith<_$LockPreferenceImpl> get copyWith =>
@ -196,8 +206,11 @@ abstract class _LockPreference implements LockPreference {
bool get lockWhenSwitching;
@override
bool get lockWithSystemLock;
/// Create a copy of LockPreference
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$LockPreferenceImplCopyWith<_$LockPreferenceImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@ -215,8 +228,12 @@ mixin _$Preferences {
NotificationsPreference get notificationsPreference =>
throw _privateConstructorUsedError;
/// Serializes this Preferences to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$PreferencesCopyWith<Preferences> get copyWith =>
throw _privateConstructorUsedError;
}
@ -248,6 +265,8 @@ class _$PreferencesCopyWithImpl<$Res, $Val extends Preferences>
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -276,6 +295,8 @@ class _$PreferencesCopyWithImpl<$Res, $Val extends Preferences>
) as $Val);
}
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ThemePreferencesCopyWith<$Res> get themePreference {
@ -284,6 +305,8 @@ class _$PreferencesCopyWithImpl<$Res, $Val extends Preferences>
});
}
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$LockPreferenceCopyWith<$Res> get lockPreference {
@ -292,6 +315,8 @@ class _$PreferencesCopyWithImpl<$Res, $Val extends Preferences>
});
}
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$NotificationsPreferenceCopyWith<$Res> get notificationsPreference {
@ -332,6 +357,8 @@ class __$$PreferencesImplCopyWithImpl<$Res>
_$PreferencesImpl _value, $Res Function(_$PreferencesImpl) _then)
: super(_value, _then);
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -407,12 +434,14 @@ class _$PreferencesImpl implements _Preferences {
other.notificationsPreference == notificationsPreference));
}
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, themePreference,
languagePreference, lockPreference, notificationsPreference);
@JsonKey(ignore: true)
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$PreferencesImplCopyWith<_$PreferencesImpl> get copyWith =>
@ -445,8 +474,11 @@ abstract class _Preferences implements Preferences {
LockPreference get lockPreference;
@override
NotificationsPreference get notificationsPreference;
/// Create a copy of Preferences
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$PreferencesImplCopyWith<_$PreferencesImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -3,7 +3,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_chat_ui/flutter_chat_ui.dart';
import 'scale_scheme.dart';
import 'scale_theme/scale_scheme.dart';
ChatTheme makeChatTheme(
ScaleScheme scale, ScaleConfig scaleConfig, TextTheme textTheme) =>

View File

@ -1,10 +1,10 @@
import 'package:flutter/material.dart';
import 'radix_generator.dart';
import 'scale_color.dart';
import 'scale_input_decorator_theme.dart';
import 'scale_scheme.dart';
import 'scale_theme.dart';
import 'scale_theme/scale_color.dart';
import 'scale_theme/scale_input_decorator_theme.dart';
import 'scale_theme/scale_scheme.dart';
import 'scale_theme/scale_theme.dart';
ScaleColor _contrastScaleColor(
{required Brightness brightness,

View File

@ -1,7 +1,4 @@
export 'chat_theme.dart';
export 'radix_generator.dart';
export 'scale_color.dart';
export 'scale_scheme.dart';
export 'scale_theme.dart';
export 'slider_tile.dart';
export 'scale_theme/scale_theme.dart';
export 'theme_preference.dart';

View File

@ -1,13 +1,14 @@
import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:radix_colors/radix_colors.dart';
import '../../tools/tools.dart';
import 'scale_color.dart';
import 'scale_input_decorator_theme.dart';
import 'scale_scheme.dart';
import 'scale_theme.dart';
import 'scale_theme/scale_color.dart';
import 'scale_theme/scale_input_decorator_theme.dart';
import 'scale_theme/scale_scheme.dart';
import 'scale_theme/scale_theme.dart';
enum RadixThemeColor {
scarlet, // red + violet + tomato
@ -571,7 +572,11 @@ RadixScheme _radixScheme(Brightness brightness, RadixThemeColor themeColor) {
TextTheme makeRadixTextTheme(Brightness brightness) {
late final TextTheme textTheme;
if (Platform.isIOS) {
if (kIsWeb) {
textTheme = (brightness == Brightness.light)
? Typography.blackHelsinki
: Typography.whiteHelsinki;
} else if (Platform.isIOS) {
textTheme = (brightness == Brightness.light)
? Typography.blackCupertino
: Typography.whiteCupertino;

View File

@ -0,0 +1,93 @@
import 'package:animated_custom_dropdown/custom_dropdown.dart';
import 'package:flutter/material.dart';
import 'scale_scheme.dart';
import 'scale_theme.dart';
class ScaleCustomDropdownTheme {
ScaleCustomDropdownTheme({
required this.decoration,
required this.closedHeaderPadding,
required this.expandedHeaderPadding,
required this.itemsListPadding,
required this.listItemPadding,
required this.disabledDecoration,
required this.textStyle,
});
final CustomDropdownDecoration decoration;
final EdgeInsets closedHeaderPadding;
final EdgeInsets expandedHeaderPadding;
final EdgeInsets itemsListPadding;
final EdgeInsets listItemPadding;
final CustomDropdownDisabledDecoration disabledDecoration;
final TextStyle textStyle;
}
extension ScaleCustomDropdownThemeExt on ScaleTheme {
ScaleCustomDropdownTheme customDropdownTheme() {
final scale = scheme.primaryScale;
final borderColor = scale.borderText;
final fillColor = scale.subtleBorder;
// final backgroundColor = config.useVisualIndicators && !selected
// ? tileColor.borderText
// : borderColor;
// final textColor = config.useVisualIndicators && !selected
// ? borderColor
// : tileColor.borderText;
// final largeTextStyle = textTheme.labelMedium!.copyWith(color: textColor);
// final smallTextStyle = textTheme.labelSmall!.copyWith(color: textColor);
final border = Border.fromBorderSide(config.useVisualIndicators
? BorderSide(width: 2, color: borderColor, strokeAlign: 0)
: BorderSide.none);
final borderRadius = BorderRadius.circular(8 * config.borderRadiusScale);
final decoration = CustomDropdownDecoration(
closedFillColor: fillColor,
expandedFillColor: fillColor,
closedShadow: [],
expandedShadow: [],
closedSuffixIcon: Icon(Icons.arrow_drop_down, color: borderColor),
expandedSuffixIcon: Icon(Icons.arrow_drop_up, color: borderColor),
prefixIcon: null,
closedBorder: border,
closedBorderRadius: borderRadius,
closedErrorBorder: null,
closedErrorBorderRadius: null,
expandedBorder: border,
expandedBorderRadius: borderRadius,
hintStyle: null,
headerStyle: null,
noResultFoundStyle: null,
errorStyle: null,
listItemStyle: null,
overlayScrollbarDecoration: null,
searchFieldDecoration: null,
listItemDecoration: null,
);
final disabledDecoration = CustomDropdownDisabledDecoration(
fillColor: null,
shadow: null,
suffixIcon: null,
prefixIcon: null,
border: null,
borderRadius: null,
headerStyle: null,
hintStyle: null,
);
return ScaleCustomDropdownTheme(
textStyle: textTheme.labelSmall!.copyWith(color: borderColor),
decoration: decoration,
closedHeaderPadding: const EdgeInsets.all(4),
expandedHeaderPadding: const EdgeInsets.all(4),
itemsListPadding: const EdgeInsets.all(4),
listItemPadding: const EdgeInsets.all(4),
disabledDecoration: disabledDecoration,
);
}
}

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'scale_scheme.dart';
import 'scale_theme.dart';
class ScaleInputDecoratorTheme extends InputDecorationTheme {
ScaleInputDecoratorTheme(
@ -25,41 +26,41 @@ class ScaleInputDecoratorTheme extends InputDecorationTheme {
final TextTheme _textTheme;
@override
TextStyle? get hintStyle => MaterialStateTextStyle.resolveWith((states) {
if (states.contains(MaterialState.disabled)) {
TextStyle? get hintStyle => WidgetStateTextStyle.resolveWith((states) {
if (states.contains(WidgetState.disabled)) {
return TextStyle(color: _scaleScheme.grayScale.border);
}
return TextStyle(color: _scaleScheme.primaryScale.border);
});
@override
Color? get fillColor => MaterialStateColor.resolveWith((states) {
if (states.contains(MaterialState.disabled)) {
return _scaleScheme.grayScale.primary.withOpacity(0.04);
Color? get fillColor => WidgetStateColor.resolveWith((states) {
if (states.contains(WidgetState.disabled)) {
return _scaleScheme.grayScale.primary.withAlpha(10);
}
return _scaleScheme.primaryScale.primary.withOpacity(0.04);
return _scaleScheme.primaryScale.primary.withAlpha(10);
});
@override
BorderSide? get activeIndicatorBorder =>
MaterialStateBorderSide.resolveWith((states) {
if (states.contains(MaterialState.disabled)) {
WidgetStateBorderSide.resolveWith((states) {
if (states.contains(WidgetState.disabled)) {
return BorderSide(
color: _scaleScheme.grayScale.border.withAlpha(0x7F));
color: _scaleScheme.grayScale.border.withAlpha(127));
}
if (states.contains(MaterialState.error)) {
if (states.contains(MaterialState.hovered)) {
if (states.contains(WidgetState.error)) {
if (states.contains(WidgetState.hovered)) {
return BorderSide(color: _scaleScheme.errorScale.hoverBorder);
}
if (states.contains(MaterialState.focused)) {
if (states.contains(WidgetState.focused)) {
return BorderSide(color: _scaleScheme.errorScale.border, width: 2);
}
return BorderSide(color: _scaleScheme.errorScale.subtleBorder);
}
if (states.contains(MaterialState.hovered)) {
if (states.contains(WidgetState.hovered)) {
return BorderSide(color: _scaleScheme.secondaryScale.hoverBorder);
}
if (states.contains(MaterialState.focused)) {
if (states.contains(WidgetState.focused)) {
return BorderSide(
color: _scaleScheme.secondaryScale.border, width: 2);
}
@ -67,25 +68,24 @@ class ScaleInputDecoratorTheme extends InputDecorationTheme {
});
@override
BorderSide? get outlineBorder =>
MaterialStateBorderSide.resolveWith((states) {
if (states.contains(MaterialState.disabled)) {
BorderSide? get outlineBorder => WidgetStateBorderSide.resolveWith((states) {
if (states.contains(WidgetState.disabled)) {
return BorderSide(
color: _scaleScheme.grayScale.border.withAlpha(0x7F));
color: _scaleScheme.grayScale.border.withAlpha(127));
}
if (states.contains(MaterialState.error)) {
if (states.contains(MaterialState.hovered)) {
if (states.contains(WidgetState.error)) {
if (states.contains(WidgetState.hovered)) {
return BorderSide(color: _scaleScheme.errorScale.hoverBorder);
}
if (states.contains(MaterialState.focused)) {
if (states.contains(WidgetState.focused)) {
return BorderSide(color: _scaleScheme.errorScale.border, width: 2);
}
return BorderSide(color: _scaleScheme.errorScale.subtleBorder);
}
if (states.contains(MaterialState.hovered)) {
if (states.contains(WidgetState.hovered)) {
return BorderSide(color: _scaleScheme.primaryScale.hoverBorder);
}
if (states.contains(MaterialState.focused)) {
if (states.contains(WidgetState.focused)) {
return BorderSide(color: _scaleScheme.primaryScale.border, width: 2);
}
return BorderSide(color: _scaleScheme.primaryScale.subtleBorder);
@ -95,51 +95,51 @@ class ScaleInputDecoratorTheme extends InputDecorationTheme {
Color? get iconColor => _scaleScheme.primaryScale.primary;
@override
Color? get prefixIconColor => MaterialStateColor.resolveWith((states) {
if (states.contains(MaterialState.disabled)) {
return _scaleScheme.primaryScale.primary.withAlpha(0x3F);
Color? get prefixIconColor => WidgetStateColor.resolveWith((states) {
if (states.contains(WidgetState.disabled)) {
return _scaleScheme.primaryScale.primary.withAlpha(127);
}
if (states.contains(MaterialState.error)) {
if (states.contains(WidgetState.error)) {
return _scaleScheme.errorScale.primary;
}
return _scaleScheme.primaryScale.primary;
});
@override
Color? get suffixIconColor => MaterialStateColor.resolveWith((states) {
if (states.contains(MaterialState.disabled)) {
return _scaleScheme.primaryScale.primary.withAlpha(0x3F);
Color? get suffixIconColor => WidgetStateColor.resolveWith((states) {
if (states.contains(WidgetState.disabled)) {
return _scaleScheme.primaryScale.primary.withAlpha(127);
}
if (states.contains(MaterialState.error)) {
if (states.contains(WidgetState.error)) {
return _scaleScheme.errorScale.primary;
}
return _scaleScheme.primaryScale.primary;
});
@override
TextStyle? get labelStyle => MaterialStateTextStyle.resolveWith((states) {
TextStyle? get labelStyle => WidgetStateTextStyle.resolveWith((states) {
final textStyle = _textTheme.bodyLarge ?? const TextStyle();
if (states.contains(MaterialState.disabled)) {
if (states.contains(WidgetState.disabled)) {
return textStyle.copyWith(
color: _scaleScheme.grayScale.border.withAlpha(0x7F));
color: _scaleScheme.grayScale.border.withAlpha(127));
}
if (states.contains(MaterialState.error)) {
if (states.contains(MaterialState.hovered)) {
if (states.contains(WidgetState.error)) {
if (states.contains(WidgetState.hovered)) {
return textStyle.copyWith(
color: _scaleScheme.errorScale.hoverBorder);
}
if (states.contains(MaterialState.focused)) {
if (states.contains(WidgetState.focused)) {
return textStyle.copyWith(
color: _scaleScheme.errorScale.hoverBorder);
}
return textStyle.copyWith(
color: _scaleScheme.errorScale.subtleBorder);
}
if (states.contains(MaterialState.hovered)) {
if (states.contains(WidgetState.hovered)) {
return textStyle.copyWith(
color: _scaleScheme.primaryScale.hoverBorder);
}
if (states.contains(MaterialState.focused)) {
if (states.contains(WidgetState.focused)) {
return textStyle.copyWith(
color: _scaleScheme.primaryScale.hoverBorder);
}
@ -150,19 +150,24 @@ class ScaleInputDecoratorTheme extends InputDecorationTheme {
TextStyle? get floatingLabelStyle => labelStyle;
@override
TextStyle? get helperStyle => MaterialStateTextStyle.resolveWith((states) {
TextStyle? get helperStyle => WidgetStateTextStyle.resolveWith((states) {
final textStyle = _textTheme.bodySmall ?? const TextStyle();
if (states.contains(MaterialState.disabled)) {
if (states.contains(WidgetState.disabled)) {
return textStyle.copyWith(
color: _scaleScheme.grayScale.border.withAlpha(0x7F));
color: _scaleScheme.grayScale.border.withAlpha(127));
}
return textStyle.copyWith(
color: _scaleScheme.secondaryScale.border.withAlpha(0x7F));
color: _scaleScheme.secondaryScale.border.withAlpha(127));
});
@override
TextStyle? get errorStyle => MaterialStateTextStyle.resolveWith((states) {
TextStyle? get errorStyle => WidgetStateTextStyle.resolveWith((states) {
final textStyle = _textTheme.bodySmall ?? const TextStyle();
return textStyle.copyWith(color: _scaleScheme.errorScale.primary);
});
}
extension ScaleInputDecoratorThemeExt on ScaleTheme {
ScaleInputDecoratorTheme inputDecoratorTheme() =>
ScaleInputDecoratorTheme(scheme, config, textTheme);
}

View File

@ -0,0 +1,44 @@
import 'package:flutter/material.dart';
import 'scale_scheme.dart';
export 'scale_color.dart';
export 'scale_input_decorator_theme.dart';
export 'scale_scheme.dart';
export 'scale_tile_theme.dart';
export 'scale_toast_theme.dart';
class ScaleTheme extends ThemeExtension<ScaleTheme> {
ScaleTheme({
required this.textTheme,
required this.scheme,
required this.config,
});
final TextTheme textTheme;
final ScaleScheme scheme;
final ScaleConfig config;
@override
ScaleTheme copyWith({
TextTheme? textTheme,
ScaleScheme? scheme,
ScaleConfig? config,
}) =>
ScaleTheme(
textTheme: textTheme ?? this.textTheme,
scheme: scheme ?? this.scheme,
config: config ?? this.config,
);
@override
ScaleTheme lerp(ScaleTheme? other, double t) {
if (other is! ScaleTheme) {
return this;
}
return ScaleTheme(
textTheme: TextTheme.lerp(textTheme, other.textTheme, t),
scheme: scheme.lerp(other.scheme, t),
config: config.lerp(other.config, t));
}
}

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'scale_scheme.dart';
import 'scale_theme.dart';
class ScaleTileTheme {
ScaleTileTheme(
@ -19,40 +20,7 @@ class ScaleTileTheme {
final TextStyle smallTextStyle;
}
class ScaleTheme extends ThemeExtension<ScaleTheme> {
ScaleTheme({
required this.textTheme,
required this.scheme,
required this.config,
});
final TextTheme textTheme;
final ScaleScheme scheme;
final ScaleConfig config;
@override
ScaleTheme copyWith({
TextTheme? textTheme,
ScaleScheme? scheme,
ScaleConfig? config,
}) =>
ScaleTheme(
textTheme: textTheme ?? this.textTheme,
scheme: scheme ?? this.scheme,
config: config ?? this.config,
);
@override
ScaleTheme lerp(ScaleTheme? other, double t) {
if (other is! ScaleTheme) {
return this;
}
return ScaleTheme(
textTheme: TextTheme.lerp(textTheme, other.textTheme, t),
scheme: scheme.lerp(other.scheme, t),
config: config.lerp(other.config, t));
}
extension ScaleTileThemeExt on ScaleTheme {
ScaleTileTheme tileTheme(
{bool disabled = false,
bool selected = false,

View File

@ -0,0 +1,72 @@
import 'package:flutter/material.dart';
import 'scale_scheme.dart';
import 'scale_theme.dart';
enum ScaleToastKind {
info,
error,
}
class ScaleToastTheme {
ScaleToastTheme(
{required this.primaryColor,
required this.backgroundColor,
required this.foregroundColor,
required this.borderSide,
required this.borderRadius,
required this.padding,
required this.icon,
required this.titleTextStyle,
required this.descriptionTextStyle});
final Color primaryColor;
final Color backgroundColor;
final Color foregroundColor;
final BorderSide? borderSide;
final BorderRadiusGeometry borderRadius;
final EdgeInsetsGeometry padding;
final Icon icon;
final TextStyle titleTextStyle;
final TextStyle descriptionTextStyle;
}
extension ScaleToastThemeExt on ScaleTheme {
ScaleToastTheme toastTheme(ScaleToastKind kind) {
final toastScaleColor = scheme.scale(ScaleKind.tertiary);
Icon icon;
switch (kind) {
case ScaleToastKind.info:
icon = const Icon(Icons.info, size: 32);
case ScaleToastKind.error:
icon = const Icon(Icons.dangerous, size: 32);
}
final primaryColor = toastScaleColor.calloutText;
final borderColor = toastScaleColor.border;
final backgroundColor = config.useVisualIndicators
? toastScaleColor.calloutText
: toastScaleColor.calloutBackground;
final textColor = config.useVisualIndicators
? toastScaleColor.calloutBackground
: toastScaleColor.calloutText;
final titleColor = config.useVisualIndicators
? toastScaleColor.calloutBackground
: toastScaleColor.calloutText;
return ScaleToastTheme(
primaryColor: primaryColor,
backgroundColor: backgroundColor,
foregroundColor: textColor,
borderSide: (config.useVisualIndicators || config.preferBorders)
? BorderSide(color: borderColor, width: 2)
: const BorderSide(color: Colors.transparent, width: 0),
borderRadius: BorderRadius.circular(12 * config.borderRadiusScale),
padding: const EdgeInsets.all(8),
icon: icon,
titleTextStyle: textTheme.labelMedium!.copyWith(color: titleColor),
descriptionTextStyle:
textTheme.labelMedium!.copyWith(color: textColor));
}
}

View File

@ -5,7 +5,7 @@ import 'package:freezed_annotation/freezed_annotation.dart';
import '../views/widget_helpers.dart';
import 'contrast_generator.dart';
import 'radix_generator.dart';
import 'scale_scheme.dart';
import 'scale_theme/scale_scheme.dart';
part 'theme_preference.freezed.dart';
part 'theme_preference.g.dart';

View File

@ -25,8 +25,12 @@ mixin _$ThemePreferences {
ColorPreference get colorPreference => throw _privateConstructorUsedError;
double get displayScale => throw _privateConstructorUsedError;
/// Serializes this ThemePreferences to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of ThemePreferences
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ThemePreferencesCopyWith<ThemePreferences> get copyWith =>
throw _privateConstructorUsedError;
}
@ -53,6 +57,8 @@ class _$ThemePreferencesCopyWithImpl<$Res, $Val extends ThemePreferences>
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ThemePreferences
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -99,6 +105,8 @@ class __$$ThemePreferencesImplCopyWithImpl<$Res>
$Res Function(_$ThemePreferencesImpl) _then)
: super(_value, _then);
/// Create a copy of ThemePreferences
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -162,12 +170,14 @@ class _$ThemePreferencesImpl implements _ThemePreferences {
other.displayScale == displayScale));
}
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType, brightnessPreference, colorPreference, displayScale);
@JsonKey(ignore: true)
/// Create a copy of ThemePreferences
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ThemePreferencesImplCopyWith<_$ThemePreferencesImpl> get copyWith =>
@ -197,8 +207,11 @@ abstract class _ThemePreferences implements ThemePreferences {
ColorPreference get colorPreference;
@override
double get displayScale;
/// Create a copy of ThemePreferences
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ThemePreferencesImplCopyWith<_$ThemePreferencesImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -40,7 +40,9 @@ class OptionBox extends StatelessWidget {
ElevatedButton(
onPressed: _onClick,
child: Row(mainAxisSize: MainAxisSize.min, children: [
Icon(_buttonIcon, size: 24).paddingLTRB(0, 8, 8, 8),
Icon(_buttonIcon,
size: 24, color: scale.primaryScale.appText)
.paddingLTRB(0, 8, 8, 8),
Text(textAlign: TextAlign.center, _buttonText)
])).paddingLTRB(0, 12, 0, 0).toCenter()
]).paddingAll(12))

View File

@ -14,17 +14,22 @@ class StyledScaffold extends StatelessWidget {
final enableBorder = !isMobileSize(context);
final scaffold = clipBorder(
clipEnabled: enableBorder,
borderEnabled: scaleConfig.useVisualIndicators,
borderRadius: 16 * scaleConfig.borderRadiusScale,
borderColor: scale.primaryScale.border,
child: Scaffold(appBar: appBar, body: body, key: key))
.paddingAll(enableBorder ? 32 : 0);
var scaffold = clipBorder(
clipEnabled: enableBorder,
borderEnabled: scaleConfig.useVisualIndicators,
borderRadius: 16 * scaleConfig.borderRadiusScale,
borderColor: scale.primaryScale.border,
child: Scaffold(appBar: appBar, body: body, key: key));
if (!scaleConfig.useVisualIndicators) {
scaffold = scaffold.withShadow(
offset: const Offset(0, 16),
shadowColor: scale.primaryScale.primary.withAlpha(0x3F).darken(60));
}
return GestureDetector(
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
child: scaffold);
child: scaffold.paddingAll(enableBorder ? 32 : 0));
}
////////////////////////////////////////////////////////////////////////////

View File

@ -8,6 +8,7 @@ export 'pop_control.dart';
export 'recovery_key_widget.dart';
export 'responsive.dart';
export 'scanner_error_widget.dart';
export 'slider_tile.dart';
export 'styled_alert.dart';
export 'styled_dialog.dart';
export 'styled_scaffold.dart';

View File

@ -500,24 +500,26 @@ const grayColorFilter = ColorFilter.matrix(<double>[
0,
]);
Widget clipBorder({
Container clipBorder({
required bool clipEnabled,
required bool borderEnabled,
required double borderRadius,
required Color borderColor,
required Widget child,
}) =>
ClipRRect(
borderRadius: clipEnabled
? BorderRadius.circular(borderRadius)
: BorderRadius.zero,
child: DecoratedBox(
decoration: BoxDecoration(boxShadow: [
if (borderEnabled) BoxShadow(color: borderColor, spreadRadius: 2)
]),
child: ClipRRect(
// ignore: avoid_unnecessary_containers, use_decorated_box
Container(
decoration: ShapeDecoration(
color: borderColor,
shape: RoundedRectangleBorder(
borderRadius: clipEnabled
? BorderRadius.circular(borderRadius)
: BorderRadius.zero,
child: child,
)).paddingAll(clipEnabled && borderEnabled ? 2 : 0));
)),
child: ClipRRect(
clipBehavior: Clip.hardEdge,
borderRadius: clipEnabled
? BorderRadius.circular(borderRadius)
: BorderRadius.zero,
child: child)
.paddingAll(clipEnabled && borderEnabled ? 2 : 0));

View File

@ -112,7 +112,7 @@ class CallbackPrinter extends LoggyPrinter {
void onLog(LogRecord record) {
final out = record.pretty().replaceAll('\uFFFD', '');
if (Platform.isAndroid) {
if (!kIsWeb && Platform.isAndroid) {
debugPrint(out);
} else {
debugPrintSynchronously(out);

View File

@ -19,7 +19,9 @@ mixin _$ProcessorConnectionState {
VeilidStateAttachment get attachment => throw _privateConstructorUsedError;
VeilidStateNetwork get network => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of ProcessorConnectionState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ProcessorConnectionStateCopyWith<ProcessorConnectionState> get copyWith =>
throw _privateConstructorUsedError;
}
@ -47,6 +49,8 @@ class _$ProcessorConnectionStateCopyWithImpl<$Res,
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of ProcessorConnectionState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -65,6 +69,8 @@ class _$ProcessorConnectionStateCopyWithImpl<$Res,
) as $Val);
}
/// Create a copy of ProcessorConnectionState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$VeilidStateAttachmentCopyWith<$Res> get attachment {
@ -73,6 +79,8 @@ class _$ProcessorConnectionStateCopyWithImpl<$Res,
});
}
/// Create a copy of ProcessorConnectionState
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$VeilidStateNetworkCopyWith<$Res> get network {
@ -109,6 +117,8 @@ class __$$ProcessorConnectionStateImplCopyWithImpl<$Res>
$Res Function(_$ProcessorConnectionStateImpl) _then)
: super(_value, _then);
/// Create a copy of ProcessorConnectionState
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -158,7 +168,9 @@ class _$ProcessorConnectionStateImpl extends _ProcessorConnectionState {
@override
int get hashCode => Object.hash(runtimeType, attachment, network);
@JsonKey(ignore: true)
/// Create a copy of ProcessorConnectionState
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$ProcessorConnectionStateImplCopyWith<_$ProcessorConnectionStateImpl>
@ -177,8 +189,11 @@ abstract class _ProcessorConnectionState extends ProcessorConnectionState {
VeilidStateAttachment get attachment;
@override
VeilidStateNetwork get network;
/// Create a copy of ProcessorConnectionState
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ProcessorConnectionStateImplCopyWith<_$ProcessorConnectionStateImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@ -1,13 +1,11 @@
import 'dart:async';
import 'package:animated_custom_dropdown/custom_dropdown.dart';
import 'package:ansicolor/ansicolor.dart';
import 'package:awesome_extensions/awesome_extensions.dart';
import 'package:cool_dropdown/cool_dropdown.dart';
import 'package:cool_dropdown/models/cool_dropdown_item.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_translate/flutter_translate.dart';
import 'package:go_router/go_router.dart';
@ -17,6 +15,7 @@ import 'package:xterm/xterm.dart';
import '../../layout/layout.dart';
import '../../notifications/notifications.dart';
import '../../theme/models/scale_theme/scale_custom_dropdown_theme.dart';
import '../../theme/theme.dart';
import '../../tools/tools.dart';
import 'history_text_editing_controller.dart';
@ -30,6 +29,15 @@ const kDefaultTerminalStyle = TerminalStyle(
// height: 1.2,
fontFamily: 'Source Code Pro');
class LogLevelDropdownItem {
const LogLevelDropdownItem(
{required this.label, required this.icon, required this.value});
final String label;
final Widget icon;
final LogLevel value;
}
class DeveloperPage extends StatefulWidget {
const DeveloperPage({super.key});
@ -49,7 +57,7 @@ class _DeveloperPageState extends State<DeveloperPage> {
});
for (var i = 0; i < logLevels.length; i++) {
_logLevelDropdownItems.add(CoolDropdownItem<LogLevel>(
_logLevelDropdownItems.add(LogLevelDropdownItem(
label: logLevelName(logLevels[i]),
icon: Text(logLevelEmoji(logLevels[i])),
value: logLevels[i]));
@ -167,29 +175,28 @@ class _DeveloperPageState extends State<DeveloperPage> {
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final textTheme = theme.textTheme;
final scale = theme.extension<ScaleScheme>()!;
final scaleTheme = theme.extension<ScaleTheme>()!;
final dropdownTheme = scaleTheme.customDropdownTheme();
final scaleConfig = theme.extension<ScaleConfig>()!;
// WidgetsBinding.instance.addPostFrameCallback((_) {
// if (!_isScrolling && _wantsBottom) {
// _scrollToBottom();
// }
// });
final hintColor = scaleConfig.useVisualIndicators
? scale.primaryScale.primaryText
: scale.primaryScale.primary;
return Scaffold(
backgroundColor: scale.primaryScale.primary,
backgroundColor: scale.primaryScale.border,
appBar: DefaultAppBar(
title: Text(translate('developer.title')),
leading: IconButton(
icon: Icon(Icons.arrow_back, color: scale.primaryScale.primaryText),
icon: Icon(Icons.arrow_back, color: scale.primaryScale.borderText),
onPressed: () => GoRouterHelper(context).pop(),
),
actions: [
IconButton(
icon: const Icon(Icons.copy),
color: scale.primaryScale.primaryText,
disabledColor: scale.primaryScale.primaryText.withAlpha(0x3F),
color: scale.primaryScale.borderText,
disabledColor: scale.primaryScale.borderText.withAlpha(0x3F),
onPressed: _terminalController.selection == null
? null
: () async {
@ -197,15 +204,15 @@ class _DeveloperPageState extends State<DeveloperPage> {
}),
IconButton(
icon: const Icon(Icons.copy_all),
color: scale.primaryScale.primaryText,
disabledColor: scale.primaryScale.primaryText.withAlpha(0x3F),
color: scale.primaryScale.borderText,
disabledColor: scale.primaryScale.borderText.withAlpha(0x3F),
onPressed: () async {
await copyAll(context);
}),
IconButton(
icon: const Icon(Icons.clear_all),
color: scale.primaryScale.primaryText,
disabledColor: scale.primaryScale.primaryText.withAlpha(0x3F),
color: scale.primaryScale.borderText,
disabledColor: scale.primaryScale.borderText.withAlpha(0x3F),
onPressed: () async {
final confirm = await showConfirmModal(
context: context,
@ -216,74 +223,39 @@ class _DeveloperPageState extends State<DeveloperPage> {
await clear(context);
}
}),
CoolDropdown<LogLevel>(
controller: _logLevelController,
defaultItem: _logLevelDropdownItems
.singleWhere((x) => x.value == _logLevelDropDown),
onChange: (value) {
setState(() {
_logLevelDropDown = value;
Loggy('').level = getLogOptions(value);
setVeilidLogLevel(value);
_logLevelController.close();
});
},
resultOptions: ResultOptions(
width: 64,
height: 40,
render: ResultRender.icon,
icon: SizedBox(
width: 10,
height: 10,
child: CustomPaint(
painter: DropdownArrowPainter(
color: scale.primaryScale.primaryText))),
textStyle: textTheme.labelMedium!
.copyWith(color: scale.primaryScale.primaryText),
padding: const EdgeInsets.fromLTRB(8, 4, 8, 4),
openBoxDecoration: BoxDecoration(
//color: scale.primaryScale.border,
border: Border.all(
color: scaleConfig.useVisualIndicators
? scale.primaryScale.hoverBorder
: scale.primaryScale.borderText),
borderRadius:
BorderRadius.circular(8 * scaleConfig.borderRadiusScale),
),
boxDecoration: BoxDecoration(
//color: scale.primaryScale.hoverBorder,
border: Border.all(
color: scaleConfig.useVisualIndicators
? scale.primaryScale.hoverBorder
: scale.primaryScale.borderText),
borderRadius:
BorderRadius.circular(8 * scaleConfig.borderRadiusScale),
),
),
dropdownOptions: DropdownOptions(
width: 160,
align: DropdownAlign.right,
duration: 150.ms,
color: scale.primaryScale.elementBackground,
borderSide: BorderSide(color: scale.primaryScale.border),
borderRadius:
BorderRadius.circular(8 * scaleConfig.borderRadiusScale),
padding: const EdgeInsets.fromLTRB(8, 4, 8, 4),
),
dropdownTriangleOptions: const DropdownTriangleOptions(
align: DropdownTriangleAlign.right),
dropdownItemOptions: DropdownItemOptions(
selectedTextStyle: textTheme.labelMedium!
.copyWith(color: scale.primaryScale.appText),
textStyle: textTheme.labelMedium!
.copyWith(color: scale.primaryScale.appText),
selectedBoxDecoration: BoxDecoration(
color: scale.primaryScale.activeElementBackground),
mainAxisAlignment: MainAxisAlignment.spaceBetween,
padding: const EdgeInsets.fromLTRB(8, 4, 8, 4),
selectedPadding: const EdgeInsets.fromLTRB(8, 4, 8, 4)),
dropdownList: _logLevelDropdownItems,
).paddingLTRB(0, 0, 8, 0)
SizedBox.fromSize(
size: const Size(120, 48),
child: CustomDropdown<LogLevelDropdownItem>(
items: _logLevelDropdownItems,
initialItem: _logLevelDropdownItems
.singleWhere((x) => x.value == _logLevelDropDown),
onChanged: (item) {
if (item != null) {
setState(() {
_logLevelDropDown = item.value;
Loggy('').level = getLogOptions(item.value);
setVeilidLogLevel(item.value);
});
}
},
headerBuilder: (context, item, enabled) => Row(children: [
item.icon,
const Spacer(),
Text(item.label).copyWith(style: dropdownTheme.textStyle)
]),
listItemBuilder: (context, item, enabled, onItemSelect) =>
Row(children: [
item.icon,
const Spacer(),
Text(item.label).copyWith(style: dropdownTheme.textStyle)
]),
decoration: dropdownTheme.decoration,
disabledDecoration: dropdownTheme.disabledDecoration,
listItemPadding: dropdownTheme.listItemPadding,
itemsListPadding: dropdownTheme.itemsListPadding,
expandedHeaderPadding: dropdownTheme.expandedHeaderPadding,
closedHeaderPadding: dropdownTheme.closedHeaderPadding,
)).paddingLTRB(0, 4, 8, 4),
],
),
body: GestureDetector(
@ -312,21 +284,24 @@ class _DeveloperPageState extends State<DeveloperPage> {
decoration: InputDecoration(
filled: true,
contentPadding: const EdgeInsets.fromLTRB(8, 2, 8, 2),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(
8 * scaleConfig.borderRadiusScale),
borderSide: BorderSide.none),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(
8 * scaleConfig.borderRadiusScale),
),
fillColor: scale.primaryScale.subtleBackground,
enabledBorder:
const OutlineInputBorder(borderSide: BorderSide.none),
border:
const OutlineInputBorder(borderSide: BorderSide.none),
focusedBorder:
const OutlineInputBorder(borderSide: BorderSide.none),
fillColor: scale.primaryScale.elementBackground,
hoverColor: scale.primaryScale.elementBackground,
hintStyle: scaleTheme.textTheme.labelMedium!.copyWith(
color: scaleConfig.useVisualIndicators
? hintColor.withAlpha(0x7F)
: hintColor),
hintText: translate('developer.command'),
suffixIcon: IconButton(
icon: Icon(Icons.send,
color: _historyController.controller.text.isEmpty
? scale.primaryScale.primary.withAlpha(0x3F)
: scale.primaryScale.primary),
? hintColor.withAlpha(0x7F)
: hintColor),
onPressed:
(_historyController.controller.text.isEmpty || _busy)
? null
@ -366,9 +341,9 @@ class _DeveloperPageState extends State<DeveloperPage> {
final _terminalController = TerminalController();
late final HistoryTextEditingController _historyController;
final _logLevelController = DropdownController<LogLevel>(duration: 250.ms);
final List<CoolDropdownItem<LogLevel>> _logLevelDropdownItems = [];
final List<LogLevelDropdownItem> _logLevelDropdownItems = [];
var _logLevelDropDown = log.level.logLevel;
var _showEllet = false;
var _busy = false;

View File

@ -34,34 +34,33 @@ class SignalStrengthMeterWidget extends StatelessWidget {
case AttachmentState.detached:
iconWidget = Icon(Icons.signal_cellular_nodata,
size: iconSize,
color: this.color ?? scale.primaryScale.primaryText);
color: this.color ?? scale.primaryScale.borderText);
return;
case AttachmentState.detaching:
iconWidget = Icon(Icons.signal_cellular_off,
size: iconSize,
color: this.color ?? scale.primaryScale.primaryText);
color: this.color ?? scale.primaryScale.borderText);
return;
case AttachmentState.attaching:
value = 0;
color = this.color ?? scale.primaryScale.primaryText;
color = this.color ?? scale.primaryScale.borderText;
case AttachmentState.attachedWeak:
value = 1;
color = this.color ?? scale.primaryScale.primaryText;
color = this.color ?? scale.primaryScale.borderText;
case AttachmentState.attachedStrong:
value = 2;
color = this.color ?? scale.primaryScale.primaryText;
color = this.color ?? scale.primaryScale.borderText;
case AttachmentState.attachedGood:
value = 3;
color = this.color ?? scale.primaryScale.primaryText;
color = this.color ?? scale.primaryScale.borderText;
case AttachmentState.fullyAttached:
value = 4;
color = this.color ?? scale.primaryScale.primaryText;
color = this.color ?? scale.primaryScale.borderText;
case AttachmentState.overAttached:
value = 4;
color = this.color ?? scale.primaryScale.primaryText;
color = this.color ?? scale.primaryScale.borderText;
}
inactiveColor =
this.inactiveColor ?? scale.primaryScale.primaryText;
inactiveColor = this.inactiveColor ?? scale.grayScale.borderText;
iconWidget = SignalStrengthIndicator.bars(
value: value,

View File

@ -48,6 +48,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">

View File

@ -36,116 +36,116 @@ void main() {
setUpAll(veilidFixture.attach);
tearDownAll(veilidFixture.detach);
// group('TableDB Tests', () {
// group('TableDBArray Tests', () {
// // test('create/delete TableDBArray', testTableDBArrayCreateDelete);
group('TableDB Tests', () {
group('TableDBArray Tests', () {
// test('create/delete TableDBArray', testTableDBArrayCreateDelete);
// group('TableDBArray Add/Get Tests', () {
// for (final params in [
// //
// (99, 3, 15),
// (100, 4, 16),
// (101, 5, 17),
// //
// (511, 3, 127),
// (512, 4, 128),
// (513, 5, 129),
// //
// (4095, 3, 1023),
// (4096, 4, 1024),
// (4097, 5, 1025),
// //
// (65535, 3, 16383),
// (65536, 4, 16384),
// (65537, 5, 16385),
// ]) {
// final count = params.$1;
// final singles = params.$2;
// final batchSize = params.$3;
group('TableDBArray Add/Get Tests', () {
for (final params in [
//
(99, 3, 15),
(100, 4, 16),
(101, 5, 17),
//
(511, 3, 127),
(512, 4, 128),
(513, 5, 129),
//
(4095, 3, 1023),
(4096, 4, 1024),
(4097, 5, 1025),
//
(65535, 3, 16383),
(65536, 4, 16384),
(65537, 5, 16385),
]) {
final count = params.$1;
final singles = params.$2;
final batchSize = params.$3;
// test(
// timeout: const Timeout(Duration(seconds: 480)),
// 'add/remove TableDBArray count = $count batchSize=$batchSize',
// makeTestTableDBArrayAddGetClear(
// count: count,
// singles: singles,
// batchSize: batchSize,
// crypto: const VeilidCryptoPublic()),
// );
// }
// });
test(
timeout: const Timeout(Duration(seconds: 480)),
'add/remove TableDBArray count = $count batchSize=$batchSize',
makeTestTableDBArrayAddGetClear(
count: count,
singles: singles,
batchSize: batchSize,
crypto: const VeilidCryptoPublic()),
);
}
});
// group('TableDBArray Insert Tests', () {
// for (final params in [
// //
// (99, 3, 15),
// (100, 4, 16),
// (101, 5, 17),
// //
// (511, 3, 127),
// (512, 4, 128),
// (513, 5, 129),
// //
// (4095, 3, 1023),
// (4096, 4, 1024),
// (4097, 5, 1025),
// //
// (65535, 3, 16383),
// (65536, 4, 16384),
// (65537, 5, 16385),
// ]) {
// final count = params.$1;
// final singles = params.$2;
// final batchSize = params.$3;
group('TableDBArray Insert Tests', () {
for (final params in [
//
(99, 3, 15),
(100, 4, 16),
(101, 5, 17),
//
(511, 3, 127),
(512, 4, 128),
(513, 5, 129),
//
(4095, 3, 1023),
(4096, 4, 1024),
(4097, 5, 1025),
//
(65535, 3, 16383),
(65536, 4, 16384),
(65537, 5, 16385),
]) {
final count = params.$1;
final singles = params.$2;
final batchSize = params.$3;
// test(
// timeout: const Timeout(Duration(seconds: 480)),
// 'insert TableDBArray count=$count singles=$singles batchSize=$batchSize',
// makeTestTableDBArrayInsert(
// count: count,
// singles: singles,
// batchSize: batchSize,
// crypto: const VeilidCryptoPublic()),
// );
// }
// });
test(
timeout: const Timeout(Duration(seconds: 480)),
'insert TableDBArray count=$count singles=$singles batchSize=$batchSize',
makeTestTableDBArrayInsert(
count: count,
singles: singles,
batchSize: batchSize,
crypto: const VeilidCryptoPublic()),
);
}
});
// group('TableDBArray Remove Tests', () {
// for (final params in [
// //
// (99, 3, 15),
// (100, 4, 16),
// (101, 5, 17),
// //
// (511, 3, 127),
// (512, 4, 128),
// (513, 5, 129),
// //
// (4095, 3, 1023),
// (4096, 4, 1024),
// (4097, 5, 1025),
// //
// (16383, 3, 4095),
// (16384, 4, 4096),
// (16385, 5, 4097),
// ]) {
// final count = params.$1;
// final singles = params.$2;
// final batchSize = params.$3;
group('TableDBArray Remove Tests', () {
for (final params in [
//
(99, 3, 15),
(100, 4, 16),
(101, 5, 17),
//
(511, 3, 127),
(512, 4, 128),
(513, 5, 129),
//
(4095, 3, 1023),
(4096, 4, 1024),
(4097, 5, 1025),
//
(16383, 3, 4095),
(16384, 4, 4096),
(16385, 5, 4097),
]) {
final count = params.$1;
final singles = params.$2;
final batchSize = params.$3;
// test(
// timeout: const Timeout(Duration(seconds: 480)),
// 'remove TableDBArray count=$count singles=$singles batchSize=$batchSize',
// makeTestTableDBArrayRemove(
// count: count,
// singles: singles,
// batchSize: batchSize,
// crypto: const VeilidCryptoPublic()),
// );
// }
// });
// });
// });
test(
timeout: const Timeout(Duration(seconds: 480)),
'remove TableDBArray count=$count singles=$singles batchSize=$batchSize',
makeTestTableDBArrayRemove(
count: count,
singles: singles,
batchSize: batchSize,
crypto: const VeilidCryptoPublic()),
);
}
});
});
});
group('DHT Support Tests', () {
setUpAll(updateProcessorFixture.setUp);

View File

@ -34,10 +34,10 @@ packages:
dependency: transitive
description:
name: async
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
url: "https://pub.dev"
source: hosted
version: "2.11.0"
version: "2.12.0"
async_tools:
dependency: "direct dev"
description:
@ -66,10 +66,10 @@ packages:
dependency: transitive
description:
name: boolean_selector
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
change_case:
dependency: transitive
description:
@ -82,10 +82,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.4.0"
charcode:
dependency: transitive
description:
@ -98,18 +98,18 @@ packages:
dependency: transitive
description:
name: clock
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.dev"
source: hosted
version: "1.1.1"
version: "1.1.2"
collection:
dependency: transitive
description:
name: collection
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.dev"
source: hosted
version: "1.19.0"
version: "1.19.1"
convert:
dependency: transitive
description:
@ -154,10 +154,10 @@ packages:
dependency: transitive
description:
name: fake_async
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
url: "https://pub.dev"
source: hosted
version: "1.3.1"
version: "1.3.2"
fast_immutable_collections:
dependency: transitive
description:
@ -178,10 +178,10 @@ packages:
dependency: transitive
description:
name: file
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
url: "https://pub.dev"
source: hosted
version: "7.0.0"
version: "7.0.1"
fixnum:
dependency: transitive
description:
@ -296,18 +296,18 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
url: "https://pub.dev"
source: hosted
version: "10.0.7"
version: "10.0.8"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
url: "https://pub.dev"
source: hosted
version: "3.0.8"
version: "3.0.9"
leak_tracker_testing:
dependency: transitive
description:
@ -352,10 +352,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
url: "https://pub.dev"
source: hosted
version: "0.12.16+1"
version: "0.12.17"
material_color_utilities:
dependency: transitive
description:
@ -368,10 +368,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
url: "https://pub.dev"
source: hosted
version: "1.15.0"
version: "1.16.0"
mime:
dependency: transitive
description:
@ -400,10 +400,10 @@ packages:
dependency: transitive
description:
name: path
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
source: hosted
version: "1.9.0"
version: "1.9.1"
path_provider:
dependency: transitive
description:
@ -456,10 +456,10 @@ packages:
dependency: transitive
description:
name: platform
sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984"
url: "https://pub.dev"
source: hosted
version: "3.1.5"
version: "3.1.6"
plugin_platform_interface:
dependency: transitive
description:
@ -480,10 +480,10 @@ packages:
dependency: transitive
description:
name: process
sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32"
sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d"
url: "https://pub.dev"
source: hosted
version: "5.0.2"
version: "5.0.3"
protobuf:
dependency: transitive
description:
@ -557,34 +557,34 @@ packages:
dependency: transitive
description:
name: source_span
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.10.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
url: "https://pub.dev"
source: hosted
version: "1.12.0"
version: "1.12.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
version: "2.1.4"
string_scanner:
dependency: transitive
description:
name: string_scanner
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.4.1"
sync_http:
dependency: transitive
description:
@ -613,34 +613,34 @@ packages:
dependency: transitive
description:
name: term_glyph
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.2.2"
test:
dependency: "direct dev"
description:
name: test
sha256: "713a8789d62f3233c46b4a90b174737b2c04cb6ae4500f2aa8b1be8f03f5e67f"
sha256: "301b213cd241ca982e9ba50266bd3f5bd1ea33f1455554c5abb85d1be0e2d87e"
url: "https://pub.dev"
source: hosted
version: "1.25.8"
version: "1.25.15"
test_api:
dependency: transitive
description:
name: test_api
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
url: "https://pub.dev"
source: hosted
version: "0.7.3"
version: "0.7.4"
test_core:
dependency: transitive
description:
name: test_core
sha256: "12391302411737c176b0b5d6491f466b0dd56d4763e347b6714efbaa74d7953d"
sha256: "84d17c3486c8dfdbe5e12a50c8ae176d15e2a771b96909a9442b40173649ccaa"
url: "https://pub.dev"
source: hosted
version: "0.6.5"
version: "0.6.8"
typed_data:
dependency: transitive
description:
@ -663,7 +663,7 @@ packages:
path: "../../../../veilid/veilid-flutter"
relative: true
source: path
version: "0.4.1"
version: "0.4.3"
veilid_support:
dependency: "direct main"
description:
@ -682,10 +682,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
url: "https://pub.dev"
source: hosted
version: "14.3.0"
version: "14.3.1"
watcher:
dependency: transitive
description:
@ -751,5 +751,5 @@ packages:
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.5.0 <4.0.0"
dart: ">=3.7.0-0 <4.0.0"
flutter: ">=3.24.0"

View File

@ -29,8 +29,12 @@ mixin _$DHTRecordPoolAllocations {
throw _privateConstructorUsedError;
IMap<String, String> get debugNames => throw _privateConstructorUsedError;
/// Serializes this DHTRecordPoolAllocations to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of DHTRecordPoolAllocations
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$DHTRecordPoolAllocationsCopyWith<DHTRecordPoolAllocations> get copyWith =>
throw _privateConstructorUsedError;
}
@ -59,6 +63,8 @@ class _$DHTRecordPoolAllocationsCopyWithImpl<$Res,
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of DHTRecordPoolAllocations
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -114,6 +120,8 @@ class __$$DHTRecordPoolAllocationsImplCopyWithImpl<$Res>
$Res Function(_$DHTRecordPoolAllocationsImpl) _then)
: super(_value, _then);
/// Create a copy of DHTRecordPoolAllocations
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -188,12 +196,14 @@ class _$DHTRecordPoolAllocationsImpl implements _DHTRecordPoolAllocations {
other.debugNames == debugNames));
}
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, childrenByParent, parentByChild,
const DeepCollectionEquality().hash(rootRecords), debugNames);
@JsonKey(ignore: true)
/// Create a copy of DHTRecordPoolAllocations
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$DHTRecordPoolAllocationsImplCopyWith<_$DHTRecordPoolAllocationsImpl>
@ -226,8 +236,11 @@ abstract class _DHTRecordPoolAllocations implements DHTRecordPoolAllocations {
ISet<Typed<FixedEncodedString43>> get rootRecords;
@override
IMap<String, String> get debugNames;
/// Create a copy of DHTRecordPoolAllocations
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$DHTRecordPoolAllocationsImplCopyWith<_$DHTRecordPoolAllocationsImpl>
get copyWith => throw _privateConstructorUsedError;
}
@ -243,8 +256,12 @@ mixin _$OwnedDHTRecordPointer {
throw _privateConstructorUsedError;
KeyPair get owner => throw _privateConstructorUsedError;
/// Serializes this OwnedDHTRecordPointer to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of OwnedDHTRecordPointer
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$OwnedDHTRecordPointerCopyWith<OwnedDHTRecordPointer> get copyWith =>
throw _privateConstructorUsedError;
}
@ -269,6 +286,8 @@ class _$OwnedDHTRecordPointerCopyWithImpl<$Res,
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of OwnedDHTRecordPointer
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -309,6 +328,8 @@ class __$$OwnedDHTRecordPointerImplCopyWithImpl<$Res>
$Res Function(_$OwnedDHTRecordPointerImpl) _then)
: super(_value, _then);
/// Create a copy of OwnedDHTRecordPointer
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -357,11 +378,13 @@ class _$OwnedDHTRecordPointerImpl implements _OwnedDHTRecordPointer {
(identical(other.owner, owner) || other.owner == owner));
}
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, recordKey, owner);
@JsonKey(ignore: true)
/// Create a copy of OwnedDHTRecordPointer
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$OwnedDHTRecordPointerImplCopyWith<_$OwnedDHTRecordPointerImpl>
@ -388,8 +411,11 @@ abstract class _OwnedDHTRecordPointer implements OwnedDHTRecordPointer {
Typed<FixedEncodedString43> get recordKey;
@override
KeyPair get owner;
/// Create a copy of OwnedDHTRecordPointer
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
_$$OwnedDHTRecordPointerImplCopyWith<_$OwnedDHTRecordPointerImpl>
get copyWith => throw _privateConstructorUsedError;
}

View File

@ -1,8 +1,5 @@
part of 'dht_record_pool.dart';
const int _watchBackoffMultiplier = 2;
const int _watchBackoffMax = 30;
const int? _defaultWatchDurationSecs = null; // 600
const int _watchRenewalNumerator = 4;
const int _watchRenewalDenominator = 5;

View File

@ -23,8 +23,12 @@ mixin _$AccountRecordInfo {
// Top level account keys and secrets
OwnedDHTRecordPointer get accountRecord => throw _privateConstructorUsedError;
/// Serializes this AccountRecordInfo to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of AccountRecordInfo
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$AccountRecordInfoCopyWith<AccountRecordInfo> get copyWith =>
throw _privateConstructorUsedError;
}
@ -50,6 +54,8 @@ class _$AccountRecordInfoCopyWithImpl<$Res, $Val extends AccountRecordInfo>
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of AccountRecordInfo
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -63,6 +69,8 @@ class _$AccountRecordInfoCopyWithImpl<$Res, $Val extends AccountRecordInfo>
) as $Val);
}
/// Create a copy of AccountRecordInfo
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$OwnedDHTRecordPointerCopyWith<$Res> get accountRecord {
@ -94,6 +102,8 @@ class __$$AccountRecordInfoImplCopyWithImpl<$Res>
$Res Function(_$AccountRecordInfoImpl) _then)
: super(_value, _then);
/// Create a copy of AccountRecordInfo
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -134,11 +144,13 @@ class _$AccountRecordInfoImpl implements _AccountRecordInfo {
other.accountRecord == accountRecord));
}
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, accountRecord);
@JsonKey(ignore: true)
/// Create a copy of AccountRecordInfo
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$AccountRecordInfoImplCopyWith<_$AccountRecordInfoImpl> get copyWith =>
@ -161,10 +173,14 @@ abstract class _AccountRecordInfo implements AccountRecordInfo {
factory _AccountRecordInfo.fromJson(Map<String, dynamic> json) =
_$AccountRecordInfoImpl.fromJson;
@override // Top level account keys and secrets
OwnedDHTRecordPointer get accountRecord;
// Top level account keys and secrets
@override
@JsonKey(ignore: true)
OwnedDHTRecordPointer get accountRecord;
/// Create a copy of AccountRecordInfo
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$AccountRecordInfoImplCopyWith<_$AccountRecordInfoImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -24,8 +24,12 @@ mixin _$Identity {
IMap<String, ISet<AccountRecordInfo>> get accountRecords =>
throw _privateConstructorUsedError;
/// Serializes this Identity to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of Identity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$IdentityCopyWith<Identity> get copyWith =>
throw _privateConstructorUsedError;
}
@ -48,6 +52,8 @@ class _$IdentityCopyWithImpl<$Res, $Val extends Identity>
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of Identity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -81,6 +87,8 @@ class __$$IdentityImplCopyWithImpl<$Res>
_$IdentityImpl _value, $Res Function(_$IdentityImpl) _then)
: super(_value, _then);
/// Create a copy of Identity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -121,11 +129,13 @@ class _$IdentityImpl implements _Identity {
other.accountRecords == accountRecords));
}
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, accountRecords);
@JsonKey(ignore: true)
/// Create a copy of Identity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$IdentityImplCopyWith<_$IdentityImpl> get copyWith =>
@ -147,10 +157,14 @@ abstract class _Identity implements Identity {
factory _Identity.fromJson(Map<String, dynamic> json) =
_$IdentityImpl.fromJson;
@override // Top level account keys and secrets
IMap<String, ISet<AccountRecordInfo>> get accountRecords;
// Top level account keys and secrets
@override
@JsonKey(ignore: true)
IMap<String, ISet<AccountRecordInfo>> get accountRecords;
/// Create a copy of Identity
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$IdentityImplCopyWith<_$IdentityImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -38,8 +38,12 @@ mixin _$IdentityInstance {
// by SuperIdentity publicKey
FixedEncodedString86 get signature => throw _privateConstructorUsedError;
/// Serializes this IdentityInstance to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of IdentityInstance
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$IdentityInstanceCopyWith<IdentityInstance> get copyWith =>
throw _privateConstructorUsedError;
}
@ -68,6 +72,8 @@ class _$IdentityInstanceCopyWithImpl<$Res, $Val extends IdentityInstance>
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of IdentityInstance
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -126,6 +132,8 @@ class __$$IdentityInstanceImplCopyWithImpl<$Res>
$Res Function(_$IdentityInstanceImpl) _then)
: super(_value, _then);
/// Create a copy of IdentityInstance
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -219,7 +227,7 @@ class _$IdentityInstanceImpl extends _IdentityInstance {
other.signature == signature));
}
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
@ -229,7 +237,9 @@ class _$IdentityInstanceImpl extends _IdentityInstance {
superSignature,
signature);
@JsonKey(ignore: true)
/// Create a copy of IdentityInstance
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$IdentityInstanceImplCopyWith<_$IdentityInstanceImpl> get copyWith =>
@ -256,25 +266,31 @@ abstract class _IdentityInstance extends IdentityInstance {
factory _IdentityInstance.fromJson(Map<String, dynamic> json) =
_$IdentityInstanceImpl.fromJson;
@override // Private DHT record storing identity account mapping
Typed<FixedEncodedString43> get recordKey;
@override // Public key of identity instance
FixedEncodedString43 get publicKey;
@override // Secret key of identity instance
// Private DHT record storing identity account mapping
@override
Typed<FixedEncodedString43> get recordKey; // Public key of identity instance
@override
FixedEncodedString43 get publicKey; // Secret key of identity instance
// Encrypted with appended salt, key is DeriveSharedSecret(
// password = SuperIdentity.secret,
// salt = publicKey)
// Used to recover accounts without generating a new instance
@Uint8ListJsonConverter()
Uint8List get encryptedSecretKey;
@override // Signature of SuperInstance recordKey and SuperInstance publicKey
// by publicKey
FixedEncodedString86 get superSignature;
@override // Signature of recordKey, publicKey, encryptedSecretKey, and superSignature
// by SuperIdentity publicKey
FixedEncodedString86 get signature;
@override
@JsonKey(ignore: true)
@Uint8ListJsonConverter()
Uint8List
get encryptedSecretKey; // Signature of SuperInstance recordKey and SuperInstance publicKey
// by publicKey
@override
FixedEncodedString86
get superSignature; // Signature of recordKey, publicKey, encryptedSecretKey, and superSignature
// by SuperIdentity publicKey
@override
FixedEncodedString86 get signature;
/// Create a copy of IdentityInstance
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$IdentityInstanceImplCopyWith<_$IdentityInstanceImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -53,8 +53,12 @@ mixin _$SuperIdentity {
/// by publicKey
FixedEncodedString86 get signature => throw _privateConstructorUsedError;
/// Serializes this SuperIdentity to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
/// Create a copy of SuperIdentity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$SuperIdentityCopyWith<SuperIdentity> get copyWith =>
throw _privateConstructorUsedError;
}
@ -86,6 +90,8 @@ class _$SuperIdentityCopyWithImpl<$Res, $Val extends SuperIdentity>
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of SuperIdentity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -124,6 +130,8 @@ class _$SuperIdentityCopyWithImpl<$Res, $Val extends SuperIdentity>
) as $Val);
}
/// Create a copy of SuperIdentity
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$IdentityInstanceCopyWith<$Res> get currentInstance {
@ -161,6 +169,8 @@ class __$$SuperIdentityImplCopyWithImpl<$Res>
_$SuperIdentityImpl _value, $Res Function(_$SuperIdentityImpl) _then)
: super(_value, _then);
/// Create a copy of SuperIdentity
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@ -298,7 +308,7 @@ class _$SuperIdentityImpl extends _SuperIdentity {
other.signature == signature));
}
@JsonKey(ignore: true)
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
@ -309,7 +319,9 @@ class _$SuperIdentityImpl extends _SuperIdentity {
const DeepCollectionEquality().hash(_deprecatedSuperRecordKeys),
signature);
@JsonKey(ignore: true)
/// Create a copy of SuperIdentity
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$SuperIdentityImplCopyWith<_$SuperIdentityImpl> get copyWith =>
@ -337,44 +349,46 @@ abstract class _SuperIdentity extends SuperIdentity {
factory _SuperIdentity.fromJson(Map<String, dynamic> json) =
_$SuperIdentityImpl.fromJson;
@override
/// Public DHT record storing this structure for account recovery
/// changing this can migrate/forward the SuperIdentity to a new DHT record
/// Instances should not hash this recordKey, rather the actual record
/// key used to store the superIdentity, as this may change.
Typed<FixedEncodedString43> get recordKey;
@override
Typed<FixedEncodedString43> get recordKey;
/// Public key of the SuperIdentity used to sign identity keys for recovery
/// This must match the owner of the superRecord DHT record and can not be
/// changed without changing the record
FixedEncodedString43 get publicKey;
@override
FixedEncodedString43 get publicKey;
/// Current identity instance
/// The most recently generated identity instance for this SuperIdentity
IdentityInstance get currentInstance;
@override
IdentityInstance get currentInstance;
/// Deprecated identity instances
/// These may be compromised and should not be considered valid for
/// new signatures, but may be used to validate old signatures
List<IdentityInstance> get deprecatedInstances;
@override
List<IdentityInstance> get deprecatedInstances;
/// Deprecated superRecords
/// These may be compromised and should not be considered valid for
/// new signatures, but may be used to validate old signatures
List<Typed<FixedEncodedString43>> get deprecatedSuperRecordKeys;
@override
List<Typed<FixedEncodedString43>> get deprecatedSuperRecordKeys;
/// Signature of recordKey, currentInstance signature,
/// signatures of deprecatedInstances, and deprecatedSuperRecordKeys
/// by publicKey
FixedEncodedString86 get signature;
@override
@JsonKey(ignore: true)
FixedEncodedString86 get signature;
/// Create a copy of SuperIdentity
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$SuperIdentityImplCopyWith<_$SuperIdentityImpl> get copyWith =>
throw _privateConstructorUsedError;
}

View File

@ -4,7 +4,7 @@
//
// @dart = 2.12
// ignore_for_file: annotate_overrides, camel_case_types
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
@ -16,7 +16,27 @@ import 'package:protobuf/protobuf.dart' as $pb;
import 'veilid.pb.dart' as $0;
class DHTData extends $pb.GeneratedMessage {
factory DHTData() => create();
factory DHTData({
$core.Iterable<$0.TypedKey>? keys,
$0.TypedKey? hash,
$core.int? chunk,
$core.int? size,
}) {
final $result = create();
if (keys != null) {
$result.keys.addAll(keys);
}
if (hash != null) {
$result.hash = hash;
}
if (chunk != null) {
$result.chunk = chunk;
}
if (size != null) {
$result.size = size;
}
return $result;
}
DHTData._() : super();
factory DHTData.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory DHTData.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@ -50,9 +70,12 @@ class DHTData extends $pb.GeneratedMessage {
static DHTData getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<DHTData>(create);
static DHTData? _defaultInstance;
/// Other keys to concatenate
/// Uses the same writer as this DHTList with SMPL schema
@$pb.TagNumber(1)
$core.List<$0.TypedKey> get keys => $_getList(0);
/// Hash of reassembled data to verify contents
@$pb.TagNumber(2)
$0.TypedKey get hash => $_getN(1);
@$pb.TagNumber(2)
@ -64,6 +87,7 @@ class DHTData extends $pb.GeneratedMessage {
@$pb.TagNumber(2)
$0.TypedKey ensureHash() => $_ensure(1);
/// Chunk size per subkey
@$pb.TagNumber(3)
$core.int get chunk => $_getIZ(2);
@$pb.TagNumber(3)
@ -73,6 +97,7 @@ class DHTData extends $pb.GeneratedMessage {
@$pb.TagNumber(3)
void clearChunk() => clearField(3);
/// Total data size
@$pb.TagNumber(4)
$core.int get size => $_getIZ(3);
@$pb.TagNumber(4)
@ -83,8 +108,26 @@ class DHTData extends $pb.GeneratedMessage {
void clearSize() => clearField(4);
}
/// DHTLog - represents a ring buffer of many elements with append/truncate semantics
/// Header in subkey 0 of first key follows this structure
class DHTLog extends $pb.GeneratedMessage {
factory DHTLog() => create();
factory DHTLog({
$core.int? head,
$core.int? tail,
$core.int? stride,
}) {
final $result = create();
if (head != null) {
$result.head = head;
}
if (tail != null) {
$result.tail = tail;
}
if (stride != null) {
$result.stride = stride;
}
return $result;
}
DHTLog._() : super();
factory DHTLog.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory DHTLog.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@ -117,6 +160,7 @@ class DHTLog extends $pb.GeneratedMessage {
static DHTLog getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<DHTLog>(create);
static DHTLog? _defaultInstance;
/// Position of the start of the log (oldest items)
@$pb.TagNumber(1)
$core.int get head => $_getIZ(0);
@$pb.TagNumber(1)
@ -126,6 +170,7 @@ class DHTLog extends $pb.GeneratedMessage {
@$pb.TagNumber(1)
void clearHead() => clearField(1);
/// Position of the end of the log (newest items)
@$pb.TagNumber(2)
$core.int get tail => $_getIZ(1);
@$pb.TagNumber(2)
@ -135,6 +180,7 @@ class DHTLog extends $pb.GeneratedMessage {
@$pb.TagNumber(2)
void clearTail() => clearField(2);
/// Stride of each segment of the dhtlog
@$pb.TagNumber(3)
$core.int get stride => $_getIZ(2);
@$pb.TagNumber(3)
@ -145,8 +191,32 @@ class DHTLog extends $pb.GeneratedMessage {
void clearStride() => clearField(3);
}
/// DHTShortArray - represents a re-orderable collection of up to 256 individual elements
/// Header in subkey 0 of first key follows this structure
///
/// stride = descriptor subkey count on first key - 1
/// Subkeys 1..=stride on the first key are individual elements
/// Subkeys 0..stride on the 'keys' keys are also individual elements
///
/// Keys must use writable schema in order to make this list mutable
class DHTShortArray extends $pb.GeneratedMessage {
factory DHTShortArray() => create();
factory DHTShortArray({
$core.Iterable<$0.TypedKey>? keys,
$core.List<$core.int>? index,
$core.Iterable<$core.int>? seqs,
}) {
final $result = create();
if (keys != null) {
$result.keys.addAll(keys);
}
if (index != null) {
$result.index = index;
}
if (seqs != null) {
$result.seqs.addAll(seqs);
}
return $result;
}
DHTShortArray._() : super();
factory DHTShortArray.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory DHTShortArray.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@ -179,9 +249,16 @@ class DHTShortArray extends $pb.GeneratedMessage {
static DHTShortArray getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<DHTShortArray>(create);
static DHTShortArray? _defaultInstance;
/// Other keys to concatenate
/// Uses the same writer as this DHTList with SMPL schema
@$pb.TagNumber(1)
$core.List<$0.TypedKey> get keys => $_getList(0);
/// Item position index (uint8[256./])
/// Actual item location is:
/// idx = index[n] + 1 (offset for header at idx 0)
/// key = idx / stride
/// subkey = idx % stride
@$pb.TagNumber(2)
$core.List<$core.int> get index => $_getN(1);
@$pb.TagNumber(2)
@ -191,12 +268,26 @@ class DHTShortArray extends $pb.GeneratedMessage {
@$pb.TagNumber(2)
void clearIndex() => clearField(2);
/// Most recent sequence numbers for elements
@$pb.TagNumber(3)
$core.List<$core.int> get seqs => $_getList(2);
}
/// A pointer to an child DHT record
class OwnedDHTRecordPointer extends $pb.GeneratedMessage {
factory OwnedDHTRecordPointer() => create();
factory OwnedDHTRecordPointer({
$0.TypedKey? recordKey,
$0.KeyPair? owner,
}) {
final $result = create();
if (recordKey != null) {
$result.recordKey = recordKey;
}
if (owner != null) {
$result.owner = owner;
}
return $result;
}
OwnedDHTRecordPointer._() : super();
factory OwnedDHTRecordPointer.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory OwnedDHTRecordPointer.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@ -228,6 +319,7 @@ class OwnedDHTRecordPointer extends $pb.GeneratedMessage {
static OwnedDHTRecordPointer getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<OwnedDHTRecordPointer>(create);
static OwnedDHTRecordPointer? _defaultInstance;
/// DHT Record key
@$pb.TagNumber(1)
$0.TypedKey get recordKey => $_getN(0);
@$pb.TagNumber(1)
@ -239,6 +331,7 @@ class OwnedDHTRecordPointer extends $pb.GeneratedMessage {
@$pb.TagNumber(1)
$0.TypedKey ensureRecordKey() => $_ensure(0);
/// DHT record owner key
@$pb.TagNumber(2)
$0.KeyPair get owner => $_getN(1);
@$pb.TagNumber(2)

View File

@ -4,7 +4,7 @@
//
// @dart = 2.12
// ignore_for_file: annotate_overrides, camel_case_types
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import

View File

@ -4,7 +4,7 @@
//
// @dart = 2.12
// ignore_for_file: annotate_overrides, camel_case_types
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import

View File

@ -4,7 +4,7 @@
//
// @dart = 2.12
// ignore_for_file: annotate_overrides, camel_case_types
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields

View File

@ -4,7 +4,7 @@
//
// @dart = 2.12
// ignore_for_file: annotate_overrides, camel_case_types
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import
@ -13,8 +13,45 @@ import 'dart:core' as $core;
import 'package:protobuf/protobuf.dart' as $pb;
/// 32-byte value in bigendian format
class CryptoKey extends $pb.GeneratedMessage {
factory CryptoKey() => create();
factory CryptoKey({
$core.int? u0,
$core.int? u1,
$core.int? u2,
$core.int? u3,
$core.int? u4,
$core.int? u5,
$core.int? u6,
$core.int? u7,
}) {
final $result = create();
if (u0 != null) {
$result.u0 = u0;
}
if (u1 != null) {
$result.u1 = u1;
}
if (u2 != null) {
$result.u2 = u2;
}
if (u3 != null) {
$result.u3 = u3;
}
if (u4 != null) {
$result.u4 = u4;
}
if (u5 != null) {
$result.u5 = u5;
}
if (u6 != null) {
$result.u6 = u6;
}
if (u7 != null) {
$result.u7 = u7;
}
return $result;
}
CryptoKey._() : super();
factory CryptoKey.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory CryptoKey.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@ -125,8 +162,77 @@ class CryptoKey extends $pb.GeneratedMessage {
void clearU7() => clearField(8);
}
/// 64-byte value in bigendian format
class Signature extends $pb.GeneratedMessage {
factory Signature() => create();
factory Signature({
$core.int? u0,
$core.int? u1,
$core.int? u2,
$core.int? u3,
$core.int? u4,
$core.int? u5,
$core.int? u6,
$core.int? u7,
$core.int? u8,
$core.int? u9,
$core.int? u10,
$core.int? u11,
$core.int? u12,
$core.int? u13,
$core.int? u14,
$core.int? u15,
}) {
final $result = create();
if (u0 != null) {
$result.u0 = u0;
}
if (u1 != null) {
$result.u1 = u1;
}
if (u2 != null) {
$result.u2 = u2;
}
if (u3 != null) {
$result.u3 = u3;
}
if (u4 != null) {
$result.u4 = u4;
}
if (u5 != null) {
$result.u5 = u5;
}
if (u6 != null) {
$result.u6 = u6;
}
if (u7 != null) {
$result.u7 = u7;
}
if (u8 != null) {
$result.u8 = u8;
}
if (u9 != null) {
$result.u9 = u9;
}
if (u10 != null) {
$result.u10 = u10;
}
if (u11 != null) {
$result.u11 = u11;
}
if (u12 != null) {
$result.u12 = u12;
}
if (u13 != null) {
$result.u13 = u13;
}
if (u14 != null) {
$result.u14 = u14;
}
if (u15 != null) {
$result.u15 = u15;
}
return $result;
}
Signature._() : super();
factory Signature.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory Signature.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@ -317,8 +423,37 @@ class Signature extends $pb.GeneratedMessage {
void clearU15() => clearField(16);
}
/// 24-byte value in bigendian format
class Nonce extends $pb.GeneratedMessage {
factory Nonce() => create();
factory Nonce({
$core.int? u0,
$core.int? u1,
$core.int? u2,
$core.int? u3,
$core.int? u4,
$core.int? u5,
}) {
final $result = create();
if (u0 != null) {
$result.u0 = u0;
}
if (u1 != null) {
$result.u1 = u1;
}
if (u2 != null) {
$result.u2 = u2;
}
if (u3 != null) {
$result.u3 = u3;
}
if (u4 != null) {
$result.u4 = u4;
}
if (u5 != null) {
$result.u5 = u5;
}
return $result;
}
Nonce._() : super();
factory Nonce.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory Nonce.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@ -409,8 +544,21 @@ class Nonce extends $pb.GeneratedMessage {
void clearU5() => clearField(6);
}
/// 36-byte typed crypto key
class TypedKey extends $pb.GeneratedMessage {
factory TypedKey() => create();
factory TypedKey({
$core.int? kind,
CryptoKey? value,
}) {
final $result = create();
if (kind != null) {
$result.kind = kind;
}
if (value != null) {
$result.value = value;
}
return $result;
}
TypedKey._() : super();
factory TypedKey.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory TypedKey.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@ -442,6 +590,7 @@ class TypedKey extends $pb.GeneratedMessage {
static TypedKey getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<TypedKey>(create);
static TypedKey? _defaultInstance;
/// CryptoKind FourCC in bigendian format
@$pb.TagNumber(1)
$core.int get kind => $_getIZ(0);
@$pb.TagNumber(1)
@ -451,6 +600,7 @@ class TypedKey extends $pb.GeneratedMessage {
@$pb.TagNumber(1)
void clearKind() => clearField(1);
/// Key value
@$pb.TagNumber(2)
CryptoKey get value => $_getN(1);
@$pb.TagNumber(2)
@ -463,8 +613,21 @@ class TypedKey extends $pb.GeneratedMessage {
CryptoKey ensureValue() => $_ensure(1);
}
/// Key pair
class KeyPair extends $pb.GeneratedMessage {
factory KeyPair() => create();
factory KeyPair({
CryptoKey? key,
CryptoKey? secret,
}) {
final $result = create();
if (key != null) {
$result.key = key;
}
if (secret != null) {
$result.secret = secret;
}
return $result;
}
KeyPair._() : super();
factory KeyPair.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory KeyPair.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@ -496,6 +659,7 @@ class KeyPair extends $pb.GeneratedMessage {
static KeyPair getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<KeyPair>(create);
static KeyPair? _defaultInstance;
/// Public key
@$pb.TagNumber(1)
CryptoKey get key => $_getN(0);
@$pb.TagNumber(1)
@ -507,6 +671,7 @@ class KeyPair extends $pb.GeneratedMessage {
@$pb.TagNumber(1)
CryptoKey ensureKey() => $_ensure(0);
/// Private key
@$pb.TagNumber(2)
CryptoKey get secret => $_getN(1);
@$pb.TagNumber(2)

View File

@ -4,7 +4,7 @@
//
// @dart = 2.12
// ignore_for_file: annotate_overrides, camel_case_types
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import

View File

@ -4,7 +4,7 @@
//
// @dart = 2.12
// ignore_for_file: annotate_overrides, camel_case_types
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields
// ignore_for_file: unnecessary_import, unnecessary_this, unused_import

View File

@ -4,7 +4,7 @@
//
// @dart = 2.12
// ignore_for_file: annotate_overrides, camel_case_types
// ignore_for_file: annotate_overrides, camel_case_types, comment_references
// ignore_for_file: constant_identifier_names
// ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
// ignore_for_file: non_constant_identifier_names, prefer_final_fields

View File

@ -115,6 +115,7 @@ Future<VeilidConfig> getVeilidConfig(bool isWeb, String programName) async {
const VeilidConfigCapabilities(disable: ['DHTV', 'DHTW', 'TUNL']),
protectedStore:
// XXX: Linux often does not have a secret storage mechanism installed
config.protectedStore.copyWith(allowInsecureFallback: Platform.isLinux),
config.protectedStore
.copyWith(allowInsecureFallback: !isWeb && Platform.isLinux),
);
}

View File

@ -36,10 +36,9 @@ packages:
async_tools:
dependency: "direct main"
description:
name: async_tools
sha256: bbded696bfcb1437d0ca510ac047f261f9c7494fea2c488dd32ba2800e7f49e8
url: "https://pub.dev"
source: hosted
path: "../../../dart_async_tools"
relative: true
source: path
version: "0.1.7"
bloc:
dependency: "direct main"
@ -141,10 +140,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.4.0"
charcode:
dependency: "direct main"
description:
@ -173,10 +172,10 @@ packages:
dependency: "direct main"
description:
name: collection
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.dev"
source: hosted
version: "1.19.0"
version: "1.19.1"
convert:
dependency: transitive
description:
@ -407,10 +406,10 @@ packages:
dependency: "direct main"
description:
name: meta
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
url: "https://pub.dev"
source: hosted
version: "1.15.0"
version: "1.16.0"
mime:
dependency: transitive
description:
@ -726,7 +725,7 @@ packages:
path: "../../../veilid/veilid-flutter"
relative: true
source: path
version: "0.4.1"
version: "0.4.3"
vm_service:
dependency: transitive
description:
@ -792,5 +791,5 @@ packages:
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.6.0 <4.0.0"
dart: ">=3.7.0-0 <4.0.0"
flutter: ">=3.24.0"

View File

@ -26,9 +26,9 @@ dependencies:
# veilid: ^0.0.1
path: ../../../veilid/veilid-flutter
# dependency_overrides:
# async_tools:
# path: ../../../dart_async_tools
dependency_overrides:
async_tools:
path: ../../../dart_async_tools
# bloc_advanced_tools:
# path: ../../../bloc_advanced_tools

View File

@ -33,6 +33,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.4.0"
animated_custom_dropdown:
dependency: "direct main"
description:
name: animated_custom_dropdown
sha256: "5a72dc209041bb53f6c7164bc2e366552d5197cdb032b1c9b2c36e3013024486"
url: "https://pub.dev"
source: hosted
version: "3.1.1"
animated_switcher_transitions:
dependency: "direct main"
description:
@ -61,18 +69,18 @@ packages:
dependency: "direct main"
description:
name: archive
sha256: "6199c74e3db4fbfbd04f66d739e72fe11c8a8957d5f219f1f4482dbde6420b5a"
sha256: "0c64e928dcbefddecd234205422bcfc2b5e6d31be0b86fef0d0dd48d7b4c9742"
url: "https://pub.dev"
source: hosted
version: "4.0.2"
version: "4.0.4"
args:
dependency: transitive
description:
name: args
sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6
sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04
url: "https://pub.dev"
source: hosted
version: "2.6.0"
version: "2.7.0"
async:
dependency: transitive
description:
@ -84,19 +92,18 @@ packages:
async_tools:
dependency: "direct main"
description:
name: async_tools
sha256: bbded696bfcb1437d0ca510ac047f261f9c7494fea2c488dd32ba2800e7f49e8
url: "https://pub.dev"
source: hosted
path: "../dart_async_tools"
relative: true
source: path
version: "0.1.7"
awesome_extensions:
dependency: "direct main"
description:
name: awesome_extensions
sha256: "91dc128e8cf01fbd3d3567b8f1dd1e3183cbf9fd6b1850e8b0fafce9a7eee0da"
sha256: "9b1693e986e4045141add298fa2d7f9aa6cdd3c125b951e2cde739a5058ed879"
url: "https://pub.dev"
source: hosted
version: "2.0.20"
version: "2.0.21"
badges:
dependency: "direct main"
description:
@ -117,10 +124,10 @@ packages:
dependency: "direct main"
description:
name: basic_utils
sha256: "2064b21d3c41ed7654bc82cc476fd65542e04d60059b74d5eed490a4da08fc6c"
sha256: "548047bef0b3b697be19fa62f46de54d99c9019a69fb7db92c69e19d87f633c7"
url: "https://pub.dev"
source: hosted
version: "5.7.0"
version: "5.8.2"
bidi:
dependency: transitive
description:
@ -221,10 +228,10 @@ packages:
dependency: transitive
description:
name: built_value
sha256: "28a712df2576b63c6c005c465989a348604960c0958d28be5303ba9baa841ac2"
sha256: ea90e81dc4a25a043d9bee692d20ed6d1c4a1662a28c03a96417446c093ed6b4
url: "https://pub.dev"
source: hosted
version: "8.9.3"
version: "8.9.5"
cached_network_image:
dependency: transitive
description:
@ -261,18 +268,18 @@ packages:
dependency: transitive
description:
name: camera_android_camerax
sha256: "7cc6adf1868bdcf4e63a56b24b41692dfbad2bec1cdceea451c77798f6a605c3"
sha256: "13784f539c7f104766bff84e4479a70f03b29d78b208278be45c939250d9d7f5"
url: "https://pub.dev"
source: hosted
version: "0.6.13"
version: "0.6.14+1"
camera_avfoundation:
dependency: transitive
description:
name: camera_avfoundation
sha256: "1eeb9ce7c9a397e312343fd7db337d95f35c3e65ad5a62ff637c8abce5102b98"
sha256: "3057ada0b30402e3a9b6dffec365c9736a36edbf04abaecc67c4309eadc86b49"
url: "https://pub.dev"
source: hosted
version: "0.9.18+8"
version: "0.9.18+9"
camera_platform_interface:
dependency: transitive
description:
@ -301,10 +308,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.4.0"
charcode:
dependency: "direct main"
description:
@ -349,10 +356,10 @@ packages:
dependency: transitive
description:
name: clock
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.dev"
source: hosted
version: "1.1.1"
version: "1.1.2"
code_builder:
dependency: transitive
description:
@ -365,10 +372,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.dev"
source: hosted
version: "1.19.0"
version: "1.19.1"
convert:
dependency: transitive
description:
@ -377,14 +384,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.2"
cool_dropdown:
dependency: "direct main"
description:
name: cool_dropdown
sha256: "23926fd242b625bcb7ab30c1336498d60f78267518db439141ca19de403ab030"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
cross_file:
dependency: transitive
description:
@ -445,10 +444,10 @@ packages:
dependency: transitive
description:
name: dio_web_adapter
sha256: e485c7a39ff2b384fa1d7e09b4e25f755804de8384358049124830b04fc4f93a
sha256: "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78"
url: "https://pub.dev"
source: hosted
version: "2.1.0"
version: "2.1.1"
equatable:
dependency: "direct main"
description:
@ -477,10 +476,10 @@ packages:
dependency: transitive
description:
name: ffi
sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418"
url: "https://pub.dev"
source: hosted
version: "2.1.3"
version: "2.1.4"
file:
dependency: transitive
description:
@ -592,10 +591,10 @@ packages:
dependency: "direct main"
description:
name: flutter_native_splash
sha256: "7062602e0dbd29141fb8eb19220b5871ca650be5197ab9c1f193a28b17537bc7"
sha256: edb09c35ee9230c4b03f13dd45bb3a276d0801865f0a4650b7e2a3bba61a803a
url: "https://pub.dev"
source: hosted
version: "2.4.4"
version: "2.4.5"
flutter_parsed_text:
dependency: transitive
description:
@ -608,10 +607,10 @@ packages:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: "615a505aef59b151b46bbeef55b36ce2b6ed299d160c51d84281946f0aa0ce0e"
sha256: "5a1e6fb2c0561958d7e4c33574674bda7b77caaca7a33b758876956f2902eea3"
url: "https://pub.dev"
source: hosted
version: "2.0.24"
version: "2.0.27"
flutter_shaders:
dependency: transitive
description:
@ -677,10 +676,10 @@ packages:
dependency: "direct main"
description:
name: form_builder_validators
sha256: "517fb884183fff7a0ef3db7d375981011da26ee452f20fb3d2e788ad527ad01d"
sha256: cd617fa346250293ff3e2709961d0faf7b80e6e4f0ff7b500126b28d7422dd67
url: "https://pub.dev"
source: hosted
version: "11.1.1"
version: "11.1.2"
freezed:
dependency: "direct dev"
description:
@ -733,10 +732,10 @@ packages:
dependency: "direct main"
description:
name: go_router
sha256: "04539267a740931c6d4479a10d466717ca5901c6fdfd3fcda09391bbb8ebd651"
sha256: f02fd7d2a4dc512fec615529824fdd217fecb3a3d3de68360293a551f21634b3
url: "https://pub.dev"
source: hosted
version: "14.8.0"
version: "14.8.1"
graphs:
dependency: transitive
description:
@ -797,18 +796,26 @@ packages:
dependency: "direct dev"
description:
name: icons_launcher
sha256: a7c83fbc837dc6f81944ef35c3756f533bb2aba32fcca5cbcdb2dbcd877d5ae9
sha256: "2949eef3d336028d89133f69ef221d877e09deed04ebd8e738ab4a427850a7a2"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
version: "3.0.1"
iconsax_flutter:
dependency: transitive
description:
name: iconsax_flutter
sha256: "95b65699da8ea98f87c5d232f06b0debaaf1ec1332b697e4d90969ec9a93037d"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
image:
dependency: "direct main"
description:
name: image
sha256: "8346ad4b5173924b5ddddab782fc7d8a6300178c8b1dc427775405a01701c4a6"
sha256: "13d3349ace88f12f4a0d175eb5c12dcdd39d35c4c109a8a13dfeb6d0bd9e31c3"
url: "https://pub.dev"
source: hosted
version: "4.5.2"
version: "4.5.3"
intl:
dependency: "direct main"
description:
@ -829,10 +836,10 @@ packages:
dependency: transitive
description:
name: js
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc"
url: "https://pub.dev"
source: hosted
version: "0.7.1"
version: "0.7.2"
json_annotation:
dependency: "direct main"
description:
@ -901,10 +908,10 @@ packages:
dependency: "direct main"
description:
name: meta
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
url: "https://pub.dev"
source: hosted
version: "1.15.0"
version: "1.16.0"
mime:
dependency: transitive
description:
@ -917,18 +924,10 @@ packages:
dependency: "direct main"
description:
name: mobile_scanner
sha256: "91d28b825784e15572fdc39165c5733099ce0e69c6f6f0964ebdbf98a62130fd"
sha256: "9cb9e371ee9b5b548714f9ab5fd33b530d799745c83d5729ecd1e8ab2935dbd1"
url: "https://pub.dev"
source: hosted
version: "6.0.6"
motion_toast:
dependency: "direct main"
description:
name: motion_toast
sha256: "5a4775bf5a89a2402456047f194df5a5d6ac717af0d7694c8b9e37f324d1efd7"
url: "https://pub.dev"
source: hosted
version: "2.11.0"
version: "6.0.7"
native_device_orientation:
dependency: "direct main"
description:
@ -957,26 +956,26 @@ packages:
dependency: transitive
description:
name: package_config
sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67"
sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.2.0"
package_info_plus:
dependency: "direct main"
description:
name: package_info_plus
sha256: "67eae327b1b0faf761964a1d2e5d323c797f3799db0e85aa232db8d9e922bc35"
sha256: "7976bfe4c583170d6cdc7077e3237560b364149fcd268b5f53d95a991963b191"
url: "https://pub.dev"
source: hosted
version: "8.2.1"
version: "8.3.0"
package_info_plus_platform_interface:
dependency: transitive
description:
name: package_info_plus_platform_interface
sha256: "205ec83335c2ab9107bbba3f8997f9356d72ca3c715d2f038fc773d0366b4c76"
sha256: "6c935fb612dff8e3cc9632c2b301720c77450a126114126ffaafe28d2e87956c"
url: "https://pub.dev"
source: hosted
version: "3.1.0"
version: "3.2.0"
pasteboard:
dependency: "direct main"
description:
@ -989,10 +988,10 @@ packages:
dependency: "direct main"
description:
name: path
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
source: hosted
version: "1.9.0"
version: "1.9.1"
path_parsing:
dependency: transitive
description:
@ -1013,10 +1012,10 @@ packages:
dependency: transitive
description:
name: path_provider_android
sha256: "4adf4fd5423ec60a29506c76581bc05854c55e3a0b72d35bb28d661c9686edf2"
sha256: "0ca7359dad67fd7063cb2892ab0c0737b2daafd807cf1acecd62374c8fae6c12"
url: "https://pub.dev"
source: hosted
version: "2.2.15"
version: "2.2.16"
path_provider_foundation:
dependency: transitive
description:
@ -1049,6 +1048,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.3.0"
pausable_timer:
dependency: transitive
description:
name: pausable_timer
sha256: "6ef1a95441ec3439de6fb63f39a011b67e693198e7dae14e20675c3c00e86074"
url: "https://pub.dev"
source: hosted
version: "3.1.0+3"
pdf:
dependency: "direct main"
description:
@ -1069,10 +1076,10 @@ packages:
dependency: transitive
description:
name: petitparser
sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646"
url: "https://pub.dev"
source: hosted
version: "6.0.2"
version: "6.1.0"
photo_view:
dependency: transitive
description:
@ -1109,10 +1116,10 @@ packages:
dependency: transitive
description:
name: pointycastle
sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe"
sha256: "92aa3841d083cc4b0f4709b5c74fd6409a3e6ba833ffc7dc6a8fee096366acf5"
url: "https://pub.dev"
source: hosted
version: "3.9.1"
version: "4.0.0"
pool:
dependency: transitive
description:
@ -1165,10 +1172,10 @@ packages:
dependency: transitive
description:
name: pub_semver
sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd"
sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585"
url: "https://pub.dev"
source: hosted
version: "2.1.5"
version: "2.2.0"
pubspec_parse:
dependency: transitive
description:
@ -1334,10 +1341,10 @@ packages:
dependency: transitive
description:
name: shared_preferences_android
sha256: a768fc8ede5f0c8e6150476e14f38e2417c0864ca36bb4582be8e21925a03c22
sha256: "3ec7210872c4ba945e3244982918e502fa2bfb5230dff6832459ca0e1879b7ad"
url: "https://pub.dev"
source: hosted
version: "2.4.6"
version: "2.4.8"
shared_preferences_foundation:
dependency: transitive
description:
@ -1484,34 +1491,34 @@ packages:
dependency: transitive
description:
name: sqflite
sha256: "2d7299468485dca85efeeadf5d38986909c5eb0cd71fd3db2c2f000e6c9454bb"
sha256: e2297b1da52f127bc7a3da11439985d9b536f75070f3325e62ada69a5c585d03
url: "https://pub.dev"
source: hosted
version: "2.4.1"
version: "2.4.2"
sqflite_android:
dependency: transitive
description:
name: sqflite_android
sha256: "78f489aab276260cdd26676d2169446c7ecd3484bbd5fead4ca14f3ed4dd9ee3"
sha256: "2b3070c5fa881839f8b402ee4a39c1b4d561704d4ebbbcfb808a119bc2a1701b"
url: "https://pub.dev"
source: hosted
version: "2.4.0"
version: "2.4.1"
sqflite_common:
dependency: transitive
description:
name: sqflite_common
sha256: "761b9740ecbd4d3e66b8916d784e581861fd3c3553eda85e167bc49fdb68f709"
sha256: "84731e8bfd8303a3389903e01fb2141b6e59b5973cacbb0929021df08dddbe8b"
url: "https://pub.dev"
source: hosted
version: "2.5.4+6"
version: "2.5.5"
sqflite_darwin:
dependency: transitive
description:
name: sqflite_darwin
sha256: "22adfd9a2c7d634041e96d6241e6e1c8138ca6817018afc5d443fef91dcefa9c"
sha256: "279832e5cde3fe99e8571879498c9211f3ca6391b0d818df4e17d9fff5c6ccb3"
url: "https://pub.dev"
source: hosted
version: "2.4.1+1"
version: "2.4.2"
sqflite_platform_interface:
dependency: transitive
description:
@ -1564,10 +1571,10 @@ packages:
dependency: transitive
description:
name: synchronized
sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225"
sha256: "0669c70faae6270521ee4f05bffd2919892d42d1276e6c495be80174b6bc0ef6"
url: "https://pub.dev"
source: hosted
version: "3.3.0+3"
version: "3.3.1"
system_info2:
dependency: transitive
description:
@ -1608,6 +1615,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.2"
toastification:
dependency: "direct main"
description:
name: toastification
sha256: "9713989549d60754fd0522425d1251501919cfb7bab4ffbbb36ef40de5ea72b9"
url: "https://pub.dev"
source: hosted
version: "3.0.2"
transitioned_indexed_stack:
dependency: "direct main"
description:
@ -1652,10 +1667,10 @@ packages:
dependency: transitive
description:
name: url_launcher_android
sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193"
sha256: "1d0eae19bd7606ef60fe69ef3b312a437a16549476c42321d5dc1506c9ca3bf4"
url: "https://pub.dev"
source: hosted
version: "6.3.14"
version: "6.3.15"
url_launcher_ios:
dependency: transitive
description:
@ -1758,7 +1773,7 @@ packages:
path: "../veilid/veilid-flutter"
relative: true
source: path
version: "0.4.1"
version: "0.4.3"
veilid_support:
dependency: "direct main"
description:
@ -1786,10 +1801,10 @@ packages:
dependency: transitive
description:
name: web
sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb
sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.1.1"
web_socket:
dependency: transitive
description:
@ -1810,10 +1825,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: daf97c9d80197ed7b619040e86c8ab9a9dad285e7671ee7390f9180cc828a51e
sha256: dc6ecaa00a7c708e5b4d10ee7bec8c270e9276dfcab1783f57e9962d7884305f
url: "https://pub.dev"
source: hosted
version: "5.10.1"
version: "5.12.0"
window_manager:
dependency: "direct main"
description:
@ -1879,5 +1894,5 @@ packages:
source: hosted
version: "1.1.2"
sdks:
dart: ">=3.6.0 <4.0.0"
dart: ">=3.7.0 <4.0.0"
flutter: ">=3.27.0"

View File

@ -9,69 +9,68 @@ environment:
dependencies:
accordion: ^2.6.0
animated_bottom_navigation_bar: ^1.3.3
animated_bottom_navigation_bar: ^1.4.0
animated_custom_dropdown: ^3.1.1
animated_switcher_transitions: ^1.0.0
animated_theme_switcher: ^2.0.10
ansicolor: ^2.0.2
archive: ^4.0.2
ansicolor: ^2.0.3
archive: ^4.0.4
async_tools: ^0.1.7
awesome_extensions: ^2.0.16
awesome_extensions: ^2.0.21
badges: ^3.1.2
basic_utils: ^5.7.0
basic_utils: ^5.8.2
bloc: ^8.1.4
bloc_advanced_tools: ^0.1.8
blurry_modal_progress_hud: ^1.1.1
change_case: ^2.1.0
charcode: ^1.3.1
change_case: ^2.2.0
charcode: ^1.4.0
circular_profile_avatar: ^2.0.5
circular_reveal_animation: ^2.0.1
cool_dropdown: ^2.1.0
cupertino_icons: ^1.0.8
equatable: ^2.0.5
equatable: ^2.0.7
expansion_tile_group: ^2.2.0
fast_immutable_collections: ^10.2.4
file_saver: ^0.2.13
fixnum: ^1.1.0
file_saver: ^0.2.14
fixnum: ^1.1.1
flutter:
sdk: flutter
flutter_animate: ^4.5.0
flutter_bloc: ^8.1.5
flutter_animate: ^4.5.2
flutter_bloc: ^8.1.6
flutter_chat_types: ^3.6.2
flutter_chat_ui:
git:
url: https://gitlab.com/veilid/flutter-chat-ui.git
ref: main
flutter_form_builder: ^9.3.0
flutter_form_builder: ^9.7.0
flutter_hooks: ^0.20.5
flutter_localizations:
sdk: flutter
flutter_native_splash: ^2.4.0
flutter_native_splash: ^2.4.5
flutter_slidable: ^4.0.0
flutter_spinkit: ^5.2.1
flutter_sticky_header: ^0.7.0
flutter_svg: ^2.0.10+1
flutter_svg: ^2.0.17
flutter_translate: ^4.1.0
flutter_zoom_drawer: ^3.2.0
form_builder_validators: ^11.0.0
freezed_annotation: ^2.4.1
go_router: ^14.1.4
form_builder_validators: ^11.1.2
freezed_annotation: ^2.4.4
go_router: ^14.8.1
hydrated_bloc: ^9.1.5
image: ^4.2.0
image: ^4.5.3
intl: ^0.19.0
json_annotation: ^4.9.0
loggy: ^2.0.3
meta: ^1.12.0
mobile_scanner: ^6.0.6
motion_toast: ^2.10.0
meta: ^1.16.0
mobile_scanner: ^6.0.7
native_device_orientation: ^2.0.3
package_info_plus: ^8.0.0
package_info_plus: ^8.3.0
pasteboard: ^0.3.0
path: ^1.9.0
path_provider: ^2.1.3
pdf: ^3.11.0
path: ^1.9.1
path_provider: ^2.1.5
pdf: ^3.11.3
pinput: ^5.0.1
preload_page_view: ^0.2.0
printing: ^5.13.1
printing: ^5.14.2
protobuf: ^3.1.0
provider: ^6.1.2
qr_code_dart_scan: ^0.9.11
@ -86,7 +85,7 @@ dependencies:
url: https://gitlab.com/veilid/Searchable-Listview.git
ref: main
share_plus: ^10.1.4
shared_preferences: ^2.2.3
shared_preferences: ^2.5.2
signal_strength_indicator: ^0.4.1
sliver_expandable: ^1.1.1
sliver_fill_remaining_box_adapter: ^1.0.0
@ -96,12 +95,13 @@ dependencies:
url: https://gitlab.com/veilid/dart-sorted-list-improved.git
ref: main
split_view: ^3.2.1
stack_trace: ^1.11.1
stack_trace: ^1.12.1
star_menu: ^4.0.1
stream_transform: ^2.1.0
stream_transform: ^2.1.1
toastification: ^3.0.2
transitioned_indexed_stack: ^1.0.2
url_launcher: ^6.3.0
uuid: ^4.4.0
url_launcher: ^6.3.1
uuid: ^4.5.1
veilid:
# veilid: ^0.0.1
path: ../veilid/veilid-flutter
@ -111,9 +111,9 @@ dependencies:
xterm: ^4.0.0
zxing2: ^0.2.3
# dependency_overrides:
# async_tools:
# path: ../dart_async_tools
dependency_overrides:
async_tools:
path: ../dart_async_tools
# bloc_advanced_tools:
# path: ../bloc_advanced_tools
# searchable_listview:
@ -122,10 +122,10 @@ dependencies:
# path: ../flutter_chat_ui
dev_dependencies:
build_runner: ^2.4.11
freezed: ^2.5.2
icons_launcher: ^3.0.0
json_serializable: ^6.8.0
build_runner: ^2.4.15
freezed: ^2.5.8
icons_launcher: ^3.0.1
json_serializable: ^6.9.4
lint_hard: ^5.0.0
flutter_native_splash: