increase min sdk and apply new formatter
This commit is contained in:
@@ -18,8 +18,9 @@ class BrowserIcon with FastEquatable {
|
||||
required Color? dominantColor,
|
||||
required IconSource source,
|
||||
}) async {
|
||||
final image =
|
||||
await tryDecodeImage(bytes).then((image) => image!.toEquatable());
|
||||
final image = await tryDecodeImage(
|
||||
bytes,
|
||||
).then((image) => image!.toEquatable());
|
||||
|
||||
return BrowserIcon(
|
||||
image: image,
|
||||
@@ -38,9 +39,5 @@ class BrowserIcon with FastEquatable {
|
||||
bool get cacheHash => true;
|
||||
|
||||
@override
|
||||
List<Object?> get hashParameters => [
|
||||
image,
|
||||
dominantColor,
|
||||
source,
|
||||
];
|
||||
List<Object?> get hashParameters => [image, dominantColor, source];
|
||||
}
|
||||
|
||||
@@ -12,17 +12,17 @@ class FindResultState with FastEquatable {
|
||||
});
|
||||
|
||||
factory FindResultState.$default() => FindResultState(
|
||||
activeMatchOrdinal: -1,
|
||||
numberOfMatches: 0,
|
||||
isDoneCounting: false,
|
||||
);
|
||||
activeMatchOrdinal: -1,
|
||||
numberOfMatches: 0,
|
||||
isDoneCounting: false,
|
||||
);
|
||||
|
||||
@override
|
||||
List<Object?> get hashParameters => [
|
||||
activeMatchOrdinal,
|
||||
numberOfMatches,
|
||||
isDoneCounting,
|
||||
];
|
||||
activeMatchOrdinal,
|
||||
numberOfMatches,
|
||||
isDoneCounting,
|
||||
];
|
||||
|
||||
@override
|
||||
bool get cacheHash => true;
|
||||
|
||||
@@ -28,16 +28,20 @@ class HistoryState with FastEquatable {
|
||||
});
|
||||
|
||||
factory HistoryState.$default() => HistoryState(
|
||||
items: const [],
|
||||
currentIndex: 0,
|
||||
canGoBack: false,
|
||||
canGoForward: false,
|
||||
);
|
||||
items: const [],
|
||||
currentIndex: 0,
|
||||
canGoBack: false,
|
||||
canGoForward: false,
|
||||
);
|
||||
|
||||
@override
|
||||
bool get cacheHash => true;
|
||||
|
||||
@override
|
||||
List<Object?> get hashParameters =>
|
||||
[items, currentIndex, canGoBack, canGoForward];
|
||||
List<Object?> get hashParameters => [
|
||||
items,
|
||||
currentIndex,
|
||||
canGoBack,
|
||||
canGoForward,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -5,15 +5,10 @@ class ReaderableState with FastEquatable {
|
||||
|
||||
final bool active;
|
||||
|
||||
ReaderableState({
|
||||
required this.readerable,
|
||||
required this.active,
|
||||
});
|
||||
ReaderableState({required this.readerable, required this.active});
|
||||
|
||||
factory ReaderableState.$default() => ReaderableState(
|
||||
readerable: false,
|
||||
active: false,
|
||||
);
|
||||
factory ReaderableState.$default() =>
|
||||
ReaderableState(readerable: false, active: false);
|
||||
|
||||
@override
|
||||
bool get cacheHash => true;
|
||||
|
||||
@@ -11,11 +11,8 @@ class SecurityState with FastEquatable {
|
||||
required this.issuer,
|
||||
});
|
||||
|
||||
factory SecurityState.$default() => SecurityState(
|
||||
secure: false,
|
||||
host: "",
|
||||
issuer: "",
|
||||
);
|
||||
factory SecurityState.$default() =>
|
||||
SecurityState(secure: false, host: "", issuer: "");
|
||||
|
||||
@override
|
||||
bool get cacheHash => true;
|
||||
|
||||
@@ -26,12 +26,12 @@ class TabState extends WebPageInfo with FastEquatable {
|
||||
|
||||
@override
|
||||
BrowserIcon? get favicon => icon.mapNotNull(
|
||||
(icon) => BrowserIcon(
|
||||
image: icon,
|
||||
dominantColor: null,
|
||||
source: IconSource.memory,
|
||||
),
|
||||
);
|
||||
(icon) => BrowserIcon(
|
||||
image: icon,
|
||||
dominantColor: null,
|
||||
source: IconSource.memory,
|
||||
),
|
||||
);
|
||||
|
||||
final EquatableImage? thumbnail;
|
||||
|
||||
@@ -64,40 +64,40 @@ class TabState extends WebPageInfo with FastEquatable {
|
||||
}) : super(title: title);
|
||||
|
||||
factory TabState.$default(String tabId) => TabState(
|
||||
id: tabId,
|
||||
contextId: null,
|
||||
url: Uri.parse('about:blank'),
|
||||
title: "",
|
||||
icon: null,
|
||||
thumbnail: null,
|
||||
progress: 0,
|
||||
isPrivate: false,
|
||||
isFullScreen: false,
|
||||
isLoading: false,
|
||||
securityInfoState: SecurityState.$default(),
|
||||
historyState: HistoryState.$default(),
|
||||
readerableState: ReaderableState.$default(),
|
||||
findResultState: FindResultState.$default(),
|
||||
);
|
||||
id: tabId,
|
||||
contextId: null,
|
||||
url: Uri.parse('about:blank'),
|
||||
title: "",
|
||||
icon: null,
|
||||
thumbnail: null,
|
||||
progress: 0,
|
||||
isPrivate: false,
|
||||
isFullScreen: false,
|
||||
isLoading: false,
|
||||
securityInfoState: SecurityState.$default(),
|
||||
historyState: HistoryState.$default(),
|
||||
readerableState: ReaderableState.$default(),
|
||||
findResultState: FindResultState.$default(),
|
||||
);
|
||||
|
||||
@override
|
||||
bool get cacheHash => true;
|
||||
|
||||
@override
|
||||
List<Object?> get hashParameters => [
|
||||
id,
|
||||
contextId,
|
||||
url,
|
||||
title,
|
||||
icon,
|
||||
thumbnail,
|
||||
progress,
|
||||
isPrivate,
|
||||
isFullScreen,
|
||||
isLoading,
|
||||
securityInfoState,
|
||||
historyState,
|
||||
readerableState,
|
||||
findResultState,
|
||||
];
|
||||
id,
|
||||
contextId,
|
||||
url,
|
||||
title,
|
||||
icon,
|
||||
thumbnail,
|
||||
progress,
|
||||
isPrivate,
|
||||
isFullScreen,
|
||||
isLoading,
|
||||
securityInfoState,
|
||||
historyState,
|
||||
readerableState,
|
||||
findResultState,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -106,7 +106,6 @@ class _$TabStateCWProxyImpl implements _$TabStateCWProxy {
|
||||
this(findResultState: findResultState);
|
||||
|
||||
@override
|
||||
|
||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `TabState(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
||||
///
|
||||
/// Usage
|
||||
@@ -130,58 +129,71 @@ class _$TabStateCWProxyImpl implements _$TabStateCWProxy {
|
||||
}) {
|
||||
return TabState(
|
||||
id: _value.id,
|
||||
contextId: contextId == const $CopyWithPlaceholder()
|
||||
? _value.contextId
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: contextId as String?,
|
||||
url: url == const $CopyWithPlaceholder()
|
||||
? _value.url
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: url as Uri,
|
||||
title: title == const $CopyWithPlaceholder()
|
||||
? _value.title
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: title as String,
|
||||
icon: icon == const $CopyWithPlaceholder()
|
||||
? _value.icon
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: icon as EquatableImage?,
|
||||
thumbnail: thumbnail == const $CopyWithPlaceholder()
|
||||
? _value.thumbnail
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: thumbnail as EquatableImage?,
|
||||
progress: progress == const $CopyWithPlaceholder()
|
||||
? _value.progress
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: progress as int,
|
||||
isPrivate: isPrivate == const $CopyWithPlaceholder()
|
||||
? _value.isPrivate
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: isPrivate as bool,
|
||||
isFullScreen: isFullScreen == const $CopyWithPlaceholder()
|
||||
? _value.isFullScreen
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: isFullScreen as bool,
|
||||
isLoading: isLoading == const $CopyWithPlaceholder()
|
||||
? _value.isLoading
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: isLoading as bool,
|
||||
securityInfoState: securityInfoState == const $CopyWithPlaceholder()
|
||||
? _value.securityInfoState
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: securityInfoState as SecurityState,
|
||||
historyState: historyState == const $CopyWithPlaceholder()
|
||||
? _value.historyState
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: historyState as HistoryState,
|
||||
readerableState: readerableState == const $CopyWithPlaceholder()
|
||||
? _value.readerableState
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: readerableState as ReaderableState,
|
||||
findResultState: findResultState == const $CopyWithPlaceholder()
|
||||
? _value.findResultState
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: findResultState as FindResultState,
|
||||
contextId:
|
||||
contextId == const $CopyWithPlaceholder()
|
||||
? _value.contextId
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: contextId as String?,
|
||||
url:
|
||||
url == const $CopyWithPlaceholder()
|
||||
? _value.url
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: url as Uri,
|
||||
title:
|
||||
title == const $CopyWithPlaceholder()
|
||||
? _value.title
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: title as String,
|
||||
icon:
|
||||
icon == const $CopyWithPlaceholder()
|
||||
? _value.icon
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: icon as EquatableImage?,
|
||||
thumbnail:
|
||||
thumbnail == const $CopyWithPlaceholder()
|
||||
? _value.thumbnail
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: thumbnail as EquatableImage?,
|
||||
progress:
|
||||
progress == const $CopyWithPlaceholder()
|
||||
? _value.progress
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: progress as int,
|
||||
isPrivate:
|
||||
isPrivate == const $CopyWithPlaceholder()
|
||||
? _value.isPrivate
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: isPrivate as bool,
|
||||
isFullScreen:
|
||||
isFullScreen == const $CopyWithPlaceholder()
|
||||
? _value.isFullScreen
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: isFullScreen as bool,
|
||||
isLoading:
|
||||
isLoading == const $CopyWithPlaceholder()
|
||||
? _value.isLoading
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: isLoading as bool,
|
||||
securityInfoState:
|
||||
securityInfoState == const $CopyWithPlaceholder()
|
||||
? _value.securityInfoState
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: securityInfoState as SecurityState,
|
||||
historyState:
|
||||
historyState == const $CopyWithPlaceholder()
|
||||
? _value.historyState
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: historyState as HistoryState,
|
||||
readerableState:
|
||||
readerableState == const $CopyWithPlaceholder()
|
||||
? _value.readerableState
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: readerableState as ReaderableState,
|
||||
findResultState:
|
||||
findResultState == const $CopyWithPlaceholder()
|
||||
? _value.findResultState
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: findResultState as FindResultState,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,12 +33,12 @@ class WebExtensionState with FastEquatable {
|
||||
|
||||
@override
|
||||
List<Object?> get hashParameters => [
|
||||
extensionId,
|
||||
title,
|
||||
enabled,
|
||||
badgeText,
|
||||
badgeTextColor,
|
||||
badgeBackgroundColor,
|
||||
icon,
|
||||
];
|
||||
extensionId,
|
||||
title,
|
||||
enabled,
|
||||
badgeText,
|
||||
badgeTextColor,
|
||||
badgeBackgroundColor,
|
||||
icon,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -69,7 +69,6 @@ class _$WebExtensionStateCWProxyImpl implements _$WebExtensionStateCWProxy {
|
||||
WebExtensionState icon(EquatableImage? icon) => this(icon: icon);
|
||||
|
||||
@override
|
||||
|
||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `WebExtensionState(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
||||
///
|
||||
/// Usage
|
||||
@@ -86,34 +85,41 @@ class _$WebExtensionStateCWProxyImpl implements _$WebExtensionStateCWProxy {
|
||||
Object? icon = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return WebExtensionState(
|
||||
extensionId: extensionId == const $CopyWithPlaceholder()
|
||||
? _value.extensionId
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: extensionId as String,
|
||||
enabled: enabled == const $CopyWithPlaceholder()
|
||||
? _value.enabled
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: enabled as bool,
|
||||
title: title == const $CopyWithPlaceholder()
|
||||
? _value.title
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: title as String?,
|
||||
badgeText: badgeText == const $CopyWithPlaceholder()
|
||||
? _value.badgeText
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: badgeText as String?,
|
||||
badgeTextColor: badgeTextColor == const $CopyWithPlaceholder()
|
||||
? _value.badgeTextColor
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: badgeTextColor as Color?,
|
||||
badgeBackgroundColor: badgeBackgroundColor == const $CopyWithPlaceholder()
|
||||
? _value.badgeBackgroundColor
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: badgeBackgroundColor as Color?,
|
||||
icon: icon == const $CopyWithPlaceholder()
|
||||
? _value.icon
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: icon as EquatableImage?,
|
||||
extensionId:
|
||||
extensionId == const $CopyWithPlaceholder()
|
||||
? _value.extensionId
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: extensionId as String,
|
||||
enabled:
|
||||
enabled == const $CopyWithPlaceholder()
|
||||
? _value.enabled
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: enabled as bool,
|
||||
title:
|
||||
title == const $CopyWithPlaceholder()
|
||||
? _value.title
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: title as String?,
|
||||
badgeText:
|
||||
badgeText == const $CopyWithPlaceholder()
|
||||
? _value.badgeText
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: badgeText as String?,
|
||||
badgeTextColor:
|
||||
badgeTextColor == const $CopyWithPlaceholder()
|
||||
? _value.badgeTextColor
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: badgeTextColor as Color?,
|
||||
badgeBackgroundColor:
|
||||
badgeBackgroundColor == const $CopyWithPlaceholder()
|
||||
? _value.badgeBackgroundColor
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: badgeBackgroundColor as Color?,
|
||||
icon:
|
||||
icon == const $CopyWithPlaceholder()
|
||||
? _value.icon
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: icon as EquatableImage?,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user