initial commit

This commit is contained in:
Henry Hiles 2025-07-26 21:21:04 -04:00
commit 6490b8fef6
No known key found for this signature in database
16 changed files with 1910 additions and 0 deletions

16
lib/models/settings.dart Normal file
View file

@ -0,0 +1,16 @@
import "package:freezed_annotation/freezed_annotation.dart";
part "settings.freezed.dart";
part "settings.g.dart";
@freezed
abstract class Settings with _$Settings {
const factory Settings({
required String socket,
required Uri authUri,
required Uri minioUri,
}) = _Settings;
factory Settings.fromJson(Map<String, dynamic> json) =>
_$SettingsFromJson(json);
}

View file

@ -0,0 +1,154 @@
// dart format width=80
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'settings.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$Settings {
String get socket; Uri get authUri; Uri get minioUri;
/// Create a copy of Settings
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$SettingsCopyWith<Settings> get copyWith => _$SettingsCopyWithImpl<Settings>(this as Settings, _$identity);
/// Serializes this Settings to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is Settings&&(identical(other.socket, socket) || other.socket == socket)&&(identical(other.authUri, authUri) || other.authUri == authUri)&&(identical(other.minioUri, minioUri) || other.minioUri == minioUri));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,socket,authUri,minioUri);
@override
String toString() {
return 'Settings(socket: $socket, authUri: $authUri, minioUri: $minioUri)';
}
}
/// @nodoc
abstract mixin class $SettingsCopyWith<$Res> {
factory $SettingsCopyWith(Settings value, $Res Function(Settings) _then) = _$SettingsCopyWithImpl;
@useResult
$Res call({
String socket, Uri authUri, Uri minioUri
});
}
/// @nodoc
class _$SettingsCopyWithImpl<$Res>
implements $SettingsCopyWith<$Res> {
_$SettingsCopyWithImpl(this._self, this._then);
final Settings _self;
final $Res Function(Settings) _then;
/// Create a copy of Settings
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? socket = null,Object? authUri = null,Object? minioUri = null,}) {
return _then(_self.copyWith(
socket: null == socket ? _self.socket : socket // ignore: cast_nullable_to_non_nullable
as String,authUri: null == authUri ? _self.authUri : authUri // ignore: cast_nullable_to_non_nullable
as Uri,minioUri: null == minioUri ? _self.minioUri : minioUri // ignore: cast_nullable_to_non_nullable
as Uri,
));
}
}
/// @nodoc
@JsonSerializable()
class _Settings implements Settings {
const _Settings({required this.socket, required this.authUri, required this.minioUri});
factory _Settings.fromJson(Map<String, dynamic> json) => _$SettingsFromJson(json);
@override final String socket;
@override final Uri authUri;
@override final Uri minioUri;
/// Create a copy of Settings
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$SettingsCopyWith<_Settings> get copyWith => __$SettingsCopyWithImpl<_Settings>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$SettingsToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Settings&&(identical(other.socket, socket) || other.socket == socket)&&(identical(other.authUri, authUri) || other.authUri == authUri)&&(identical(other.minioUri, minioUri) || other.minioUri == minioUri));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,socket,authUri,minioUri);
@override
String toString() {
return 'Settings(socket: $socket, authUri: $authUri, minioUri: $minioUri)';
}
}
/// @nodoc
abstract mixin class _$SettingsCopyWith<$Res> implements $SettingsCopyWith<$Res> {
factory _$SettingsCopyWith(_Settings value, $Res Function(_Settings) _then) = __$SettingsCopyWithImpl;
@override @useResult
$Res call({
String socket, Uri authUri, Uri minioUri
});
}
/// @nodoc
class __$SettingsCopyWithImpl<$Res>
implements _$SettingsCopyWith<$Res> {
__$SettingsCopyWithImpl(this._self, this._then);
final _Settings _self;
final $Res Function(_Settings) _then;
/// Create a copy of Settings
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? socket = null,Object? authUri = null,Object? minioUri = null,}) {
return _then(_Settings(
socket: null == socket ? _self.socket : socket // ignore: cast_nullable_to_non_nullable
as String,authUri: null == authUri ? _self.authUri : authUri // ignore: cast_nullable_to_non_nullable
as Uri,minioUri: null == minioUri ? _self.minioUri : minioUri // ignore: cast_nullable_to_non_nullable
as Uri,
));
}
}
// dart format on

View file

@ -0,0 +1,19 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'settings.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_Settings _$SettingsFromJson(Map<String, dynamic> json) => _Settings(
socket: json['socket'] as String,
authUri: Uri.parse(json['authUri'] as String),
minioUri: Uri.parse(json['minioUri'] as String),
);
Map<String, dynamic> _$SettingsToJson(_Settings instance) => <String, dynamic>{
'socket': instance.socket,
'authUri': instance.authUri.toString(),
'minioUri': instance.minioUri.toString(),
};