mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 08:46:18 +01:00
Use generator for toString
This commit is contained in:
parent
18b2dd9c96
commit
5570fcf156
108 changed files with 1862 additions and 788 deletions
|
@ -8,3 +8,11 @@ targets:
|
|||
new_sql_code_generation: true
|
||||
scoped_dart_components: true
|
||||
generate_connect_constructor: true
|
||||
to_string:
|
||||
options:
|
||||
formatStringNameMapping:
|
||||
double: "${$?.toStringAsFixed(3)}"
|
||||
List: "[length: ${$?.length}]"
|
||||
File: "${$?.path}"
|
||||
FileDescriptor: "${$?.fdPath}"
|
||||
useEnumName: true
|
||||
|
|
|
@ -4,10 +4,15 @@ import 'package:equatable/equatable.dart';
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/ci_string.dart';
|
||||
import 'package:nc_photos/iterable_extension.dart';
|
||||
import 'package:nc_photos/string_extension.dart';
|
||||
import 'package:nc_photos/type.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'account.g.dart';
|
||||
|
||||
/// Details of a remote Nextcloud server account
|
||||
@toString
|
||||
class Account with EquatableMixin {
|
||||
Account(
|
||||
this.id,
|
||||
|
@ -51,17 +56,7 @@ class Account with EquatableMixin {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"id: '$id', "
|
||||
"scheme: '$scheme', "
|
||||
"address: '${kDebugMode ? address : "***"}', "
|
||||
"userId: '${kDebugMode ? userId : "***"}', "
|
||||
"username2: '${kDebugMode ? username2 : "***"}', "
|
||||
"password: '${password.isNotEmpty == true ? (kDebugMode ? password : '***') : null}', "
|
||||
"roots: List {'${roots.join('\', \'')}'}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
static Account? fromJson(
|
||||
JsonObj json, {
|
||||
|
@ -105,13 +100,18 @@ class Account with EquatableMixin {
|
|||
|
||||
final String id;
|
||||
final String scheme;
|
||||
@Format(r"${kDebugMode ? $? : '***'}")
|
||||
final String address;
|
||||
// For non LDAP users, this is the username used to sign in
|
||||
@Format(r"${kDebugMode ? $? : '***'}")
|
||||
final CiString userId;
|
||||
// Username used to sign in. For non-LDAP users, this is identical to userId
|
||||
@Format(r"${kDebugMode ? $? : '***'}")
|
||||
final String username2;
|
||||
@Format(r"${$?.isNotEmpty ? (kDebugMode ? $? : '***') : null}")
|
||||
final String password;
|
||||
|
||||
@Format(r"${$?.toReadableString()}")
|
||||
final List<String> _roots;
|
||||
|
||||
/// versioning of this class, use to upgrade old persisted accounts
|
||||
|
|
14
app/lib/account.g.dart
Normal file
14
app/lib/account.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'account.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$AccountToString on Account {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "Account {id: $id, scheme: $scheme, address: ${kDebugMode ? address : '***'}, userId: ${kDebugMode ? userId : '***'}, username2: ${kDebugMode ? username2 : '***'}, password: ${password.isNotEmpty ? (kDebugMode ? password : '***') : null}, _roots: ${_roots.toReadableString()}}";
|
||||
}
|
||||
}
|
|
@ -1,30 +1,32 @@
|
|||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
import 'package:xml/xml.dart';
|
||||
|
||||
part 'api.g.dart';
|
||||
|
||||
@toString
|
||||
class Response {
|
||||
Response(this.statusCode, this.headers, this.body);
|
||||
|
||||
bool get isGood => _isHttpStatusGood(statusCode);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return "{"
|
||||
"status: $statusCode, "
|
||||
"headers: ..., "
|
||||
"body: ..., "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final int statusCode;
|
||||
@Format(r"...")
|
||||
final Map<String, String> headers;
|
||||
|
||||
/// Content of the response body, String if isResponseString == true during
|
||||
/// request, Uint8List otherwise
|
||||
@Format(
|
||||
r"${kDebugMode ? body.toString().replaceAll(RegExp(r'\n\t'), '').substring(0, 200) : '...'}")
|
||||
final dynamic body;
|
||||
}
|
||||
|
||||
|
|
14
app/lib/api/api.g.dart
Normal file
14
app/lib/api/api.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'api.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ResponseToString on Response {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "Response {statusCode: $statusCode, headers: ..., body: ${kDebugMode ? body.toString().replaceAll(RegExp(r'\n\t'), '').substring(0, 200) : '...'}}";
|
||||
}
|
||||
}
|
|
@ -8,6 +8,9 @@ import 'package:nc_photos/api/api.dart';
|
|||
import 'package:nc_photos/entity/file_descriptor.dart';
|
||||
import 'package:nc_photos/entity/file_util.dart' as file_util;
|
||||
import 'package:nc_photos/exception.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'api_util.g.dart';
|
||||
|
||||
/// Characters that are not allowed in filename
|
||||
const reservedFilenameChars = "<>:\"/\\|?*";
|
||||
|
@ -165,6 +168,7 @@ Stream<Future<AppPasswordResponse>> pollAppPassword(
|
|||
.takeWhile((_) => options.isTokenValid());
|
||||
}
|
||||
|
||||
@toString
|
||||
class InitiateLoginResponse {
|
||||
const InitiateLoginResponse({
|
||||
required this.poll,
|
||||
|
@ -181,34 +185,26 @@ class InitiateLoginResponse {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"poll: $poll, "
|
||||
"login: $login, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final InitiateLoginPollOptions poll;
|
||||
final String login;
|
||||
}
|
||||
|
||||
@toString
|
||||
class InitiateLoginPollOptions {
|
||||
InitiateLoginPollOptions(this.token, String endpoint)
|
||||
: endpoint = Uri.parse(endpoint),
|
||||
_validUntil = DateTime.now().add(const Duration(minutes: 20));
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"token: ${kDebugMode ? token : '***'}, "
|
||||
"endpoint: $endpoint, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
bool isTokenValid() {
|
||||
return DateTime.now().isBefore(_validUntil);
|
||||
}
|
||||
|
||||
@Format(r"${kDebugMode ? $? : '***'}")
|
||||
final String token;
|
||||
final Uri endpoint;
|
||||
final DateTime _validUntil;
|
||||
|
@ -216,6 +212,7 @@ class InitiateLoginPollOptions {
|
|||
|
||||
abstract class AppPasswordResponse {}
|
||||
|
||||
@toString
|
||||
class AppPasswordSuccess implements AppPasswordResponse {
|
||||
const AppPasswordSuccess({
|
||||
required this.server,
|
||||
|
@ -233,16 +230,11 @@ class AppPasswordSuccess implements AppPasswordResponse {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"server: $server, "
|
||||
"loginName: $loginName, "
|
||||
"appPassword: ${kDebugMode ? appPassword : '***'}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Uri server;
|
||||
final String loginName;
|
||||
@Format(r"${kDebugMode ? appPassword : '***'}")
|
||||
final String appPassword;
|
||||
}
|
||||
|
||||
|
|
28
app/lib/api/api_util.g.dart
Normal file
28
app/lib/api/api_util.g.dart
Normal file
|
@ -0,0 +1,28 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'api_util.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$InitiateLoginResponseToString on InitiateLoginResponse {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "InitiateLoginResponse {poll: $poll, login: $login}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$InitiateLoginPollOptionsToString on InitiateLoginPollOptions {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "InitiateLoginPollOptions {token: ${kDebugMode ? token : '***'}, endpoint: $endpoint, _validUntil: $_validUntil}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AppPasswordSuccessToString on AppPasswordSuccess {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AppPasswordSuccess {server: $server, loginName: $loginName, appPassword: ${kDebugMode ? appPassword : '***'}}";
|
||||
}
|
||||
}
|
|
@ -7,68 +7,60 @@ import 'package:nc_photos/account.dart';
|
|||
import 'package:nc_photos/api/api_util.dart' as api_util;
|
||||
import 'package:nc_photos/ci_string.dart';
|
||||
import 'package:nc_photos/exception.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'app_password_exchange.g.dart';
|
||||
|
||||
abstract class AppPasswordExchangeBlocEvent {
|
||||
const AppPasswordExchangeBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class AppPasswordExchangeBlocInitiateLogin
|
||||
extends AppPasswordExchangeBlocEvent {
|
||||
const AppPasswordExchangeBlocInitiateLogin(this.uri);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"uri: $uri, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Uri uri;
|
||||
}
|
||||
|
||||
@toString
|
||||
class AppPasswordExchangeBlocPoll extends AppPasswordExchangeBlocEvent {
|
||||
const AppPasswordExchangeBlocPoll(this.pollOptions);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"pollOptions: $pollOptions, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final api_util.InitiateLoginPollOptions pollOptions;
|
||||
}
|
||||
|
||||
@toString
|
||||
class AppPasswordExchangeBlocCancel extends AppPasswordExchangeBlocEvent {
|
||||
const AppPasswordExchangeBlocCancel();
|
||||
|
||||
@override
|
||||
String toString() => "AppPasswordExchangeBlocCancel {}";
|
||||
String toString() => _$toString();
|
||||
}
|
||||
|
||||
@toString
|
||||
class _AppPasswordExchangeBlocAppPwReceived
|
||||
extends AppPasswordExchangeBlocEvent {
|
||||
const _AppPasswordExchangeBlocAppPwReceived(this.appPasswordResponse);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"appPasswordResponse: $appPasswordResponse, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final api_util.AppPasswordSuccess appPasswordResponse;
|
||||
}
|
||||
|
||||
@toString
|
||||
class _AppPasswordExchangeBlocAppPwFailed extends AppPasswordExchangeBlocEvent {
|
||||
const _AppPasswordExchangeBlocAppPwFailed(this.exception);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final dynamic exception;
|
||||
}
|
||||
|
@ -81,53 +73,43 @@ class AppPasswordExchangeBlocInit extends AppPasswordExchangeBlocState {
|
|||
const AppPasswordExchangeBlocInit();
|
||||
}
|
||||
|
||||
@toString
|
||||
class AppPasswordExchangeBlocInitiateLoginSuccess
|
||||
extends AppPasswordExchangeBlocState {
|
||||
const AppPasswordExchangeBlocInitiateLoginSuccess(this.result);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"result: $result, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final api_util.InitiateLoginResponse result;
|
||||
}
|
||||
|
||||
@toString
|
||||
class AppPasswordExchangeBlocAppPwSuccess extends AppPasswordExchangeBlocState {
|
||||
const AppPasswordExchangeBlocAppPwSuccess(this.result);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"result: $result, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final api_util.AppPasswordSuccess result;
|
||||
}
|
||||
|
||||
@toString
|
||||
class AppPasswordExchangeBlocFailure extends AppPasswordExchangeBlocState {
|
||||
const AppPasswordExchangeBlocFailure(this.exception);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final dynamic exception;
|
||||
}
|
||||
|
||||
@toString
|
||||
class AppPasswordExchangeBlocResult extends AppPasswordExchangeBlocState {
|
||||
const AppPasswordExchangeBlocResult(this.result);
|
||||
|
||||
@override
|
||||
String toString() => "AppPasswordExchangeBlocResult {"
|
||||
"result: $result, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account? result;
|
||||
}
|
||||
|
|
78
app/lib/bloc/app_password_exchange.g.dart
Normal file
78
app/lib/bloc/app_password_exchange.g.dart
Normal file
|
@ -0,0 +1,78 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'app_password_exchange.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$AppPasswordExchangeBlocInitiateLoginToString
|
||||
on AppPasswordExchangeBlocInitiateLogin {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AppPasswordExchangeBlocInitiateLogin {uri: $uri}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AppPasswordExchangeBlocPollToString on AppPasswordExchangeBlocPoll {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AppPasswordExchangeBlocPoll {pollOptions: $pollOptions}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AppPasswordExchangeBlocCancelToString
|
||||
on AppPasswordExchangeBlocCancel {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AppPasswordExchangeBlocCancel {}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$_AppPasswordExchangeBlocAppPwReceivedToString
|
||||
on _AppPasswordExchangeBlocAppPwReceived {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "_AppPasswordExchangeBlocAppPwReceived {appPasswordResponse: $appPasswordResponse}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$_AppPasswordExchangeBlocAppPwFailedToString
|
||||
on _AppPasswordExchangeBlocAppPwFailed {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "_AppPasswordExchangeBlocAppPwFailed {exception: $exception}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AppPasswordExchangeBlocInitiateLoginSuccessToString
|
||||
on AppPasswordExchangeBlocInitiateLoginSuccess {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AppPasswordExchangeBlocInitiateLoginSuccess {result: $result}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AppPasswordExchangeBlocAppPwSuccessToString
|
||||
on AppPasswordExchangeBlocAppPwSuccess {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AppPasswordExchangeBlocAppPwSuccess {result: $result}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AppPasswordExchangeBlocFailureToString
|
||||
on AppPasswordExchangeBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AppPasswordExchangeBlocFailure {exception: $exception}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AppPasswordExchangeBlocResultToString
|
||||
on AppPasswordExchangeBlocResult {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AppPasswordExchangeBlocResult {result: $result}";
|
||||
}
|
||||
}
|
|
@ -14,51 +14,50 @@ import 'package:nc_photos/use_case/list_album.dart';
|
|||
import 'package:nc_photos/use_case/list_location_group.dart';
|
||||
import 'package:nc_photos/use_case/list_person.dart';
|
||||
import 'package:nc_photos/use_case/list_tag.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
import 'package:woozy_search/woozy_search.dart';
|
||||
|
||||
part 'home_search_suggestion.g.dart';
|
||||
|
||||
abstract class HomeSearchResult {}
|
||||
|
||||
@toString
|
||||
class HomeSearchAlbumResult implements HomeSearchResult {
|
||||
const HomeSearchAlbumResult(this.album);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"album: $album, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Album album;
|
||||
}
|
||||
|
||||
@toString
|
||||
class HomeSearchTagResult implements HomeSearchResult {
|
||||
const HomeSearchTagResult(this.tag);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"tag: $tag, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Tag tag;
|
||||
}
|
||||
|
||||
@toString
|
||||
class HomeSearchPersonResult implements HomeSearchResult {
|
||||
const HomeSearchPersonResult(this.person);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"person: $person, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Person person;
|
||||
}
|
||||
|
||||
@toString
|
||||
class HomeSearchLocationResult implements HomeSearchResult {
|
||||
const HomeSearchLocationResult(this.location);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"location: $location, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final LocationGroup location;
|
||||
}
|
||||
|
@ -67,33 +66,31 @@ abstract class HomeSearchSuggestionBlocEvent {
|
|||
const HomeSearchSuggestionBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class HomeSearchSuggestionBlocPreloadData
|
||||
extends HomeSearchSuggestionBlocEvent {
|
||||
const HomeSearchSuggestionBlocPreloadData();
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
}
|
||||
|
||||
@toString
|
||||
class HomeSearchSuggestionBlocSearch extends HomeSearchSuggestionBlocEvent {
|
||||
const HomeSearchSuggestionBlocSearch(this.phrase);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"phrase: '$phrase', "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final CiString phrase;
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class HomeSearchSuggestionBlocState {
|
||||
const HomeSearchSuggestionBlocState(this.results);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"results: List {legth: ${results.length}}, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final List<HomeSearchResult> results;
|
||||
}
|
||||
|
@ -112,16 +109,14 @@ class HomeSearchSuggestionBlocSuccess extends HomeSearchSuggestionBlocState {
|
|||
: super(results);
|
||||
}
|
||||
|
||||
@toString
|
||||
class HomeSearchSuggestionBlocFailure extends HomeSearchSuggestionBlocState {
|
||||
const HomeSearchSuggestionBlocFailure(
|
||||
List<HomeSearchTagResult> results, this.exception)
|
||||
: super(results);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Object exception;
|
||||
}
|
||||
|
|
67
app/lib/bloc/home_search_suggestion.g.dart
Normal file
67
app/lib/bloc/home_search_suggestion.g.dart
Normal file
|
@ -0,0 +1,67 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'home_search_suggestion.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$HomeSearchAlbumResultToString on HomeSearchAlbumResult {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "HomeSearchAlbumResult {album: $album}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$HomeSearchTagResultToString on HomeSearchTagResult {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "HomeSearchTagResult {tag: $tag}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$HomeSearchPersonResultToString on HomeSearchPersonResult {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "HomeSearchPersonResult {person: $person}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$HomeSearchLocationResultToString on HomeSearchLocationResult {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "HomeSearchLocationResult {location: $location}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$HomeSearchSuggestionBlocPreloadDataToString
|
||||
on HomeSearchSuggestionBlocPreloadData {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "HomeSearchSuggestionBlocPreloadData {}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$HomeSearchSuggestionBlocSearchToString
|
||||
on HomeSearchSuggestionBlocSearch {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "HomeSearchSuggestionBlocSearch {phrase: $phrase}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$HomeSearchSuggestionBlocStateToString
|
||||
on HomeSearchSuggestionBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "HomeSearchSuggestionBlocState")} {results: [length: ${results.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$HomeSearchSuggestionBlocFailureToString
|
||||
on HomeSearchSuggestionBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "HomeSearchSuggestionBlocFailure {results: [length: ${results.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:kiwi/kiwi.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
|
@ -14,6 +15,9 @@ import 'package:nc_photos/or_null.dart';
|
|||
import 'package:nc_photos/remote_storage_util.dart' as remote_storage_util;
|
||||
import 'package:nc_photos/throttler.dart';
|
||||
import 'package:nc_photos/use_case/list_album.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'list_album.g.dart';
|
||||
|
||||
class ListAlbumBlocItem {
|
||||
ListAlbumBlocItem(this.album);
|
||||
|
@ -25,40 +29,31 @@ abstract class ListAlbumBlocEvent {
|
|||
const ListAlbumBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListAlbumBlocQuery extends ListAlbumBlocEvent {
|
||||
const ListAlbumBlocQuery(this.account);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
}
|
||||
|
||||
/// An external event has happened and may affect the state of this bloc
|
||||
@toString
|
||||
class _ListAlbumBlocExternalEvent extends ListAlbumBlocEvent {
|
||||
const _ListAlbumBlocExternalEvent();
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class ListAlbumBlocState {
|
||||
const ListAlbumBlocState(this.account, this.items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"items: List {length: ${items.length}}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account? account;
|
||||
final List<ListAlbumBlocItem> items;
|
||||
|
@ -78,18 +73,14 @@ class ListAlbumBlocSuccess extends ListAlbumBlocState {
|
|||
: super(account, items);
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListAlbumBlocFailure extends ListAlbumBlocState {
|
||||
const ListAlbumBlocFailure(
|
||||
Account? account, List<ListAlbumBlocItem> items, this.exception)
|
||||
: super(account, items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final dynamic exception;
|
||||
}
|
||||
|
|
35
app/lib/bloc/list_album.g.dart
Normal file
35
app/lib/bloc/list_album.g.dart
Normal file
|
@ -0,0 +1,35 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'list_album.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ListAlbumBlocQueryToString on ListAlbumBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListAlbumBlocQuery {account: $account}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$_ListAlbumBlocExternalEventToString on _ListAlbumBlocExternalEvent {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "_ListAlbumBlocExternalEvent {}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListAlbumBlocStateToString on ListAlbumBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "ListAlbumBlocState")} {account: $account, items: [length: ${items.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListAlbumBlocFailureToString on ListAlbumBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListAlbumBlocFailure {account: $account, items: [length: ${items.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/ci_string.dart';
|
||||
|
@ -14,17 +15,16 @@ import 'package:nc_photos/iterable_extension.dart';
|
|||
import 'package:nc_photos/object_extension.dart';
|
||||
import 'package:nc_photos/use_case/list_share.dart';
|
||||
import 'package:nc_photos/use_case/list_sharee.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'list_album_share_outlier.g.dart';
|
||||
|
||||
@toString
|
||||
class ListAlbumShareOutlierItem with EquatableMixin {
|
||||
const ListAlbumShareOutlierItem(this.file, this.shareItems);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"file: '${file.path}', "
|
||||
"shareItems: ${shareItems.toReadableString()}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
@ -33,6 +33,7 @@ class ListAlbumShareOutlierItem with EquatableMixin {
|
|||
];
|
||||
|
||||
final File file;
|
||||
@Format(r"${$?.toReadableString()}")
|
||||
final List<ListAlbumShareOutlierShareItem> shareItems;
|
||||
}
|
||||
|
||||
|
@ -40,16 +41,13 @@ abstract class ListAlbumShareOutlierShareItem with EquatableMixin {
|
|||
const ListAlbumShareOutlierShareItem();
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListAlbumShareOutlierExtraShareItem
|
||||
extends ListAlbumShareOutlierShareItem {
|
||||
const ListAlbumShareOutlierExtraShareItem(this.share);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"share: $share, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
@ -59,18 +57,14 @@ class ListAlbumShareOutlierExtraShareItem
|
|||
final Share share;
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListAlbumShareOutlierMissingShareItem
|
||||
extends ListAlbumShareOutlierShareItem {
|
||||
const ListAlbumShareOutlierMissingShareItem(
|
||||
this.shareWith, this.shareWithDisplayName);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"shareWith: $shareWith, "
|
||||
"shareWithDisplayName: $shareWithDisplayName, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
@ -86,31 +80,23 @@ abstract class ListAlbumShareOutlierBlocEvent {
|
|||
const ListAlbumShareOutlierBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListAlbumShareOutlierBlocQuery extends ListAlbumShareOutlierBlocEvent {
|
||||
const ListAlbumShareOutlierBlocQuery(this.account, this.album);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"album: $album, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
final Album album;
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class ListAlbumShareOutlierBlocState with EquatableMixin {
|
||||
const ListAlbumShareOutlierBlocState(this.account, this.items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"items: ${items.toReadableString()}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
@ -119,6 +105,7 @@ abstract class ListAlbumShareOutlierBlocState with EquatableMixin {
|
|||
];
|
||||
|
||||
final Account? account;
|
||||
@Format(r"${$?.toReadableString()}")
|
||||
final List<ListAlbumShareOutlierItem> items;
|
||||
}
|
||||
|
||||
|
@ -138,18 +125,14 @@ class ListAlbumShareOutlierBlocSuccess extends ListAlbumShareOutlierBlocState {
|
|||
: super(account, items);
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListAlbumShareOutlierBlocFailure extends ListAlbumShareOutlierBlocState {
|
||||
const ListAlbumShareOutlierBlocFailure(
|
||||
Account? account, List<ListAlbumShareOutlierItem> items, this.exception)
|
||||
: super(account, items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
|
54
app/lib/bloc/list_album_share_outlier.g.dart
Normal file
54
app/lib/bloc/list_album_share_outlier.g.dart
Normal file
|
@ -0,0 +1,54 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'list_album_share_outlier.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ListAlbumShareOutlierItemToString on ListAlbumShareOutlierItem {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListAlbumShareOutlierItem {file: ${file.path}, shareItems: ${shareItems.toReadableString()}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListAlbumShareOutlierExtraShareItemToString
|
||||
on ListAlbumShareOutlierExtraShareItem {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListAlbumShareOutlierExtraShareItem {share: $share}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListAlbumShareOutlierMissingShareItemToString
|
||||
on ListAlbumShareOutlierMissingShareItem {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListAlbumShareOutlierMissingShareItem {shareWith: $shareWith, shareWithDisplayName: $shareWithDisplayName}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListAlbumShareOutlierBlocQueryToString
|
||||
on ListAlbumShareOutlierBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListAlbumShareOutlierBlocQuery {account: $account, album: $album}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListAlbumShareOutlierBlocStateToString
|
||||
on ListAlbumShareOutlierBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "ListAlbumShareOutlierBlocState")} {account: $account, items: ${items.toReadableString()}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListAlbumShareOutlierBlocFailureToString
|
||||
on ListAlbumShareOutlierBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListAlbumShareOutlierBlocFailure {account: $account, items: ${items.toReadableString()}, exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/di_container.dart';
|
||||
|
@ -8,41 +9,40 @@ import 'package:nc_photos/entity/person.dart';
|
|||
import 'package:nc_photos/event/event.dart';
|
||||
import 'package:nc_photos/throttler.dart';
|
||||
import 'package:nc_photos/use_case/populate_person.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'list_face_file.g.dart';
|
||||
|
||||
abstract class ListFaceFileBlocEvent {
|
||||
const ListFaceFileBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListFaceFileBlocQuery extends ListFaceFileBlocEvent {
|
||||
const ListFaceFileBlocQuery(this.account, this.person);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"person: $person, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
final Person person;
|
||||
}
|
||||
|
||||
/// An external event has happened and may affect the state of this bloc
|
||||
@toString
|
||||
class _ListFaceFileBlocExternalEvent extends ListFaceFileBlocEvent {
|
||||
const _ListFaceFileBlocExternalEvent();
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class ListFaceFileBlocState {
|
||||
const ListFaceFileBlocState(this.account, this.items);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"items: List {length: ${items.length}}, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account? account;
|
||||
final List<File> items;
|
||||
|
@ -62,16 +62,14 @@ class ListFaceFileBlocSuccess extends ListFaceFileBlocState {
|
|||
: super(account, items);
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListFaceFileBlocFailure extends ListFaceFileBlocState {
|
||||
const ListFaceFileBlocFailure(
|
||||
Account? account, List<File> items, this.exception)
|
||||
: super(account, items);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Object exception;
|
||||
}
|
||||
|
|
36
app/lib/bloc/list_face_file.g.dart
Normal file
36
app/lib/bloc/list_face_file.g.dart
Normal file
|
@ -0,0 +1,36 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'list_face_file.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ListFaceFileBlocQueryToString on ListFaceFileBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListFaceFileBlocQuery {account: $account, person: $person}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$_ListFaceFileBlocExternalEventToString
|
||||
on _ListFaceFileBlocExternalEvent {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "_ListFaceFileBlocExternalEvent {}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListFaceFileBlocStateToString on ListFaceFileBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "ListFaceFileBlocState")} {account: $account, items: [length: ${items.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListFaceFileBlocFailureToString on ListFaceFileBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListFaceFileBlocFailure {account: $account, items: [length: ${items.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/debug_util.dart';
|
||||
|
@ -11,6 +12,9 @@ import 'package:nc_photos/iterable_extension.dart';
|
|||
import 'package:nc_photos/remote_storage_util.dart' as remote_storage_util;
|
||||
import 'package:nc_photos/use_case/list_album.dart';
|
||||
import 'package:nc_photos/use_case/ls.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'list_importable_album.g.dart';
|
||||
|
||||
class ListImportableAlbumBlocItem {
|
||||
ListImportableAlbumBlocItem(this.file, this.photoCount);
|
||||
|
@ -23,6 +27,7 @@ abstract class ListImportableAlbumBlocEvent {
|
|||
const ListImportableAlbumBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListImportableAlbumBlocQuery extends ListImportableAlbumBlocEvent {
|
||||
const ListImportableAlbumBlocQuery(
|
||||
this.account,
|
||||
|
@ -30,26 +35,19 @@ class ListImportableAlbumBlocQuery extends ListImportableAlbumBlocEvent {
|
|||
);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"roots: ${roots.toReadableString()}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
@Format(r"${$?.toReadableString()}")
|
||||
final List<File> roots;
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class ListImportableAlbumBlocState {
|
||||
const ListImportableAlbumBlocState(this.items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"items: List {length: ${items.length}}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final List<ListImportableAlbumBlocItem> items;
|
||||
}
|
||||
|
@ -68,18 +66,14 @@ class ListImportableAlbumBlocSuccess extends ListImportableAlbumBlocState {
|
|||
: super(items);
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListImportableAlbumBlocFailure extends ListImportableAlbumBlocState {
|
||||
const ListImportableAlbumBlocFailure(
|
||||
List<ListImportableAlbumBlocItem> items, this.exception)
|
||||
: super(items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final dynamic exception;
|
||||
}
|
||||
|
|
31
app/lib/bloc/list_importable_album.g.dart
Normal file
31
app/lib/bloc/list_importable_album.g.dart
Normal file
|
@ -0,0 +1,31 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'list_importable_album.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ListImportableAlbumBlocQueryToString
|
||||
on ListImportableAlbumBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListImportableAlbumBlocQuery {account: $account, roots: ${roots.toReadableString()}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListImportableAlbumBlocStateToString
|
||||
on ListImportableAlbumBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "ListImportableAlbumBlocState")} {items: [length: ${items.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListImportableAlbumBlocFailureToString
|
||||
on ListImportableAlbumBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListImportableAlbumBlocFailure {items: [length: ${items.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/di_container.dart';
|
||||
|
@ -8,39 +9,39 @@ import 'package:nc_photos/event/event.dart';
|
|||
import 'package:nc_photos/throttler.dart';
|
||||
import 'package:nc_photos/use_case/list_location_file.dart';
|
||||
import 'package:nc_photos/use_case/list_location_group.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'list_location.g.dart';
|
||||
|
||||
abstract class ListLocationBlocEvent {
|
||||
const ListLocationBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListLocationBlocQuery extends ListLocationBlocEvent {
|
||||
const ListLocationBlocQuery(this.account);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
}
|
||||
|
||||
/// An external event has happened and may affect the state of this bloc
|
||||
@toString
|
||||
class _ListLocationBlocExternalEvent extends ListLocationBlocEvent {
|
||||
const _ListLocationBlocExternalEvent();
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class ListLocationBlocState {
|
||||
const ListLocationBlocState(this.account, this.result);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"result: $result, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account? account;
|
||||
final LocationGroupResult result;
|
||||
|
@ -61,16 +62,14 @@ class ListLocationBlocSuccess extends ListLocationBlocState {
|
|||
: super(account, result);
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListLocationBlocFailure extends ListLocationBlocState {
|
||||
const ListLocationBlocFailure(
|
||||
Account? account, LocationGroupResult result, this.exception)
|
||||
: super(account, result);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Object exception;
|
||||
}
|
||||
|
|
36
app/lib/bloc/list_location.g.dart
Normal file
36
app/lib/bloc/list_location.g.dart
Normal file
|
@ -0,0 +1,36 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'list_location.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ListLocationBlocQueryToString on ListLocationBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListLocationBlocQuery {account: $account}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$_ListLocationBlocExternalEventToString
|
||||
on _ListLocationBlocExternalEvent {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "_ListLocationBlocExternalEvent {}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListLocationBlocStateToString on ListLocationBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "ListLocationBlocState")} {account: $account, result: $result}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListLocationBlocFailureToString on ListLocationBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListLocationBlocFailure {account: $account, result: $result, exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/di_container.dart';
|
||||
|
@ -7,20 +8,20 @@ import 'package:nc_photos/entity/file_util.dart' as file_util;
|
|||
import 'package:nc_photos/event/event.dart';
|
||||
import 'package:nc_photos/throttler.dart';
|
||||
import 'package:nc_photos/use_case/list_location_file.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'list_location_file.g.dart';
|
||||
|
||||
abstract class ListLocationFileBlocEvent {
|
||||
const ListLocationFileBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListLocationFileBlocQuery extends ListLocationFileBlocEvent {
|
||||
const ListLocationFileBlocQuery(this.account, this.place, this.countryCode);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"place: $place, "
|
||||
"countryCode: $countryCode, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
final String? place;
|
||||
|
@ -28,22 +29,20 @@ class ListLocationFileBlocQuery extends ListLocationFileBlocEvent {
|
|||
}
|
||||
|
||||
/// An external event has happened and may affect the state of this bloc
|
||||
@toString
|
||||
class _ListLocationFileBlocExternalEvent extends ListLocationFileBlocEvent {
|
||||
const _ListLocationFileBlocExternalEvent();
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class ListLocationFileBlocState {
|
||||
const ListLocationFileBlocState(this.account, this.items);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"items: List {length: ${items.length}}, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account? account;
|
||||
final List<File> items;
|
||||
|
@ -63,16 +62,14 @@ class ListLocationFileBlocSuccess extends ListLocationFileBlocState {
|
|||
: super(account, items);
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListLocationFileBlocFailure extends ListLocationFileBlocState {
|
||||
const ListLocationFileBlocFailure(
|
||||
Account? account, List<File> items, this.exception)
|
||||
: super(account, items);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Object exception;
|
||||
}
|
||||
|
|
36
app/lib/bloc/list_location_file.g.dart
Normal file
36
app/lib/bloc/list_location_file.g.dart
Normal file
|
@ -0,0 +1,36 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'list_location_file.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ListLocationFileBlocQueryToString on ListLocationFileBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListLocationFileBlocQuery {account: $account, place: $place, countryCode: $countryCode}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$_ListLocationFileBlocExternalEventToString
|
||||
on _ListLocationFileBlocExternalEvent {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "_ListLocationFileBlocExternalEvent {}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListLocationFileBlocStateToString on ListLocationFileBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "ListLocationFileBlocState")} {account: $account, items: [length: ${items.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListLocationFileBlocFailureToString on ListLocationFileBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListLocationFileBlocFailure {account: $account, items: [length: ${items.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,33 +1,34 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/di_container.dart';
|
||||
import 'package:nc_photos/entity/person.dart';
|
||||
import 'package:nc_photos/use_case/list_person.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'list_person.g.dart';
|
||||
|
||||
abstract class ListPersonBlocEvent {
|
||||
const ListPersonBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListPersonBlocQuery extends ListPersonBlocEvent {
|
||||
const ListPersonBlocQuery(this.account);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class ListPersonBlocState {
|
||||
const ListPersonBlocState(this.account, this.items);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"items: List {length: ${items.length}}, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account? account;
|
||||
final List<Person> items;
|
||||
|
@ -47,16 +48,14 @@ class ListPersonBlocSuccess extends ListPersonBlocState {
|
|||
: super(account, items);
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListPersonBlocFailure extends ListPersonBlocState {
|
||||
const ListPersonBlocFailure(
|
||||
Account? account, List<Person> items, this.exception)
|
||||
: super(account, items);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Object exception;
|
||||
}
|
||||
|
|
28
app/lib/bloc/list_person.g.dart
Normal file
28
app/lib/bloc/list_person.g.dart
Normal file
|
@ -0,0 +1,28 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'list_person.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ListPersonBlocQueryToString on ListPersonBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListPersonBlocQuery {account: $account}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListPersonBlocStateToString on ListPersonBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "ListPersonBlocState")} {account: $account, items: [length: ${items.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListPersonBlocFailureToString on ListPersonBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListPersonBlocFailure {account: $account, items: [length: ${items.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,40 +1,35 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/entity/file.dart';
|
||||
import 'package:nc_photos/entity/share.dart';
|
||||
import 'package:nc_photos/entity/share/data_source.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'list_share.g.dart';
|
||||
|
||||
abstract class ListShareBlocEvent {
|
||||
const ListShareBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListShareBlocQuery extends ListShareBlocEvent {
|
||||
const ListShareBlocQuery(this.account, this.file);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"file: '${file.path}', "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
final File file;
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class ListShareBlocState {
|
||||
const ListShareBlocState(this.account, this.file, this.items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"file: '${file.path}', "
|
||||
"items: List {length: ${items.length}}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account? account;
|
||||
final File file;
|
||||
|
@ -55,18 +50,14 @@ class ListShareBlocSuccess extends ListShareBlocState {
|
|||
: super(account, file, items);
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListShareBlocFailure extends ListShareBlocState {
|
||||
const ListShareBlocFailure(
|
||||
Account? account, File file, List<Share> items, this.exception)
|
||||
: super(account, file, items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final dynamic exception;
|
||||
}
|
||||
|
|
28
app/lib/bloc/list_share.g.dart
Normal file
28
app/lib/bloc/list_share.g.dart
Normal file
|
@ -0,0 +1,28 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'list_share.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ListShareBlocQueryToString on ListShareBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListShareBlocQuery {account: $account, file: ${file.path}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListShareBlocStateToString on ListShareBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "ListShareBlocState")} {account: $account, file: ${file.path}, items: [length: ${items.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListShareBlocFailureToString on ListShareBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListShareBlocFailure {account: $account, file: ${file.path}, items: [length: ${items.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,38 +1,35 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:kiwi/kiwi.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/bloc/bloc_util.dart' as bloc_util;
|
||||
import 'package:nc_photos/entity/sharee.dart';
|
||||
import 'package:nc_photos/entity/sharee/data_source.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'list_sharee.g.dart';
|
||||
|
||||
abstract class ListShareeBlocEvent {
|
||||
const ListShareeBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListShareeBlocQuery extends ListShareeBlocEvent {
|
||||
const ListShareeBlocQuery(this.account);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class ListShareeBlocState {
|
||||
const ListShareeBlocState(this.account, this.items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"items: List {length: ${items.length}}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account? account;
|
||||
final List<Sharee> items;
|
||||
|
@ -52,18 +49,14 @@ class ListShareeBlocSuccess extends ListShareeBlocState {
|
|||
: super(account, items);
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListShareeBlocFailure extends ListShareeBlocState {
|
||||
const ListShareeBlocFailure(
|
||||
Account? account, List<Sharee> items, this.exception)
|
||||
: super(account, items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final dynamic exception;
|
||||
}
|
||||
|
|
28
app/lib/bloc/list_sharee.g.dart
Normal file
28
app/lib/bloc/list_sharee.g.dart
Normal file
|
@ -0,0 +1,28 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'list_sharee.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ListShareeBlocQueryToString on ListShareeBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListShareeBlocQuery {account: $account}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListShareeBlocStateToString on ListShareeBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "ListShareeBlocState")} {account: $account, items: [length: ${items.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListShareeBlocFailureToString on ListShareeBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListShareeBlocFailure {account: $account, items: [length: ${items.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:kiwi/kiwi.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
|
@ -18,6 +19,9 @@ import 'package:nc_photos/use_case/list_share_with_me.dart';
|
|||
import 'package:nc_photos/use_case/ls.dart';
|
||||
import 'package:nc_photos/use_case/ls_single_file.dart';
|
||||
import 'package:path/path.dart' as path_lib;
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'list_sharing.g.dart';
|
||||
|
||||
abstract class ListSharingItem {
|
||||
const ListSharingItem(this.share);
|
||||
|
@ -41,60 +45,46 @@ abstract class ListSharingBlocEvent {
|
|||
const ListSharingBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListSharingBlocQuery extends ListSharingBlocEvent {
|
||||
const ListSharingBlocQuery(this.account);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
}
|
||||
|
||||
@toString
|
||||
class _ListSharingBlocShareRemoved extends ListSharingBlocEvent {
|
||||
const _ListSharingBlocShareRemoved(this.shares);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"shares: ${shares.toReadableString()}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@Format(r"${$?.toReadableString()}")
|
||||
final List<Share> shares;
|
||||
}
|
||||
|
||||
@toString
|
||||
class _ListSharingBlocPendingSharedAlbumMoved extends ListSharingBlocEvent {
|
||||
const _ListSharingBlocPendingSharedAlbumMoved(
|
||||
this.account, this.file, this.destination);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"file: $file, "
|
||||
"destination: $destination, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
final File file;
|
||||
final String destination;
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class ListSharingBlocState {
|
||||
const ListSharingBlocState(this.account, this.items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"items: List {length: ${items.length}}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account? account;
|
||||
final List<ListSharingItem> items;
|
||||
|
@ -123,18 +113,14 @@ class ListSharingBlocSuccess extends ListSharingBlocState {
|
|||
);
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListSharingBlocFailure extends ListSharingBlocState {
|
||||
const ListSharingBlocFailure(
|
||||
Account? account, List<ListSharingItem> items, this.exception)
|
||||
: super(account, items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
ListSharingBlocFailure copyWith({
|
||||
Account? account,
|
||||
|
|
44
app/lib/bloc/list_sharing.g.dart
Normal file
44
app/lib/bloc/list_sharing.g.dart
Normal file
|
@ -0,0 +1,44 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'list_sharing.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ListSharingBlocQueryToString on ListSharingBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListSharingBlocQuery {account: $account}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$_ListSharingBlocShareRemovedToString
|
||||
on _ListSharingBlocShareRemoved {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "_ListSharingBlocShareRemoved {shares: ${shares.toReadableString()}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$_ListSharingBlocPendingSharedAlbumMovedToString
|
||||
on _ListSharingBlocPendingSharedAlbumMoved {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "_ListSharingBlocPendingSharedAlbumMoved {account: $account, file: ${file.path}, destination: $destination}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListSharingBlocStateToString on ListSharingBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "ListSharingBlocState")} {account: $account, items: [length: ${items.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListSharingBlocFailureToString on ListSharingBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListSharingBlocFailure {account: $account, items: [length: ${items.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:kiwi/kiwi.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
|
@ -6,30 +7,30 @@ import 'package:nc_photos/bloc/bloc_util.dart' as bloc_util;
|
|||
import 'package:nc_photos/di_container.dart';
|
||||
import 'package:nc_photos/entity/tag.dart';
|
||||
import 'package:nc_photos/use_case/list_tag.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'list_tag.g.dart';
|
||||
|
||||
abstract class ListTagBlocEvent {
|
||||
const ListTagBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListTagBlocQuery extends ListTagBlocEvent {
|
||||
const ListTagBlocQuery(this.account);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class ListTagBlocState {
|
||||
const ListTagBlocState(this.account, this.items);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"items: List {length: ${items.length}}, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account? account;
|
||||
final List<Tag> items;
|
||||
|
@ -49,15 +50,13 @@ class ListTagBlocSuccess extends ListTagBlocState {
|
|||
: super(account, items);
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListTagBlocFailure extends ListTagBlocState {
|
||||
const ListTagBlocFailure(Account? account, List<Tag> items, this.exception)
|
||||
: super(account, items);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final dynamic exception;
|
||||
}
|
||||
|
|
28
app/lib/bloc/list_tag.g.dart
Normal file
28
app/lib/bloc/list_tag.g.dart
Normal file
|
@ -0,0 +1,28 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'list_tag.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ListTagBlocQueryToString on ListTagBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListTagBlocQuery {account: $account}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListTagBlocStateToString on ListTagBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "ListTagBlocState")} {account: $account, items: [length: ${items.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListTagBlocFailureToString on ListTagBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListTagBlocFailure {account: $account, items: [length: ${items.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/di_container.dart';
|
||||
|
@ -8,41 +9,40 @@ import 'package:nc_photos/entity/tag.dart';
|
|||
import 'package:nc_photos/event/event.dart';
|
||||
import 'package:nc_photos/throttler.dart';
|
||||
import 'package:nc_photos/use_case/find_file.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'list_tag_file.g.dart';
|
||||
|
||||
abstract class ListTagFileBlocEvent {
|
||||
const ListTagFileBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListTagFileBlocQuery extends ListTagFileBlocEvent {
|
||||
const ListTagFileBlocQuery(this.account, this.tag);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"tag: $tag, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
final Tag tag;
|
||||
}
|
||||
|
||||
/// An external event has happened and may affect the state of this bloc
|
||||
@toString
|
||||
class _ListTagFileBlocExternalEvent extends ListTagFileBlocEvent {
|
||||
const _ListTagFileBlocExternalEvent();
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class ListTagFileBlocState {
|
||||
const ListTagFileBlocState(this.account, this.items);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"items: List {length: ${items.length}}, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account? account;
|
||||
final List<File> items;
|
||||
|
@ -62,16 +62,14 @@ class ListTagFileBlocSuccess extends ListTagFileBlocState {
|
|||
: super(account, items);
|
||||
}
|
||||
|
||||
@toString
|
||||
class ListTagFileBlocFailure extends ListTagFileBlocState {
|
||||
const ListTagFileBlocFailure(
|
||||
Account? account, List<File> items, this.exception)
|
||||
: super(account, items);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Object exception;
|
||||
}
|
||||
|
|
36
app/lib/bloc/list_tag_file.g.dart
Normal file
36
app/lib/bloc/list_tag_file.g.dart
Normal file
|
@ -0,0 +1,36 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'list_tag_file.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ListTagFileBlocQueryToString on ListTagFileBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListTagFileBlocQuery {account: $account, tag: $tag}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$_ListTagFileBlocExternalEventToString
|
||||
on _ListTagFileBlocExternalEvent {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "_ListTagFileBlocExternalEvent {}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListTagFileBlocStateToString on ListTagFileBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "ListTagFileBlocState")} {account: $account, items: [length: ${items.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ListTagFileBlocFailureToString on ListTagFileBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ListTagFileBlocFailure {account: $account, items: [length: ${items.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,26 +1,26 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/debug_util.dart';
|
||||
import 'package:nc_photos/entity/file.dart';
|
||||
import 'package:nc_photos/exception.dart';
|
||||
import 'package:nc_photos/use_case/ls.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'ls_dir.g.dart';
|
||||
|
||||
@toString
|
||||
class LsDirBlocItem with EquatableMixin {
|
||||
LsDirBlocItem(this.file, this.isE2ee, this.children);
|
||||
|
||||
@override
|
||||
toString({bool isDeep = false}) {
|
||||
String toString({bool isDeep = false}) {
|
||||
if (isDeep) {
|
||||
return "$runtimeType:${_toDeepString(0)}";
|
||||
} else {
|
||||
final childrenStr =
|
||||
children == null ? "null" : "List {length: ${children!.length}}";
|
||||
return "$runtimeType {"
|
||||
"file: '${file.path}', "
|
||||
"children: $childrenStr, "
|
||||
"}";
|
||||
return _$toString();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,6 +53,7 @@ abstract class LsDirBlocEvent {
|
|||
const LsDirBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class LsDirBlocQuery extends LsDirBlocEvent {
|
||||
const LsDirBlocQuery(
|
||||
this.account,
|
||||
|
@ -61,13 +62,7 @@ class LsDirBlocQuery extends LsDirBlocEvent {
|
|||
});
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"root: '${root.path}', "
|
||||
"depth: $depth, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
LsDirBlocQuery copyWith({
|
||||
Account? account,
|
||||
|
@ -86,17 +81,12 @@ class LsDirBlocQuery extends LsDirBlocEvent {
|
|||
final int depth;
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class LsDirBlocState with EquatableMixin {
|
||||
const LsDirBlocState(this.account, this.root, this.items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"root: ${root.path}, "
|
||||
"items: List {length: ${items.length}}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
@ -124,18 +114,14 @@ class LsDirBlocSuccess extends LsDirBlocState {
|
|||
: super(account, root, items);
|
||||
}
|
||||
|
||||
@toString
|
||||
class LsDirBlocFailure extends LsDirBlocState {
|
||||
const LsDirBlocFailure(
|
||||
Account? account, File root, List<LsDirBlocItem> items, this.exception)
|
||||
: super(account, root, items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
|
35
app/lib/bloc/ls_dir.g.dart
Normal file
35
app/lib/bloc/ls_dir.g.dart
Normal file
|
@ -0,0 +1,35 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'ls_dir.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$LsDirBlocItemToString on LsDirBlocItem {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "LsDirBlocItem {file: ${file.path}, isE2ee: $isE2ee, children: ${children == null ? null : "[length: ${children!.length}]"}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$LsDirBlocQueryToString on LsDirBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "LsDirBlocQuery {account: $account, root: ${root.path}, depth: $depth}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$LsDirBlocStateToString on LsDirBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "LsDirBlocState")} {account: $account, root: ${root.path}, items: [length: ${items.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$LsDirBlocFailureToString on LsDirBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "LsDirBlocFailure {account: $account, root: ${root.path}, items: [length: ${items.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:kiwi/kiwi.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
|
@ -9,45 +10,39 @@ import 'package:nc_photos/entity/file_util.dart' as file_util;
|
|||
import 'package:nc_photos/event/event.dart';
|
||||
import 'package:nc_photos/throttler.dart';
|
||||
import 'package:nc_photos/use_case/ls_trashbin.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'ls_trashbin.g.dart';
|
||||
|
||||
abstract class LsTrashbinBlocEvent {
|
||||
const LsTrashbinBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class LsTrashbinBlocQuery extends LsTrashbinBlocEvent {
|
||||
const LsTrashbinBlocQuery(this.account);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
}
|
||||
|
||||
/// An external event has happened and may affect the state of this bloc
|
||||
@toString
|
||||
class _LsTrashbinBlocExternalEvent extends LsTrashbinBlocEvent {
|
||||
const _LsTrashbinBlocExternalEvent();
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class LsTrashbinBlocState {
|
||||
const LsTrashbinBlocState(this.account, this.items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"items: List {length: ${items.length}}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account? account;
|
||||
final List<File> items;
|
||||
|
@ -67,18 +62,14 @@ class LsTrashbinBlocSuccess extends LsTrashbinBlocState {
|
|||
: super(account, items);
|
||||
}
|
||||
|
||||
@toString
|
||||
class LsTrashbinBlocFailure extends LsTrashbinBlocState {
|
||||
const LsTrashbinBlocFailure(
|
||||
Account? account, List<File> items, this.exception)
|
||||
: super(account, items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final dynamic exception;
|
||||
}
|
||||
|
|
36
app/lib/bloc/ls_trashbin.g.dart
Normal file
36
app/lib/bloc/ls_trashbin.g.dart
Normal file
|
@ -0,0 +1,36 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'ls_trashbin.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$LsTrashbinBlocQueryToString on LsTrashbinBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "LsTrashbinBlocQuery {account: $account}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$_LsTrashbinBlocExternalEventToString
|
||||
on _LsTrashbinBlocExternalEvent {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "_LsTrashbinBlocExternalEvent {}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$LsTrashbinBlocStateToString on LsTrashbinBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "LsTrashbinBlocState")} {account: $account, items: [length: ${items.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$LsTrashbinBlocFailureToString on LsTrashbinBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "LsTrashbinBlocFailure {account: $account, items: [length: ${items.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -8,12 +8,14 @@ part of 'progress.dart';
|
|||
|
||||
extension _$ProgressBlocUpdateToString on ProgressBlocUpdate {
|
||||
String _$toString() {
|
||||
return "ProgressBlocUpdate {progress: $progress, text: $text}";
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ProgressBlocUpdate {progress: ${progress.toStringAsFixed(3)}, text: $text}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ProgressBlocStateToString on ProgressBlocState {
|
||||
String _$toString() {
|
||||
return "ProgressBlocState {progress: $progress, text: $text}";
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ProgressBlocState {progress: ${progress.toStringAsFixed(3)}, text: $text}";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,21 +23,22 @@ import 'package:nc_photos/use_case/ls.dart';
|
|||
import 'package:nc_photos/use_case/scan_dir.dart';
|
||||
import 'package:nc_photos/use_case/scan_dir_offline.dart';
|
||||
import 'package:nc_photos/use_case/sync_dir.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'scan_account_dir.g.dart';
|
||||
|
||||
abstract class ScanAccountDirBlocEvent {
|
||||
const ScanAccountDirBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class ScanAccountDirBlocQueryBase extends ScanAccountDirBlocEvent {
|
||||
const ScanAccountDirBlocQueryBase({
|
||||
this.progressBloc,
|
||||
});
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
/// Get notified about the query progress
|
||||
final ProgressBloc? progressBloc;
|
||||
|
@ -56,25 +57,20 @@ class ScanAccountDirBlocRefresh extends ScanAccountDirBlocQueryBase {
|
|||
}
|
||||
|
||||
/// An external event has happened and may affect the state of this bloc
|
||||
@toString
|
||||
class _ScanAccountDirBlocExternalEvent extends ScanAccountDirBlocEvent {
|
||||
const _ScanAccountDirBlocExternalEvent();
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class ScanAccountDirBlocState {
|
||||
const ScanAccountDirBlocState(this.files);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"files: List {length: ${files.length}}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final List<FileDescriptor> files;
|
||||
}
|
||||
|
@ -96,17 +92,13 @@ class ScanAccountDirBlocSuccess extends ScanAccountDirBlocState {
|
|||
const ScanAccountDirBlocSuccess(List<FileDescriptor> files) : super(files);
|
||||
}
|
||||
|
||||
@toString
|
||||
class ScanAccountDirBlocFailure extends ScanAccountDirBlocState {
|
||||
const ScanAccountDirBlocFailure(List<FileDescriptor> files, this.exception)
|
||||
: super(files);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final dynamic exception;
|
||||
}
|
||||
|
|
36
app/lib/bloc/scan_account_dir.g.dart
Normal file
36
app/lib/bloc/scan_account_dir.g.dart
Normal file
|
@ -0,0 +1,36 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'scan_account_dir.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ScanAccountDirBlocQueryBaseToString on ScanAccountDirBlocQueryBase {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "ScanAccountDirBlocQueryBase")} {progressBloc: $progressBloc}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$_ScanAccountDirBlocExternalEventToString
|
||||
on _ScanAccountDirBlocExternalEvent {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "_ScanAccountDirBlocExternalEvent {}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ScanAccountDirBlocStateToString on ScanAccountDirBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "ScanAccountDirBlocState")} {files: [length: ${files.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ScanAccountDirBlocFailureToString on ScanAccountDirBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ScanAccountDirBlocFailure {files: [length: ${files.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:kiwi/kiwi.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/di_container.dart';
|
||||
|
@ -6,40 +7,42 @@ import 'package:nc_photos/entity/local_file.dart';
|
|||
import 'package:nc_photos/event/event.dart';
|
||||
import 'package:nc_photos/iterable_extension.dart';
|
||||
import 'package:nc_photos/use_case/scan_local_dir.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'scan_local_dir.g.dart';
|
||||
|
||||
abstract class ScanLocalDirBlocEvent {
|
||||
const ScanLocalDirBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class ScanLocalDirBlocQuery extends ScanLocalDirBlocEvent {
|
||||
const ScanLocalDirBlocQuery(this.relativePaths);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"relativePaths: ${relativePaths.toReadableString()}, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
@Format(r"${$?.toReadableString()}")
|
||||
final List<String> relativePaths;
|
||||
}
|
||||
|
||||
@toString
|
||||
class _ScanLocalDirBlocFileDeleted extends ScanLocalDirBlocEvent {
|
||||
const _ScanLocalDirBlocFileDeleted(this.files);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"files: ${files.map((f) => f.logTag).toReadableString()}, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
@Format(r"${$?.map((f) => f.logTag).toReadableString()}")
|
||||
final List<LocalFile> files;
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class ScanLocalDirBlocState {
|
||||
const ScanLocalDirBlocState(this.files);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"files: List {length: ${files.length}}, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final List<LocalFile> files;
|
||||
}
|
||||
|
@ -56,15 +59,13 @@ class ScanLocalDirBlocSuccess extends ScanLocalDirBlocState {
|
|||
const ScanLocalDirBlocSuccess(List<LocalFile> files) : super(files);
|
||||
}
|
||||
|
||||
@toString
|
||||
class ScanLocalDirBlocFailure extends ScanLocalDirBlocState {
|
||||
const ScanLocalDirBlocFailure(List<LocalFile> files, this.exception)
|
||||
: super(files);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final dynamic exception;
|
||||
}
|
||||
|
|
36
app/lib/bloc/scan_local_dir.g.dart
Normal file
36
app/lib/bloc/scan_local_dir.g.dart
Normal file
|
@ -0,0 +1,36 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'scan_local_dir.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ScanLocalDirBlocQueryToString on ScanLocalDirBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ScanLocalDirBlocQuery {relativePaths: ${relativePaths.toReadableString()}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$_ScanLocalDirBlocFileDeletedToString
|
||||
on _ScanLocalDirBlocFileDeleted {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "_ScanLocalDirBlocFileDeleted {files: ${files.map((f) => f.logTag).toReadableString()}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ScanLocalDirBlocStateToString on ScanLocalDirBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "ScanLocalDirBlocState")} {files: [length: ${files.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ScanLocalDirBlocFailureToString on ScanLocalDirBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ScanLocalDirBlocFailure {files: [length: ${files.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/di_container.dart';
|
||||
|
@ -8,53 +9,50 @@ import 'package:nc_photos/entity/search.dart';
|
|||
import 'package:nc_photos/event/event.dart';
|
||||
import 'package:nc_photos/throttler.dart';
|
||||
import 'package:nc_photos/use_case/search.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'search.g.dart';
|
||||
|
||||
abstract class SearchBlocEvent {
|
||||
const SearchBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class SearchBlocQuery extends SearchBlocEvent {
|
||||
const SearchBlocQuery(this.account, this.criteria);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"criteria: $criteria, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
final SearchCriteria criteria;
|
||||
}
|
||||
|
||||
/// An external event has happened and may affect the state of this bloc
|
||||
@toString
|
||||
class _SearchBlocExternalEvent extends SearchBlocEvent {
|
||||
const _SearchBlocExternalEvent();
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
}
|
||||
|
||||
@toString
|
||||
class SearchBlocResetLanding extends SearchBlocEvent {
|
||||
const SearchBlocResetLanding(this.account);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class SearchBlocState {
|
||||
const SearchBlocState(this.account, this.criteria, this.items);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"criteria: $criteria, "
|
||||
"items: List {length: ${items.length}}, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account? account;
|
||||
final SearchCriteria criteria;
|
||||
|
@ -77,16 +75,14 @@ class SearchBlocSuccess extends SearchBlocState {
|
|||
: super(account, criteria, items);
|
||||
}
|
||||
|
||||
@toString
|
||||
class SearchBlocFailure extends SearchBlocState {
|
||||
const SearchBlocFailure(Account? account, SearchCriteria criteria,
|
||||
List<File> items, this.exception)
|
||||
: super(account, criteria, items);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Object exception;
|
||||
}
|
||||
|
|
42
app/lib/bloc/search.g.dart
Normal file
42
app/lib/bloc/search.g.dart
Normal file
|
@ -0,0 +1,42 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'search.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$SearchBlocQueryToString on SearchBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "SearchBlocQuery {account: $account, criteria: $criteria}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$_SearchBlocExternalEventToString on _SearchBlocExternalEvent {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "_SearchBlocExternalEvent {}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$SearchBlocResetLandingToString on SearchBlocResetLanding {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "SearchBlocResetLanding {account: $account}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$SearchBlocStateToString on SearchBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "SearchBlocState")} {account: $account, criteria: $criteria, items: [length: ${items.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$SearchBlocFailureToString on SearchBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "SearchBlocFailure {account: $account, criteria: $criteria, items: [length: ${items.length}], exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -1,35 +1,35 @@
|
|||
import 'package:bloc/bloc.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/di_container.dart';
|
||||
import 'package:nc_photos/entity/person.dart';
|
||||
import 'package:nc_photos/use_case/list_location_group.dart';
|
||||
import 'package:nc_photos/use_case/list_person.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'search_landing.g.dart';
|
||||
|
||||
abstract class SearchLandingBlocEvent {
|
||||
const SearchLandingBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class SearchLandingBlocQuery extends SearchLandingBlocEvent {
|
||||
const SearchLandingBlocQuery(this.account);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class SearchLandingBlocState {
|
||||
const SearchLandingBlocState(this.account, this.persons, this.locations);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"account: $account, "
|
||||
"persons: List {length: ${persons.length}}, "
|
||||
"locations: $locations, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account? account;
|
||||
final List<Person> persons;
|
||||
|
@ -53,16 +53,14 @@ class SearchLandingBlocSuccess extends SearchLandingBlocState {
|
|||
: super(account, persons, locations);
|
||||
}
|
||||
|
||||
@toString
|
||||
class SearchLandingBlocFailure extends SearchLandingBlocState {
|
||||
const SearchLandingBlocFailure(Account? account, List<Person> persons,
|
||||
LocationGroupResult locations, this.exception)
|
||||
: super(account, persons, locations);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final Object exception;
|
||||
}
|
||||
|
|
28
app/lib/bloc/search_landing.g.dart
Normal file
28
app/lib/bloc/search_landing.g.dart
Normal file
|
@ -0,0 +1,28 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'search_landing.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$SearchLandingBlocQueryToString on SearchLandingBlocQuery {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "SearchLandingBlocQuery {account: $account}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$SearchLandingBlocStateToString on SearchLandingBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "SearchLandingBlocState")} {account: $account, persons: [length: ${persons.length}], locations: $locations}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$SearchLandingBlocFailureToString on SearchLandingBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "SearchLandingBlocFailure {account: $account, persons: [length: ${persons.length}], locations: $locations, exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -4,49 +4,43 @@ import 'package:flutter/foundation.dart';
|
|||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/ci_string.dart';
|
||||
import 'package:nc_photos/iterable_extension.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
import 'package:woozy_search/woozy_search.dart';
|
||||
|
||||
part 'search_suggestion.g.dart';
|
||||
|
||||
abstract class SearchSuggestionBlocEvent<T> {
|
||||
const SearchSuggestionBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class SearchSuggestionBlocUpdateItemsEvent<T>
|
||||
extends SearchSuggestionBlocEvent<T> {
|
||||
const SearchSuggestionBlocUpdateItemsEvent(this.items);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"items: List {legth: ${items.length}}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final List<T> items;
|
||||
}
|
||||
|
||||
@toString
|
||||
class SearchSuggestionBlocSearchEvent<T> extends SearchSuggestionBlocEvent<T> {
|
||||
const SearchSuggestionBlocSearchEvent(this.phrase);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"phrase: '$phrase', "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final CiString phrase;
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class SearchSuggestionBlocState<T> {
|
||||
const SearchSuggestionBlocState(this.results);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"results: List {legth: ${results.length}}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final List<T> results;
|
||||
}
|
||||
|
|
30
app/lib/bloc/search_suggestion.g.dart
Normal file
30
app/lib/bloc/search_suggestion.g.dart
Normal file
|
@ -0,0 +1,30 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'search_suggestion.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$SearchSuggestionBlocUpdateItemsEventToString
|
||||
on SearchSuggestionBlocUpdateItemsEvent {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "SearchSuggestionBlocUpdateItemsEvent {items: [length: ${items.length}]}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$SearchSuggestionBlocSearchEventToString
|
||||
on SearchSuggestionBlocSearchEvent {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "SearchSuggestionBlocSearchEvent {phrase: $phrase}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$SearchSuggestionBlocStateToString on SearchSuggestionBlocState {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "SearchSuggestionBlocState")} {results: [length: ${results.length}]}";
|
||||
}
|
||||
}
|
|
@ -11,6 +11,9 @@ import 'package:nc_photos/iterable_extension.dart';
|
|||
import 'package:nc_photos/object_extension.dart';
|
||||
import 'package:nc_photos/or_null.dart';
|
||||
import 'package:nc_photos/type.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'album.g.dart';
|
||||
|
||||
/// Immutable object that represents an album
|
||||
class Album with EquatableMixin {
|
||||
|
@ -216,6 +219,7 @@ class Album with EquatableMixin {
|
|||
static final _log = Logger("entity.album.Album");
|
||||
}
|
||||
|
||||
@toString
|
||||
class AlbumShare with EquatableMixin {
|
||||
AlbumShare({
|
||||
required this.userId,
|
||||
|
@ -257,13 +261,7 @@ class AlbumShare with EquatableMixin {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"userId: $userId, "
|
||||
"displayName: $displayName, "
|
||||
"sharedAt: $sharedAt, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
|
14
app/lib/entity/album.g.dart
Normal file
14
app/lib/entity/album.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'album.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$AlbumShareToString on AlbumShare {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AlbumShare {userId: $userId, displayName: $displayName, sharedAt: $sharedAt}";
|
||||
}
|
||||
}
|
|
@ -8,6 +8,9 @@ import 'package:nc_photos/entity/file.dart';
|
|||
import 'package:nc_photos/entity/file_descriptor.dart';
|
||||
import 'package:nc_photos/entity/file_util.dart' as file_util;
|
||||
import 'package:nc_photos/type.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'cover_provider.g.dart';
|
||||
|
||||
abstract class AlbumCoverProvider with EquatableMixin {
|
||||
const AlbumCoverProvider();
|
||||
|
@ -48,7 +51,7 @@ abstract class AlbumCoverProvider with EquatableMixin {
|
|||
}
|
||||
|
||||
@override
|
||||
toString();
|
||||
String toString();
|
||||
|
||||
FileDescriptor? getCover(Album album);
|
||||
|
||||
|
@ -58,6 +61,7 @@ abstract class AlbumCoverProvider with EquatableMixin {
|
|||
}
|
||||
|
||||
/// Cover selected automatically by us
|
||||
@toString
|
||||
class AlbumAutoCoverProvider extends AlbumCoverProvider {
|
||||
AlbumAutoCoverProvider({
|
||||
this.coverFile,
|
||||
|
@ -72,11 +76,7 @@ class AlbumAutoCoverProvider extends AlbumCoverProvider {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"coverFile: '${coverFile?.path}', "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
getCover(Album album) {
|
||||
|
@ -118,6 +118,7 @@ class AlbumAutoCoverProvider extends AlbumCoverProvider {
|
|||
}
|
||||
|
||||
/// Cover picked by user
|
||||
@toString
|
||||
class AlbumManualCoverProvider extends AlbumCoverProvider {
|
||||
AlbumManualCoverProvider({
|
||||
required this.coverFile,
|
||||
|
@ -130,11 +131,7 @@ class AlbumManualCoverProvider extends AlbumCoverProvider {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"coverFile: '${coverFile.path}', "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
getCover(Album album) => coverFile;
|
||||
|
@ -157,6 +154,7 @@ class AlbumManualCoverProvider extends AlbumCoverProvider {
|
|||
}
|
||||
|
||||
/// Cover selected when building a Memory album
|
||||
@toString
|
||||
class AlbumMemoryCoverProvider extends AlbumCoverProvider {
|
||||
AlbumMemoryCoverProvider({
|
||||
required this.coverFile,
|
||||
|
@ -170,9 +168,7 @@ class AlbumMemoryCoverProvider extends AlbumCoverProvider {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"coverFile: '${coverFile.fdPath}', "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
getCover(Album album) => coverFile;
|
||||
|
|
28
app/lib/entity/album/cover_provider.g.dart
Normal file
28
app/lib/entity/album/cover_provider.g.dart
Normal file
|
@ -0,0 +1,28 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'cover_provider.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$AlbumAutoCoverProviderToString on AlbumAutoCoverProvider {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AlbumAutoCoverProvider {coverFile: ${coverFile == null ? null : "${coverFile!.path}"}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AlbumManualCoverProviderToString on AlbumManualCoverProvider {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AlbumManualCoverProvider {coverFile: ${coverFile.path}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AlbumMemoryCoverProviderToString on AlbumMemoryCoverProvider {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AlbumMemoryCoverProvider {coverFile: ${coverFile.fdPath}}";
|
||||
}
|
||||
}
|
|
@ -1,10 +1,15 @@
|
|||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/ci_string.dart';
|
||||
import 'package:nc_photos/entity/file.dart';
|
||||
import 'package:nc_photos/or_null.dart';
|
||||
import 'package:nc_photos/type.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'item.g.dart';
|
||||
|
||||
@toString
|
||||
abstract class AlbumItem with EquatableMixin {
|
||||
AlbumItem({
|
||||
required this.addedBy,
|
||||
|
@ -51,12 +56,7 @@ abstract class AlbumItem with EquatableMixin {
|
|||
JsonObj toContentJson();
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"addedBy: '$addedBy', "
|
||||
"addedAt: $addedAt, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
@ -70,6 +70,7 @@ abstract class AlbumItem with EquatableMixin {
|
|||
static final _log = Logger("entity.album.AlbumItem");
|
||||
}
|
||||
|
||||
@toString
|
||||
class AlbumFileItem extends AlbumItem {
|
||||
AlbumFileItem({
|
||||
required CiString addedBy,
|
||||
|
@ -99,12 +100,7 @@ class AlbumFileItem extends AlbumItem {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"file: $file, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
toContentJson() {
|
||||
|
@ -142,6 +138,7 @@ class AlbumFileItem extends AlbumItem {
|
|||
static const _type = "file";
|
||||
}
|
||||
|
||||
@toString
|
||||
class AlbumLabelItem extends AlbumItem {
|
||||
AlbumLabelItem({
|
||||
required CiString addedBy,
|
||||
|
@ -159,12 +156,7 @@ class AlbumLabelItem extends AlbumItem {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"text: '$text', "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
toContentJson() {
|
||||
|
|
28
app/lib/entity/album/item.g.dart
Normal file
28
app/lib/entity/album/item.g.dart
Normal file
|
@ -0,0 +1,28 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'item.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$AlbumItemToString on AlbumItem {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "AlbumItem")} {addedBy: $addedBy, addedAt: $addedAt}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AlbumFileItemToString on AlbumFileItem {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AlbumFileItem {addedBy: $addedBy, addedAt: $addedAt, file: ${file.path}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AlbumLabelItemToString on AlbumLabelItem {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AlbumLabelItem {addedBy: $addedBy, addedAt: $addedAt, text: $text}";
|
||||
}
|
||||
}
|
|
@ -10,6 +10,9 @@ import 'package:nc_photos/entity/tag.dart';
|
|||
import 'package:nc_photos/iterable_extension.dart';
|
||||
import 'package:nc_photos/or_null.dart';
|
||||
import 'package:nc_photos/type.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'provider.g.dart';
|
||||
|
||||
abstract class AlbumProvider with EquatableMixin {
|
||||
const AlbumProvider();
|
||||
|
@ -53,7 +56,7 @@ abstract class AlbumProvider with EquatableMixin {
|
|||
JsonObj toContentJson();
|
||||
|
||||
@override
|
||||
toString({bool isDeep = false});
|
||||
String toString({bool isDeep = false});
|
||||
|
||||
/// Return the date time associated with the latest item, or null
|
||||
DateTime? get latestItemTime;
|
||||
|
@ -68,13 +71,6 @@ abstract class AlbumProviderBase extends AlbumProvider {
|
|||
DateTime? latestItemTime,
|
||||
}) : latestItemTime = latestItemTime?.toUtc();
|
||||
|
||||
@override
|
||||
toString({bool isDeep = false}) {
|
||||
return "$runtimeType {"
|
||||
"latestItemTime: $latestItemTime, "
|
||||
"}";
|
||||
}
|
||||
|
||||
@override
|
||||
toContentJson() {
|
||||
return {
|
||||
|
@ -97,6 +93,7 @@ abstract class AlbumProviderBase extends AlbumProvider {
|
|||
final DateTime? latestItemTime;
|
||||
}
|
||||
|
||||
@ToString(extraParams: r"{bool isDeep = false}")
|
||||
class AlbumStaticProvider extends AlbumProviderBase {
|
||||
AlbumStaticProvider({
|
||||
DateTime? latestItemTime,
|
||||
|
@ -121,14 +118,7 @@ class AlbumStaticProvider extends AlbumProviderBase {
|
|||
(parent.provider as AlbumStaticProvider);
|
||||
|
||||
@override
|
||||
toString({bool isDeep = false}) {
|
||||
final itemsStr =
|
||||
isDeep ? items.toReadableString() : "List {length: ${items.length}}";
|
||||
return "$runtimeType {"
|
||||
"super: ${super.toString(isDeep: isDeep)}, "
|
||||
"items: $itemsStr, "
|
||||
"}";
|
||||
}
|
||||
String toString({bool isDeep = false}) => _$toString(isDeep: isDeep);
|
||||
|
||||
@override
|
||||
toContentJson() {
|
||||
|
@ -157,6 +147,7 @@ class AlbumStaticProvider extends AlbumProviderBase {
|
|||
];
|
||||
|
||||
/// Immutable list of items. Modifying the list will result in an error
|
||||
@Format(r"${isDeep ? $?.toReadableString() : '[length: ${$?.length}]'}")
|
||||
final List<AlbumItem> items;
|
||||
|
||||
static const _type = "static";
|
||||
|
@ -168,6 +159,7 @@ abstract class AlbumDynamicProvider extends AlbumProviderBase {
|
|||
}) : super(latestItemTime: latestItemTime);
|
||||
}
|
||||
|
||||
@ToString(extraParams: r"{bool isDeep = false}")
|
||||
class AlbumDirProvider extends AlbumDynamicProvider {
|
||||
AlbumDirProvider({
|
||||
required this.dirs,
|
||||
|
@ -188,12 +180,7 @@ class AlbumDirProvider extends AlbumDynamicProvider {
|
|||
}
|
||||
|
||||
@override
|
||||
toString({bool isDeep = false}) {
|
||||
return "$runtimeType {"
|
||||
"super: ${super.toString(isDeep: isDeep)}, "
|
||||
"dirs: ${dirs.map((e) => e.path).toReadableString()}, "
|
||||
"}";
|
||||
}
|
||||
String toString({bool isDeep = false}) => _$toString(isDeep: isDeep);
|
||||
|
||||
@override
|
||||
toContentJson() {
|
||||
|
@ -221,11 +208,13 @@ class AlbumDirProvider extends AlbumDynamicProvider {
|
|||
dirs,
|
||||
];
|
||||
|
||||
@Format(r"${$?.map((e) => e.path).toReadableString()}")
|
||||
final List<File> dirs;
|
||||
|
||||
static const _type = "dir";
|
||||
}
|
||||
|
||||
@ToString(extraParams: r"{bool isDeep = false}")
|
||||
class AlbumTagProvider extends AlbumDynamicProvider {
|
||||
AlbumTagProvider({
|
||||
required this.tags,
|
||||
|
@ -242,10 +231,7 @@ class AlbumTagProvider extends AlbumDynamicProvider {
|
|||
);
|
||||
|
||||
@override
|
||||
toString({bool isDeep = false}) => "$runtimeType {"
|
||||
"super: ${super.toString(isDeep: isDeep)}, "
|
||||
"tags: ${tags.map((t) => t.displayName).toReadableString()}, "
|
||||
"}";
|
||||
String toString({bool isDeep = false}) => _$toString(isDeep: isDeep);
|
||||
|
||||
@override
|
||||
toContentJson() => {
|
||||
|
@ -270,6 +256,7 @@ class AlbumTagProvider extends AlbumDynamicProvider {
|
|||
tags,
|
||||
];
|
||||
|
||||
@Format(r"${$?.map((t) => t.displayName).toReadableString()}")
|
||||
final List<Tag> tags;
|
||||
|
||||
static const _type = "tag";
|
||||
|
@ -297,6 +284,7 @@ abstract class AlbumSmartProvider extends AlbumProviderBase {
|
|||
}
|
||||
|
||||
/// Memory album is created based on dates
|
||||
@ToString(extraParams: r"{bool isDeep = false}")
|
||||
class AlbumMemoryProvider extends AlbumSmartProvider {
|
||||
AlbumMemoryProvider({
|
||||
required this.year,
|
||||
|
@ -305,14 +293,7 @@ class AlbumMemoryProvider extends AlbumSmartProvider {
|
|||
}) : super(latestItemTime: DateTime(year, month, day));
|
||||
|
||||
@override
|
||||
toString({bool isDeep = false}) {
|
||||
return "$runtimeType {"
|
||||
"super: ${super.toString(isDeep: isDeep)}, "
|
||||
"year: $year, "
|
||||
"month: $month, "
|
||||
"day: $day, "
|
||||
"}";
|
||||
}
|
||||
String toString({bool isDeep = false}) => _$toString(isDeep: isDeep);
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
|
35
app/lib/entity/album/provider.g.dart
Normal file
35
app/lib/entity/album/provider.g.dart
Normal file
|
@ -0,0 +1,35 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'provider.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$AlbumStaticProviderToString on AlbumStaticProvider {
|
||||
String _$toString({bool isDeep = false}) {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AlbumStaticProvider {latestItemTime: $latestItemTime, items: ${isDeep ? items.toReadableString() : '[length: ${items.length}]'}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AlbumDirProviderToString on AlbumDirProvider {
|
||||
String _$toString({bool isDeep = false}) {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AlbumDirProvider {latestItemTime: $latestItemTime, dirs: ${dirs.map((e) => e.path).toReadableString()}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AlbumTagProviderToString on AlbumTagProvider {
|
||||
String _$toString({bool isDeep = false}) {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AlbumTagProvider {latestItemTime: $latestItemTime, tags: ${tags.map((t) => t.displayName).toReadableString()}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AlbumMemoryProviderToString on AlbumMemoryProvider {
|
||||
String _$toString({bool isDeep = false}) {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AlbumMemoryProvider {latestItemTime: $latestItemTime, year: $year, month: $month, day: $day}";
|
||||
}
|
||||
}
|
|
@ -6,8 +6,11 @@ import 'package:nc_photos/entity/file.dart';
|
|||
import 'package:nc_photos/entity/file_descriptor.dart';
|
||||
import 'package:nc_photos/iterable_extension.dart';
|
||||
import 'package:nc_photos/type.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
|
||||
part 'sort_provider.g.dart';
|
||||
|
||||
abstract class AlbumSortProvider with EquatableMixin {
|
||||
const AlbumSortProvider();
|
||||
|
||||
|
@ -56,6 +59,7 @@ abstract class AlbumSortProvider with EquatableMixin {
|
|||
}
|
||||
|
||||
/// Sort provider that does nothing
|
||||
@toString
|
||||
class AlbumNullSortProvider extends AlbumSortProvider {
|
||||
const AlbumNullSortProvider();
|
||||
|
||||
|
@ -64,10 +68,7 @@ class AlbumNullSortProvider extends AlbumSortProvider {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
sort(List<AlbumItem> items) {
|
||||
|
@ -90,13 +91,6 @@ abstract class AlbumReversibleSortProvider extends AlbumSortProvider {
|
|||
required this.isAscending,
|
||||
});
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"isAscending: $isAscending, "
|
||||
"}";
|
||||
}
|
||||
|
||||
@override
|
||||
get props => [
|
||||
isAscending,
|
||||
|
@ -113,6 +107,7 @@ abstract class AlbumReversibleSortProvider extends AlbumSortProvider {
|
|||
}
|
||||
|
||||
/// Sort based on the time of the files
|
||||
@toString
|
||||
class AlbumTimeSortProvider extends AlbumReversibleSortProvider {
|
||||
const AlbumTimeSortProvider({
|
||||
required bool isAscending,
|
||||
|
@ -125,11 +120,7 @@ class AlbumTimeSortProvider extends AlbumReversibleSortProvider {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
sort(List<AlbumItem> items) {
|
||||
|
@ -166,6 +157,7 @@ class AlbumTimeSortProvider extends AlbumReversibleSortProvider {
|
|||
}
|
||||
|
||||
/// Sort based on the name of the files
|
||||
@toString
|
||||
class AlbumFilenameSortProvider extends AlbumReversibleSortProvider {
|
||||
const AlbumFilenameSortProvider({
|
||||
required bool isAscending,
|
||||
|
@ -178,9 +170,7 @@ class AlbumFilenameSortProvider extends AlbumReversibleSortProvider {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"super: ${super.toString()}, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
sort(List<AlbumItem> items) {
|
||||
|
|
28
app/lib/entity/album/sort_provider.g.dart
Normal file
28
app/lib/entity/album/sort_provider.g.dart
Normal file
|
@ -0,0 +1,28 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'sort_provider.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$AlbumNullSortProviderToString on AlbumNullSortProvider {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AlbumNullSortProvider {}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AlbumTimeSortProviderToString on AlbumTimeSortProvider {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AlbumTimeSortProvider {isAscending: $isAscending}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AlbumFilenameSortProviderToString on AlbumFilenameSortProvider {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AlbumFilenameSortProvider {isAscending: $isAscending}";
|
||||
}
|
||||
}
|
|
@ -87,7 +87,7 @@ class Exif with EquatableMixin {
|
|||
final dataStr = data.entries.map((e) {
|
||||
return "${e.key}: '${e.value}'";
|
||||
}).join(", ");
|
||||
return "$runtimeType {$dataStr}";
|
||||
return "Exif {$dataStr}";
|
||||
}
|
||||
|
||||
/// 0x010f Make
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
import 'package:equatable/equatable.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/entity/person.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'face.g.dart';
|
||||
|
||||
@toString
|
||||
class Face with EquatableMixin {
|
||||
const Face({
|
||||
required this.id,
|
||||
|
@ -9,12 +13,7 @@ class Face with EquatableMixin {
|
|||
});
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"id: '$id', "
|
||||
"fileId: '$fileId', "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
|
14
app/lib/entity/face.g.dart
Normal file
14
app/lib/entity/face.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'face.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$FaceToString on Face {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "Face {id: $id, fileId: $fileId}";
|
||||
}
|
||||
}
|
|
@ -1,16 +1,18 @@
|
|||
import 'package:equatable/equatable.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/entity/file.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'favorite.g.dart';
|
||||
|
||||
@toString
|
||||
class Favorite with EquatableMixin {
|
||||
const Favorite({
|
||||
required this.fileId,
|
||||
});
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"fileId: '$fileId', "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
Favorite copyWith({
|
||||
int? fileId,
|
||||
|
|
14
app/lib/entity/favorite.g.dart
Normal file
14
app/lib/entity/favorite.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'favorite.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$FavoriteToString on Favorite {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "Favorite {fileId: $fileId}";
|
||||
}
|
||||
}
|
|
@ -11,10 +11,14 @@ import 'package:nc_photos/json_util.dart' as json_util;
|
|||
import 'package:nc_photos/or_null.dart';
|
||||
import 'package:nc_photos/string_extension.dart';
|
||||
import 'package:nc_photos/type.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'file.g.dart';
|
||||
|
||||
int compareFileDateTimeDescending(File x, File y) =>
|
||||
compareFileDescriptorDateTimeDescending(x, y);
|
||||
|
||||
@ToString(ignoreNull: true)
|
||||
class ImageLocation with EquatableMixin {
|
||||
const ImageLocation({
|
||||
this.version = appVersion,
|
||||
|
@ -54,19 +58,7 @@ class ImageLocation with EquatableMixin {
|
|||
bool isEmpty() => name == null;
|
||||
|
||||
@override
|
||||
toString() {
|
||||
var product = "$runtimeType {"
|
||||
"version: $version, ";
|
||||
if (name != null) {
|
||||
product += "name: $name, "
|
||||
"latitude: $latitude, "
|
||||
"longitude: $longitude, "
|
||||
"countryCode: $countryCode, "
|
||||
"admin1: $admin1, "
|
||||
"admin2: $admin2, ";
|
||||
}
|
||||
return product + "}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
@ -91,6 +83,7 @@ class ImageLocation with EquatableMixin {
|
|||
}
|
||||
|
||||
/// Immutable object that hold metadata of a [File]
|
||||
@ToString(ignoreNull: true)
|
||||
class Metadata with EquatableMixin {
|
||||
Metadata({
|
||||
DateTime? lastUpdated,
|
||||
|
@ -191,23 +184,7 @@ class Metadata with EquatableMixin {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() {
|
||||
var product = "$runtimeType {"
|
||||
"lastUpdated: $lastUpdated, ";
|
||||
if (fileEtag != null) {
|
||||
product += "fileEtag: $fileEtag, ";
|
||||
}
|
||||
if (imageWidth != null) {
|
||||
product += "imageWidth: $imageWidth, ";
|
||||
}
|
||||
if (imageHeight != null) {
|
||||
product += "imageHeight: $imageHeight, ";
|
||||
}
|
||||
if (exif != null) {
|
||||
product += "exif: $exif, ";
|
||||
}
|
||||
return product + "}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
@ -324,6 +301,7 @@ class MetadataUpgraderV3 implements MetadataUpgrader {
|
|||
static final _log = Logger("entity.file.MetadataUpgraderV3");
|
||||
}
|
||||
|
||||
@ToString(ignoreNull: true)
|
||||
class File with EquatableMixin implements FileDescriptor {
|
||||
File({
|
||||
required String path,
|
||||
|
@ -410,65 +388,7 @@ class File with EquatableMixin implements FileDescriptor {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() {
|
||||
var product = "$runtimeType {"
|
||||
"path: '$path', ";
|
||||
if (contentLength != null) {
|
||||
product += "contentLength: $contentLength, ";
|
||||
}
|
||||
if (contentType != null) {
|
||||
product += "contentType: '$contentType', ";
|
||||
}
|
||||
if (etag != null) {
|
||||
product += "etag: '$etag', ";
|
||||
}
|
||||
if (lastModified != null) {
|
||||
product += "lastModified: $lastModified, ";
|
||||
}
|
||||
if (isCollection != null) {
|
||||
product += "isCollection: $isCollection, ";
|
||||
}
|
||||
if (usedBytes != null) {
|
||||
product += "usedBytes: $usedBytes, ";
|
||||
}
|
||||
if (hasPreview != null) {
|
||||
product += "hasPreview: $hasPreview, ";
|
||||
}
|
||||
if (fileId != null) {
|
||||
product += "fileId: $fileId, ";
|
||||
}
|
||||
if (isFavorite != null) {
|
||||
product += "isFavorite: $isFavorite, ";
|
||||
}
|
||||
if (ownerId != null) {
|
||||
product += "ownerId: '$ownerId', ";
|
||||
}
|
||||
if (ownerDisplayName != null) {
|
||||
product += "ownerDisplayName: '$ownerDisplayName', ";
|
||||
}
|
||||
if (trashbinFilename != null) {
|
||||
product += "trashbinFilename: '$trashbinFilename', ";
|
||||
}
|
||||
if (trashbinOriginalLocation != null) {
|
||||
product += "trashbinOriginalLocation: '$trashbinOriginalLocation', ";
|
||||
}
|
||||
if (trashbinDeletionTime != null) {
|
||||
product += "trashbinDeletionTime: $trashbinDeletionTime, ";
|
||||
}
|
||||
if (metadata != null) {
|
||||
product += "metadata: $metadata, ";
|
||||
}
|
||||
if (isArchived != null) {
|
||||
product += "isArchived: $isArchived, ";
|
||||
}
|
||||
if (overrideDateTime != null) {
|
||||
product += "overrideDateTime: $overrideDateTime, ";
|
||||
}
|
||||
if (location != null) {
|
||||
product += "location: $location, ";
|
||||
}
|
||||
return product + "}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
JsonObj toJson() {
|
||||
|
|
28
app/lib/entity/file.g.dart
Normal file
28
app/lib/entity/file.g.dart
Normal file
|
@ -0,0 +1,28 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'file.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ImageLocationToString on ImageLocation {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ImageLocation {version: $version, ${name == null ? "" : "name: $name, "}${latitude == null ? "" : "latitude: ${latitude!.toStringAsFixed(3)}, "}${longitude == null ? "" : "longitude: ${longitude!.toStringAsFixed(3)}, "}${countryCode == null ? "" : "countryCode: $countryCode, "}${admin1 == null ? "" : "admin1: $admin1, "}${admin2 == null ? "" : "admin2: $admin2"}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$MetadataToString on Metadata {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "Metadata {lastUpdated: $lastUpdated, ${fileEtag == null ? "" : "fileEtag: $fileEtag, "}${imageWidth == null ? "" : "imageWidth: $imageWidth, "}${imageHeight == null ? "" : "imageHeight: $imageHeight, "}${exif == null ? "" : "exif: $exif"}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$FileToString on File {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "File {path: $path, ${contentLength == null ? "" : "contentLength: $contentLength, "}${contentType == null ? "" : "contentType: $contentType, "}${etag == null ? "" : "etag: $etag, "}${lastModified == null ? "" : "lastModified: $lastModified, "}${isCollection == null ? "" : "isCollection: $isCollection, "}${usedBytes == null ? "" : "usedBytes: $usedBytes, "}${hasPreview == null ? "" : "hasPreview: $hasPreview, "}${fileId == null ? "" : "fileId: $fileId, "}${isFavorite == null ? "" : "isFavorite: $isFavorite, "}${ownerId == null ? "" : "ownerId: $ownerId, "}${ownerDisplayName == null ? "" : "ownerDisplayName: $ownerDisplayName, "}${trashbinFilename == null ? "" : "trashbinFilename: $trashbinFilename, "}${trashbinOriginalLocation == null ? "" : "trashbinOriginalLocation: $trashbinOriginalLocation, "}${trashbinDeletionTime == null ? "" : "trashbinDeletionTime: $trashbinDeletionTime, "}${metadata == null ? "" : "metadata: $metadata, "}${isArchived == null ? "" : "isArchived: $isArchived, "}${overrideDateTime == null ? "" : "overrideDateTime: $overrideDateTime, "}${location == null ? "" : "location: $location"}}";
|
||||
}
|
||||
}
|
|
@ -1,4 +1,7 @@
|
|||
import 'package:equatable/equatable.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'local_file.g.dart';
|
||||
|
||||
abstract class LocalFile with EquatableMixin {
|
||||
const LocalFile();
|
||||
|
@ -25,6 +28,7 @@ extension LocalFileExtension on LocalFile {
|
|||
}
|
||||
|
||||
/// A local file represented by its content uri on Android
|
||||
@ToString(ignoreNull: true)
|
||||
class LocalUriFile with EquatableMixin implements LocalFile {
|
||||
const LocalUriFile({
|
||||
required this.uri,
|
||||
|
@ -48,20 +52,7 @@ class LocalUriFile with EquatableMixin implements LocalFile {
|
|||
get identityHashCode => uri.hashCode;
|
||||
|
||||
@override
|
||||
toString() {
|
||||
var product = "$runtimeType {"
|
||||
"uri: $uri, "
|
||||
"displayName: $displayName, "
|
||||
"path: '$path', "
|
||||
"lastModified: $lastModified, ";
|
||||
if (mime != null) {
|
||||
product += "mime: $mime, ";
|
||||
}
|
||||
if (dateTaken != null) {
|
||||
product += "dateTaken: $dateTaken, ";
|
||||
}
|
||||
return product + "}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get logTag => path;
|
||||
|
|
14
app/lib/entity/local_file.g.dart
Normal file
14
app/lib/entity/local_file.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'local_file.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$LocalUriFileToString on LocalUriFile {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "LocalUriFile {uri: $uri, displayName: $displayName, path: $path, lastModified: $lastModified, ${mime == null ? "" : "mime: $mime, "}${dateTaken == null ? "" : "dateTaken: $dateTaken"}}";
|
||||
}
|
||||
}
|
|
@ -1,6 +1,10 @@
|
|||
import 'package:equatable/equatable.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'person.g.dart';
|
||||
|
||||
@toString
|
||||
class Person with EquatableMixin {
|
||||
const Person({
|
||||
required this.name,
|
||||
|
@ -9,11 +13,7 @@ class Person with EquatableMixin {
|
|||
});
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"name: '$name', "
|
||||
"thumbFaceId: '$thumbFaceId', "
|
||||
"count: '$count', "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
|
14
app/lib/entity/person.g.dart
Normal file
14
app/lib/entity/person.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'person.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$PersonToString on Person {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "Person {name: $name, thumbFaceId: $thumbFaceId, count: $count}";
|
||||
}
|
||||
}
|
|
@ -3,7 +3,11 @@ import 'package:nc_photos/entity/file.dart';
|
|||
import 'package:nc_photos/entity/file_util.dart' as file_util;
|
||||
import 'package:nc_photos/entity/sqlite_table_extension.dart' as sql;
|
||||
import 'package:nc_photos/iterable_extension.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'search.g.dart';
|
||||
|
||||
@toString
|
||||
class SearchCriteria {
|
||||
SearchCriteria(String input, this.filters) : input = input.trim();
|
||||
|
||||
|
@ -17,12 +21,10 @@ class SearchCriteria {
|
|||
);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"input: $input, "
|
||||
"filters: ${filters.toReadableString()}, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final String input;
|
||||
@Format(r"${$?.toReadableString()}")
|
||||
final List<SearchFilter> filters;
|
||||
}
|
||||
|
||||
|
@ -48,6 +50,7 @@ extension on SearchFileType {
|
|||
}
|
||||
}
|
||||
|
||||
@toString
|
||||
class SearchFileTypeFilter implements SearchFilter {
|
||||
const SearchFileTypeFilter(this.type);
|
||||
|
||||
|
@ -68,13 +71,12 @@ class SearchFileTypeFilter implements SearchFilter {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"type: ${type.name}, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final SearchFileType type;
|
||||
}
|
||||
|
||||
@toString
|
||||
class SearchFavoriteFilter implements SearchFilter {
|
||||
const SearchFavoriteFilter(this.value);
|
||||
|
||||
|
@ -87,9 +89,7 @@ class SearchFavoriteFilter implements SearchFilter {
|
|||
isSatisfy(File file) => (file.isFavorite ?? false) == value;
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"value: $value, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final bool value;
|
||||
}
|
||||
|
|
28
app/lib/entity/search.g.dart
Normal file
28
app/lib/entity/search.g.dart
Normal file
|
@ -0,0 +1,28 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'search.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$SearchCriteriaToString on SearchCriteria {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "SearchCriteria {input: $input, filters: ${filters.toReadableString()}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$SearchFileTypeFilterToString on SearchFileTypeFilter {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "SearchFileTypeFilter {type: ${type.name}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$SearchFavoriteFilterToString on SearchFavoriteFilter {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "SearchFavoriteFilter {value: $value}";
|
||||
}
|
||||
}
|
|
@ -4,6 +4,9 @@ import 'package:nc_photos/ci_string.dart';
|
|||
import 'package:nc_photos/entity/file.dart';
|
||||
import 'package:nc_photos/string_extension.dart';
|
||||
import 'package:path/path.dart' as path_lib;
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'share.g.dart';
|
||||
|
||||
enum ShareType {
|
||||
user,
|
||||
|
@ -84,6 +87,7 @@ extension ShareItemTypeExtension on ShareItemType {
|
|||
}
|
||||
}
|
||||
|
||||
@toString
|
||||
class Share with EquatableMixin {
|
||||
Share({
|
||||
required this.id,
|
||||
|
@ -102,23 +106,7 @@ class Share with EquatableMixin {
|
|||
}) : path = path.trimAny("/");
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"id: $id, "
|
||||
"shareType: $shareType, "
|
||||
"stime: $stime, "
|
||||
"uidOwner: $uidOwner, "
|
||||
"displaynameOwner: $displaynameOwner, "
|
||||
"uidFileOwner: $uidFileOwner, "
|
||||
"path: $path, "
|
||||
"itemType: $itemType, "
|
||||
"mimeType: $mimeType, "
|
||||
"itemSource: $itemSource, "
|
||||
"shareWith: $shareWith, "
|
||||
"shareWithDisplayName: $shareWithDisplayName, "
|
||||
"url: $url, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
|
14
app/lib/entity/share.g.dart
Normal file
14
app/lib/entity/share.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'share.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ShareToString on Share {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "Share {id: $id, shareType: ${shareType.name}, stime: $stime, uidOwner: $uidOwner, displaynameOwner: $displaynameOwner, uidFileOwner: $uidFileOwner, path: $path, itemType: ${itemType.name}, mimeType: $mimeType, itemSource: $itemSource, shareWith: $shareWith, shareWithDisplayName: $shareWithDisplayName, url: $url}";
|
||||
}
|
||||
}
|
|
@ -1,6 +1,9 @@
|
|||
import 'package:equatable/equatable.dart';
|
||||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/ci_string.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'sharee.g.dart';
|
||||
|
||||
enum ShareeType {
|
||||
user,
|
||||
|
@ -14,6 +17,7 @@ enum ShareeType {
|
|||
lookup,
|
||||
}
|
||||
|
||||
@ToString(ignoreNull: true)
|
||||
class Sharee with EquatableMixin {
|
||||
Sharee({
|
||||
required this.type,
|
||||
|
@ -24,17 +28,7 @@ class Sharee with EquatableMixin {
|
|||
});
|
||||
|
||||
@override
|
||||
toString() {
|
||||
var product = "$runtimeType {"
|
||||
"type: $type, "
|
||||
"label: $label, "
|
||||
"shareType: $shareType, "
|
||||
"shareWith: $shareWith, ";
|
||||
if (shareWithDisplayNameUnique != null) {
|
||||
product += "shareWithDisplayNameUnique: $shareWithDisplayNameUnique, ";
|
||||
}
|
||||
return product + "}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
|
14
app/lib/entity/sharee.g.dart
Normal file
14
app/lib/entity/sharee.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'sharee.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ShareeToString on Sharee {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "Sharee {type: ${type.name}, label: $label, shareType: $shareType, shareWith: $shareWith, ${shareWithDisplayNameUnique == null ? "" : "shareWithDisplayNameUnique: $shareWithDisplayNameUnique"}}";
|
||||
}
|
||||
}
|
|
@ -4,7 +4,11 @@ import 'package:nc_photos/entity/file.dart';
|
|||
import 'package:nc_photos/json_util.dart' as json_util;
|
||||
import 'package:nc_photos/or_null.dart';
|
||||
import 'package:nc_photos/type.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'tag.g.dart';
|
||||
|
||||
@ToString(ignoreNull: true)
|
||||
class Tag with EquatableMixin {
|
||||
const Tag({
|
||||
required this.id,
|
||||
|
@ -28,20 +32,7 @@ class Tag with EquatableMixin {
|
|||
};
|
||||
|
||||
@override
|
||||
toString() {
|
||||
final buffer = StringBuffer();
|
||||
buffer.write("$runtimeType {"
|
||||
"id: $id, "
|
||||
"displayName: '$displayName', ");
|
||||
if (userVisible != null) {
|
||||
buffer.write("userVisible: $userVisible, ");
|
||||
}
|
||||
if (userAssignable != null) {
|
||||
buffer.write("userAssignable: $userAssignable, ");
|
||||
}
|
||||
buffer.write("}");
|
||||
return buffer.toString();
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
Tag copyWith({
|
||||
int? id,
|
||||
|
|
14
app/lib/entity/tag.g.dart
Normal file
14
app/lib/entity/tag.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'tag.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$TagToString on Tag {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "Tag {id: $id, displayName: $displayName, ${userVisible == null ? "" : "userVisible: $userVisible, "}${userAssignable == null ? "" : "userAssignable: $userAssignable"}}";
|
||||
}
|
||||
}
|
|
@ -2,14 +2,16 @@ import 'package:equatable/equatable.dart';
|
|||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/entity/file.dart';
|
||||
import 'package:nc_photos/entity/tag.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'tagged_file.g.dart';
|
||||
|
||||
@toString
|
||||
class TaggedFile with EquatableMixin {
|
||||
const TaggedFile({required this.fileId});
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"fileId: '$fileId', "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
@override
|
||||
get props => [
|
||||
|
|
14
app/lib/entity/tagged_file.g.dart
Normal file
14
app/lib/entity/tagged_file.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'tagged_file.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$TaggedFileToString on TaggedFile {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "TaggedFile {fileId: $fileId}";
|
||||
}
|
||||
}
|
|
@ -6,20 +6,20 @@ import 'package:logging/logging.dart';
|
|||
import 'package:nc_photos/account.dart';
|
||||
import 'package:nc_photos/api/api.dart';
|
||||
import 'package:nc_photos/exception.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'app_password_exchange_bloc.g.dart';
|
||||
|
||||
abstract class AppPasswordExchangeBlocEvent {
|
||||
const AppPasswordExchangeBlocEvent();
|
||||
}
|
||||
|
||||
@toString
|
||||
class AppPasswordExchangeBlocConnect extends AppPasswordExchangeBlocEvent {
|
||||
const AppPasswordExchangeBlocConnect(this.account);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final Account account;
|
||||
}
|
||||
|
@ -32,28 +32,23 @@ class AppPasswordExchangeBlocInit extends AppPasswordExchangeBlocState {
|
|||
const AppPasswordExchangeBlocInit();
|
||||
}
|
||||
|
||||
@toString
|
||||
class AppPasswordExchangeBlocSuccess extends AppPasswordExchangeBlocState {
|
||||
const AppPasswordExchangeBlocSuccess(this.password);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"password: ${kDebugMode ? password : '***'}, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
@Format(r"${kDebugMode ? password : '***'}")
|
||||
final String password;
|
||||
}
|
||||
|
||||
@toString
|
||||
class AppPasswordExchangeBlocFailure extends AppPasswordExchangeBlocState {
|
||||
const AppPasswordExchangeBlocFailure(this.exception);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"exception: $exception, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
final dynamic exception;
|
||||
}
|
||||
|
|
31
app/lib/legacy/app_password_exchange_bloc.g.dart
Normal file
31
app/lib/legacy/app_password_exchange_bloc.g.dart
Normal file
|
@ -0,0 +1,31 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'app_password_exchange_bloc.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$AppPasswordExchangeBlocConnectToString
|
||||
on AppPasswordExchangeBlocConnect {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AppPasswordExchangeBlocConnect {account: $account}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AppPasswordExchangeBlocSuccessToString
|
||||
on AppPasswordExchangeBlocSuccess {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AppPasswordExchangeBlocSuccess {password: ${kDebugMode ? password : '***'}}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$AppPasswordExchangeBlocFailureToString
|
||||
on AppPasswordExchangeBlocFailure {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AppPasswordExchangeBlocFailure {exception: $exception}";
|
||||
}
|
||||
}
|
|
@ -11,19 +11,19 @@ import 'package:nc_photos/event/event.dart';
|
|||
import 'package:nc_photos/pref.dart';
|
||||
import 'package:nc_photos/reverse_geocoder.dart';
|
||||
import 'package:nc_photos/use_case/update_missing_metadata.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'metadata_task_manager.g.dart';
|
||||
|
||||
/// Task to update metadata for missing files
|
||||
@ToString(ignorePrivate: true)
|
||||
class MetadataTask {
|
||||
MetadataTask(this._c, this.account, this.pref) : assert(require(_c));
|
||||
|
||||
static bool require(DiContainer c) => DiContainer.has(c, DiType.fileRepo);
|
||||
|
||||
@override
|
||||
toString() {
|
||||
return "$runtimeType {"
|
||||
"account: $account, "
|
||||
"}";
|
||||
}
|
||||
String toString() => _$toString();
|
||||
|
||||
Future<void> call() async {
|
||||
try {
|
||||
|
@ -71,6 +71,7 @@ class MetadataTask {
|
|||
final DiContainer _c;
|
||||
|
||||
final Account account;
|
||||
@ignore
|
||||
final AccountPref pref;
|
||||
|
||||
static final _log = Logger("metadata_task_manager.MetadataTask");
|
||||
|
|
14
app/lib/metadata_task_manager.g.dart
Normal file
14
app/lib/metadata_task_manager.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'metadata_task_manager.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$MetadataTaskToString on MetadataTask {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "MetadataTask {account: $account}";
|
||||
}
|
||||
}
|
|
@ -1,12 +1,15 @@
|
|||
import 'package:device_info_plus/device_info_plus.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:memory_info/memory_info.dart';
|
||||
import 'package:nc_photos/double_extension.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'android_info.g.dart';
|
||||
|
||||
/// System info for Android
|
||||
///
|
||||
/// Only meaningful when running on Android. Must call [init] before accessing
|
||||
/// the data fields
|
||||
@toString
|
||||
class AndroidInfo {
|
||||
factory AndroidInfo() => _inst;
|
||||
|
||||
|
@ -30,10 +33,7 @@ class AndroidInfo {
|
|||
}
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"sdkInt: $sdkInt, "
|
||||
"totalMemMb: ${totalMemMb.toStringAsFixedTruncated(2)}, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
static late final AndroidInfo _inst;
|
||||
|
||||
|
|
14
app/lib/mobile/android/android_info.g.dart
Normal file
14
app/lib/mobile/android/android_info.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'android_info.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$AndroidInfoToString on AndroidInfo {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "AndroidInfo {sdkInt: $sdkInt, totalMemMb: ${totalMemMb.toStringAsFixed(3)}}";
|
||||
}
|
||||
}
|
|
@ -4,7 +4,11 @@ import 'package:equatable/equatable.dart';
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:nc_photos_plugin/nc_photos_plugin.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'content_uri_image_provider.g.dart';
|
||||
|
||||
@toString
|
||||
class ContentUriImage extends ImageProvider<ContentUriImage>
|
||||
with EquatableMixin {
|
||||
/// Creates an object that decodes a content Uri as an image.
|
||||
|
@ -52,10 +56,7 @@ class ContentUriImage extends ImageProvider<ContentUriImage>
|
|||
];
|
||||
|
||||
@override
|
||||
toString() => "${objectRuntimeType(this, "ContentUriImage")} {"
|
||||
"uri: $uri, "
|
||||
"scale: $scale, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final String uri;
|
||||
|
||||
|
|
14
app/lib/mobile/android/content_uri_image_provider.g.dart
Normal file
14
app/lib/mobile/android/content_uri_image_provider.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'content_uri_image_provider.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ContentUriImageToString on ContentUriImage {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ContentUriImage {uri: $uri, scale: ${scale.toStringAsFixed(3)}}";
|
||||
}
|
||||
}
|
|
@ -8,12 +8,14 @@ part of 'progress_util.dart';
|
|||
|
||||
extension _$IntProgressToString on IntProgress {
|
||||
String _$toString() {
|
||||
return "IntProgress {max: $max, step: $step, _current: $_current}";
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "IntProgress {max: $max, step: ${step.toStringAsFixed(3)}, _current: $_current}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$ProgressToString on Progress {
|
||||
String _$toString() {
|
||||
return "Progress {progress: $progress, ${text == null ? "" : "text: $text, "}}";
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "Progress {progress: ${progress.toStringAsFixed(3)}, ${text == null ? "" : "text: $text"}}";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,20 +8,17 @@ import 'package:nc_photos/math_util.dart' as math_util;
|
|||
import 'package:nc_photos/mobile/platform.dart'
|
||||
if (dart.library.html) 'package:nc_photos/web/platform.dart' as platform;
|
||||
import 'package:sqlite3/common.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'reverse_geocoder.g.dart';
|
||||
|
||||
@toString
|
||||
class ReverseGeocoderLocation {
|
||||
const ReverseGeocoderLocation(this.name, this.latitude, this.longitude,
|
||||
this.countryCode, this.admin1, this.admin2);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"name: $name, "
|
||||
"latitude: $latitude, "
|
||||
"longitude: $longitude, "
|
||||
"countryCode: $countryCode, "
|
||||
"admin1: $admin1, "
|
||||
"admin2: $admin2, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final String name;
|
||||
final double latitude;
|
||||
|
|
14
app/lib/reverse_geocoder.g.dart
Normal file
14
app/lib/reverse_geocoder.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'reverse_geocoder.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$ReverseGeocoderLocationToString on ReverseGeocoderLocation {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "ReverseGeocoderLocation {name: $name, latitude: ${latitude.toStringAsFixed(3)}, longitude: ${longitude.toStringAsFixed(3)}, countryCode: $countryCode, admin1: $admin1, admin2: $admin2}";
|
||||
}
|
||||
}
|
|
@ -5,18 +5,17 @@ import 'package:nc_photos/di_container.dart';
|
|||
import 'package:nc_photos/entity/sqlite_table.dart' as sql;
|
||||
import 'package:nc_photos/entity/sqlite_table_extension.dart' as sql;
|
||||
import 'package:nc_photos/location_util.dart' as location_util;
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'list_location_group.g.dart';
|
||||
|
||||
@toString
|
||||
class LocationGroup {
|
||||
const LocationGroup(
|
||||
this.place, this.countryCode, this.count, this.latestFileId);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"place: $place, "
|
||||
"countryCode: $countryCode, "
|
||||
"count: $count, "
|
||||
"latestFileId: $latestFileId, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final String place;
|
||||
final String countryCode;
|
||||
|
@ -24,17 +23,13 @@ class LocationGroup {
|
|||
final int latestFileId;
|
||||
}
|
||||
|
||||
@toString
|
||||
class LocationGroupResult {
|
||||
const LocationGroupResult(
|
||||
this.name, this.admin1, this.admin2, this.countryCode);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"name: List {length: ${name.length}}, "
|
||||
"admin1: List {length: ${admin1.length}}, "
|
||||
"admin2: List {length: ${admin2.length}}, "
|
||||
"countryCode: List {length: ${countryCode.length}}, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final List<LocationGroup> name;
|
||||
final List<LocationGroup> admin1;
|
||||
|
|
21
app/lib/use_case/list_location_group.g.dart
Normal file
21
app/lib/use_case/list_location_group.g.dart
Normal file
|
@ -0,0 +1,21 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'list_location_group.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$LocationGroupToString on LocationGroup {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "LocationGroup {place: $place, countryCode: $countryCode, count: $count, latestFileId: $latestFileId}";
|
||||
}
|
||||
}
|
||||
|
||||
extension _$LocationGroupResultToString on LocationGroupResult {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "LocationGroupResult {name: [length: ${name.length}], admin1: [length: ${admin1.length}], admin2: [length: ${admin2.length}], countryCode: [length: ${countryCode.length}]}";
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
||||
import 'package:kiwi/kiwi.dart';
|
||||
|
@ -43,6 +44,9 @@ import 'package:nc_photos/widget/share_album_dialog.dart';
|
|||
import 'package:nc_photos/widget/shared_album_info_dialog.dart';
|
||||
import 'package:nc_photos/widget/simple_input_dialog.dart';
|
||||
import 'package:nc_photos/widget/viewer.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'album_browser.g.dart';
|
||||
|
||||
class AlbumBrowserArguments {
|
||||
AlbumBrowserArguments(this.account, this.album);
|
||||
|
@ -892,6 +896,7 @@ enum _SelectionMenuOption {
|
|||
removeFromAlbum,
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class _ListItem implements SelectableItem, DraggableItem {
|
||||
const _ListItem({
|
||||
required this.index,
|
||||
|
@ -918,20 +923,23 @@ abstract class _ListItem implements SelectableItem, DraggableItem {
|
|||
buildDragFeedbackWidget(BuildContext context) => null;
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"index: $index, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final int index;
|
||||
|
||||
@ignore
|
||||
final VoidCallback? onTap;
|
||||
@override
|
||||
@ignore
|
||||
final DragTargetAccept<DraggableItem>? onDropBefore;
|
||||
@override
|
||||
@ignore
|
||||
final DragTargetAccept<DraggableItem>? onDropAfter;
|
||||
@override
|
||||
@ignore
|
||||
final VoidCallback? onDragStarted;
|
||||
@override
|
||||
@ignore
|
||||
final VoidCallback? onDragEndedAny;
|
||||
}
|
||||
|
||||
|
|
14
app/lib/widget/album_browser.g.dart
Normal file
14
app/lib/widget/album_browser.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'album_browser.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$_ListItemToString on _ListItem {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "_ListItem")} {index: $index}";
|
||||
}
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
||||
import 'package:kiwi/kiwi.dart';
|
||||
|
@ -36,6 +37,9 @@ import 'package:nc_photos/widget/photo_list_item.dart';
|
|||
import 'package:nc_photos/widget/photo_list_util.dart' as photo_list_util;
|
||||
import 'package:nc_photos/widget/selectable_item_stream_list_mixin.dart';
|
||||
import 'package:nc_photos/widget/viewer.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'dynamic_album_browser.g.dart';
|
||||
|
||||
class DynamicAlbumBrowserArguments {
|
||||
DynamicAlbumBrowserArguments(this.account, this.album);
|
||||
|
@ -679,6 +683,7 @@ enum _SelectionMenuOption {
|
|||
download,
|
||||
}
|
||||
|
||||
@toString
|
||||
abstract class _ListItem implements SelectableItem {
|
||||
const _ListItem({
|
||||
required this.index,
|
||||
|
@ -695,12 +700,11 @@ abstract class _ListItem implements SelectableItem {
|
|||
get staggeredTile => const StaggeredTile.count(1, 1);
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"index: $index, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final int index;
|
||||
|
||||
@ignore
|
||||
final VoidCallback? onTap;
|
||||
}
|
||||
|
||||
|
|
14
app/lib/widget/dynamic_album_browser.g.dart
Normal file
14
app/lib/widget/dynamic_album_browser.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'dynamic_album_browser.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$_ListItemToString on _ListItem {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "_ListItem")} {index: $index}";
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:cached_network_image_platform_interface/cached_network_image_platform_interface.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
@ -13,7 +14,11 @@ import 'package:nc_photos/k.dart' as k;
|
|||
import 'package:nc_photos/mobile/android/content_uri_image_provider.dart';
|
||||
import 'package:nc_photos/theme.dart';
|
||||
import 'package:nc_photos/widget/selectable_item_stream_list_mixin.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
|
||||
part 'photo_list_item.g.dart';
|
||||
|
||||
@toString
|
||||
abstract class PhotoListFileItem extends SelectableItem {
|
||||
const PhotoListFileItem({
|
||||
required this.fileIndex,
|
||||
|
@ -35,11 +40,7 @@ abstract class PhotoListFileItem extends SelectableItem {
|
|||
get hashCode => file.fdPath.hashCode;
|
||||
|
||||
@override
|
||||
toString() => "$runtimeType {"
|
||||
"fileIndex: $fileIndex, "
|
||||
"file: ${file.fdPath}, "
|
||||
"shouldShowFavoriteBadge: $shouldShowFavoriteBadge, "
|
||||
"}";
|
||||
String toString() => _$toString();
|
||||
|
||||
final int fileIndex;
|
||||
final FileDescriptor file;
|
||||
|
|
14
app/lib/widget/photo_list_item.g.dart
Normal file
14
app/lib/widget/photo_list_item.g.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'photo_list_item.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// ToStringGenerator
|
||||
// **************************************************************************
|
||||
|
||||
extension _$PhotoListFileItemToString on PhotoListFileItem {
|
||||
String _$toString() {
|
||||
// ignore: unnecessary_string_interpolations
|
||||
return "${objectRuntimeType(this, "PhotoListFileItem")} {fileIndex: $fileIndex, file: ${file.fdPath}, shouldShowFavoriteBadge: $shouldShowFavoriteBadge}";
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue