dart format

This commit is contained in:
Fabian Freund
2026-02-22 18:55:47 +01:00
parent ac80632eeb
commit 3094f68607
15 changed files with 55 additions and 84 deletions
+3 -9
View File
@@ -38,16 +38,10 @@ class Profile with FastEquatable {
static String getNewProfileId() => uuid.v7();
Profile({
required this.id,
required this.name,
AuthSettings? authSettings,
}) : authSettings = authSettings ?? AuthSettings.withDefaults();
Profile({required this.id, required this.name, AuthSettings? authSettings})
: authSettings = authSettings ?? AuthSettings.withDefaults();
factory Profile.create({
required String name,
AuthSettings? authSettings,
}) {
factory Profile.create({required String name, AuthSettings? authSettings}) {
return Profile(
id: getNewProfileId(),
name: name,
+13 -15
View File
@@ -358,21 +358,19 @@ class GenericWebsiteService extends _$GenericWebsiteService {
}
late final Future<Result<WebPageInfo>> inFlightFetch;
inFlightFetch = fetchPageInfo(
url: url,
isImageRequest: true,
proxyPort: null,
).timeout(
const Duration(seconds: 20),
onTimeout: () => Result.failure(
const ErrorMessage(source: 'icon', message: 'Icon fetch timeout'),
),
).whenComplete(() {
// Only clear this entry if it is still the active in-flight request.
if (identical(_inFlightFetches[url]?.future, inFlightFetch)) {
_inFlightFetches.remove(url);
}
});
inFlightFetch = fetchPageInfo(url: url, isImageRequest: true, proxyPort: null)
.timeout(
const Duration(seconds: 20),
onTimeout: () => Result.failure(
const ErrorMessage(source: 'icon', message: 'Icon fetch timeout'),
),
)
.whenComplete(() {
// Only clear this entry if it is still the active in-flight request.
if (identical(_inFlightFetches[url]?.future, inFlightFetch)) {
_inFlightFetches.remove(url);
}
});
_inFlightFetches[url] = _InFlightFetch(inFlightFetch);
return inFlightFetch;