upgrade min sdk; run formatter
This commit is contained in:
@@ -17,10 +17,9 @@ class CacheDao extends DatabaseAccessor<UserDatabase> with _$CacheDaoMixin {
|
||||
}
|
||||
|
||||
SingleOrNullSelectable<Uint8List?> getCachedIcon(String origin) {
|
||||
final query =
|
||||
selectOnly(db.iconCache)
|
||||
..addColumns([db.iconCache.iconData])
|
||||
..where(db.iconCache.origin.equals(origin));
|
||||
final query = selectOnly(db.iconCache)
|
||||
..addColumns([db.iconCache.iconData])
|
||||
..where(db.iconCache.origin.equals(origin));
|
||||
|
||||
return query.map((row) => row.read(db.iconCache.iconData));
|
||||
}
|
||||
|
||||
@@ -30,9 +30,8 @@ class SettingDao extends DatabaseAccessor<UserDatabase> with _$SettingDaoMixin {
|
||||
Selectable<MapEntry<String, DriftAny?>> getAllSettingsOfPartitionKey(
|
||||
String? partitionKey,
|
||||
) {
|
||||
final query =
|
||||
db.setting.select()
|
||||
..where((r) => r.partitionKey.equalsNullable(partitionKey));
|
||||
final query = db.setting.select()
|
||||
..where((r) => r.partitionKey.equalsNullable(partitionKey));
|
||||
|
||||
return query.map((row) => MapEntry(row.key, row.value));
|
||||
}
|
||||
|
||||
@@ -45,11 +45,10 @@ class Setting extends Table with TableInfo<Setting, SettingData> {
|
||||
SettingData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||
return SettingData(
|
||||
key:
|
||||
attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}key'],
|
||||
)!,
|
||||
key: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}key'],
|
||||
)!,
|
||||
partitionKey: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}partition_key'],
|
||||
@@ -123,10 +122,9 @@ class SettingData extends DataClass implements Insertable<SettingData> {
|
||||
SettingData copyWithCompanion(SettingCompanion data) {
|
||||
return SettingData(
|
||||
key: data.key.present ? data.key.value : this.key,
|
||||
partitionKey:
|
||||
data.partitionKey.present
|
||||
? data.partitionKey.value
|
||||
: this.partitionKey,
|
||||
partitionKey: data.partitionKey.present
|
||||
? data.partitionKey.value
|
||||
: this.partitionKey,
|
||||
value: data.value.present ? data.value.value : this.value,
|
||||
);
|
||||
}
|
||||
@@ -269,21 +267,18 @@ class IconCache extends Table with TableInfo<IconCache, IconCacheData> {
|
||||
IconCacheData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||
return IconCacheData(
|
||||
origin:
|
||||
attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}origin'],
|
||||
)!,
|
||||
iconData:
|
||||
attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.blob,
|
||||
data['${effectivePrefix}icon_data'],
|
||||
)!,
|
||||
fetchDate:
|
||||
attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.dateTime,
|
||||
data['${effectivePrefix}fetch_date'],
|
||||
)!,
|
||||
origin: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}origin'],
|
||||
)!,
|
||||
iconData: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.blob,
|
||||
data['${effectivePrefix}icon_data'],
|
||||
)!,
|
||||
fetchDate: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.dateTime,
|
||||
data['${effectivePrefix}fetch_date'],
|
||||
)!,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -577,12 +572,12 @@ class $SettingTableManager
|
||||
TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
createFilteringComposer:
|
||||
() => $SettingFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer:
|
||||
() => $SettingOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer:
|
||||
() => $SettingAnnotationComposer($db: db, $table: table),
|
||||
createFilteringComposer: () =>
|
||||
$SettingFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer: () =>
|
||||
$SettingOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer: () =>
|
||||
$SettingAnnotationComposer($db: db, $table: table),
|
||||
updateCompanionCallback:
|
||||
({
|
||||
Value<String> key = const Value.absent(),
|
||||
@@ -607,16 +602,9 @@ class $SettingTableManager
|
||||
value: value,
|
||||
rowid: rowid,
|
||||
),
|
||||
withReferenceMapper:
|
||||
(p0) =>
|
||||
p0
|
||||
.map(
|
||||
(e) => (
|
||||
e.readTable(table),
|
||||
BaseReferences(db, table, e),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
withReferenceMapper: (p0) => p0
|
||||
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
||||
.toList(),
|
||||
prefetchHooksCallback: null,
|
||||
),
|
||||
);
|
||||
@@ -740,12 +728,12 @@ class $IconCacheTableManager
|
||||
TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
createFilteringComposer:
|
||||
() => $IconCacheFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer:
|
||||
() => $IconCacheOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer:
|
||||
() => $IconCacheAnnotationComposer($db: db, $table: table),
|
||||
createFilteringComposer: () =>
|
||||
$IconCacheFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer: () =>
|
||||
$IconCacheOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer: () =>
|
||||
$IconCacheAnnotationComposer($db: db, $table: table),
|
||||
updateCompanionCallback:
|
||||
({
|
||||
Value<String> origin = const Value.absent(),
|
||||
@@ -770,16 +758,9 @@ class $IconCacheTableManager
|
||||
fetchDate: fetchDate,
|
||||
rowid: rowid,
|
||||
),
|
||||
withReferenceMapper:
|
||||
(p0) =>
|
||||
p0
|
||||
.map(
|
||||
(e) => (
|
||||
e.readTable(table),
|
||||
BaseReferences(db, table, e),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
withReferenceMapper: (p0) => p0
|
||||
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
||||
.toList(),
|
||||
prefetchHooksCallback: null,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -147,64 +147,60 @@ class _$EngineSettingsCWProxyImpl implements _$EngineSettingsCWProxy {
|
||||
Object? userAgent = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return EngineSettings(
|
||||
javascriptEnabled:
|
||||
javascriptEnabled == const $CopyWithPlaceholder()
|
||||
? _value.javascriptEnabled
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: javascriptEnabled as bool?,
|
||||
javascriptEnabled: javascriptEnabled == const $CopyWithPlaceholder()
|
||||
? _value.javascriptEnabled
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: javascriptEnabled as bool?,
|
||||
trackingProtectionPolicy:
|
||||
trackingProtectionPolicy == const $CopyWithPlaceholder()
|
||||
? _value.trackingProtectionPolicy
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: trackingProtectionPolicy as TrackingProtectionPolicy?,
|
||||
httpsOnlyMode:
|
||||
httpsOnlyMode == const $CopyWithPlaceholder()
|
||||
? _value.httpsOnlyMode
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: httpsOnlyMode as HttpsOnlyMode?,
|
||||
? _value.trackingProtectionPolicy
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: trackingProtectionPolicy as TrackingProtectionPolicy?,
|
||||
httpsOnlyMode: httpsOnlyMode == const $CopyWithPlaceholder()
|
||||
? _value.httpsOnlyMode
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: httpsOnlyMode as HttpsOnlyMode?,
|
||||
globalPrivacyControlEnabled:
|
||||
globalPrivacyControlEnabled == const $CopyWithPlaceholder()
|
||||
? _value.globalPrivacyControlEnabled
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: globalPrivacyControlEnabled as bool?,
|
||||
preferredColorScheme:
|
||||
preferredColorScheme == const $CopyWithPlaceholder()
|
||||
? _value.preferredColorScheme
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: preferredColorScheme as ColorScheme?,
|
||||
? _value.globalPrivacyControlEnabled
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: globalPrivacyControlEnabled as bool?,
|
||||
preferredColorScheme: preferredColorScheme == const $CopyWithPlaceholder()
|
||||
? _value.preferredColorScheme
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: preferredColorScheme as ColorScheme?,
|
||||
cookieBannerHandlingMode:
|
||||
cookieBannerHandlingMode == const $CopyWithPlaceholder()
|
||||
? _value.cookieBannerHandlingMode
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: cookieBannerHandlingMode as CookieBannerHandlingMode?,
|
||||
? _value.cookieBannerHandlingMode
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: cookieBannerHandlingMode as CookieBannerHandlingMode?,
|
||||
cookieBannerHandlingModePrivateBrowsing:
|
||||
cookieBannerHandlingModePrivateBrowsing ==
|
||||
const $CopyWithPlaceholder()
|
||||
? _value.cookieBannerHandlingModePrivateBrowsing
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: cookieBannerHandlingModePrivateBrowsing
|
||||
as CookieBannerHandlingMode?,
|
||||
const $CopyWithPlaceholder()
|
||||
? _value.cookieBannerHandlingModePrivateBrowsing
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: cookieBannerHandlingModePrivateBrowsing
|
||||
as CookieBannerHandlingMode?,
|
||||
cookieBannerHandlingGlobalRules:
|
||||
cookieBannerHandlingGlobalRules == const $CopyWithPlaceholder()
|
||||
? _value.cookieBannerHandlingGlobalRules
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: cookieBannerHandlingGlobalRules as bool?,
|
||||
? _value.cookieBannerHandlingGlobalRules
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: cookieBannerHandlingGlobalRules as bool?,
|
||||
cookieBannerHandlingGlobalRulesSubFrames:
|
||||
cookieBannerHandlingGlobalRulesSubFrames ==
|
||||
const $CopyWithPlaceholder()
|
||||
? _value.cookieBannerHandlingGlobalRulesSubFrames
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: cookieBannerHandlingGlobalRulesSubFrames as bool?,
|
||||
const $CopyWithPlaceholder()
|
||||
? _value.cookieBannerHandlingGlobalRulesSubFrames
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: cookieBannerHandlingGlobalRulesSubFrames as bool?,
|
||||
webContentIsolationStrategy:
|
||||
webContentIsolationStrategy == const $CopyWithPlaceholder()
|
||||
? _value.webContentIsolationStrategy
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: webContentIsolationStrategy as WebContentIsolationStrategy?,
|
||||
userAgent:
|
||||
userAgent == const $CopyWithPlaceholder()
|
||||
? _value.userAgent
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: userAgent as String?,
|
||||
? _value.webContentIsolationStrategy
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: webContentIsolationStrategy as WebContentIsolationStrategy?,
|
||||
userAgent: userAgent == const $CopyWithPlaceholder()
|
||||
? _value.userAgent
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: userAgent as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,31 +75,28 @@ class _$GeneralSettingsCWProxyImpl implements _$GeneralSettingsCWProxy {
|
||||
Object? defaultSearchProvider = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return GeneralSettings(
|
||||
themeMode:
|
||||
themeMode == const $CopyWithPlaceholder()
|
||||
? _value.themeMode
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: themeMode as ThemeMode,
|
||||
enableReadability:
|
||||
enableReadability == const $CopyWithPlaceholder()
|
||||
? _value.enableReadability
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: enableReadability as bool,
|
||||
enforceReadability:
|
||||
enforceReadability == const $CopyWithPlaceholder()
|
||||
? _value.enforceReadability
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: enforceReadability as bool,
|
||||
themeMode: themeMode == const $CopyWithPlaceholder()
|
||||
? _value.themeMode
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: themeMode as ThemeMode,
|
||||
enableReadability: enableReadability == const $CopyWithPlaceholder()
|
||||
? _value.enableReadability
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: enableReadability as bool,
|
||||
enforceReadability: enforceReadability == const $CopyWithPlaceholder()
|
||||
? _value.enforceReadability
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: enforceReadability as bool,
|
||||
deleteBrowsingDataOnQuit:
|
||||
deleteBrowsingDataOnQuit == const $CopyWithPlaceholder()
|
||||
? _value.deleteBrowsingDataOnQuit
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: deleteBrowsingDataOnQuit as Set<DeleteBrowsingDataType>?,
|
||||
? _value.deleteBrowsingDataOnQuit
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: deleteBrowsingDataOnQuit as Set<DeleteBrowsingDataType>?,
|
||||
defaultSearchProvider:
|
||||
defaultSearchProvider == const $CopyWithPlaceholder()
|
||||
? _value.defaultSearchProvider
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: defaultSearchProvider as String,
|
||||
? _value.defaultSearchProvider
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: defaultSearchProvider as String,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -131,10 +128,9 @@ Map<String, dynamic> _$GeneralSettingsToJson(GeneralSettings instance) =>
|
||||
'themeMode': _$ThemeModeEnumMap[instance.themeMode]!,
|
||||
'enableReadability': instance.enableReadability,
|
||||
'enforceReadability': instance.enforceReadability,
|
||||
'deleteBrowsingDataOnQuit':
|
||||
instance.deleteBrowsingDataOnQuit
|
||||
?.map((e) => _$DeleteBrowsingDataTypeEnumMap[e]!)
|
||||
.toList(),
|
||||
'deleteBrowsingDataOnQuit': instance.deleteBrowsingDataOnQuit
|
||||
?.map((e) => _$DeleteBrowsingDataTypeEnumMap[e]!)
|
||||
.toList(),
|
||||
'defaultSearchProvider': instance.defaultSearchProvider,
|
||||
};
|
||||
|
||||
|
||||
@@ -13,8 +13,9 @@ String _$userDatabaseHash() => r'b925780435806f0241d7ddb635e301e9fc8baf6e';
|
||||
final userDatabaseProvider = Provider<UserDatabase>.internal(
|
||||
userDatabase,
|
||||
name: r'userDatabaseProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$userDatabaseHash,
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$userDatabaseHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user