mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-25 08:24:43 +01:00
Fix new linter warnings
This commit is contained in:
parent
90b138a9cc
commit
4e8d8d6768
77 changed files with 213 additions and 297 deletions
|
@ -1,4 +1,4 @@
|
||||||
/// Helper functions working with remote Nextcloud server
|
// Helper functions working with remote Nextcloud server
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:clock/clock.dart';
|
import 'package:clock/clock.dart';
|
||||||
|
@ -131,7 +131,7 @@ String getAccountAvatarUrl(Account account, int size) =>
|
||||||
String getAccountAvatarUrlRelative(Account account, int size) =>
|
String getAccountAvatarUrlRelative(Account account, int size) =>
|
||||||
"avatar/${account.userId}/$size";
|
"avatar/${account.userId}/$size";
|
||||||
|
|
||||||
/// Initiate a login with Nextclouds login flow v2: https://docs.nextcloud.com/server/latest/developer_manual/client_apis/LoginFlow/index.html#login-flow-v2
|
/// Initiate a login with Nextcloud login flow v2: https://docs.nextcloud.com/server/latest/developer_manual/client_apis/LoginFlow/index.html#login-flow-v2
|
||||||
Future<InitiateLoginResponse> initiateLogin(Uri uri) async {
|
Future<InitiateLoginResponse> initiateLogin(Uri uri) async {
|
||||||
final response = await Api.fromBaseUrl(uri).request(
|
final response = await Api.fromBaseUrl(uri).request(
|
||||||
"POST",
|
"POST",
|
||||||
|
@ -151,7 +151,7 @@ Future<InitiateLoginResponse> initiateLogin(Uri uri) async {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Retrieve App Password after successful initiation of login with Nextclouds login flow v2: https://docs.nextcloud.com/server/latest/developer_manual/client_apis/LoginFlow/index.html#login-flow-v2
|
/// Retrieve App Password after successful initiation of login with Nextcloud login flow v2: https://docs.nextcloud.com/server/latest/developer_manual/client_apis/LoginFlow/index.html#login-flow-v2
|
||||||
Future<AppPasswordResponse> _getAppPassword(
|
Future<AppPasswordResponse> _getAppPassword(
|
||||||
InitiateLoginPollOptions options) async {
|
InitiateLoginPollOptions options) async {
|
||||||
Uri baseUrl;
|
Uri baseUrl;
|
||||||
|
|
|
@ -104,20 +104,17 @@ class HomeSearchSuggestionBlocInit extends HomeSearchSuggestionBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
class HomeSearchSuggestionBlocLoading extends HomeSearchSuggestionBlocState {
|
class HomeSearchSuggestionBlocLoading extends HomeSearchSuggestionBlocState {
|
||||||
const HomeSearchSuggestionBlocLoading(List<HomeSearchResult> results)
|
const HomeSearchSuggestionBlocLoading(super.results);
|
||||||
: super(results);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class HomeSearchSuggestionBlocSuccess extends HomeSearchSuggestionBlocState {
|
class HomeSearchSuggestionBlocSuccess extends HomeSearchSuggestionBlocState {
|
||||||
const HomeSearchSuggestionBlocSuccess(List<HomeSearchResult> results)
|
const HomeSearchSuggestionBlocSuccess(super.results);
|
||||||
: super(results);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@toString
|
@toString
|
||||||
class HomeSearchSuggestionBlocFailure extends HomeSearchSuggestionBlocState {
|
class HomeSearchSuggestionBlocFailure extends HomeSearchSuggestionBlocState {
|
||||||
const HomeSearchSuggestionBlocFailure(
|
const HomeSearchSuggestionBlocFailure(
|
||||||
List<HomeSearchTagResult> results, this.exception)
|
List<HomeSearchTagResult> super.results, this.exception);
|
||||||
: super(results);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => _$toString();
|
String toString() => _$toString();
|
||||||
|
|
|
@ -116,22 +116,17 @@ class ListAlbumShareOutlierBlocInit extends ListAlbumShareOutlierBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
class ListAlbumShareOutlierBlocLoading extends ListAlbumShareOutlierBlocState {
|
class ListAlbumShareOutlierBlocLoading extends ListAlbumShareOutlierBlocState {
|
||||||
const ListAlbumShareOutlierBlocLoading(
|
const ListAlbumShareOutlierBlocLoading(super.account, super.items);
|
||||||
Account? account, List<ListAlbumShareOutlierItem> items)
|
|
||||||
: super(account, items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ListAlbumShareOutlierBlocSuccess extends ListAlbumShareOutlierBlocState {
|
class ListAlbumShareOutlierBlocSuccess extends ListAlbumShareOutlierBlocState {
|
||||||
const ListAlbumShareOutlierBlocSuccess(
|
const ListAlbumShareOutlierBlocSuccess(super.account, super.items);
|
||||||
Account? account, List<ListAlbumShareOutlierItem> items)
|
|
||||||
: super(account, items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@toString
|
@toString
|
||||||
class ListAlbumShareOutlierBlocFailure extends ListAlbumShareOutlierBlocState {
|
class ListAlbumShareOutlierBlocFailure extends ListAlbumShareOutlierBlocState {
|
||||||
const ListAlbumShareOutlierBlocFailure(
|
const ListAlbumShareOutlierBlocFailure(
|
||||||
Account? account, List<ListAlbumShareOutlierItem> items, this.exception)
|
super.account, super.items, this.exception);
|
||||||
: super(account, items);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => _$toString();
|
String toString() => _$toString();
|
||||||
|
|
|
@ -58,20 +58,16 @@ class ListImportableAlbumBlocInit extends ListImportableAlbumBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
class ListImportableAlbumBlocLoading extends ListImportableAlbumBlocState {
|
class ListImportableAlbumBlocLoading extends ListImportableAlbumBlocState {
|
||||||
const ListImportableAlbumBlocLoading(List<ListImportableAlbumBlocItem> items)
|
const ListImportableAlbumBlocLoading(super.items);
|
||||||
: super(items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ListImportableAlbumBlocSuccess extends ListImportableAlbumBlocState {
|
class ListImportableAlbumBlocSuccess extends ListImportableAlbumBlocState {
|
||||||
const ListImportableAlbumBlocSuccess(List<ListImportableAlbumBlocItem> items)
|
const ListImportableAlbumBlocSuccess(super.items);
|
||||||
: super(items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@toString
|
@toString
|
||||||
class ListImportableAlbumBlocFailure extends ListImportableAlbumBlocState {
|
class ListImportableAlbumBlocFailure extends ListImportableAlbumBlocState {
|
||||||
const ListImportableAlbumBlocFailure(
|
const ListImportableAlbumBlocFailure(super.items, this.exception);
|
||||||
List<ListImportableAlbumBlocItem> items, this.exception)
|
|
||||||
: super(items);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => _$toString();
|
String toString() => _$toString();
|
||||||
|
|
|
@ -42,19 +42,16 @@ class ListTagBlocInit extends ListTagBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
class ListTagBlocLoading extends ListTagBlocState {
|
class ListTagBlocLoading extends ListTagBlocState {
|
||||||
const ListTagBlocLoading(Account? account, List<Tag> items)
|
const ListTagBlocLoading(super.account, super.items);
|
||||||
: super(account, items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class ListTagBlocSuccess extends ListTagBlocState {
|
class ListTagBlocSuccess extends ListTagBlocState {
|
||||||
const ListTagBlocSuccess(Account? account, List<Tag> items)
|
const ListTagBlocSuccess(super.account, super.items);
|
||||||
: super(account, items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@toString
|
@toString
|
||||||
class ListTagBlocFailure extends ListTagBlocState {
|
class ListTagBlocFailure extends ListTagBlocState {
|
||||||
const ListTagBlocFailure(Account? account, List<Tag> items, this.exception)
|
const ListTagBlocFailure(super.account, super.items, this.exception);
|
||||||
: super(account, items);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => _$toString();
|
String toString() => _$toString();
|
||||||
|
|
|
@ -106,20 +106,17 @@ class LsDirBlocInit extends LsDirBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
class LsDirBlocLoading extends LsDirBlocState {
|
class LsDirBlocLoading extends LsDirBlocState {
|
||||||
const LsDirBlocLoading(Account? account, File root, List<LsDirBlocItem> items)
|
const LsDirBlocLoading(super.account, super.root, super.items);
|
||||||
: super(account, root, items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class LsDirBlocSuccess extends LsDirBlocState {
|
class LsDirBlocSuccess extends LsDirBlocState {
|
||||||
const LsDirBlocSuccess(Account? account, File root, List<LsDirBlocItem> items)
|
const LsDirBlocSuccess(super.account, super.root, super.items);
|
||||||
: super(account, root, items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@toString
|
@toString
|
||||||
class LsDirBlocFailure extends LsDirBlocState {
|
class LsDirBlocFailure extends LsDirBlocState {
|
||||||
const LsDirBlocFailure(
|
const LsDirBlocFailure(
|
||||||
Account? account, File root, List<LsDirBlocItem> items, this.exception)
|
super.account, super.root, super.items, this.exception);
|
||||||
: super(account, root, items);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => _$toString();
|
String toString() => _$toString();
|
||||||
|
|
|
@ -54,20 +54,16 @@ class LsTrashbinBlocInit extends LsTrashbinBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
class LsTrashbinBlocLoading extends LsTrashbinBlocState {
|
class LsTrashbinBlocLoading extends LsTrashbinBlocState {
|
||||||
const LsTrashbinBlocLoading(Account? account, List<File> items)
|
const LsTrashbinBlocLoading(super.account, super.items);
|
||||||
: super(account, items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class LsTrashbinBlocSuccess extends LsTrashbinBlocState {
|
class LsTrashbinBlocSuccess extends LsTrashbinBlocState {
|
||||||
const LsTrashbinBlocSuccess(Account? account, List<File> items)
|
const LsTrashbinBlocSuccess(super.account, super.items);
|
||||||
: super(account, items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@toString
|
@toString
|
||||||
class LsTrashbinBlocFailure extends LsTrashbinBlocState {
|
class LsTrashbinBlocFailure extends LsTrashbinBlocState {
|
||||||
const LsTrashbinBlocFailure(
|
const LsTrashbinBlocFailure(super.account, super.items, this.exception);
|
||||||
Account? account, List<File> items, this.exception)
|
|
||||||
: super(account, items);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => _$toString();
|
String toString() => _$toString();
|
||||||
|
@ -78,8 +74,7 @@ class LsTrashbinBlocFailure extends LsTrashbinBlocState {
|
||||||
/// The state of this bloc is inconsistent. This typically means that the data
|
/// The state of this bloc is inconsistent. This typically means that the data
|
||||||
/// may have been changed externally
|
/// may have been changed externally
|
||||||
class LsTrashbinBlocInconsistent extends LsTrashbinBlocState {
|
class LsTrashbinBlocInconsistent extends LsTrashbinBlocState {
|
||||||
const LsTrashbinBlocInconsistent(Account? account, List<File> items)
|
const LsTrashbinBlocInconsistent(super.account, super.items);
|
||||||
: super(account, items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@npLog
|
@npLog
|
||||||
|
|
|
@ -53,17 +53,16 @@ class ScanLocalDirBlocInit extends ScanLocalDirBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
class ScanLocalDirBlocLoading extends ScanLocalDirBlocState {
|
class ScanLocalDirBlocLoading extends ScanLocalDirBlocState {
|
||||||
const ScanLocalDirBlocLoading(List<LocalFile> files) : super(files);
|
const ScanLocalDirBlocLoading(super.files);
|
||||||
}
|
}
|
||||||
|
|
||||||
class ScanLocalDirBlocSuccess extends ScanLocalDirBlocState {
|
class ScanLocalDirBlocSuccess extends ScanLocalDirBlocState {
|
||||||
const ScanLocalDirBlocSuccess(List<LocalFile> files) : super(files);
|
const ScanLocalDirBlocSuccess(super.files);
|
||||||
}
|
}
|
||||||
|
|
||||||
@toString
|
@toString
|
||||||
class ScanLocalDirBlocFailure extends ScanLocalDirBlocState {
|
class ScanLocalDirBlocFailure extends ScanLocalDirBlocState {
|
||||||
const ScanLocalDirBlocFailure(List<LocalFile> files, this.exception)
|
const ScanLocalDirBlocFailure(super.files, this.exception);
|
||||||
: super(files);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => _$toString();
|
String toString() => _$toString();
|
||||||
|
|
|
@ -66,22 +66,17 @@ class SearchBlocInit extends SearchBlocState {
|
||||||
}
|
}
|
||||||
|
|
||||||
class SearchBlocLoading extends SearchBlocState {
|
class SearchBlocLoading extends SearchBlocState {
|
||||||
const SearchBlocLoading(
|
const SearchBlocLoading(super.account, super.criteria, super.items);
|
||||||
Account? account, SearchCriteria criteria, List<FileDescriptor> items)
|
|
||||||
: super(account, criteria, items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class SearchBlocSuccess extends SearchBlocState {
|
class SearchBlocSuccess extends SearchBlocState {
|
||||||
const SearchBlocSuccess(
|
const SearchBlocSuccess(super.account, super.criteria, super.items);
|
||||||
Account? account, SearchCriteria criteria, List<FileDescriptor> items)
|
|
||||||
: super(account, criteria, items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@toString
|
@toString
|
||||||
class SearchBlocFailure extends SearchBlocState {
|
class SearchBlocFailure extends SearchBlocState {
|
||||||
const SearchBlocFailure(Account? account, SearchCriteria criteria,
|
const SearchBlocFailure(
|
||||||
List<FileDescriptor> items, this.exception)
|
super.account, super.criteria, super.items, this.exception);
|
||||||
: super(account, criteria, items);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String toString() => _$toString();
|
String toString() => _$toString();
|
||||||
|
@ -92,9 +87,7 @@ class SearchBlocFailure extends SearchBlocState {
|
||||||
/// The state of this bloc is inconsistent. This typically means that the data
|
/// The state of this bloc is inconsistent. This typically means that the data
|
||||||
/// may have been changed externally
|
/// may have been changed externally
|
||||||
class SearchBlocInconsistent extends SearchBlocState {
|
class SearchBlocInconsistent extends SearchBlocState {
|
||||||
const SearchBlocInconsistent(
|
const SearchBlocInconsistent(super.account, super.criteria, super.items);
|
||||||
Account? account, SearchCriteria criteria, List<FileDescriptor> items)
|
|
||||||
: super(account, criteria, items);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@npLog
|
@npLog
|
||||||
|
|
|
@ -51,11 +51,11 @@ class SearchSuggestionBlocInit<T> extends SearchSuggestionBlocState<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
class SearchSuggestionBlocLoading<T> extends SearchSuggestionBlocState<T> {
|
class SearchSuggestionBlocLoading<T> extends SearchSuggestionBlocState<T> {
|
||||||
const SearchSuggestionBlocLoading(List<T> results) : super(results);
|
const SearchSuggestionBlocLoading(super.results);
|
||||||
}
|
}
|
||||||
|
|
||||||
class SearchSuggestionBlocSuccess<T> extends SearchSuggestionBlocState<T> {
|
class SearchSuggestionBlocSuccess<T> extends SearchSuggestionBlocState<T> {
|
||||||
const SearchSuggestionBlocSuccess(List<T> results) : super(results);
|
const SearchSuggestionBlocSuccess(super.results);
|
||||||
}
|
}
|
||||||
|
|
||||||
@npLog
|
@npLog
|
||||||
|
|
|
@ -128,10 +128,10 @@ class AlbumFileItem extends AlbumItem {
|
||||||
@toString
|
@toString
|
||||||
class AlbumLabelItem extends AlbumItem {
|
class AlbumLabelItem extends AlbumItem {
|
||||||
AlbumLabelItem({
|
AlbumLabelItem({
|
||||||
required CiString addedBy,
|
required super.addedBy,
|
||||||
required DateTime addedAt,
|
required super.addedAt,
|
||||||
required this.text,
|
required this.text,
|
||||||
}) : super(addedBy: addedBy, addedAt: addedAt);
|
});
|
||||||
|
|
||||||
factory AlbumLabelItem.fromJson(
|
factory AlbumLabelItem.fromJson(
|
||||||
JsonObj json, CiString addedBy, DateTime addedAt) {
|
JsonObj json, CiString addedBy, DateTime addedAt) {
|
||||||
|
|
|
@ -98,12 +98,9 @@ abstract class AlbumProviderBase extends AlbumProvider {
|
||||||
@ToString(extraParams: r"{bool isDeep = false}")
|
@ToString(extraParams: r"{bool isDeep = false}")
|
||||||
class AlbumStaticProvider extends AlbumProviderBase {
|
class AlbumStaticProvider extends AlbumProviderBase {
|
||||||
AlbumStaticProvider({
|
AlbumStaticProvider({
|
||||||
DateTime? latestItemTime,
|
super.latestItemTime,
|
||||||
required List<AlbumItem> items,
|
required List<AlbumItem> items,
|
||||||
}) : items = UnmodifiableListView(items),
|
}) : items = UnmodifiableListView(items);
|
||||||
super(
|
|
||||||
latestItemTime: latestItemTime,
|
|
||||||
);
|
|
||||||
|
|
||||||
factory AlbumStaticProvider.fromJson(JsonObj json) {
|
factory AlbumStaticProvider.fromJson(JsonObj json) {
|
||||||
return AlbumStaticProvider(
|
return AlbumStaticProvider(
|
||||||
|
@ -157,18 +154,16 @@ class AlbumStaticProvider extends AlbumProviderBase {
|
||||||
|
|
||||||
abstract class AlbumDynamicProvider extends AlbumProviderBase {
|
abstract class AlbumDynamicProvider extends AlbumProviderBase {
|
||||||
AlbumDynamicProvider({
|
AlbumDynamicProvider({
|
||||||
DateTime? latestItemTime,
|
super.latestItemTime,
|
||||||
}) : super(latestItemTime: latestItemTime);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ToString(extraParams: r"{bool isDeep = false}")
|
@ToString(extraParams: r"{bool isDeep = false}")
|
||||||
class AlbumDirProvider extends AlbumDynamicProvider {
|
class AlbumDirProvider extends AlbumDynamicProvider {
|
||||||
AlbumDirProvider({
|
AlbumDirProvider({
|
||||||
required this.dirs,
|
required this.dirs,
|
||||||
DateTime? latestItemTime,
|
super.latestItemTime,
|
||||||
}) : super(
|
});
|
||||||
latestItemTime: latestItemTime,
|
|
||||||
);
|
|
||||||
|
|
||||||
factory AlbumDirProvider.fromJson(JsonObj json) {
|
factory AlbumDirProvider.fromJson(JsonObj json) {
|
||||||
return AlbumDirProvider(
|
return AlbumDirProvider(
|
||||||
|
@ -220,8 +215,8 @@ class AlbumDirProvider extends AlbumDynamicProvider {
|
||||||
class AlbumTagProvider extends AlbumDynamicProvider {
|
class AlbumTagProvider extends AlbumDynamicProvider {
|
||||||
AlbumTagProvider({
|
AlbumTagProvider({
|
||||||
required this.tags,
|
required this.tags,
|
||||||
DateTime? latestItemTime,
|
super.latestItemTime,
|
||||||
}) : super(latestItemTime: latestItemTime);
|
});
|
||||||
|
|
||||||
factory AlbumTagProvider.fromJson(JsonObj json) => AlbumTagProvider(
|
factory AlbumTagProvider.fromJson(JsonObj json) => AlbumTagProvider(
|
||||||
latestItemTime: json["latestItemTime"] == null
|
latestItemTime: json["latestItemTime"] == null
|
||||||
|
|
|
@ -145,8 +145,8 @@ abstract class AlbumReversibleSortProvider extends AlbumSortProvider {
|
||||||
@toString
|
@toString
|
||||||
class AlbumTimeSortProvider extends AlbumReversibleSortProvider {
|
class AlbumTimeSortProvider extends AlbumReversibleSortProvider {
|
||||||
const AlbumTimeSortProvider({
|
const AlbumTimeSortProvider({
|
||||||
required bool isAscending,
|
required super.isAscending,
|
||||||
}) : super(isAscending: isAscending);
|
});
|
||||||
|
|
||||||
factory AlbumTimeSortProvider.fromJson(JsonObj json) {
|
factory AlbumTimeSortProvider.fromJson(JsonObj json) {
|
||||||
return AlbumTimeSortProvider(
|
return AlbumTimeSortProvider(
|
||||||
|
@ -164,8 +164,8 @@ class AlbumTimeSortProvider extends AlbumReversibleSortProvider {
|
||||||
@toString
|
@toString
|
||||||
class AlbumFilenameSortProvider extends AlbumReversibleSortProvider {
|
class AlbumFilenameSortProvider extends AlbumReversibleSortProvider {
|
||||||
const AlbumFilenameSortProvider({
|
const AlbumFilenameSortProvider({
|
||||||
required bool isAscending,
|
required super.isAscending,
|
||||||
}) : super(isAscending: isAscending);
|
});
|
||||||
|
|
||||||
factory AlbumFilenameSortProvider.fromJson(JsonObj json) {
|
factory AlbumFilenameSortProvider.fromJson(JsonObj json) {
|
||||||
return AlbumFilenameSortProvider(
|
return AlbumFilenameSortProvider(
|
||||||
|
|
|
@ -30,17 +30,17 @@ abstract class CollectionAdapter {
|
||||||
static CollectionAdapter of(
|
static CollectionAdapter of(
|
||||||
DiContainer c, Account account, Collection collection) {
|
DiContainer c, Account account, Collection collection) {
|
||||||
switch (collection.contentProvider.runtimeType) {
|
switch (collection.contentProvider.runtimeType) {
|
||||||
case CollectionAlbumProvider:
|
case const (CollectionAlbumProvider):
|
||||||
return CollectionAlbumAdapter(c, account, collection);
|
return CollectionAlbumAdapter(c, account, collection);
|
||||||
case CollectionLocationGroupProvider:
|
case const (CollectionLocationGroupProvider):
|
||||||
return CollectionLocationGroupAdapter(c, account, collection);
|
return CollectionLocationGroupAdapter(c, account, collection);
|
||||||
case CollectionMemoryProvider:
|
case const (CollectionMemoryProvider):
|
||||||
return CollectionMemoryAdapter(c, account, collection);
|
return CollectionMemoryAdapter(c, account, collection);
|
||||||
case CollectionNcAlbumProvider:
|
case const (CollectionNcAlbumProvider):
|
||||||
return CollectionNcAlbumAdapter(c, account, collection);
|
return CollectionNcAlbumAdapter(c, account, collection);
|
||||||
case CollectionPersonProvider:
|
case const (CollectionPersonProvider):
|
||||||
return CollectionPersonAdapter(c, account, collection);
|
return CollectionPersonAdapter(c, account, collection);
|
||||||
case CollectionTagProvider:
|
case const (CollectionTagProvider):
|
||||||
return CollectionTagAdapter(c, account, collection);
|
return CollectionTagAdapter(c, account, collection);
|
||||||
default:
|
default:
|
||||||
throw UnsupportedError(
|
throw UnsupportedError(
|
||||||
|
|
|
@ -12,9 +12,9 @@ abstract class PersonAdapter {
|
||||||
|
|
||||||
static PersonAdapter of(DiContainer c, Account account, Person person) {
|
static PersonAdapter of(DiContainer c, Account account, Person person) {
|
||||||
switch (person.contentProvider.runtimeType) {
|
switch (person.contentProvider.runtimeType) {
|
||||||
case PersonFaceRecognitionProvider:
|
case const (PersonFaceRecognitionProvider):
|
||||||
return PersonFaceRecognitionAdapter(c, account, person);
|
return PersonFaceRecognitionAdapter(c, account, person);
|
||||||
case PersonRecognizeProvider:
|
case const (PersonRecognizeProvider):
|
||||||
return PersonRecognizeAdapter(c, account, person);
|
return PersonRecognizeAdapter(c, account, person);
|
||||||
default:
|
default:
|
||||||
throw UnsupportedError(
|
throw UnsupportedError(
|
||||||
|
|
|
@ -38,9 +38,9 @@ class Connect extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const Connect({
|
const Connect({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
Connect.fromArgs(ConnectArguments args, {Key? key})
|
Connect.fromArgs(ConnectArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
@ -248,9 +248,8 @@ class _ConnectState extends State<Connect> {
|
||||||
|
|
||||||
class _WebDavUrlDialog extends StatefulWidget {
|
class _WebDavUrlDialog extends StatefulWidget {
|
||||||
const _WebDavUrlDialog({
|
const _WebDavUrlDialog({
|
||||||
Key? key,
|
|
||||||
required this.account,
|
required this.account,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _WebDavUrlDialogState();
|
createState() => _WebDavUrlDialogState();
|
||||||
|
|
|
@ -25,9 +25,7 @@ part 'sign_in.g.dart';
|
||||||
class SignIn extends StatefulWidget {
|
class SignIn extends StatefulWidget {
|
||||||
static const routeName = "/sign-in-legacy";
|
static const routeName = "/sign-in-legacy";
|
||||||
|
|
||||||
const SignIn({
|
const SignIn({super.key});
|
||||||
Key? key,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _SignInState();
|
createState() => _SignInState();
|
||||||
|
|
|
@ -2,9 +2,7 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:nc_photos/app_localizations.dart';
|
import 'package:nc_photos/app_localizations.dart';
|
||||||
|
|
||||||
class AboutGeocodingDialog extends StatelessWidget {
|
class AboutGeocodingDialog extends StatelessWidget {
|
||||||
const AboutGeocodingDialog({
|
const AboutGeocodingDialog({super.key});
|
||||||
Key? key,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
|
|
@ -28,9 +28,9 @@ class AlbumDirPicker extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const AlbumDirPicker({
|
const AlbumDirPicker({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
AlbumDirPicker.fromArgs(AlbumDirPickerArguments args, {Key? key})
|
AlbumDirPicker.fromArgs(AlbumDirPickerArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
|
|
@ -42,9 +42,9 @@ class AlbumImporter extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const AlbumImporter({
|
const AlbumImporter({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
AlbumImporter.fromArgs(AlbumImporterArguments args, {Key? key})
|
AlbumImporter.fromArgs(AlbumImporterArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
|
|
@ -40,10 +40,10 @@ class AlbumShareOutlierBrowser extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const AlbumShareOutlierBrowser({
|
const AlbumShareOutlierBrowser({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.album,
|
required this.album,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
AlbumShareOutlierBrowser.fromArgs(AlbumShareOutlierBrowserArguments args,
|
AlbumShareOutlierBrowser.fromArgs(AlbumShareOutlierBrowserArguments args,
|
||||||
{Key? key})
|
{Key? key})
|
||||||
|
|
|
@ -59,8 +59,7 @@ class BorderSideTween extends Tween<BorderSide?> {
|
||||||
/// The [begin] and [end] properties must be non-null before the tween is
|
/// The [begin] and [end] properties must be non-null before the tween is
|
||||||
/// first used, but the arguments can be null if the values are going to be
|
/// first used, but the arguments can be null if the values are going to be
|
||||||
/// filled in later.
|
/// filled in later.
|
||||||
BorderSideTween({BorderSide? begin, BorderSide? end})
|
BorderSideTween({super.begin, super.end});
|
||||||
: super(begin: begin, end: end);
|
|
||||||
|
|
||||||
/// Returns the value this variable has at the given animation clock value.
|
/// Returns the value this variable has at the given animation clock value.
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -34,9 +34,9 @@ class Changelog extends StatelessWidget {
|
||||||
_changelogs.keys.first > fromVersion;
|
_changelogs.keys.first > fromVersion;
|
||||||
|
|
||||||
const Changelog({
|
const Changelog({
|
||||||
Key? key,
|
super.key,
|
||||||
this.fromVersion,
|
this.fromVersion,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
Changelog.fromArgs(ChangelogArguments args, {Key? key})
|
Changelog.fromArgs(ChangelogArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
|
|
@ -2,13 +2,13 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class CollectionGridItem extends StatelessWidget {
|
class CollectionGridItem extends StatelessWidget {
|
||||||
const CollectionGridItem({
|
const CollectionGridItem({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.cover,
|
required this.cover,
|
||||||
required this.title,
|
required this.title,
|
||||||
this.subtitle,
|
this.subtitle,
|
||||||
this.subtitle2,
|
this.subtitle2,
|
||||||
this.icon,
|
this.icon,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
|
@ -39,9 +39,9 @@ class Connect extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const Connect({
|
const Connect({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.uri,
|
required this.uri,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
Connect.fromArgs(ConnectArguments args, {Key? key})
|
Connect.fromArgs(ConnectArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
@ -303,9 +303,8 @@ class _ConnectState extends State<Connect> {
|
||||||
|
|
||||||
class _WebDavUrlDialog extends StatefulWidget {
|
class _WebDavUrlDialog extends StatefulWidget {
|
||||||
const _WebDavUrlDialog({
|
const _WebDavUrlDialog({
|
||||||
Key? key,
|
|
||||||
required this.account,
|
required this.account,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _WebDavUrlDialogState();
|
createState() => _WebDavUrlDialogState();
|
||||||
|
|
|
@ -5,10 +5,10 @@ import 'package:flutter/material.dart';
|
||||||
/// Scaffold is needed for [SnackBar] to show correctly on top of a dialog
|
/// Scaffold is needed for [SnackBar] to show correctly on top of a dialog
|
||||||
class DialogScaffold extends StatelessWidget {
|
class DialogScaffold extends StatelessWidget {
|
||||||
const DialogScaffold({
|
const DialogScaffold({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.body,
|
required this.body,
|
||||||
this.canPop = true,
|
this.canPop = true,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
|
|
@ -21,14 +21,14 @@ part 'dir_picker.g.dart';
|
||||||
|
|
||||||
class DirPicker extends StatefulWidget {
|
class DirPicker extends StatefulWidget {
|
||||||
const DirPicker({
|
const DirPicker({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.strippedRootDir,
|
required this.strippedRootDir,
|
||||||
this.initialPicks,
|
this.initialPicks,
|
||||||
this.isMultipleSelections = true,
|
this.isMultipleSelections = true,
|
||||||
this.validator,
|
this.validator,
|
||||||
this.onConfirmed,
|
this.onConfirmed,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => DirPickerState();
|
createState() => DirPickerState();
|
||||||
|
|
|
@ -7,7 +7,7 @@ part 'draggable.g.dart';
|
||||||
@npLog
|
@npLog
|
||||||
class Draggable<T extends Object> extends StatelessWidget {
|
class Draggable<T extends Object> extends StatelessWidget {
|
||||||
const Draggable({
|
const Draggable({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.data,
|
required this.data,
|
||||||
required this.child,
|
required this.child,
|
||||||
this.feedback,
|
this.feedback,
|
||||||
|
@ -16,7 +16,7 @@ class Draggable<T extends Object> extends StatelessWidget {
|
||||||
this.onDragStarted,
|
this.onDragStarted,
|
||||||
this.onDragEndedAny,
|
this.onDragEndedAny,
|
||||||
this.feedbackSize,
|
this.feedbackSize,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
|
|
@ -3,10 +3,10 @@ import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
class EmptyListIndicator extends StatelessWidget {
|
class EmptyListIndicator extends StatelessWidget {
|
||||||
const EmptyListIndicator({
|
const EmptyListIndicator({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.icon,
|
required this.icon,
|
||||||
required this.text,
|
required this.text,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
|
|
@ -48,9 +48,9 @@ class EnhancedPhotoBrowser extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const EnhancedPhotoBrowser({
|
const EnhancedPhotoBrowser({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.filename,
|
required this.filename,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
EnhancedPhotoBrowser.fromArgs(EnhancedPhotoBrowserArguments args, {Key? key})
|
EnhancedPhotoBrowser.fromArgs(EnhancedPhotoBrowserArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
|
|
@ -41,9 +41,9 @@ class Home extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const Home({
|
const Home({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
Home.fromArgs(HomeArguments args, {Key? key})
|
Home.fromArgs(HomeArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
|
|
@ -13,13 +13,13 @@ import 'package:np_ui/np_ui.dart';
|
||||||
/// AppBar for home screens
|
/// AppBar for home screens
|
||||||
class HomeSliverAppBar extends StatelessWidget {
|
class HomeSliverAppBar extends StatelessWidget {
|
||||||
const HomeSliverAppBar({
|
const HomeSliverAppBar({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
this.actions,
|
this.actions,
|
||||||
this.menuActions,
|
this.menuActions,
|
||||||
this.onSelectedMenuActions,
|
this.onSelectedMenuActions,
|
||||||
this.isShowProgressIcon = false,
|
this.isShowProgressIcon = false,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
|
@ -44,9 +44,9 @@ part 'home_search.g.dart';
|
||||||
|
|
||||||
class HomeSearch extends StatefulWidget {
|
class HomeSearch extends StatefulWidget {
|
||||||
const HomeSearch({
|
const HomeSearch({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _HomeSearchState();
|
createState() => _HomeSearchState();
|
||||||
|
@ -609,10 +609,9 @@ extension on SearchFileType {
|
||||||
|
|
||||||
class _FilterBubbleList extends StatelessWidget {
|
class _FilterBubbleList extends StatelessWidget {
|
||||||
const _FilterBubbleList({
|
const _FilterBubbleList({
|
||||||
Key? key,
|
|
||||||
required this.filters,
|
required this.filters,
|
||||||
this.onEditPressed,
|
this.onEditPressed,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
@ -681,9 +680,8 @@ class _FilterBubbleList extends StatelessWidget {
|
||||||
|
|
||||||
class _FilterEditDialog extends StatefulWidget {
|
class _FilterEditDialog extends StatefulWidget {
|
||||||
const _FilterEditDialog({
|
const _FilterEditDialog({
|
||||||
Key? key,
|
|
||||||
required this.searchState,
|
required this.searchState,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _FilterEditDialogState();
|
createState() => _FilterEditDialogState();
|
||||||
|
@ -763,14 +761,13 @@ class _FilterEditFormValue {
|
||||||
|
|
||||||
class _FilterDropdown<T> extends StatefulWidget {
|
class _FilterDropdown<T> extends StatefulWidget {
|
||||||
const _FilterDropdown({
|
const _FilterDropdown({
|
||||||
Key? key,
|
|
||||||
required this.label,
|
required this.label,
|
||||||
required this.items,
|
required this.items,
|
||||||
required this.itemStringifier,
|
required this.itemStringifier,
|
||||||
this.initialValue,
|
this.initialValue,
|
||||||
this.onValueChanged,
|
this.onValueChanged,
|
||||||
this.onSaved,
|
this.onSaved,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _FilterDropdownState<T>();
|
createState() => _FilterDropdownState<T>();
|
||||||
|
|
|
@ -30,10 +30,10 @@ class HomeSearchSuggestionController {
|
||||||
|
|
||||||
class HomeSearchSuggestion extends StatefulWidget {
|
class HomeSearchSuggestion extends StatefulWidget {
|
||||||
const HomeSearchSuggestion({
|
const HomeSearchSuggestion({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.controller,
|
required this.controller,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _HomeSearchSuggestionState();
|
createState() => _HomeSearchSuggestionState();
|
||||||
|
|
|
@ -6,7 +6,7 @@ import 'package:np_platform_util/np_platform_util.dart';
|
||||||
|
|
||||||
class HorizontalPageViewer extends StatefulWidget {
|
class HorizontalPageViewer extends StatefulWidget {
|
||||||
HorizontalPageViewer({
|
HorizontalPageViewer({
|
||||||
Key? key,
|
super.key,
|
||||||
this.pageCount,
|
this.pageCount,
|
||||||
required this.pageBuilder,
|
required this.pageBuilder,
|
||||||
this.initialPage = 0,
|
this.initialPage = 0,
|
||||||
|
@ -14,8 +14,7 @@ class HorizontalPageViewer extends StatefulWidget {
|
||||||
this.viewportFraction = 1,
|
this.viewportFraction = 1,
|
||||||
this.canSwitchPage = true,
|
this.canSwitchPage = true,
|
||||||
this.onPageChanged,
|
this.onPageChanged,
|
||||||
}) : controller = controller ?? HorizontalPageViewerController(),
|
}) : controller = controller ?? HorizontalPageViewerController();
|
||||||
super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _HorizontalPageViewerState();
|
createState() => _HorizontalPageViewerState();
|
||||||
|
@ -91,10 +90,9 @@ class _HorizontalPageViewerState extends State<HorizontalPageViewer> {
|
||||||
controller: widget.controller._pageController,
|
controller: widget.controller._pageController,
|
||||||
itemCount: widget.pageCount,
|
itemCount: widget.pageCount,
|
||||||
itemBuilder: widget.pageBuilder,
|
itemBuilder: widget.pageBuilder,
|
||||||
physics:
|
physics: getRawPlatform() != NpPlatform.web && widget.canSwitchPage
|
||||||
getRawPlatform() != NpPlatform.web && widget.canSwitchPage
|
? null
|
||||||
? null
|
: const NeverScrollableScrollPhysics(),
|
||||||
: const NeverScrollableScrollPhysics(),
|
|
||||||
),
|
),
|
||||||
if (getRawPlatform() == NpPlatform.web)
|
if (getRawPlatform() == NpPlatform.web)
|
||||||
..._buildNavigationButtons(context),
|
..._buildNavigationButtons(context),
|
||||||
|
|
|
@ -41,10 +41,10 @@ class ImageEditor extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const ImageEditor({
|
const ImageEditor({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.file,
|
required this.file,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
ImageEditor.fromArgs(ImageEditorArguments args, {Key? key})
|
ImageEditor.fromArgs(ImageEditorArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
@ -351,12 +351,11 @@ enum _ToolType {
|
||||||
|
|
||||||
class _ToolButton extends StatelessWidget {
|
class _ToolButton extends StatelessWidget {
|
||||||
const _ToolButton({
|
const _ToolButton({
|
||||||
Key? key,
|
|
||||||
required this.icon,
|
required this.icon,
|
||||||
required this.label,
|
required this.label,
|
||||||
required this.onPressed,
|
required this.onPressed,
|
||||||
this.isSelected = false,
|
this.isSelected = false,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
|
|
@ -25,10 +25,10 @@ abstract class ColorArguments {
|
||||||
|
|
||||||
class ColorToolbar extends StatefulWidget {
|
class ColorToolbar extends StatefulWidget {
|
||||||
const ColorToolbar({
|
const ColorToolbar({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.initialState,
|
required this.initialState,
|
||||||
required this.onActiveFiltersChanged,
|
required this.onActiveFiltersChanged,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _ColorToolbarState();
|
createState() => _ColorToolbarState();
|
||||||
|
|
|
@ -15,11 +15,11 @@ part 'crop_controller.g.dart';
|
||||||
/// This widget only work when width == device width!
|
/// This widget only work when width == device width!
|
||||||
class CropController extends StatelessWidget {
|
class CropController extends StatelessWidget {
|
||||||
const CropController({
|
const CropController({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.image,
|
required this.image,
|
||||||
required this.initialState,
|
required this.initialState,
|
||||||
this.onCropChanged,
|
this.onCropChanged,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -41,11 +41,10 @@ class CropController extends StatelessWidget {
|
||||||
|
|
||||||
class _WrappedCropController extends StatefulWidget {
|
class _WrappedCropController extends StatefulWidget {
|
||||||
const _WrappedCropController({
|
const _WrappedCropController({
|
||||||
Key? key,
|
|
||||||
required this.image,
|
required this.image,
|
||||||
required this.initialState,
|
required this.initialState,
|
||||||
this.onCropChanged,
|
this.onCropChanged,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<StatefulWidget> createState() => _WrappedCropControllerState();
|
State<StatefulWidget> createState() => _WrappedCropControllerState();
|
||||||
|
@ -429,7 +428,7 @@ class _WrappedCropControllerState extends State<_WrappedCropController> {
|
||||||
class _TouchDot extends StatelessWidget {
|
class _TouchDot extends StatelessWidget {
|
||||||
static const double size = 24;
|
static const double size = 24;
|
||||||
|
|
||||||
const _TouchDot({Key? key}) : super(key: key);
|
const _TouchDot();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
|
|
@ -9,13 +9,13 @@ import 'package:np_ui/np_ui.dart';
|
||||||
/// current order.
|
/// current order.
|
||||||
class ToolbarButton extends StatelessWidget {
|
class ToolbarButton extends StatelessWidget {
|
||||||
const ToolbarButton({
|
const ToolbarButton({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.icon,
|
required this.icon,
|
||||||
required this.label,
|
required this.label,
|
||||||
required this.onPressed,
|
required this.onPressed,
|
||||||
this.isSelected = false,
|
this.isSelected = false,
|
||||||
this.activationOrder,
|
this.activationOrder,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
|
|
@ -16,12 +16,12 @@ abstract class TransformArguments {
|
||||||
|
|
||||||
class TransformToolbar extends StatefulWidget {
|
class TransformToolbar extends StatefulWidget {
|
||||||
const TransformToolbar({
|
const TransformToolbar({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.initialState,
|
required this.initialState,
|
||||||
required this.onActiveFiltersChanged,
|
required this.onActiveFiltersChanged,
|
||||||
required this.isCropModeChanged,
|
required this.isCropModeChanged,
|
||||||
required this.onCropToolDeactivated,
|
required this.onCropToolDeactivated,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _TransformToolbarState();
|
createState() => _TransformToolbarState();
|
||||||
|
@ -243,11 +243,10 @@ class _OrientationArguments implements TransformArguments {
|
||||||
|
|
||||||
class _OrientationButton extends StatelessWidget {
|
class _OrientationButton extends StatelessWidget {
|
||||||
const _OrientationButton({
|
const _OrientationButton({
|
||||||
Key? key,
|
|
||||||
required this.label,
|
required this.label,
|
||||||
required this.onPressed,
|
required this.onPressed,
|
||||||
this.isSelected = false,
|
this.isSelected = false,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
|
|
@ -871,9 +871,7 @@ class _StylePickerResult {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _StylePicker extends StatefulWidget {
|
class _StylePicker extends StatefulWidget {
|
||||||
const _StylePicker({
|
const _StylePicker();
|
||||||
Key? key,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _StylePickerState();
|
createState() => _StylePickerState();
|
||||||
|
|
|
@ -20,14 +20,14 @@ part 'image_viewer.g.dart';
|
||||||
|
|
||||||
class LocalImageViewer extends StatefulWidget {
|
class LocalImageViewer extends StatefulWidget {
|
||||||
const LocalImageViewer({
|
const LocalImageViewer({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.file,
|
required this.file,
|
||||||
required this.canZoom,
|
required this.canZoom,
|
||||||
this.onLoaded,
|
this.onLoaded,
|
||||||
this.onHeightChanged,
|
this.onHeightChanged,
|
||||||
this.onZoomStarted,
|
this.onZoomStarted,
|
||||||
this.onZoomEnded,
|
this.onZoomEnded,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _LocalImageViewerState();
|
createState() => _LocalImageViewerState();
|
||||||
|
@ -82,7 +82,7 @@ class _LocalImageViewerState extends State<LocalImageViewer> {
|
||||||
|
|
||||||
class RemoteImageViewer extends StatefulWidget {
|
class RemoteImageViewer extends StatefulWidget {
|
||||||
const RemoteImageViewer({
|
const RemoteImageViewer({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.file,
|
required this.file,
|
||||||
required this.canZoom,
|
required this.canZoom,
|
||||||
|
@ -90,7 +90,7 @@ class RemoteImageViewer extends StatefulWidget {
|
||||||
this.onHeightChanged,
|
this.onHeightChanged,
|
||||||
this.onZoomStarted,
|
this.onZoomStarted,
|
||||||
this.onZoomEnded,
|
this.onZoomEnded,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _RemoteImageViewerState();
|
createState() => _RemoteImageViewerState();
|
||||||
|
@ -214,13 +214,12 @@ class _RemoteImageViewerState extends State<RemoteImageViewer> {
|
||||||
|
|
||||||
class _ImageViewer extends StatefulWidget {
|
class _ImageViewer extends StatefulWidget {
|
||||||
const _ImageViewer({
|
const _ImageViewer({
|
||||||
Key? key,
|
|
||||||
required this.child,
|
required this.child,
|
||||||
required this.canZoom,
|
required this.canZoom,
|
||||||
this.onHeightChanged,
|
this.onHeightChanged,
|
||||||
this.onZoomStarted,
|
this.onZoomStarted,
|
||||||
this.onZoomEnded,
|
this.onZoomEnded,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _ImageViewerState();
|
createState() => _ImageViewerState();
|
||||||
|
|
|
@ -10,9 +10,9 @@ import 'package:flutter/widgets.dart';
|
||||||
/// than 1 line
|
/// than 1 line
|
||||||
class ListTileCenterLeading extends StatelessWidget {
|
class ListTileCenterLeading extends StatelessWidget {
|
||||||
const ListTileCenterLeading({
|
const ListTileCenterLeading({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.child,
|
required this.child,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) => SizedBox(
|
build(BuildContext context) => SizedBox(
|
||||||
|
|
|
@ -30,10 +30,10 @@ class LocalFileViewer extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const LocalFileViewer({
|
const LocalFileViewer({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.streamFiles,
|
required this.streamFiles,
|
||||||
required this.startIndex,
|
required this.startIndex,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
LocalFileViewer.fromArgs(LocalFileViewerArguments args, {Key? key})
|
LocalFileViewer.fromArgs(LocalFileViewerArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
|
|
@ -13,14 +13,14 @@ abstract class MeasurableItemListState {
|
||||||
|
|
||||||
class MeasurableItemList extends StatefulWidget {
|
class MeasurableItemList extends StatefulWidget {
|
||||||
const MeasurableItemList({
|
const MeasurableItemList({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.maxCrossAxisExtent,
|
required this.maxCrossAxisExtent,
|
||||||
required this.itemCount,
|
required this.itemCount,
|
||||||
required this.itemBuilder,
|
required this.itemBuilder,
|
||||||
required this.staggeredTileBuilder,
|
required this.staggeredTileBuilder,
|
||||||
this.mainAxisSpacing = 0,
|
this.mainAxisSpacing = 0,
|
||||||
this.onMaxExtentChanged,
|
this.onMaxExtentChanged,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _MeasurableItemListState();
|
createState() => _MeasurableItemListState();
|
||||||
|
@ -137,7 +137,7 @@ class _MeasurableItemListState extends State<MeasurableItemList>
|
||||||
}
|
}
|
||||||
|
|
||||||
class _GridKey extends GlobalObjectKey {
|
class _GridKey extends GlobalObjectKey {
|
||||||
const _GridKey(Object value) : super(value);
|
const _GridKey(super.value);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
operator ==(Object other) {
|
operator ==(Object other) {
|
||||||
|
|
|
@ -8,10 +8,10 @@ class MeasureSize extends SingleChildRenderObjectWidget {
|
||||||
final OnWidgetSizeChanged onChange;
|
final OnWidgetSizeChanged onChange;
|
||||||
|
|
||||||
const MeasureSize({
|
const MeasureSize({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.onChange,
|
required this.onChange,
|
||||||
required Widget child,
|
required Widget super.child,
|
||||||
}) : super(key: key, child: child);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
RenderObject createRenderObject(BuildContext context) {
|
RenderObject createRenderObject(BuildContext context) {
|
||||||
|
@ -41,10 +41,10 @@ class _MeasureSizeRenderObject extends RenderProxyBox {
|
||||||
|
|
||||||
class SliverMeasureExtent extends SingleChildRenderObjectWidget {
|
class SliverMeasureExtent extends SingleChildRenderObjectWidget {
|
||||||
const SliverMeasureExtent({
|
const SliverMeasureExtent({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.onChange,
|
required this.onChange,
|
||||||
required Widget child,
|
required Widget super.child,
|
||||||
}) : super(key: key, child: child);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
RenderObject createRenderObject(BuildContext context) {
|
RenderObject createRenderObject(BuildContext context) {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
||||||
// ignore: must_be_immutable
|
// ignore: must_be_immutable
|
||||||
class MeasurableSliverStaggeredGrid extends SliverStaggeredGrid {
|
class MeasurableSliverStaggeredGrid extends SliverStaggeredGrid {
|
||||||
MeasurableSliverStaggeredGrid.extentBuilder({
|
MeasurableSliverStaggeredGrid.extentBuilder({
|
||||||
Key? key,
|
super.key,
|
||||||
required double maxCrossAxisExtent,
|
required double maxCrossAxisExtent,
|
||||||
required IndexedStaggeredTileBuilder staggeredTileBuilder,
|
required IndexedStaggeredTileBuilder staggeredTileBuilder,
|
||||||
required IndexedWidgetBuilder itemBuilder,
|
required IndexedWidgetBuilder itemBuilder,
|
||||||
|
@ -12,7 +12,6 @@ class MeasurableSliverStaggeredGrid extends SliverStaggeredGrid {
|
||||||
double mainAxisSpacing = 0,
|
double mainAxisSpacing = 0,
|
||||||
double crossAxisSpacing = 0,
|
double crossAxisSpacing = 0,
|
||||||
}) : super(
|
}) : super(
|
||||||
key: key,
|
|
||||||
gridDelegate: SliverStaggeredGridDelegateWithMaxCrossAxisExtent(
|
gridDelegate: SliverStaggeredGridDelegateWithMaxCrossAxisExtent(
|
||||||
maxCrossAxisExtent: maxCrossAxisExtent,
|
maxCrossAxisExtent: maxCrossAxisExtent,
|
||||||
mainAxisSpacing: mainAxisSpacing,
|
mainAxisSpacing: mainAxisSpacing,
|
||||||
|
@ -42,9 +41,9 @@ class MeasurableSliverStaggeredGrid extends SliverStaggeredGrid {
|
||||||
class RenderMeasurableSliverStaggeredGrid extends RenderSliverStaggeredGrid
|
class RenderMeasurableSliverStaggeredGrid extends RenderSliverStaggeredGrid
|
||||||
with WidgetsBindingObserver {
|
with WidgetsBindingObserver {
|
||||||
RenderMeasurableSliverStaggeredGrid({
|
RenderMeasurableSliverStaggeredGrid({
|
||||||
required RenderSliverVariableSizeBoxChildManager childManager,
|
required super.childManager,
|
||||||
required SliverStaggeredGridDelegate gridDelegate,
|
required super.gridDelegate,
|
||||||
}) : super(childManager: childManager, gridDelegate: gridDelegate);
|
});
|
||||||
|
|
||||||
/// Calculate the height of this staggered grid view
|
/// Calculate the height of this staggered grid view
|
||||||
///
|
///
|
||||||
|
|
|
@ -8,9 +8,9 @@ part 'photo_date_time_edit_dialog.g.dart';
|
||||||
|
|
||||||
class PhotoDateTimeEditDialog extends StatefulWidget {
|
class PhotoDateTimeEditDialog extends StatefulWidget {
|
||||||
const PhotoDateTimeEditDialog({
|
const PhotoDateTimeEditDialog({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.initialDateTime,
|
required this.initialDateTime,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _PhotoDateTimeEditDialogState();
|
createState() => _PhotoDateTimeEditDialogState();
|
||||||
|
|
|
@ -48,16 +48,12 @@ abstract class PhotoListFileItem extends SelectableItem {
|
||||||
|
|
||||||
class PhotoListImageItem extends PhotoListFileItem {
|
class PhotoListImageItem extends PhotoListFileItem {
|
||||||
const PhotoListImageItem({
|
const PhotoListImageItem({
|
||||||
required int fileIndex,
|
required super.fileIndex,
|
||||||
required FileDescriptor file,
|
required super.file,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.previewUrl,
|
required this.previewUrl,
|
||||||
required bool shouldShowFavoriteBadge,
|
required super.shouldShowFavoriteBadge,
|
||||||
}) : super(
|
});
|
||||||
fileIndex: fileIndex,
|
|
||||||
file: file,
|
|
||||||
shouldShowFavoriteBadge: shouldShowFavoriteBadge,
|
|
||||||
);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget buildWidget(BuildContext context) => PhotoListImage(
|
Widget buildWidget(BuildContext context) => PhotoListImage(
|
||||||
|
@ -74,16 +70,12 @@ class PhotoListImageItem extends PhotoListFileItem {
|
||||||
|
|
||||||
class PhotoListVideoItem extends PhotoListFileItem {
|
class PhotoListVideoItem extends PhotoListFileItem {
|
||||||
const PhotoListVideoItem({
|
const PhotoListVideoItem({
|
||||||
required int fileIndex,
|
required super.fileIndex,
|
||||||
required FileDescriptor file,
|
required super.file,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.previewUrl,
|
required this.previewUrl,
|
||||||
required bool shouldShowFavoriteBadge,
|
required super.shouldShowFavoriteBadge,
|
||||||
}) : super(
|
});
|
||||||
fileIndex: fileIndex,
|
|
||||||
file: file,
|
|
||||||
shouldShowFavoriteBadge: shouldShowFavoriteBadge,
|
|
||||||
);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
buildWidget(BuildContext context) => PhotoListVideo(
|
buildWidget(BuildContext context) => PhotoListVideo(
|
||||||
|
@ -146,12 +138,9 @@ abstract class PhotoListLocalFileItem extends SelectableItem {
|
||||||
|
|
||||||
class PhotoListLocalImageItem extends PhotoListLocalFileItem {
|
class PhotoListLocalImageItem extends PhotoListLocalFileItem {
|
||||||
const PhotoListLocalImageItem({
|
const PhotoListLocalImageItem({
|
||||||
required int fileIndex,
|
required super.fileIndex,
|
||||||
required LocalFile file,
|
required super.file,
|
||||||
}) : super(
|
});
|
||||||
fileIndex: fileIndex,
|
|
||||||
file: file,
|
|
||||||
);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
buildWidget(BuildContext context) {
|
buildWidget(BuildContext context) {
|
||||||
|
@ -209,14 +198,14 @@ class PhotoListLocalImageItem extends PhotoListLocalFileItem {
|
||||||
|
|
||||||
class PhotoListImage extends StatelessWidget {
|
class PhotoListImage extends StatelessWidget {
|
||||||
const PhotoListImage({
|
const PhotoListImage({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.previewUrl,
|
required this.previewUrl,
|
||||||
this.padding = const EdgeInsets.all(2),
|
this.padding = const EdgeInsets.all(2),
|
||||||
this.isGif = false,
|
this.isGif = false,
|
||||||
this.isFavorite = false,
|
this.isFavorite = false,
|
||||||
this.heroKey,
|
this.heroKey,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -285,11 +274,11 @@ class PhotoListImage extends StatelessWidget {
|
||||||
|
|
||||||
class PhotoListVideo extends StatelessWidget {
|
class PhotoListVideo extends StatelessWidget {
|
||||||
const PhotoListVideo({
|
const PhotoListVideo({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.previewUrl,
|
required this.previewUrl,
|
||||||
this.isFavorite = false,
|
this.isFavorite = false,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
@ -337,9 +326,9 @@ class PhotoListVideo extends StatelessWidget {
|
||||||
|
|
||||||
class PhotoListLabel extends StatelessWidget {
|
class PhotoListLabel extends StatelessWidget {
|
||||||
const PhotoListLabel({
|
const PhotoListLabel({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.text,
|
required this.text,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
@ -360,10 +349,10 @@ class PhotoListLabel extends StatelessWidget {
|
||||||
|
|
||||||
class PhotoListLabelEdit extends PhotoListLabel {
|
class PhotoListLabelEdit extends PhotoListLabel {
|
||||||
const PhotoListLabelEdit({
|
const PhotoListLabelEdit({
|
||||||
Key? key,
|
super.key,
|
||||||
required String text,
|
required super.text,
|
||||||
required this.onEditPressed,
|
required this.onEditPressed,
|
||||||
}) : super(key: key, text: text);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
|
|
@ -2,9 +2,9 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class ProcessingDialog extends StatelessWidget {
|
class ProcessingDialog extends StatelessWidget {
|
||||||
const ProcessingDialog({
|
const ProcessingDialog({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.text,
|
required this.text,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
|
|
@ -32,9 +32,9 @@ class RootPicker extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const RootPicker({
|
const RootPicker({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
RootPicker.fromArgs(RootPickerArguments args, {Key? key})
|
RootPicker.fromArgs(RootPickerArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
|
|
@ -5,7 +5,7 @@ import 'package:nc_photos/widget/animated_smooth_clip_r_rect.dart';
|
||||||
// Overlay a check mark if an item is selected
|
// Overlay a check mark if an item is selected
|
||||||
class Selectable extends StatelessWidget {
|
class Selectable extends StatelessWidget {
|
||||||
const Selectable({
|
const Selectable({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.child,
|
required this.child,
|
||||||
this.isSelected = false,
|
this.isSelected = false,
|
||||||
required this.iconSize,
|
required this.iconSize,
|
||||||
|
@ -14,7 +14,7 @@ class Selectable extends StatelessWidget {
|
||||||
this.indicatorAlignment = Alignment.topLeft,
|
this.indicatorAlignment = Alignment.topLeft,
|
||||||
this.onTap,
|
this.onTap,
|
||||||
this.onLongPress,
|
this.onLongPress,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
|
|
@ -3,11 +3,11 @@ import 'package:nc_photos/app_localizations.dart';
|
||||||
|
|
||||||
class SelectionAppBar extends StatelessWidget {
|
class SelectionAppBar extends StatelessWidget {
|
||||||
const SelectionAppBar({
|
const SelectionAppBar({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.count,
|
required this.count,
|
||||||
this.onClosePressed,
|
this.onClosePressed,
|
||||||
this.actions,
|
this.actions,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
|
|
@ -171,11 +171,10 @@ class _WrappedEnhancementSettingsState
|
||||||
|
|
||||||
class _SizeSlider extends StatefulWidget {
|
class _SizeSlider extends StatefulWidget {
|
||||||
const _SizeSlider({
|
const _SizeSlider({
|
||||||
Key? key,
|
|
||||||
required this.initialWidth,
|
required this.initialWidth,
|
||||||
required this.initialHeight,
|
required this.initialHeight,
|
||||||
this.onChanged,
|
this.onChanged,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _SizeSliderState();
|
createState() => _SizeSliderState();
|
||||||
|
|
|
@ -505,7 +505,6 @@ class _PresetItem {
|
||||||
/// Based on the original HueRingPicker
|
/// Based on the original HueRingPicker
|
||||||
class _HueRingPicker extends StatefulWidget {
|
class _HueRingPicker extends StatefulWidget {
|
||||||
const _HueRingPicker({
|
const _HueRingPicker({
|
||||||
Key? key,
|
|
||||||
required this.pickerColor,
|
required this.pickerColor,
|
||||||
required this.onColorChanged,
|
required this.onColorChanged,
|
||||||
// ignore: unused_element
|
// ignore: unused_element
|
||||||
|
@ -516,7 +515,7 @@ class _HueRingPicker extends StatefulWidget {
|
||||||
this.displayThumbColor = true,
|
this.displayThumbColor = true,
|
||||||
// ignore: unused_element
|
// ignore: unused_element
|
||||||
this.pickerAreaBorderRadius = const BorderRadius.all(Radius.zero),
|
this.pickerAreaBorderRadius = const BorderRadius.all(Radius.zero),
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final Color pickerColor;
|
final Color pickerColor;
|
||||||
final ValueChanged<Color> onColorChanged;
|
final ValueChanged<Color> onColorChanged;
|
||||||
|
|
|
@ -11,9 +11,7 @@ bool isNeedSetup() => Pref().getSetupProgressOr() & _PageId.all != _PageId.all;
|
||||||
class Setup extends StatefulWidget {
|
class Setup extends StatefulWidget {
|
||||||
static const routeName = "/setup";
|
static const routeName = "/setup";
|
||||||
|
|
||||||
const Setup({
|
const Setup({super.key});
|
||||||
Key? key,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _SetupState();
|
createState() => _SetupState();
|
||||||
|
|
|
@ -29,10 +29,10 @@ class ShareFolderPicker extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const ShareFolderPicker({
|
const ShareFolderPicker({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.initialValue,
|
required this.initialValue,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
ShareFolderPicker.fromArgs(ShareFolderPickerArguments args, {Key? key})
|
ShareFolderPicker.fromArgs(ShareFolderPickerArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
|
|
@ -14,9 +14,9 @@ class ShareLinkMultipleFilesDialogResult {
|
||||||
|
|
||||||
class ShareLinkMultipleFilesDialog extends StatefulWidget {
|
class ShareLinkMultipleFilesDialog extends StatefulWidget {
|
||||||
const ShareLinkMultipleFilesDialog({
|
const ShareLinkMultipleFilesDialog({
|
||||||
Key? key,
|
super.key,
|
||||||
this.shouldAskPassword = false,
|
this.shouldAskPassword = false,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _ShareLinkMultipleFilesDialogState();
|
createState() => _ShareLinkMultipleFilesDialogState();
|
||||||
|
|
|
@ -5,9 +5,7 @@ import 'package:nc_photos/help_utils.dart' as help_utils;
|
||||||
import 'package:nc_photos/url_launcher_util.dart';
|
import 'package:nc_photos/url_launcher_util.dart';
|
||||||
|
|
||||||
class SharedAlbumInfoDialog extends StatefulWidget {
|
class SharedAlbumInfoDialog extends StatefulWidget {
|
||||||
const SharedAlbumInfoDialog({
|
const SharedAlbumInfoDialog({super.key});
|
||||||
Key? key,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _SharedAlbumInfoDialogState();
|
createState() => _SharedAlbumInfoDialogState();
|
||||||
|
|
|
@ -44,11 +44,11 @@ class SharedFileViewer extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const SharedFileViewer({
|
const SharedFileViewer({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.file,
|
required this.file,
|
||||||
required this.shares,
|
required this.shares,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
SharedFileViewer.fromArgs(SharedFileViewerArguments args, {Key? key})
|
SharedFileViewer.fromArgs(SharedFileViewerArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
|
|
@ -24,9 +24,7 @@ part 'sign_in.g.dart';
|
||||||
class SignIn extends StatefulWidget {
|
class SignIn extends StatefulWidget {
|
||||||
static const routeName = "/sign-in";
|
static const routeName = "/sign-in";
|
||||||
|
|
||||||
const SignIn({
|
const SignIn({super.key});
|
||||||
Key? key,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _SignInState();
|
createState() => _SignInState();
|
||||||
|
|
|
@ -2,14 +2,14 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SimpleInputDialog extends StatefulWidget {
|
class SimpleInputDialog extends StatefulWidget {
|
||||||
const SimpleInputDialog({
|
const SimpleInputDialog({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.buttonText,
|
required this.buttonText,
|
||||||
this.titleText,
|
this.titleText,
|
||||||
this.initialText,
|
this.initialText,
|
||||||
this.hintText,
|
this.hintText,
|
||||||
this.validator,
|
this.validator,
|
||||||
this.obscureText = false,
|
this.obscureText = false,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _SimpleInputDialogState();
|
createState() => _SimpleInputDialogState();
|
||||||
|
|
|
@ -37,12 +37,12 @@ class SlideshowConfig {
|
||||||
|
|
||||||
class SlideshowDialog extends StatefulWidget {
|
class SlideshowDialog extends StatefulWidget {
|
||||||
const SlideshowDialog({
|
const SlideshowDialog({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.duration,
|
required this.duration,
|
||||||
required this.isShuffle,
|
required this.isShuffle,
|
||||||
required this.isRepeat,
|
required this.isRepeat,
|
||||||
required this.isReverse,
|
required this.isReverse,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _SlideshowDialogState();
|
createState() => _SlideshowDialogState();
|
||||||
|
|
|
@ -42,12 +42,12 @@ class SlideshowViewer extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const SlideshowViewer({
|
const SlideshowViewer({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.streamFiles,
|
required this.streamFiles,
|
||||||
required this.startIndex,
|
required this.startIndex,
|
||||||
required this.config,
|
required this.config,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
SlideshowViewer.fromArgs(SlideshowViewerArguments args, {Key? key})
|
SlideshowViewer.fromArgs(SlideshowViewerArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
|
|
@ -31,9 +31,7 @@ part 'splash.g.dart';
|
||||||
class Splash extends StatefulWidget {
|
class Splash extends StatefulWidget {
|
||||||
static const routeName = "/splash";
|
static const routeName = "/splash";
|
||||||
|
|
||||||
const Splash({
|
const Splash({super.key});
|
||||||
Key? key,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _SplashState();
|
createState() => _SplashState();
|
||||||
|
|
|
@ -15,9 +15,9 @@ import 'package:np_string/np_string.dart';
|
||||||
|
|
||||||
class TagPickerDialog extends StatefulWidget {
|
class TagPickerDialog extends StatefulWidget {
|
||||||
const TagPickerDialog({
|
const TagPickerDialog({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _TagPickerDialogState();
|
createState() => _TagPickerDialogState();
|
||||||
|
|
|
@ -50,9 +50,9 @@ class TrashbinBrowser extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const TrashbinBrowser({
|
const TrashbinBrowser({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
TrashbinBrowser.fromArgs(TrashbinBrowserArguments args, {Key? key})
|
TrashbinBrowser.fromArgs(TrashbinBrowserArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
|
|
@ -40,11 +40,11 @@ class TrashbinViewer extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const TrashbinViewer({
|
const TrashbinViewer({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.streamFiles,
|
required this.streamFiles,
|
||||||
required this.startIndex,
|
required this.startIndex,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
TrashbinViewer.fromArgs(TrashbinViewerArguments args, {Key? key})
|
TrashbinViewer.fromArgs(TrashbinViewerArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
|
|
@ -25,7 +25,7 @@ part 'video_viewer.g.dart';
|
||||||
|
|
||||||
class VideoViewer extends StatefulWidget {
|
class VideoViewer extends StatefulWidget {
|
||||||
const VideoViewer({
|
const VideoViewer({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.file,
|
required this.file,
|
||||||
this.onLoaded,
|
this.onLoaded,
|
||||||
|
@ -36,7 +36,7 @@ class VideoViewer extends StatefulWidget {
|
||||||
this.isControlVisible = false,
|
this.isControlVisible = false,
|
||||||
this.canPlay = true,
|
this.canPlay = true,
|
||||||
this.canLoop = true,
|
this.canLoop = true,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _VideoViewerState();
|
createState() => _VideoViewerState();
|
||||||
|
|
|
@ -76,12 +76,12 @@ class Viewer extends StatefulWidget {
|
||||||
);
|
);
|
||||||
|
|
||||||
const Viewer({
|
const Viewer({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.streamFiles,
|
required this.streamFiles,
|
||||||
required this.startIndex,
|
required this.startIndex,
|
||||||
this.fromCollection,
|
this.fromCollection,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
Viewer.fromArgs(ViewerArguments args, {Key? key})
|
Viewer.fromArgs(ViewerArguments args, {Key? key})
|
||||||
: this(
|
: this(
|
||||||
|
|
|
@ -5,9 +5,9 @@ import 'package:flutter/material.dart';
|
||||||
/// Buttons are spread evenly across the horizontal axis
|
/// Buttons are spread evenly across the horizontal axis
|
||||||
class ViewerBottomAppBar extends StatelessWidget {
|
class ViewerBottomAppBar extends StatelessWidget {
|
||||||
const ViewerBottomAppBar({
|
const ViewerBottomAppBar({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.children,
|
required this.children,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
|
|
@ -53,7 +53,7 @@ class ViewerSingleCollectionData {
|
||||||
|
|
||||||
class ViewerDetailPane extends StatefulWidget {
|
class ViewerDetailPane extends StatefulWidget {
|
||||||
const ViewerDetailPane({
|
const ViewerDetailPane({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.account,
|
required this.account,
|
||||||
required this.fd,
|
required this.fd,
|
||||||
this.fromCollection,
|
this.fromCollection,
|
||||||
|
@ -62,7 +62,7 @@ class ViewerDetailPane extends StatefulWidget {
|
||||||
required this.onUnarchivePressed,
|
required this.onUnarchivePressed,
|
||||||
required this.onDeletePressed,
|
required this.onDeletePressed,
|
||||||
this.onSlideshowPressed,
|
this.onSlideshowPressed,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _ViewerDetailPaneState();
|
createState() => _ViewerDetailPaneState();
|
||||||
|
@ -529,11 +529,10 @@ class _ViewerDetailPaneState extends State<ViewerDetailPane> {
|
||||||
|
|
||||||
class _DetailPaneButton extends StatelessWidget {
|
class _DetailPaneButton extends StatelessWidget {
|
||||||
const _DetailPaneButton({
|
const _DetailPaneButton({
|
||||||
Key? key,
|
|
||||||
required this.icon,
|
required this.icon,
|
||||||
required this.label,
|
required this.label,
|
||||||
required this.onPressed,
|
required this.onPressed,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
|
|
@ -3,12 +3,12 @@ import 'package:nc_photos/app_localizations.dart';
|
||||||
|
|
||||||
class ZoomMenuButton extends StatelessWidget {
|
class ZoomMenuButton extends StatelessWidget {
|
||||||
const ZoomMenuButton({
|
const ZoomMenuButton({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.initialZoom,
|
required this.initialZoom,
|
||||||
required this.minZoom,
|
required this.minZoom,
|
||||||
required this.maxZoom,
|
required this.maxZoom,
|
||||||
this.onZoomChanged,
|
this.onZoomChanged,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
|
@ -34,12 +34,11 @@ class ZoomMenuButton extends StatelessWidget {
|
||||||
|
|
||||||
class _PopupMenuZoom extends PopupMenuEntry<void> {
|
class _PopupMenuZoom extends PopupMenuEntry<void> {
|
||||||
const _PopupMenuZoom({
|
const _PopupMenuZoom({
|
||||||
Key? key,
|
|
||||||
required this.initialValue,
|
required this.initialValue,
|
||||||
required this.minValue,
|
required this.minValue,
|
||||||
required this.maxValue,
|
required this.maxValue,
|
||||||
this.onChanged,
|
this.onChanged,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
represents(void value) => false;
|
represents(void value) => false;
|
||||||
|
|
|
@ -220,7 +220,7 @@ extension on Rational {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _Rational extends Rational with EquatableMixin {
|
class _Rational extends Rational with EquatableMixin {
|
||||||
_Rational(int numerator, int denominator) : super(numerator, denominator);
|
_Rational(super.numerator, super.denominator);
|
||||||
|
|
||||||
factory _Rational.of(Rational r) {
|
factory _Rational.of(Rational r) {
|
||||||
return _Rational(r.numerator, r.denominator);
|
return _Rational(r.numerator, r.denominator);
|
||||||
|
|
|
@ -31,7 +31,7 @@ void main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _TestWidget extends StatefulWidget {
|
class _TestWidget extends StatefulWidget {
|
||||||
const _TestWidget(this.manager, {Key? key}) : super(key: key);
|
const _TestWidget(this.manager);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
createState() => _TestWidgetState();
|
createState() => _TestWidgetState();
|
||||||
|
|
|
@ -2,24 +2,18 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class SwitchFormField extends FormField<bool> {
|
class SwitchFormField extends FormField<bool> {
|
||||||
SwitchFormField({
|
SwitchFormField({
|
||||||
Key? key,
|
super.key,
|
||||||
required bool initialValue,
|
required bool super.initialValue,
|
||||||
Widget? title,
|
Widget? title,
|
||||||
Widget? subtitle,
|
Widget? subtitle,
|
||||||
Widget? subtitleTrue,
|
Widget? subtitleTrue,
|
||||||
Widget? subtitleFalse,
|
Widget? subtitleFalse,
|
||||||
bool? dense,
|
bool? dense,
|
||||||
FormFieldSetter<bool>? onSaved,
|
super.onSaved,
|
||||||
FormFieldValidator<bool>? validator,
|
super.validator,
|
||||||
bool enabled = true,
|
super.enabled,
|
||||||
AutovalidateMode? autovalidateMode,
|
super.autovalidateMode,
|
||||||
}) : super(
|
}) : super(
|
||||||
key: key,
|
|
||||||
onSaved: onSaved,
|
|
||||||
validator: validator,
|
|
||||||
initialValue: initialValue,
|
|
||||||
enabled: enabled,
|
|
||||||
autovalidateMode: autovalidateMode,
|
|
||||||
builder: (field) {
|
builder: (field) {
|
||||||
final value = field.value ?? initialValue;
|
final value = field.value ?? initialValue;
|
||||||
return SwitchListTile(
|
return SwitchListTile(
|
||||||
|
|
|
@ -4,13 +4,13 @@ import 'package:np_ui/src/material3.dart';
|
||||||
/// A [ListTile]-like widget with unbounded height
|
/// A [ListTile]-like widget with unbounded height
|
||||||
class UnboundedListTile extends StatelessWidget {
|
class UnboundedListTile extends StatelessWidget {
|
||||||
const UnboundedListTile({
|
const UnboundedListTile({
|
||||||
Key? key,
|
super.key,
|
||||||
this.leading,
|
this.leading,
|
||||||
required this.title,
|
required this.title,
|
||||||
this.subtitle,
|
this.subtitle,
|
||||||
this.trailing,
|
this.trailing,
|
||||||
this.onTap,
|
this.onTap,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue