majro update

This commit is contained in:
Fabian Freund
2025-02-28 14:30:49 +01:00
parent a8957f6cf8
commit 3c4d479bd9
181 changed files with 7090 additions and 5299 deletions
@@ -0,0 +1,17 @@
import 'dart:convert';
import 'package:drift/drift.dart';
class StringListConverter extends TypeConverter<List<String>, String> {
const StringListConverter();
@override
List<String> fromSql(String fromDb) {
return jsonDecode(fromDb) as List<String>;
}
@override
String toSql(List<String> value) {
return jsonEncode(value);
}
}
+2 -1
View File
@@ -1,5 +1,6 @@
import 'package:copy_with_extension/copy_with_extension.dart';
import 'package:fast_equatable/fast_equatable.dart';
import 'package:lensai/extensions/nullable.dart';
import 'package:lensai/features/geckoview/domain/entities/browser_icon.dart';
part 'web_page_info.g.dart';
@@ -12,7 +13,7 @@ class WebPageInfo with FastEquatable {
final Set<String>? feeds;
bool get isPageInfoComplete =>
(title?.isNotEmpty ?? false) && favicon != null;
title.isNotEmpty && favicon != null && feeds != null;
WebPageInfo({required this.url, this.title, this.favicon, this.feeds});
+20 -17
View File
@@ -48,7 +48,6 @@ class _$WebPageInfoCWProxyImpl implements _$WebPageInfoCWProxy {
WebPageInfo feeds(Set<String>? feeds) => this(feeds: feeds);
@override
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `WebPageInfo(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
///
/// Usage
@@ -62,22 +61,26 @@ class _$WebPageInfoCWProxyImpl implements _$WebPageInfoCWProxy {
Object? feeds = const $CopyWithPlaceholder(),
}) {
return WebPageInfo(
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?,
favicon: favicon == const $CopyWithPlaceholder()
? _value.favicon
// ignore: cast_nullable_to_non_nullable
: favicon as BrowserIcon?,
feeds: feeds == const $CopyWithPlaceholder()
? _value.feeds
// ignore: cast_nullable_to_non_nullable
: feeds as Set<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?,
favicon:
favicon == const $CopyWithPlaceholder()
? _value.favicon
// ignore: cast_nullable_to_non_nullable
: favicon as BrowserIcon?,
feeds:
feeds == const $CopyWithPlaceholder()
? _value.feeds
// ignore: cast_nullable_to_non_nullable
: feeds as Set<String>?,
);
}
}