upgrade min sdk; run formatter

This commit is contained in:
Fabian Freund
2025-06-02 22:25:10 +02:00
parent 8fccd767af
commit ad03cc9bac
171 changed files with 4817 additions and 4685 deletions
+6 -10
View File
@@ -65,20 +65,16 @@ class Bang with FastEquatable implements Insertable<Bang> {
return (format == null ||
format!.contains(BangFormat.urlEncodePlaceholder) == true)
? (format == null ||
format?.contains(BangFormat.urlEncodeSpaceToPlus) == true)
? Uri.encodeQueryComponent(input)
: Uri.encodeComponent(input)
format?.contains(BangFormat.urlEncodeSpaceToPlus) == true)
? Uri.encodeQueryComponent(input)
: Uri.encodeComponent(input)
: input;
}
Uri getTemplateUrl(String? query) {
final url =
(query != null)
? urlTemplate.replaceAll(
_templateQueryPlaceholder,
formatQuery(query),
)
: urlTemplate;
final url = (query != null)
? urlTemplate.replaceAll(_templateQueryPlaceholder, formatQuery(query))
: urlTemplate;
var template = Uri.parse(url);
if (!template.hasScheme || template.origin.isEmpty) {
+35 -44
View File
@@ -89,46 +89,38 @@ class _$BangCWProxyImpl implements _$BangCWProxy {
Object? format = const $CopyWithPlaceholder(),
}) {
return Bang(
websiteName:
websiteName == const $CopyWithPlaceholder()
? _value.websiteName
// ignore: cast_nullable_to_non_nullable
: websiteName as String,
domain:
domain == const $CopyWithPlaceholder()
? _value.domain
// ignore: cast_nullable_to_non_nullable
: domain as String,
trigger:
trigger == const $CopyWithPlaceholder()
? _value.trigger
// ignore: cast_nullable_to_non_nullable
: trigger as String,
urlTemplate:
urlTemplate == const $CopyWithPlaceholder()
? _value.urlTemplate
// ignore: cast_nullable_to_non_nullable
: urlTemplate as String,
group:
group == const $CopyWithPlaceholder()
? _value.group
// ignore: cast_nullable_to_non_nullable
: group as BangGroup?,
category:
category == const $CopyWithPlaceholder()
? _value.category
// ignore: cast_nullable_to_non_nullable
: category as String?,
subCategory:
subCategory == const $CopyWithPlaceholder()
? _value.subCategory
// ignore: cast_nullable_to_non_nullable
: subCategory as String?,
format:
format == const $CopyWithPlaceholder()
? _value.format
// ignore: cast_nullable_to_non_nullable
: format as Set<BangFormat>?,
websiteName: websiteName == const $CopyWithPlaceholder()
? _value.websiteName
// ignore: cast_nullable_to_non_nullable
: websiteName as String,
domain: domain == const $CopyWithPlaceholder()
? _value.domain
// ignore: cast_nullable_to_non_nullable
: domain as String,
trigger: trigger == const $CopyWithPlaceholder()
? _value.trigger
// ignore: cast_nullable_to_non_nullable
: trigger as String,
urlTemplate: urlTemplate == const $CopyWithPlaceholder()
? _value.urlTemplate
// ignore: cast_nullable_to_non_nullable
: urlTemplate as String,
group: group == const $CopyWithPlaceholder()
? _value.group
// ignore: cast_nullable_to_non_nullable
: group as BangGroup?,
category: category == const $CopyWithPlaceholder()
? _value.category
// ignore: cast_nullable_to_non_nullable
: category as String?,
subCategory: subCategory == const $CopyWithPlaceholder()
? _value.subCategory
// ignore: cast_nullable_to_non_nullable
: subCategory as String?,
format: format == const $CopyWithPlaceholder()
? _value.format
// ignore: cast_nullable_to_non_nullable
: format as Set<BangFormat>?,
);
}
}
@@ -150,10 +142,9 @@ Bang _$BangFromJson(Map<String, dynamic> json) => Bang(
urlTemplate: json['u'] as String,
category: json['c'] as String?,
subCategory: json['sc'] as String?,
format:
(json['fmt'] as List<dynamic>?)
?.map((e) => $enumDecode(_$BangFormatEnumMap, e))
.toSet(),
format: (json['fmt'] as List<dynamic>?)
?.map((e) => $enumDecode(_$BangFormatEnumMap, e))
.toSet(),
);
Map<String, dynamic> _$BangToJson(Bang instance) => <String, dynamic>{
@@ -103,56 +103,46 @@ class _$BangDataCWProxyImpl implements _$BangDataCWProxy {
Object? icon = const $CopyWithPlaceholder(),
}) {
return BangData(
websiteName:
websiteName == const $CopyWithPlaceholder()
? _value.websiteName
// ignore: cast_nullable_to_non_nullable
: websiteName as String,
domain:
domain == const $CopyWithPlaceholder()
? _value.domain
// ignore: cast_nullable_to_non_nullable
: domain as String,
trigger:
trigger == const $CopyWithPlaceholder()
? _value.trigger
// ignore: cast_nullable_to_non_nullable
: trigger as String,
urlTemplate:
urlTemplate == const $CopyWithPlaceholder()
? _value.urlTemplate
// ignore: cast_nullable_to_non_nullable
: urlTemplate as String,
category:
category == const $CopyWithPlaceholder()
? _value.category
// ignore: cast_nullable_to_non_nullable
: category as String?,
subCategory:
subCategory == const $CopyWithPlaceholder()
? _value.subCategory
// ignore: cast_nullable_to_non_nullable
: subCategory as String?,
format:
format == const $CopyWithPlaceholder()
? _value.format
// ignore: cast_nullable_to_non_nullable
: format as Set<BangFormat>?,
frequency:
frequency == const $CopyWithPlaceholder()
? _value.frequency
// ignore: cast_nullable_to_non_nullable
: frequency as int?,
lastUsed:
lastUsed == const $CopyWithPlaceholder()
? _value.lastUsed
// ignore: cast_nullable_to_non_nullable
: lastUsed as DateTime?,
icon:
icon == const $CopyWithPlaceholder()
? _value.icon
// ignore: cast_nullable_to_non_nullable
: icon as BrowserIcon?,
websiteName: websiteName == const $CopyWithPlaceholder()
? _value.websiteName
// ignore: cast_nullable_to_non_nullable
: websiteName as String,
domain: domain == const $CopyWithPlaceholder()
? _value.domain
// ignore: cast_nullable_to_non_nullable
: domain as String,
trigger: trigger == const $CopyWithPlaceholder()
? _value.trigger
// ignore: cast_nullable_to_non_nullable
: trigger as String,
urlTemplate: urlTemplate == const $CopyWithPlaceholder()
? _value.urlTemplate
// ignore: cast_nullable_to_non_nullable
: urlTemplate as String,
category: category == const $CopyWithPlaceholder()
? _value.category
// ignore: cast_nullable_to_non_nullable
: category as String?,
subCategory: subCategory == const $CopyWithPlaceholder()
? _value.subCategory
// ignore: cast_nullable_to_non_nullable
: subCategory as String?,
format: format == const $CopyWithPlaceholder()
? _value.format
// ignore: cast_nullable_to_non_nullable
: format as Set<BangFormat>?,
frequency: frequency == const $CopyWithPlaceholder()
? _value.frequency
// ignore: cast_nullable_to_non_nullable
: frequency as int?,
lastUsed: lastUsed == const $CopyWithPlaceholder()
? _value.lastUsed
// ignore: cast_nullable_to_non_nullable
: lastUsed as DateTime?,
icon: icon == const $CopyWithPlaceholder()
? _value.icon
// ignore: cast_nullable_to_non_nullable
: icon as BrowserIcon?,
);
}
}