upgrade min sdk; run formatter
This commit is contained in:
@@ -14,8 +14,7 @@ String _$lightSeedColorFallbackHash() =>
|
||||
final lightSeedColorFallbackProvider = Provider<Color>.internal(
|
||||
lightSeedColorFallback,
|
||||
name: r'lightSeedColorFallbackProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$lightSeedColorFallbackHash,
|
||||
dependencies: null,
|
||||
@@ -33,8 +32,7 @@ String _$darkSeedColorFallbackHash() =>
|
||||
final darkSeedColorFallbackProvider = Provider<Color>.internal(
|
||||
darkSeedColorFallback,
|
||||
name: r'darkSeedColorFallbackProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$darkSeedColorFallbackHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -13,8 +13,9 @@ String _$formatHash() => r'fe7fcdd19b512784a36f3838c57701030475e429';
|
||||
final formatProvider = AsyncNotifierProvider<Format, void>.internal(
|
||||
Format.new,
|
||||
name: r'formatProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$formatHash,
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$formatHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@@ -14,8 +14,7 @@ final willAcceptDropProvider =
|
||||
AutoDisposeNotifierProvider<WillAcceptDrop, DropTargetData?>.internal(
|
||||
WillAcceptDrop.new,
|
||||
name: r'willAcceptDropProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$willAcceptDropHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -13,8 +13,9 @@ String _$routerHash() => r'25fc899b87c080600f6e1d87d510db333378bdfd';
|
||||
final routerProvider = Provider<GoRouter>.internal(
|
||||
router,
|
||||
name: r'routerProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$routerHash,
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$routerHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@@ -64,8 +64,7 @@ class BangSearchRoute extends GoRouteData {
|
||||
@override
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
return BangSearchScreen(
|
||||
initialSearchText:
|
||||
(searchText.isEmpty || searchText == emptySearchText)
|
||||
initialSearchText: (searchText.isEmpty || searchText == emptySearchText)
|
||||
? null
|
||||
: searchText,
|
||||
);
|
||||
|
||||
@@ -72,8 +72,7 @@ class SearchRoute extends GoRouteData {
|
||||
Widget build(BuildContext context, GoRouterState state) {
|
||||
return SearchScreen(
|
||||
tabType: tabType,
|
||||
initialSearchText:
|
||||
(searchText.isEmpty || searchText == emptySearchText)
|
||||
initialSearchText: (searchText.isEmpty || searchText == emptySearchText)
|
||||
? null
|
||||
: searchText,
|
||||
);
|
||||
@@ -124,8 +123,8 @@ class ContextMenuRoute extends GoRouteData {
|
||||
@override
|
||||
Page<void> buildPage(BuildContext context, GoRouterState state) {
|
||||
return DialogPage(
|
||||
builder:
|
||||
(_) => ContextMenuDialog(hitResult: HitResultJson.fromJson($extra)),
|
||||
builder: (_) =>
|
||||
ContextMenuDialog(hitResult: HitResultJson.fromJson($extra)),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,23 +61,19 @@ class _$WebPageInfoCWProxyImpl implements _$WebPageInfoCWProxy {
|
||||
Object? feeds = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return WebPageInfo(
|
||||
url:
|
||||
url == const $CopyWithPlaceholder()
|
||||
url: url == const $CopyWithPlaceholder()
|
||||
? _value.url
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: url as Uri,
|
||||
title:
|
||||
title == const $CopyWithPlaceholder()
|
||||
title: title == const $CopyWithPlaceholder()
|
||||
? _value.title
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: title as String?,
|
||||
favicon:
|
||||
favicon == const $CopyWithPlaceholder()
|
||||
favicon: favicon == const $CopyWithPlaceholder()
|
||||
? _value.favicon
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: favicon as BrowserIcon?,
|
||||
feeds:
|
||||
feeds == const $CopyWithPlaceholder()
|
||||
feeds: feeds == const $CopyWithPlaceholder()
|
||||
? _value.feeds
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: feeds as Set<Uri>?,
|
||||
|
||||
@@ -11,14 +11,14 @@ String _$appInitializationServiceHash() =>
|
||||
|
||||
/// See also [AppInitializationService].
|
||||
@ProviderFor(AppInitializationService)
|
||||
final appInitializationServiceProvider = NotifierProvider<
|
||||
final appInitializationServiceProvider =
|
||||
NotifierProvider<
|
||||
AppInitializationService,
|
||||
Result<({bool initialized, String? stage, List<ErrorMessage> errors})>
|
||||
>.internal(
|
||||
AppInitializationService.new,
|
||||
name: r'appInitializationServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$appInitializationServiceHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -37,8 +37,10 @@ const _typeMap = {
|
||||
|
||||
Iterable<ResourceSize> sizesToList(String? sizes) sync* {
|
||||
if (sizes != null) {
|
||||
final splitted =
|
||||
sizes.split(' ').where((size) => size.contains('x')).toList();
|
||||
final splitted = sizes
|
||||
.split(' ')
|
||||
.where((size) => size.contains('x'))
|
||||
.toList();
|
||||
|
||||
for (final size in splitted) {
|
||||
final dimensions = size.split('x');
|
||||
@@ -87,8 +89,7 @@ class GenericWebsiteService extends _$GenericWebsiteService {
|
||||
url: resource['url'] as String,
|
||||
type: resource['type'] as IconType,
|
||||
mimeType: resource['mimeType'] as String?,
|
||||
sizes:
|
||||
(resource['sizes'] as List<List<int>>)
|
||||
sizes: (resource['sizes'] as List<List<int>>)
|
||||
.map((s) => ResourceSize(height: s[0], width: s[1]))
|
||||
.toList(),
|
||||
maskable: resource['maskable'] as bool,
|
||||
@@ -211,8 +212,10 @@ class GenericWebsiteService extends _$GenericWebsiteService {
|
||||
|
||||
final title = document.querySelector('title')?.text;
|
||||
final resources = _extractIcons(baseUri, document);
|
||||
final feeds =
|
||||
await FeedFinder(url: baseUri, document: document).parse();
|
||||
final feeds = await FeedFinder(
|
||||
url: baseUri,
|
||||
document: document,
|
||||
).parse();
|
||||
|
||||
return {
|
||||
'title': title,
|
||||
@@ -235,8 +238,7 @@ class GenericWebsiteService extends _$GenericWebsiteService {
|
||||
);
|
||||
}
|
||||
|
||||
final resources =
|
||||
(result['resources']! as List<Map<String, dynamic>>)
|
||||
final resources = (result['resources']! as List<Map<String, dynamic>>)
|
||||
.map(_deserializeResource)
|
||||
.toList();
|
||||
|
||||
|
||||
@@ -15,8 +15,7 @@ final genericWebsiteServiceProvider =
|
||||
NotifierProvider<GenericWebsiteService, void>.internal(
|
||||
GenericWebsiteService.new,
|
||||
name: r'genericWebsiteServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$genericWebsiteServiceHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -13,8 +13,9 @@ String _$packageInfoHash() => r'cc57db7b4684ab0d5df0f050b8ea045a3658e89a';
|
||||
final packageInfoProvider = FutureProvider<PackageInfo>.internal(
|
||||
packageInfo,
|
||||
name: r'packageInfoProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$packageInfoHash,
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$packageInfoHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@@ -13,8 +13,7 @@ String _$widgetPinnableHash() => r'f91041f0f051ad0f00dd765cafea5571ca8c8088';
|
||||
final widgetPinnableProvider = FutureProvider<bool>.internal(
|
||||
widgetPinnable,
|
||||
name: r'widgetPinnableProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$widgetPinnableHash,
|
||||
dependencies: null,
|
||||
@@ -33,8 +32,7 @@ final appWidgetLaunchStreamProvider =
|
||||
AutoDisposeProvider<Raw<Stream<ReceivedIntentParameter>>>.internal(
|
||||
appWidgetLaunchStream,
|
||||
name: r'appWidgetLaunchStreamProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$appWidgetLaunchStreamHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -22,7 +22,10 @@ class BangDao extends DatabaseAccessor<BangDatabase> with _$BangDaoMixin {
|
||||
|
||||
SingleSelectable<int> getBangCount({Iterable<BangGroup>? groups}) {
|
||||
return db.bang.count(
|
||||
where: groups.mapNotNull((groups) => (t) => t.group.isInValues(groups)),
|
||||
where: groups.mapNotNull(
|
||||
(groups) =>
|
||||
(t) => t.group.isInValues(groups),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@ class SyncDao extends DatabaseAccessor<BangDatabase> with _$SyncDaoMixin {
|
||||
SyncDao(super.db);
|
||||
|
||||
SingleOrNullSelectable<DateTime?> getLastSyncOfGroup(BangGroup group) {
|
||||
final query =
|
||||
selectOnly(db.bangSync)
|
||||
final query = selectOnly(db.bangSync)
|
||||
..addColumns([db.bangSync.lastSync])
|
||||
..where(db.bangSync.group.equalsValue(group));
|
||||
|
||||
|
||||
@@ -96,23 +96,19 @@ class BangTable extends Table with TableInfo<BangTable, Bang> {
|
||||
Bang map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||
return Bang(
|
||||
websiteName:
|
||||
attachedDatabase.typeMapping.read(
|
||||
websiteName: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}website_name'],
|
||||
)!,
|
||||
domain:
|
||||
attachedDatabase.typeMapping.read(
|
||||
domain: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}domain'],
|
||||
)!,
|
||||
trigger:
|
||||
attachedDatabase.typeMapping.read(
|
||||
trigger: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}trigger'],
|
||||
)!,
|
||||
urlTemplate:
|
||||
attachedDatabase.typeMapping.read(
|
||||
urlTemplate: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}url_template'],
|
||||
)!,
|
||||
@@ -331,8 +327,7 @@ class BangSync extends Table with TableInfo<BangSync, BangSyncData> {
|
||||
data['${effectivePrefix}group'],
|
||||
)!,
|
||||
),
|
||||
lastSync:
|
||||
attachedDatabase.typeMapping.read(
|
||||
lastSync: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.dateTime,
|
||||
data['${effectivePrefix}last_sync'],
|
||||
)!,
|
||||
@@ -512,18 +507,15 @@ class BangFrequency extends Table
|
||||
BangFrequencyData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||
return BangFrequencyData(
|
||||
trigger:
|
||||
attachedDatabase.typeMapping.read(
|
||||
trigger: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}trigger'],
|
||||
)!,
|
||||
frequency:
|
||||
attachedDatabase.typeMapping.read(
|
||||
frequency: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.int,
|
||||
data['${effectivePrefix}frequency'],
|
||||
)!,
|
||||
lastUsed:
|
||||
attachedDatabase.typeMapping.read(
|
||||
lastUsed: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.dateTime,
|
||||
data['${effectivePrefix}last_used'],
|
||||
)!,
|
||||
@@ -736,18 +728,15 @@ class BangHistory extends Table with TableInfo<BangHistory, BangHistoryData> {
|
||||
BangHistoryData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||
return BangHistoryData(
|
||||
searchQuery:
|
||||
attachedDatabase.typeMapping.read(
|
||||
searchQuery: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}search_query'],
|
||||
)!,
|
||||
trigger:
|
||||
attachedDatabase.typeMapping.read(
|
||||
trigger: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}trigger'],
|
||||
)!,
|
||||
searchDate:
|
||||
attachedDatabase.typeMapping.read(
|
||||
searchDate: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.dateTime,
|
||||
data['${effectivePrefix}search_date'],
|
||||
)!,
|
||||
@@ -813,11 +802,13 @@ class BangHistoryData extends DataClass implements Insertable<BangHistoryData> {
|
||||
);
|
||||
BangHistoryData copyWithCompanion(BangHistoryCompanion data) {
|
||||
return BangHistoryData(
|
||||
searchQuery:
|
||||
data.searchQuery.present ? data.searchQuery.value : this.searchQuery,
|
||||
searchQuery: data.searchQuery.present
|
||||
? data.searchQuery.value
|
||||
: this.searchQuery,
|
||||
trigger: data.trigger.present ? data.trigger.value : this.trigger,
|
||||
searchDate:
|
||||
data.searchDate.present ? data.searchDate.value : this.searchDate,
|
||||
searchDate: data.searchDate.present
|
||||
? data.searchDate.value
|
||||
: this.searchDate,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -954,13 +945,11 @@ class BangFts extends Table
|
||||
BangFt map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||
return BangFt(
|
||||
trigger:
|
||||
attachedDatabase.typeMapping.read(
|
||||
trigger: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}trigger'],
|
||||
)!,
|
||||
websiteName:
|
||||
attachedDatabase.typeMapping.read(
|
||||
websiteName: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}website_name'],
|
||||
)!,
|
||||
@@ -1017,8 +1006,9 @@ class BangFt extends DataClass implements Insertable<BangFt> {
|
||||
BangFt copyWithCompanion(BangFtsCompanion data) {
|
||||
return BangFt(
|
||||
trigger: data.trigger.present ? data.trigger.value : this.trigger,
|
||||
websiteName:
|
||||
data.websiteName.present ? data.websiteName.value : this.websiteName,
|
||||
websiteName: data.websiteName.present
|
||||
? data.websiteName.value
|
||||
: this.websiteName,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1140,23 +1130,19 @@ class BangDataView extends ViewInfo<BangDataView, BangData>
|
||||
BangData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||
return BangData(
|
||||
websiteName:
|
||||
attachedDatabase.typeMapping.read(
|
||||
websiteName: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}website_name'],
|
||||
)!,
|
||||
domain:
|
||||
attachedDatabase.typeMapping.read(
|
||||
domain: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}domain'],
|
||||
)!,
|
||||
trigger:
|
||||
attachedDatabase.typeMapping.read(
|
||||
trigger: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}trigger'],
|
||||
)!,
|
||||
urlTemplate:
|
||||
attachedDatabase.typeMapping.read(
|
||||
urlTemplate: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}url_template'],
|
||||
)!,
|
||||
@@ -1735,12 +1721,12 @@ class $BangTableTableManager
|
||||
TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
createFilteringComposer:
|
||||
() => $BangTableFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer:
|
||||
() => $BangTableOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer:
|
||||
() => $BangTableAnnotationComposer($db: db, $table: table),
|
||||
createFilteringComposer: () =>
|
||||
$BangTableFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer: () =>
|
||||
$BangTableOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer: () =>
|
||||
$BangTableAnnotationComposer($db: db, $table: table),
|
||||
updateCompanionCallback:
|
||||
({
|
||||
Value<String> trigger = const Value.absent(),
|
||||
@@ -1785,20 +1771,13 @@ class $BangTableTableManager
|
||||
format: format,
|
||||
rowid: rowid,
|
||||
),
|
||||
withReferenceMapper:
|
||||
(p0) =>
|
||||
p0
|
||||
withReferenceMapper: (p0) => p0
|
||||
.map(
|
||||
(e) => (
|
||||
e.readTable(table),
|
||||
$BangTableReferences(db, table, e),
|
||||
),
|
||||
(e) => (e.readTable(table), $BangTableReferences(db, table, e)),
|
||||
)
|
||||
.toList(),
|
||||
prefetchHooksCallback: ({
|
||||
bangFrequencyRefs = false,
|
||||
bangHistoryRefs = false,
|
||||
}) {
|
||||
prefetchHooksCallback:
|
||||
({bangFrequencyRefs = false, bangHistoryRefs = false}) {
|
||||
return PrefetchHooks(
|
||||
db: db,
|
||||
explicitlyWatchedTables: [
|
||||
@@ -1817,9 +1796,7 @@ class $BangTableTableManager
|
||||
currentTable: table,
|
||||
referencedTable: $BangTableReferences
|
||||
._bangFrequencyRefsTable(db),
|
||||
managerFromTypedResult:
|
||||
(p0) =>
|
||||
$BangTableReferences(
|
||||
managerFromTypedResult: (p0) => $BangTableReferences(
|
||||
db,
|
||||
table,
|
||||
p0,
|
||||
@@ -1831,13 +1808,15 @@ class $BangTableTableManager
|
||||
typedResults: items,
|
||||
),
|
||||
if (bangHistoryRefs)
|
||||
await $_getPrefetchedData<Bang, BangTable, BangHistoryData>(
|
||||
await $_getPrefetchedData<
|
||||
Bang,
|
||||
BangTable,
|
||||
BangHistoryData
|
||||
>(
|
||||
currentTable: table,
|
||||
referencedTable: $BangTableReferences
|
||||
._bangHistoryRefsTable(db),
|
||||
managerFromTypedResult:
|
||||
(p0) =>
|
||||
$BangTableReferences(
|
||||
managerFromTypedResult: (p0) => $BangTableReferences(
|
||||
db,
|
||||
table,
|
||||
p0,
|
||||
@@ -1958,12 +1937,12 @@ class $BangSyncTableManager
|
||||
TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
createFilteringComposer:
|
||||
() => $BangSyncFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer:
|
||||
() => $BangSyncOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer:
|
||||
() => $BangSyncAnnotationComposer($db: db, $table: table),
|
||||
createFilteringComposer: () =>
|
||||
$BangSyncFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer: () =>
|
||||
$BangSyncOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer: () =>
|
||||
$BangSyncAnnotationComposer($db: db, $table: table),
|
||||
updateCompanionCallback:
|
||||
({
|
||||
Value<BangGroup> group = const Value.absent(),
|
||||
@@ -1974,15 +1953,8 @@ class $BangSyncTableManager
|
||||
Value<BangGroup> group = const Value.absent(),
|
||||
required DateTime lastSync,
|
||||
}) => BangSyncCompanion.insert(group: group, lastSync: lastSync),
|
||||
withReferenceMapper:
|
||||
(p0) =>
|
||||
p0
|
||||
.map(
|
||||
(e) => (
|
||||
e.readTable(table),
|
||||
BaseReferences(db, table, e),
|
||||
),
|
||||
)
|
||||
withReferenceMapper: (p0) => p0
|
||||
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
||||
.toList(),
|
||||
prefetchHooksCallback: null,
|
||||
),
|
||||
@@ -2186,12 +2158,12 @@ class $BangFrequencyTableManager
|
||||
TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
createFilteringComposer:
|
||||
() => $BangFrequencyFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer:
|
||||
() => $BangFrequencyOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer:
|
||||
() => $BangFrequencyAnnotationComposer($db: db, $table: table),
|
||||
createFilteringComposer: () =>
|
||||
$BangFrequencyFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer: () =>
|
||||
$BangFrequencyOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer: () =>
|
||||
$BangFrequencyAnnotationComposer($db: db, $table: table),
|
||||
updateCompanionCallback:
|
||||
({
|
||||
Value<String> trigger = const Value.absent(),
|
||||
@@ -2216,9 +2188,7 @@ class $BangFrequencyTableManager
|
||||
lastUsed: lastUsed,
|
||||
rowid: rowid,
|
||||
),
|
||||
withReferenceMapper:
|
||||
(p0) =>
|
||||
p0
|
||||
withReferenceMapper: (p0) => p0
|
||||
.map(
|
||||
(e) => (
|
||||
e.readTable(table),
|
||||
@@ -2230,7 +2200,8 @@ class $BangFrequencyTableManager
|
||||
return PrefetchHooks(
|
||||
db: db,
|
||||
explicitlyWatchedTables: [],
|
||||
addJoins: <
|
||||
addJoins:
|
||||
<
|
||||
T extends TableManagerState<
|
||||
dynamic,
|
||||
dynamic,
|
||||
@@ -2252,8 +2223,7 @@ class $BangFrequencyTableManager
|
||||
currentColumn: table.trigger,
|
||||
referencedTable: $BangFrequencyReferences
|
||||
._triggerTable(db),
|
||||
referencedColumn:
|
||||
$BangFrequencyReferences
|
||||
referencedColumn: $BangFrequencyReferences
|
||||
._triggerTable(db)
|
||||
.trigger,
|
||||
)
|
||||
@@ -2471,12 +2441,12 @@ class $BangHistoryTableManager
|
||||
TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
createFilteringComposer:
|
||||
() => $BangHistoryFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer:
|
||||
() => $BangHistoryOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer:
|
||||
() => $BangHistoryAnnotationComposer($db: db, $table: table),
|
||||
createFilteringComposer: () =>
|
||||
$BangHistoryFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer: () =>
|
||||
$BangHistoryOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer: () =>
|
||||
$BangHistoryAnnotationComposer($db: db, $table: table),
|
||||
updateCompanionCallback:
|
||||
({
|
||||
Value<String> searchQuery = const Value.absent(),
|
||||
@@ -2501,21 +2471,18 @@ class $BangHistoryTableManager
|
||||
searchDate: searchDate,
|
||||
rowid: rowid,
|
||||
),
|
||||
withReferenceMapper:
|
||||
(p0) =>
|
||||
p0
|
||||
withReferenceMapper: (p0) => p0
|
||||
.map(
|
||||
(e) => (
|
||||
e.readTable(table),
|
||||
$BangHistoryReferences(db, table, e),
|
||||
),
|
||||
(e) =>
|
||||
(e.readTable(table), $BangHistoryReferences(db, table, e)),
|
||||
)
|
||||
.toList(),
|
||||
prefetchHooksCallback: ({trigger = false}) {
|
||||
return PrefetchHooks(
|
||||
db: db,
|
||||
explicitlyWatchedTables: [],
|
||||
addJoins: <
|
||||
addJoins:
|
||||
<
|
||||
T extends TableManagerState<
|
||||
dynamic,
|
||||
dynamic,
|
||||
@@ -2537,8 +2504,7 @@ class $BangHistoryTableManager
|
||||
currentColumn: table.trigger,
|
||||
referencedTable: $BangHistoryReferences
|
||||
._triggerTable(db),
|
||||
referencedColumn:
|
||||
$BangHistoryReferences
|
||||
referencedColumn: $BangHistoryReferences
|
||||
._triggerTable(db)
|
||||
.trigger,
|
||||
)
|
||||
@@ -2658,12 +2624,12 @@ class $BangFtsTableManager
|
||||
TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
createFilteringComposer:
|
||||
() => $BangFtsFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer:
|
||||
() => $BangFtsOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer:
|
||||
() => $BangFtsAnnotationComposer($db: db, $table: table),
|
||||
createFilteringComposer: () =>
|
||||
$BangFtsFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer: () =>
|
||||
$BangFtsOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer: () =>
|
||||
$BangFtsAnnotationComposer($db: db, $table: table),
|
||||
updateCompanionCallback:
|
||||
({
|
||||
Value<String> trigger = const Value.absent(),
|
||||
@@ -2684,15 +2650,8 @@ class $BangFtsTableManager
|
||||
websiteName: websiteName,
|
||||
rowid: rowid,
|
||||
),
|
||||
withReferenceMapper:
|
||||
(p0) =>
|
||||
p0
|
||||
.map(
|
||||
(e) => (
|
||||
e.readTable(table),
|
||||
BaseReferences(db, table, e),
|
||||
),
|
||||
)
|
||||
withReferenceMapper: (p0) => p0
|
||||
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
||||
.toList(),
|
||||
prefetchHooksCallback: null,
|
||||
),
|
||||
|
||||
@@ -72,12 +72,8 @@ class Bang with FastEquatable implements Insertable<Bang> {
|
||||
}
|
||||
|
||||
Uri getTemplateUrl(String? query) {
|
||||
final url =
|
||||
(query != null)
|
||||
? urlTemplate.replaceAll(
|
||||
_templateQueryPlaceholder,
|
||||
formatQuery(query),
|
||||
)
|
||||
final url = (query != null)
|
||||
? urlTemplate.replaceAll(_templateQueryPlaceholder, formatQuery(query))
|
||||
: urlTemplate;
|
||||
|
||||
var template = Uri.parse(url);
|
||||
|
||||
@@ -89,43 +89,35 @@ class _$BangCWProxyImpl implements _$BangCWProxy {
|
||||
Object? format = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return Bang(
|
||||
websiteName:
|
||||
websiteName == const $CopyWithPlaceholder()
|
||||
websiteName: websiteName == const $CopyWithPlaceholder()
|
||||
? _value.websiteName
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: websiteName as String,
|
||||
domain:
|
||||
domain == const $CopyWithPlaceholder()
|
||||
domain: domain == const $CopyWithPlaceholder()
|
||||
? _value.domain
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: domain as String,
|
||||
trigger:
|
||||
trigger == const $CopyWithPlaceholder()
|
||||
trigger: trigger == const $CopyWithPlaceholder()
|
||||
? _value.trigger
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: trigger as String,
|
||||
urlTemplate:
|
||||
urlTemplate == const $CopyWithPlaceholder()
|
||||
urlTemplate: urlTemplate == const $CopyWithPlaceholder()
|
||||
? _value.urlTemplate
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: urlTemplate as String,
|
||||
group:
|
||||
group == const $CopyWithPlaceholder()
|
||||
group: group == const $CopyWithPlaceholder()
|
||||
? _value.group
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: group as BangGroup?,
|
||||
category:
|
||||
category == const $CopyWithPlaceholder()
|
||||
category: category == const $CopyWithPlaceholder()
|
||||
? _value.category
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: category as String?,
|
||||
subCategory:
|
||||
subCategory == const $CopyWithPlaceholder()
|
||||
subCategory: subCategory == const $CopyWithPlaceholder()
|
||||
? _value.subCategory
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: subCategory as String?,
|
||||
format:
|
||||
format == const $CopyWithPlaceholder()
|
||||
format: format == const $CopyWithPlaceholder()
|
||||
? _value.format
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: format as Set<BangFormat>?,
|
||||
@@ -150,8 +142,7 @@ 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>?)
|
||||
format: (json['fmt'] as List<dynamic>?)
|
||||
?.map((e) => $enumDecode(_$BangFormatEnumMap, e))
|
||||
.toSet(),
|
||||
);
|
||||
|
||||
@@ -103,53 +103,43 @@ class _$BangDataCWProxyImpl implements _$BangDataCWProxy {
|
||||
Object? icon = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return BangData(
|
||||
websiteName:
|
||||
websiteName == const $CopyWithPlaceholder()
|
||||
websiteName: websiteName == const $CopyWithPlaceholder()
|
||||
? _value.websiteName
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: websiteName as String,
|
||||
domain:
|
||||
domain == const $CopyWithPlaceholder()
|
||||
domain: domain == const $CopyWithPlaceholder()
|
||||
? _value.domain
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: domain as String,
|
||||
trigger:
|
||||
trigger == const $CopyWithPlaceholder()
|
||||
trigger: trigger == const $CopyWithPlaceholder()
|
||||
? _value.trigger
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: trigger as String,
|
||||
urlTemplate:
|
||||
urlTemplate == const $CopyWithPlaceholder()
|
||||
urlTemplate: urlTemplate == const $CopyWithPlaceholder()
|
||||
? _value.urlTemplate
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: urlTemplate as String,
|
||||
category:
|
||||
category == const $CopyWithPlaceholder()
|
||||
category: category == const $CopyWithPlaceholder()
|
||||
? _value.category
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: category as String?,
|
||||
subCategory:
|
||||
subCategory == const $CopyWithPlaceholder()
|
||||
subCategory: subCategory == const $CopyWithPlaceholder()
|
||||
? _value.subCategory
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: subCategory as String?,
|
||||
format:
|
||||
format == const $CopyWithPlaceholder()
|
||||
format: format == const $CopyWithPlaceholder()
|
||||
? _value.format
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: format as Set<BangFormat>?,
|
||||
frequency:
|
||||
frequency == const $CopyWithPlaceholder()
|
||||
frequency: frequency == const $CopyWithPlaceholder()
|
||||
? _value.frequency
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: frequency as int?,
|
||||
lastUsed:
|
||||
lastUsed == const $CopyWithPlaceholder()
|
||||
lastUsed: lastUsed == const $CopyWithPlaceholder()
|
||||
? _value.lastUsed
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: lastUsed as DateTime?,
|
||||
icon:
|
||||
icon == const $CopyWithPlaceholder()
|
||||
icon: icon == const $CopyWithPlaceholder()
|
||||
? _value.icon
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: icon as BrowserIcon?,
|
||||
|
||||
@@ -13,8 +13,9 @@ String _$bangDatabaseHash() => r'e31cf4b499300aff65174a16fb74c7dd8ec3d6f0';
|
||||
final bangDatabaseProvider = Provider<BangDatabase>.internal(
|
||||
bangDatabase,
|
||||
name: r'bangDatabaseProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$bangDatabaseHash,
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$bangDatabaseHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@@ -30,8 +30,7 @@ class BangDataSourceService extends _$BangDataSourceService {
|
||||
client.close();
|
||||
}
|
||||
}, [url.toString()]).then(
|
||||
(json) =>
|
||||
json.map((e) {
|
||||
(json) => json.map((e) {
|
||||
var bang = Bang.fromJson(e as Map<String, dynamic>);
|
||||
|
||||
if (group != null) {
|
||||
|
||||
@@ -15,8 +15,7 @@ final bangDataSourceServiceProvider =
|
||||
AutoDisposeNotifierProvider<BangDataSourceService, void>.internal(
|
||||
BangDataSourceService.new,
|
||||
name: r'bangDataSourceServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$bangDataSourceServiceHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -14,8 +14,7 @@ String _$defaultSearchBangDataHash() =>
|
||||
final defaultSearchBangDataProvider = StreamProvider<BangData?>.internal(
|
||||
defaultSearchBangData,
|
||||
name: r'defaultSearchBangDataProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$defaultSearchBangDataHash,
|
||||
dependencies: null,
|
||||
@@ -33,8 +32,7 @@ final bangCategoriesProvider =
|
||||
AutoDisposeStreamProvider<Map<String, List<String>>>.internal(
|
||||
bangCategories,
|
||||
name: r'bangCategoriesProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$bangCategoriesHash,
|
||||
dependencies: null,
|
||||
@@ -135,8 +133,7 @@ class BangListProvider extends AutoDisposeStreamProvider<List<BangData>> {
|
||||
),
|
||||
from: bangListProvider,
|
||||
name: r'bangListProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$bangListHash,
|
||||
dependencies: BangListFamily._dependencies,
|
||||
@@ -253,8 +250,7 @@ final frequentBangListProvider =
|
||||
AutoDisposeStreamProvider<List<BangData>>.internal(
|
||||
frequentBangList,
|
||||
name: r'frequentBangListProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$frequentBangListHash,
|
||||
dependencies: null,
|
||||
@@ -272,8 +268,7 @@ final searchHistoryProvider =
|
||||
AutoDisposeStreamProvider<List<SearchHistoryEntry>>.internal(
|
||||
searchHistory,
|
||||
name: r'searchHistoryProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$searchHistoryHash,
|
||||
dependencies: null,
|
||||
@@ -330,8 +325,7 @@ class LastSyncOfGroupProvider extends AutoDisposeStreamProvider<DateTime?> {
|
||||
(ref) => lastSyncOfGroup(ref as LastSyncOfGroupRef, group),
|
||||
from: lastSyncOfGroupProvider,
|
||||
name: r'lastSyncOfGroupProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$lastSyncOfGroupHash,
|
||||
dependencies: LastSyncOfGroupFamily._dependencies,
|
||||
@@ -451,8 +445,7 @@ class BangCountOfGroupProvider extends AutoDisposeStreamProvider<int> {
|
||||
(ref) => bangCountOfGroup(ref as BangCountOfGroupRef, group),
|
||||
from: bangCountOfGroupProvider,
|
||||
name: r'bangCountOfGroupProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$bangCountOfGroupHash,
|
||||
dependencies: BangCountOfGroupFamily._dependencies,
|
||||
|
||||
@@ -14,8 +14,7 @@ final bangSearchProvider =
|
||||
AutoDisposeStreamNotifierProvider<BangSearch, List<BangData>>.internal(
|
||||
BangSearch.new,
|
||||
name: r'bangSearchProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$bangSearchHash,
|
||||
dependencies: null,
|
||||
@@ -27,14 +26,16 @@ String _$seamlessBangHash() => r'8bd7a2cbe4c302ae08f85167290666a7437f8b9b';
|
||||
|
||||
/// See also [SeamlessBang].
|
||||
@ProviderFor(SeamlessBang)
|
||||
final seamlessBangProvider = AutoDisposeNotifierProvider<
|
||||
final seamlessBangProvider =
|
||||
AutoDisposeNotifierProvider<
|
||||
SeamlessBang,
|
||||
AsyncValue<List<BangData>>
|
||||
>.internal(
|
||||
SeamlessBang.new,
|
||||
name: r'seamlessBangProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$seamlessBangHash,
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$seamlessBangHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@@ -15,8 +15,7 @@ final bangDataRepositoryProvider =
|
||||
NotifierProvider<BangDataRepository, void>.internal(
|
||||
BangDataRepository.new,
|
||||
name: r'bangDataRepositoryProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$bangDataRepositoryHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -19,8 +19,9 @@ class BangSyncRepository extends _$BangSyncRepository {
|
||||
required Duration? syncInterval,
|
||||
}) async {
|
||||
if (syncInterval != null) {
|
||||
final lastSync =
|
||||
await db.syncDao.getLastSyncOfGroup(group).getSingleOrNull();
|
||||
final lastSync = await db.syncDao
|
||||
.getLastSyncOfGroup(group)
|
||||
.getSingleOrNull();
|
||||
|
||||
if (lastSync != null &&
|
||||
DateTime.now().difference(lastSync) < syncInterval) {
|
||||
|
||||
@@ -15,8 +15,7 @@ final bangSyncRepositoryProvider =
|
||||
NotifierProvider<BangSyncRepository, void>.internal(
|
||||
BangSyncRepository.new,
|
||||
name: r'bangSyncRepositoryProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$bangSyncRepositoryHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -54,23 +54,18 @@ class BangCategoriesScreen extends HookConsumerWidget {
|
||||
expanded.value = {...expanded.value}..remove(key);
|
||||
}
|
||||
},
|
||||
children:
|
||||
categories.entries
|
||||
children: categories.entries
|
||||
.map(
|
||||
(category) => ExpansionPanel(
|
||||
canTapOnHeader: true,
|
||||
isExpanded: expanded.value.contains(
|
||||
category.key,
|
||||
),
|
||||
headerBuilder:
|
||||
(context, isExpanded) =>
|
||||
isExpanded: expanded.value.contains(category.key),
|
||||
headerBuilder: (context, isExpanded) =>
|
||||
ListTile(title: Text(category.key)),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.only(left: 16.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children:
|
||||
category.value
|
||||
children: category.value
|
||||
.map(
|
||||
(subCategory) => ListTile(
|
||||
title: Text(subCategory),
|
||||
@@ -95,8 +90,7 @@ class BangCategoriesScreen extends HookConsumerWidget {
|
||||
},
|
||||
);
|
||||
},
|
||||
error:
|
||||
(error, stackTrace) => Center(
|
||||
error: (error, stackTrace) => Center(
|
||||
child: FailureWidget(
|
||||
title: 'Failed to load Bang Categories',
|
||||
exception: error,
|
||||
|
||||
@@ -47,8 +47,7 @@ class BangListScreen extends HookConsumerWidget {
|
||||
},
|
||||
);
|
||||
},
|
||||
error:
|
||||
(error, stackTrace) => SliverToBoxAdapter(
|
||||
error: (error, stackTrace) => SliverToBoxAdapter(
|
||||
child: Center(
|
||||
child: FailureWidget(
|
||||
title: 'Failed to load Bangs',
|
||||
@@ -56,8 +55,7 @@ class BangListScreen extends HookConsumerWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
loading:
|
||||
() => const SliverToBoxAdapter(
|
||||
loading: () => const SliverToBoxAdapter(
|
||||
child: Center(child: CircularProgressIndicator()),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -60,8 +60,7 @@ class BangSearchScreen extends HookConsumerWidget {
|
||||
),
|
||||
body: resultsAsync.when(
|
||||
skipLoadingOnReload: true,
|
||||
data:
|
||||
(bangs) => FadingScroll(
|
||||
data: (bangs) => FadingScroll(
|
||||
fadingSize: 25,
|
||||
builder: (context, controller) {
|
||||
return ListView.builder(
|
||||
@@ -79,12 +78,8 @@ class BangSearchScreen extends HookConsumerWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
error:
|
||||
(error, stackTrace) => Center(
|
||||
child: FailureWidget(
|
||||
title: 'Bang Search failed',
|
||||
exception: error,
|
||||
),
|
||||
error: (error, stackTrace) => Center(
|
||||
child: FailureWidget(title: 'Bang Search failed', exception: error),
|
||||
),
|
||||
loading: () => const SizedBox.shrink(),
|
||||
),
|
||||
|
||||
@@ -83,8 +83,8 @@ class SiteSearch extends HookConsumerWidget {
|
||||
width: double.maxFinite,
|
||||
child: SelectableChips(
|
||||
itemId: (bang) => bang.trigger,
|
||||
itemAvatar:
|
||||
(bang) => UrlIcon([bang.getTemplateUrl('')], iconSize: 20),
|
||||
itemAvatar: (bang) =>
|
||||
UrlIcon([bang.getTemplateUrl('')], iconSize: 20),
|
||||
itemLabel: (bang) => Text(bang.websiteName),
|
||||
availableItems: availableBangs,
|
||||
selectedItem: selectedBang,
|
||||
|
||||
@@ -15,8 +15,7 @@ final bottomSheetControllerProvider =
|
||||
AutoDisposeNotifierProvider<BottomSheetController, Sheet?>.internal(
|
||||
BottomSheetController.new,
|
||||
name: r'bottomSheetControllerProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$bottomSheetControllerHash,
|
||||
dependencies: null,
|
||||
@@ -32,8 +31,7 @@ final bottomSheetExtendProvider =
|
||||
StreamNotifierProvider<BottomSheetExtend, double>.internal(
|
||||
BottomSheetExtend.new,
|
||||
name: r'bottomSheetExtendProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$bottomSheetExtendHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -14,8 +14,7 @@ final overlayControllerProvider =
|
||||
AutoDisposeNotifierProvider<OverlayController, Widget?>.internal(
|
||||
OverlayController.new,
|
||||
name: r'overlayControllerProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$overlayControllerHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -129,68 +129,55 @@ class _$TabStateCWProxyImpl implements _$TabStateCWProxy {
|
||||
}) {
|
||||
return TabState(
|
||||
id: _value.id,
|
||||
contextId:
|
||||
contextId == const $CopyWithPlaceholder()
|
||||
contextId: contextId == const $CopyWithPlaceholder()
|
||||
? _value.contextId
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: contextId as String?,
|
||||
url:
|
||||
url == const $CopyWithPlaceholder()
|
||||
url: url == const $CopyWithPlaceholder()
|
||||
? _value.url
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: url as Uri,
|
||||
title:
|
||||
title == const $CopyWithPlaceholder()
|
||||
title: title == const $CopyWithPlaceholder()
|
||||
? _value.title
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: title as String,
|
||||
icon:
|
||||
icon == const $CopyWithPlaceholder()
|
||||
icon: icon == const $CopyWithPlaceholder()
|
||||
? _value.icon
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: icon as EquatableImage?,
|
||||
thumbnail:
|
||||
thumbnail == const $CopyWithPlaceholder()
|
||||
thumbnail: thumbnail == const $CopyWithPlaceholder()
|
||||
? _value.thumbnail
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: thumbnail as EquatableImage?,
|
||||
progress:
|
||||
progress == const $CopyWithPlaceholder()
|
||||
progress: progress == const $CopyWithPlaceholder()
|
||||
? _value.progress
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: progress as int,
|
||||
isPrivate:
|
||||
isPrivate == const $CopyWithPlaceholder()
|
||||
isPrivate: isPrivate == const $CopyWithPlaceholder()
|
||||
? _value.isPrivate
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: isPrivate as bool,
|
||||
isFullScreen:
|
||||
isFullScreen == const $CopyWithPlaceholder()
|
||||
isFullScreen: isFullScreen == const $CopyWithPlaceholder()
|
||||
? _value.isFullScreen
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: isFullScreen as bool,
|
||||
isLoading:
|
||||
isLoading == const $CopyWithPlaceholder()
|
||||
isLoading: isLoading == const $CopyWithPlaceholder()
|
||||
? _value.isLoading
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: isLoading as bool,
|
||||
securityInfoState:
|
||||
securityInfoState == const $CopyWithPlaceholder()
|
||||
securityInfoState: securityInfoState == const $CopyWithPlaceholder()
|
||||
? _value.securityInfoState
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: securityInfoState as SecurityState,
|
||||
historyState:
|
||||
historyState == const $CopyWithPlaceholder()
|
||||
historyState: historyState == const $CopyWithPlaceholder()
|
||||
? _value.historyState
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: historyState as HistoryState,
|
||||
readerableState:
|
||||
readerableState == const $CopyWithPlaceholder()
|
||||
readerableState: readerableState == const $CopyWithPlaceholder()
|
||||
? _value.readerableState
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: readerableState as ReaderableState,
|
||||
findResultState:
|
||||
findResultState == const $CopyWithPlaceholder()
|
||||
findResultState: findResultState == const $CopyWithPlaceholder()
|
||||
? _value.findResultState
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: findResultState as FindResultState,
|
||||
|
||||
@@ -85,38 +85,31 @@ class _$WebExtensionStateCWProxyImpl implements _$WebExtensionStateCWProxy {
|
||||
Object? icon = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return WebExtensionState(
|
||||
extensionId:
|
||||
extensionId == const $CopyWithPlaceholder()
|
||||
extensionId: extensionId == const $CopyWithPlaceholder()
|
||||
? _value.extensionId
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: extensionId as String,
|
||||
enabled:
|
||||
enabled == const $CopyWithPlaceholder()
|
||||
enabled: enabled == const $CopyWithPlaceholder()
|
||||
? _value.enabled
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: enabled as bool,
|
||||
title:
|
||||
title == const $CopyWithPlaceholder()
|
||||
title: title == const $CopyWithPlaceholder()
|
||||
? _value.title
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: title as String?,
|
||||
badgeText:
|
||||
badgeText == const $CopyWithPlaceholder()
|
||||
badgeText: badgeText == const $CopyWithPlaceholder()
|
||||
? _value.badgeText
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: badgeText as String?,
|
||||
badgeTextColor:
|
||||
badgeTextColor == const $CopyWithPlaceholder()
|
||||
badgeTextColor: badgeTextColor == const $CopyWithPlaceholder()
|
||||
? _value.badgeTextColor
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: badgeTextColor as Color?,
|
||||
badgeBackgroundColor:
|
||||
badgeBackgroundColor == const $CopyWithPlaceholder()
|
||||
badgeBackgroundColor: badgeBackgroundColor == const $CopyWithPlaceholder()
|
||||
? _value.badgeBackgroundColor
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: badgeBackgroundColor as Color?,
|
||||
icon:
|
||||
icon == const $CopyWithPlaceholder()
|
||||
icon: icon == const $CopyWithPlaceholder()
|
||||
? _value.icon
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: icon as EquatableImage?,
|
||||
|
||||
@@ -15,8 +15,7 @@ final selectionActionServiceProvider =
|
||||
Provider<GeckoSelectionActionService>.internal(
|
||||
selectionActionService,
|
||||
name: r'selectionActionServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$selectionActionServiceHash,
|
||||
dependencies: null,
|
||||
@@ -33,8 +32,9 @@ String _$eventServiceHash() => r'166b01f636fbdd4355dbc55a18ca4f83e0006de8';
|
||||
final eventServiceProvider = Provider<GeckoEventService>.internal(
|
||||
eventService,
|
||||
name: r'eventServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$eventServiceHash,
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$eventServiceHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
@@ -49,8 +49,9 @@ String _$addonServiceHash() => r'c7aca09b99c3810908176f3464f5f90a185aa5e7';
|
||||
final addonServiceProvider = Provider<GeckoAddonService>.internal(
|
||||
addonService,
|
||||
name: r'addonServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$addonServiceHash,
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$addonServiceHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
@@ -65,8 +66,7 @@ String _$tabContentServiceHash() => r'd9a991add907ecc138c62790883e59d8e9aa9266';
|
||||
final tabContentServiceProvider = Provider<GeckoTabContentService>.internal(
|
||||
tabContentService,
|
||||
name: r'tabContentServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$tabContentServiceHash,
|
||||
dependencies: null,
|
||||
@@ -85,8 +85,7 @@ final engineSuggestionsServiceProvider =
|
||||
Provider<GeckoSuggestionsService>.internal(
|
||||
engineSuggestionsService,
|
||||
name: r'engineSuggestionsServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$engineSuggestionsServiceHash,
|
||||
dependencies: null,
|
||||
@@ -104,8 +103,7 @@ final engineReadyStateProvider =
|
||||
NotifierProvider<EngineReadyState, bool>.internal(
|
||||
EngineReadyState.new,
|
||||
name: r'engineReadyStateProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$engineReadyStateHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -15,8 +15,7 @@ final browserExtensionServiceProvider =
|
||||
Provider<GeckoBrowserExtensionService>.internal(
|
||||
browserExtensionService,
|
||||
name: r'browserExtensionServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$browserExtensionServiceHash,
|
||||
dependencies: null,
|
||||
@@ -33,8 +32,7 @@ String _$feedRequestedHash() => r'4f179d0878072a77a87422ff6afdac53a3d57c04';
|
||||
final feedRequestedProvider = AutoDisposeStreamProvider<String>.internal(
|
||||
feedRequested,
|
||||
name: r'feedRequestedProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$feedRequestedHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -13,8 +13,9 @@ String _$selectedTabHash() => r'12b670dd76c3416e8d62bafd63bf69a83a603e3a';
|
||||
final selectedTabProvider = NotifierProvider<SelectedTab, String?>.internal(
|
||||
SelectedTab.new,
|
||||
name: r'selectedTabProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$selectedTabHash,
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$selectedTabHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@@ -14,8 +14,9 @@ final tabListProvider =
|
||||
NotifierProvider<TabList, EquatableValue<List<String>>>.internal(
|
||||
TabList.new,
|
||||
name: r'tabListProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$tabListHash,
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$tabListHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@@ -48,8 +48,7 @@ class TabSession extends _$TabSession {
|
||||
|
||||
@override
|
||||
void build({required String? tabId}) {
|
||||
_sessionService =
|
||||
(tabId != null)
|
||||
_sessionService = (tabId != null)
|
||||
? GeckoSessionService(tabId: tabId)
|
||||
: GeckoSessionService.forActiveTab();
|
||||
}
|
||||
|
||||
@@ -15,8 +15,7 @@ final selectedTabSessionNotifierProvider =
|
||||
AutoDisposeProvider<Raw<TabSession>>.internal(
|
||||
selectedTabSessionNotifier,
|
||||
name: r'selectedTabSessionNotifierProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$selectedTabSessionNotifierHash,
|
||||
dependencies: null,
|
||||
@@ -100,8 +99,7 @@ class TabSessionProvider
|
||||
() => TabSession()..tabId = tabId,
|
||||
from: tabSessionProvider,
|
||||
name: r'tabSessionProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$tabSessionHash,
|
||||
dependencies: TabSessionFamily._dependencies,
|
||||
|
||||
@@ -26,8 +26,7 @@ class TabStates extends _$TabStates {
|
||||
..[contentState.id] = current.copyWith(
|
||||
contextId: contentState.contextId,
|
||||
url: Uri.parse(contentState.url),
|
||||
title:
|
||||
(contentState.title.isNotEmpty)
|
||||
title: (contentState.title.isNotEmpty)
|
||||
? contentState.title
|
||||
: current.title,
|
||||
progress: contentState.progress,
|
||||
@@ -76,13 +75,10 @@ class TabStates extends _$TabStates {
|
||||
state = {...state}
|
||||
..[tabId] = current.copyWith.historyState(
|
||||
HistoryState(
|
||||
items:
|
||||
history.items.nonNulls
|
||||
items: history.items.nonNulls
|
||||
.map(
|
||||
(item) => HistoryItem(
|
||||
url: Uri.parse(item.url),
|
||||
title: item.title,
|
||||
),
|
||||
(item) =>
|
||||
HistoryItem(url: Uri.parse(item.url), title: item.title),
|
||||
)
|
||||
.toList(),
|
||||
currentIndex: history.currentIndex,
|
||||
|
||||
@@ -71,8 +71,7 @@ class TabStateProvider extends AutoDisposeProvider<TabState?> {
|
||||
(ref) => tabState(ref as TabStateRef, tabId),
|
||||
from: tabStateProvider,
|
||||
name: r'tabStateProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$tabStateHash,
|
||||
dependencies: TabStateFamily._dependencies,
|
||||
@@ -149,8 +148,7 @@ String _$selectedTabStateHash() => r'dbd36af7af286bd9d079f30e8e11bbda23bf7728';
|
||||
final selectedTabStateProvider = AutoDisposeProvider<TabState?>.internal(
|
||||
selectedTabState,
|
||||
name: r'selectedTabStateProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$selectedTabStateHash,
|
||||
dependencies: null,
|
||||
@@ -168,8 +166,7 @@ final tabStatesProvider =
|
||||
NotifierProvider<TabStates, Map<String, TabState>>.internal(
|
||||
TabStates.new,
|
||||
name: r'tabStatesProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$tabStatesHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -86,8 +86,7 @@ class WebExtensionsStateProvider
|
||||
() => WebExtensionsState()..actionType = actionType,
|
||||
from: webExtensionsStateProvider,
|
||||
name: r'webExtensionsStateProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$webExtensionsStateHash,
|
||||
dependencies: WebExtensionsStateFamily._dependencies,
|
||||
|
||||
@@ -49,8 +49,9 @@ class TabRepository extends _$TabRepository {
|
||||
HistoryMetadataKey? historyMetadata,
|
||||
Map<String, String>? additionalHeaders,
|
||||
}) async {
|
||||
final selectedContainer =
|
||||
await ref.read(selectedContainerProvider.notifier).fetchData();
|
||||
final selectedContainer = await ref
|
||||
.read(selectedContainerProvider.notifier)
|
||||
.fetchData();
|
||||
|
||||
return ref.read(tabDatabaseProvider).tabDao.upsertContainerTabTransactional(
|
||||
() {
|
||||
@@ -124,8 +125,8 @@ class TabRepository extends _$TabRepository {
|
||||
}
|
||||
|
||||
if (containerData.metadata.useProxy) {
|
||||
final proxyPluginHealthy =
|
||||
await GeckoContainerProxyService().healthcheck();
|
||||
final proxyPluginHealthy = await GeckoContainerProxyService()
|
||||
.healthcheck();
|
||||
|
||||
if (!proxyPluginHealthy) {
|
||||
logger.w(
|
||||
@@ -170,8 +171,7 @@ class TabRepository extends _$TabRepository {
|
||||
}
|
||||
|
||||
//We only take containers without authentication!
|
||||
final availableContainers =
|
||||
await ref
|
||||
final availableContainers = await ref
|
||||
.read(containerRepositoryProvider.notifier)
|
||||
.getAllContainersWithCount();
|
||||
|
||||
|
||||
@@ -13,8 +13,7 @@ String _$tabRepositoryHash() => r'9b7ef03bec41f149b3cb456b73d7ee0e1b2804df';
|
||||
final tabRepositoryProvider = NotifierProvider<TabRepository, void>.internal(
|
||||
TabRepository.new,
|
||||
name: r'tabRepositoryProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$tabRepositoryHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -92,13 +92,11 @@ EquatableValue<List<String>> seamlessFilteredTabIds(
|
||||
TabSearchPartition searchPartition,
|
||||
ContainerFilter containerFilter,
|
||||
) {
|
||||
final tabSearchResults =
|
||||
ref
|
||||
final tabSearchResults = ref
|
||||
.watch(
|
||||
tabSearchRepositoryProvider(searchPartition).select(
|
||||
(value) => EquatableValue(
|
||||
value.valueOrNull?.map((tab) => tab.id).toList(),
|
||||
),
|
||||
(value) =>
|
||||
EquatableValue(value.valueOrNull?.map((tab) => tab.id).toList()),
|
||||
),
|
||||
)
|
||||
.value;
|
||||
@@ -120,8 +118,7 @@ EquatableValue<List<TabPreview>> seamlessFilteredTabPreviews(
|
||||
TabSearchPartition searchPartition,
|
||||
ContainerFilter containerFilter,
|
||||
) {
|
||||
final tabSearchResults =
|
||||
ref
|
||||
final tabSearchResults = ref
|
||||
.watch(
|
||||
tabSearchRepositoryProvider(
|
||||
searchPartition,
|
||||
|
||||
@@ -74,8 +74,7 @@ class AvailableTabIdsProvider
|
||||
(ref) => availableTabIds(ref as AvailableTabIdsRef, containerFilter),
|
||||
from: availableTabIdsProvider,
|
||||
name: r'availableTabIdsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$availableTabIdsHash,
|
||||
dependencies: AvailableTabIdsFamily._dependencies,
|
||||
@@ -202,8 +201,7 @@ class AvailableTabStatesProvider
|
||||
availableTabStates(ref as AvailableTabStatesRef, containerFilter),
|
||||
from: availableTabStatesProvider,
|
||||
name: r'availableTabStatesProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$availableTabStatesHash,
|
||||
dependencies: AvailableTabStatesFamily._dependencies,
|
||||
@@ -342,8 +340,7 @@ class SeamlessFilteredTabIdsProvider
|
||||
),
|
||||
from: seamlessFilteredTabIdsProvider,
|
||||
name: r'seamlessFilteredTabIdsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$seamlessFilteredTabIdsHash,
|
||||
dependencies: SeamlessFilteredTabIdsFamily._dependencies,
|
||||
@@ -494,8 +491,7 @@ class SeamlessFilteredTabPreviewsProvider
|
||||
),
|
||||
from: seamlessFilteredTabPreviewsProvider,
|
||||
name: r'seamlessFilteredTabPreviewsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$seamlessFilteredTabPreviewsHash,
|
||||
dependencies: SeamlessFilteredTabPreviewsFamily._dependencies,
|
||||
@@ -641,8 +637,7 @@ class SelectedBangTriggerProvider
|
||||
() => SelectedBangTrigger()..domain = domain,
|
||||
from: selectedBangTriggerProvider,
|
||||
name: r'selectedBangTriggerProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$selectedBangTriggerHash,
|
||||
dependencies: SelectedBangTriggerFamily._dependencies,
|
||||
@@ -773,8 +768,7 @@ class SelectedBangDataProvider
|
||||
() => SelectedBangData()..domain = domain,
|
||||
from: selectedBangDataProvider,
|
||||
name: r'selectedBangDataProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$selectedBangDataHash,
|
||||
dependencies: SelectedBangDataFamily._dependencies,
|
||||
|
||||
@@ -11,14 +11,14 @@ String _$engineBoundIntentStreamHash() =>
|
||||
|
||||
/// See also [EngineBoundIntentStream].
|
||||
@ProviderFor(EngineBoundIntentStream)
|
||||
final engineBoundIntentStreamProvider = AutoDisposeStreamNotifierProvider<
|
||||
final engineBoundIntentStreamProvider =
|
||||
AutoDisposeStreamNotifierProvider<
|
||||
EngineBoundIntentStream,
|
||||
SharedContent
|
||||
>.internal(
|
||||
EngineBoundIntentStream.new,
|
||||
name: r'engineBoundIntentStreamProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$engineBoundIntentStreamHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -15,8 +15,7 @@ final browserViewLifecycleProvider =
|
||||
NotifierProvider<BrowserViewLifecycle, AppLifecycleState?>.internal(
|
||||
BrowserViewLifecycle.new,
|
||||
name: r'browserViewLifecycleProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$browserViewLifecycleHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -15,8 +15,7 @@ final browserAddonServiceProvider =
|
||||
AutoDisposeNotifierProvider<BrowserAddonService, void>.internal(
|
||||
BrowserAddonService.new,
|
||||
name: r'browserAddonServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$browserAddonServiceHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -15,8 +15,7 @@ final browserDataServiceProvider =
|
||||
NotifierProvider<BrowserDataService, void>.internal(
|
||||
BrowserDataService.new,
|
||||
name: r'browserDataServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$browserDataServiceHash,
|
||||
dependencies: null,
|
||||
|
||||
+1
-2
@@ -15,8 +15,7 @@ final engineSettingsReplicationServiceProvider =
|
||||
NotifierProvider<EngineSettingsReplicationService, void>.internal(
|
||||
EngineSettingsReplicationService.new,
|
||||
name: r'engineSettingsReplicationServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$engineSettingsReplicationServiceHash,
|
||||
dependencies: null,
|
||||
|
||||
+1
-2
@@ -15,8 +15,7 @@ final proxySettingsReplicationProvider =
|
||||
NotifierProvider<ProxySettingsReplication, void>.internal(
|
||||
ProxySettingsReplication.new,
|
||||
name: r'proxySettingsReplicationProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$proxySettingsReplicationHash,
|
||||
dependencies: null,
|
||||
|
||||
+3
-6
@@ -89,13 +89,11 @@ class WebPageDialog extends HookConsumerWidget {
|
||||
searchInNewTab: false,
|
||||
);
|
||||
},
|
||||
error:
|
||||
(error, stackTrace) => FailureWidget(
|
||||
error: (error, stackTrace) => FailureWidget(
|
||||
title: 'Could not load bangs',
|
||||
exception: error,
|
||||
),
|
||||
loading:
|
||||
() => SiteSearch(
|
||||
loading: () => SiteSearch(
|
||||
domain: url.host,
|
||||
availableBangs: const [
|
||||
// BangData(
|
||||
@@ -200,8 +198,7 @@ class WebPageDialog extends HookConsumerWidget {
|
||||
leading: const Icon(Icons.mobile_screen_share),
|
||||
title: const Text('Share screenshot'),
|
||||
onTap: () async {
|
||||
final screenshot =
|
||||
await ref
|
||||
final screenshot = await ref
|
||||
.read(selectedTabSessionNotifierProvider)
|
||||
.requestScreenshot();
|
||||
|
||||
|
||||
@@ -111,8 +111,7 @@ class BrowserScreen extends HookConsumerWidget {
|
||||
return displayedOverlay!;
|
||||
},
|
||||
child: Listener(
|
||||
onPointerDown:
|
||||
(displayedSheet != null)
|
||||
onPointerDown: (displayedSheet != null)
|
||||
? (_) {
|
||||
ref
|
||||
.read(bottomSheetControllerProvider.notifier)
|
||||
@@ -220,8 +219,7 @@ class BrowserScreen extends HookConsumerWidget {
|
||||
},
|
||||
),
|
||||
floatingActionButton: ReaderAppearanceButton(),
|
||||
bottomSheet:
|
||||
(displayedSheet != null)
|
||||
bottomSheet: (displayedSheet != null)
|
||||
? NotificationListener<DraggableScrollableNotification>(
|
||||
onNotification: (notification) {
|
||||
if (notification.extent <= 0.1) {
|
||||
|
||||
+5
-11
@@ -86,12 +86,10 @@ class BrowserBottomAppBar extends HookConsumerWidget {
|
||||
child: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
titleSpacing: 8.0,
|
||||
backgroundColor:
|
||||
(isPrivateTab && displayedSheet is! ViewTabsSheet)
|
||||
backgroundColor: (isPrivateTab && displayedSheet is! ViewTabsSheet)
|
||||
? const Color(0x648000D7)
|
||||
: null,
|
||||
title:
|
||||
(selectedTabId != null && displayedSheet is! ViewTabsSheet)
|
||||
title: (selectedTabId != null && displayedSheet is! ViewTabsSheet)
|
||||
? const AppBarTitle()
|
||||
: null,
|
||||
actions: [
|
||||
@@ -349,8 +347,7 @@ class BrowserBottomAppBar extends HookConsumerWidget {
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child:
|
||||
(history?.canGoBack == true || isLoading)
|
||||
child: (history?.canGoBack == true || isLoading)
|
||||
? IconButton(
|
||||
onPressed: () async {
|
||||
final controller = ref.read(
|
||||
@@ -372,9 +369,7 @@ class BrowserBottomAppBar extends HookConsumerWidget {
|
||||
: IconButton(
|
||||
onPressed: () async {
|
||||
await ref
|
||||
.read(
|
||||
tabRepositoryProvider.notifier,
|
||||
)
|
||||
.read(tabRepositoryProvider.notifier)
|
||||
.closeTab(selectedTabId);
|
||||
trippleDotMenuController.close();
|
||||
},
|
||||
@@ -384,8 +379,7 @@ class BrowserBottomAppBar extends HookConsumerWidget {
|
||||
const SizedBox(height: 48, child: VerticalDivider()),
|
||||
Expanded(
|
||||
child: IconButton(
|
||||
onPressed:
|
||||
(history?.canGoForward == true)
|
||||
onPressed: (history?.canGoForward == true)
|
||||
? () async {
|
||||
final controller = ref.read(
|
||||
tabSessionProvider(
|
||||
|
||||
@@ -43,8 +43,7 @@ class TabPreview extends HookWidget {
|
||||
borderRadius: const BorderRadius.all(Radius.circular(16.0)),
|
||||
),
|
||||
child: Material(
|
||||
color:
|
||||
tab.isPrivate
|
||||
color: tab.isPrivate
|
||||
? const Color(0xFF25003E)
|
||||
: colorScheme.surfaceContainerHighest,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(14.0)),
|
||||
@@ -63,8 +62,7 @@ class TabPreview extends HookWidget {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
tab.title,
|
||||
maxLines: 2,
|
||||
style:
|
||||
tab.isPrivate
|
||||
style: tab.isPrivate
|
||||
? const TextStyle(color: Colors.white)
|
||||
: null,
|
||||
),
|
||||
|
||||
+1
-2
@@ -34,8 +34,7 @@ class TabsActionButton extends HookConsumerWidget {
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 2.0,
|
||||
color:
|
||||
isActive
|
||||
color: isActive
|
||||
? theme.colorScheme.primary
|
||||
: DefaultTextStyle.of(context).style.color!,
|
||||
),
|
||||
|
||||
+2
-4
@@ -45,13 +45,11 @@ class _$FindInPageStateCWProxyImpl implements _$FindInPageStateCWProxy {
|
||||
Object? lastSearchText = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return FindInPageState(
|
||||
visible:
|
||||
visible == const $CopyWithPlaceholder()
|
||||
visible: visible == const $CopyWithPlaceholder()
|
||||
? _value.visible
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: visible as bool,
|
||||
lastSearchText:
|
||||
lastSearchText == const $CopyWithPlaceholder()
|
||||
lastSearchText: lastSearchText == const $CopyWithPlaceholder()
|
||||
? _value.lastSearchText
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: lastSearchText as String?,
|
||||
|
||||
+1
-2
@@ -81,8 +81,7 @@ class FindInPageRepositoryProvider
|
||||
() => FindInPageRepository()..tabId = tabId,
|
||||
from: findInPageRepositoryProvider,
|
||||
name: r'findInPageRepositoryProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$findInPageRepositoryHash,
|
||||
dependencies: FindInPageRepositoryFamily._dependencies,
|
||||
|
||||
+1
-2
@@ -15,8 +15,7 @@ final findInPageControllerProvider =
|
||||
AutoDisposeNotifierProvider<FindInPageController, FindInPageState>.internal(
|
||||
FindInPageController.new,
|
||||
name: r'findInPageControllerProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$findInPageControllerHash,
|
||||
dependencies: null,
|
||||
|
||||
+8
-16
@@ -50,13 +50,11 @@ class _$PreferenceSettingGroupCWProxyImpl
|
||||
Object? settings = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return PreferenceSettingGroup(
|
||||
description:
|
||||
description == const $CopyWithPlaceholder()
|
||||
description: description == const $CopyWithPlaceholder()
|
||||
? _value.description
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: description as String?,
|
||||
settings:
|
||||
settings == const $CopyWithPlaceholder()
|
||||
settings: settings == const $CopyWithPlaceholder()
|
||||
? _value.settings
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: settings as Map<String, PreferenceSetting>,
|
||||
@@ -144,33 +142,27 @@ class _$PreferenceSettingCWProxyImpl implements _$PreferenceSettingCWProxy {
|
||||
Object? shouldBeDefault = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return PreferenceSetting(
|
||||
value:
|
||||
value == const $CopyWithPlaceholder()
|
||||
value: value == const $CopyWithPlaceholder()
|
||||
? _value.value
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: value as Object,
|
||||
title:
|
||||
title == const $CopyWithPlaceholder()
|
||||
title: title == const $CopyWithPlaceholder()
|
||||
? _value.title
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: title as String?,
|
||||
description:
|
||||
description == const $CopyWithPlaceholder()
|
||||
description: description == const $CopyWithPlaceholder()
|
||||
? _value.description
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: description as String?,
|
||||
actualValue:
|
||||
actualValue == const $CopyWithPlaceholder()
|
||||
actualValue: actualValue == const $CopyWithPlaceholder()
|
||||
? _value.actualValue
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: actualValue as Object?,
|
||||
requireUserOptIn:
|
||||
requireUserOptIn == const $CopyWithPlaceholder()
|
||||
requireUserOptIn: requireUserOptIn == const $CopyWithPlaceholder()
|
||||
? _value.requireUserOptIn
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: requireUserOptIn as bool,
|
||||
shouldBeDefault:
|
||||
shouldBeDefault == const $CopyWithPlaceholder()
|
||||
shouldBeDefault: shouldBeDefault == const $CopyWithPlaceholder()
|
||||
? _value.shouldBeDefault
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: shouldBeDefault as bool,
|
||||
|
||||
+1
-2
@@ -107,8 +107,7 @@ class UnifiedPreferenceSettingsRepository
|
||||
_preferenceSettingGroupsProvider(partition).future,
|
||||
);
|
||||
|
||||
final prefs =
|
||||
_statelessGroups!.values
|
||||
final prefs = _statelessGroups!.values
|
||||
.map((group) => group.settings.keys)
|
||||
.flattened
|
||||
.toList();
|
||||
|
||||
+11
-19
@@ -15,8 +15,7 @@ final _preferenceSettingContentProvider =
|
||||
FutureProvider<Map<String, dynamic>>.internal(
|
||||
_preferenceSettingContent,
|
||||
name: r'_preferenceSettingContentProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$preferenceSettingContentHash,
|
||||
dependencies: null,
|
||||
@@ -99,8 +98,7 @@ class _PreferenceSettingGroupsProvider
|
||||
),
|
||||
from: _preferenceSettingGroupsProvider,
|
||||
name: r'_preferenceSettingGroupsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$preferenceSettingGroupsHash,
|
||||
dependencies: _PreferenceSettingGroupsFamily._dependencies,
|
||||
@@ -238,8 +236,7 @@ class _PreferenceSettingGroupProvider
|
||||
),
|
||||
from: _preferenceSettingGroupProvider,
|
||||
name: r'_preferenceSettingGroupProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$preferenceSettingGroupHash,
|
||||
dependencies: _PreferenceSettingGroupFamily._dependencies,
|
||||
@@ -334,14 +331,14 @@ String _$preferenceRepositoryHash() =>
|
||||
|
||||
/// See also [_PreferenceRepository].
|
||||
@ProviderFor(_PreferenceRepository)
|
||||
final _preferenceRepositoryProvider = AutoDisposeNotifierProvider<
|
||||
final _preferenceRepositoryProvider =
|
||||
AutoDisposeNotifierProvider<
|
||||
_PreferenceRepository,
|
||||
Raw<Stream<Map<String, Object>>>
|
||||
>.internal(
|
||||
_PreferenceRepository.new,
|
||||
name: r'_preferenceRepositoryProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$preferenceRepositoryHash,
|
||||
dependencies: null,
|
||||
@@ -418,13 +415,11 @@ class UnifiedPreferenceSettingsRepositoryProvider
|
||||
() => UnifiedPreferenceSettingsRepository()..partition = partition,
|
||||
from: unifiedPreferenceSettingsRepositoryProvider,
|
||||
name: r'unifiedPreferenceSettingsRepositoryProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$unifiedPreferenceSettingsRepositoryHash,
|
||||
dependencies: UnifiedPreferenceSettingsRepositoryFamily._dependencies,
|
||||
allTransitiveDependencies:
|
||||
UnifiedPreferenceSettingsRepositoryFamily
|
||||
allTransitiveDependencies: UnifiedPreferenceSettingsRepositoryFamily
|
||||
._allTransitiveDependencies,
|
||||
partition: partition,
|
||||
);
|
||||
@@ -580,14 +575,12 @@ class PreferenceSettingsGroupRepositoryProvider
|
||||
PreferencePartition partition,
|
||||
String groupName,
|
||||
) : this._internal(
|
||||
() =>
|
||||
PreferenceSettingsGroupRepository()
|
||||
() => PreferenceSettingsGroupRepository()
|
||||
..partition = partition
|
||||
..groupName = groupName,
|
||||
from: preferenceSettingsGroupRepositoryProvider,
|
||||
name: r'preferenceSettingsGroupRepositoryProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$preferenceSettingsGroupRepositoryHash,
|
||||
dependencies: PreferenceSettingsGroupRepositoryFamily._dependencies,
|
||||
@@ -623,8 +616,7 @@ class PreferenceSettingsGroupRepositoryProvider
|
||||
return ProviderOverride(
|
||||
origin: this,
|
||||
override: PreferenceSettingsGroupRepositoryProvider._internal(
|
||||
() =>
|
||||
create()
|
||||
() => create()
|
||||
..partition = partition
|
||||
..groupName = groupName,
|
||||
from: from,
|
||||
|
||||
@@ -13,8 +13,7 @@ String _$readerableServiceHash() => r'03182c8afc41f5184322a3206473cbfa96df5819';
|
||||
final readerableServiceProvider = Provider<GeckoReaderableService>.internal(
|
||||
readerableService,
|
||||
name: r'readerableServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$readerableServiceHash,
|
||||
dependencies: null,
|
||||
@@ -33,8 +32,7 @@ final appearanceButtonVisibilityProvider =
|
||||
AutoDisposeStreamProvider<bool>.internal(
|
||||
appearanceButtonVisibility,
|
||||
name: r'appearanceButtonVisibilityProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$appearanceButtonVisibilityHash,
|
||||
dependencies: null,
|
||||
|
||||
+1
-2
@@ -15,8 +15,7 @@ final readerableScreenControllerProvider =
|
||||
AsyncNotifierProvider<ReaderableScreenController, void>.internal(
|
||||
ReaderableScreenController.new,
|
||||
name: r'readerableScreenControllerProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$readerableScreenControllerHash,
|
||||
dependencies: null,
|
||||
|
||||
+6
-16
@@ -32,12 +32,8 @@ class ReaderButton extends HookConsumerWidget {
|
||||
),
|
||||
);
|
||||
|
||||
final icon =
|
||||
readerabilityState.active
|
||||
? Icon(
|
||||
MdiIcons.bookOpen,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
)
|
||||
final icon = readerabilityState.active
|
||||
? Icon(MdiIcons.bookOpen, color: Theme.of(context).colorScheme.primary)
|
||||
: Icon(
|
||||
MdiIcons.bookOpenOutline,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
@@ -50,10 +46,8 @@ class ReaderButton extends HookConsumerWidget {
|
||||
(enforceReadability && enableReadability),
|
||||
child: readerChanging.when(
|
||||
skipLoadingOnReload: true,
|
||||
data:
|
||||
(_) => InkWell(
|
||||
onTap:
|
||||
readerChanging.isLoading
|
||||
data: (_) => InkWell(
|
||||
onTap: readerChanging.isLoading
|
||||
? null
|
||||
: () async {
|
||||
await ref
|
||||
@@ -69,15 +63,11 @@ class ReaderButton extends HookConsumerWidget {
|
||||
),
|
||||
),
|
||||
error: (error, stackTrace) => SizedBox.shrink(),
|
||||
loading:
|
||||
() => AnimateGradientShader(
|
||||
loading: () => AnimateGradientShader(
|
||||
duration: const Duration(milliseconds: 500),
|
||||
primaryEnd: Alignment.bottomLeft,
|
||||
secondaryEnd: Alignment.topRight,
|
||||
primaryColors: [
|
||||
colorScheme.primary,
|
||||
colorScheme.primaryContainer,
|
||||
],
|
||||
primaryColors: [colorScheme.primary, colorScheme.primaryContainer],
|
||||
secondaryColors: [
|
||||
colorScheme.secondary,
|
||||
colorScheme.secondaryContainer,
|
||||
|
||||
@@ -37,8 +37,7 @@ AsyncValue<List<GeckoSuggestion>> engineHistorySuggestions(Ref ref) {
|
||||
return ref.watch(
|
||||
engineSuggestionsProvider.select(
|
||||
(suggestions) => suggestions.whenData(
|
||||
(suggestions) =>
|
||||
suggestions
|
||||
(suggestions) => suggestions
|
||||
.where(
|
||||
(suggestion) =>
|
||||
suggestion.type == GeckoSuggestionType.history &&
|
||||
|
||||
+4
-5
@@ -15,8 +15,7 @@ final engineHistorySuggestionsProvider =
|
||||
AutoDisposeProvider<AsyncValue<List<GeckoSuggestion>>>.internal(
|
||||
engineHistorySuggestions,
|
||||
name: r'engineHistorySuggestionsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$engineHistorySuggestionsHash,
|
||||
dependencies: null,
|
||||
@@ -31,14 +30,14 @@ String _$engineSuggestionsHash() => r'ba2c2d7f0a5e99fd9e639acd020b8cf3016c6126';
|
||||
|
||||
/// See also [EngineSuggestions].
|
||||
@ProviderFor(EngineSuggestions)
|
||||
final engineSuggestionsProvider = AutoDisposeStreamNotifierProvider<
|
||||
final engineSuggestionsProvider =
|
||||
AutoDisposeStreamNotifierProvider<
|
||||
EngineSuggestions,
|
||||
List<GeckoSuggestion>
|
||||
>.internal(
|
||||
EngineSuggestions.new,
|
||||
name: r'engineSuggestionsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$engineSuggestionsHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -22,11 +22,8 @@ class SearchSuggestions extends _$SearchSuggestions {
|
||||
final defaultProvider = ref.watch(defaultSearchSuggestionsProvider);
|
||||
final resolvedProvider = suggestionsProvider ?? defaultProvider;
|
||||
|
||||
_addQueryBinding =
|
||||
ref
|
||||
.watch(
|
||||
searchSuggestionsRepositoryProvider(resolvedProvider).notifier,
|
||||
)
|
||||
_addQueryBinding = ref
|
||||
.watch(searchSuggestionsRepositoryProvider(resolvedProvider).notifier)
|
||||
.addQuery;
|
||||
|
||||
return ref.watch(searchSuggestionsRepositoryProvider(resolvedProvider));
|
||||
|
||||
+2
-4
@@ -15,8 +15,7 @@ final defaultSearchSuggestionsProvider =
|
||||
Provider<ISearchSuggestionProvider>.internal(
|
||||
defaultSearchSuggestions,
|
||||
name: r'defaultSearchSuggestionsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$defaultSearchSuggestionsHash,
|
||||
dependencies: null,
|
||||
@@ -104,8 +103,7 @@ class SearchSuggestionsProvider
|
||||
() => SearchSuggestions()..suggestionsProvider = suggestionsProvider,
|
||||
from: searchSuggestionsProvider,
|
||||
name: r'searchSuggestionsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$searchSuggestionsHash,
|
||||
dependencies: SearchSuggestionsFamily._dependencies,
|
||||
|
||||
+1
-2
@@ -94,8 +94,7 @@ class SearchSuggestionsRepositoryProvider
|
||||
..suggestionsProvider = suggestionsProvider,
|
||||
from: searchSuggestionsRepositoryProvider,
|
||||
name: r'searchSuggestionsRepositoryProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$searchSuggestionsRepositoryHash,
|
||||
dependencies: SearchSuggestionsRepositoryFamily._dependencies,
|
||||
|
||||
@@ -32,8 +32,7 @@ class BangChips extends HookConsumerWidget {
|
||||
) {
|
||||
return showDialog<bool>(
|
||||
context: context,
|
||||
builder:
|
||||
(context) => AlertDialog(
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text('Reset usage frequency of $triggerName?'),
|
||||
content: const Text('This will remove the Bang from quick select.'),
|
||||
actions: <Widget>[
|
||||
@@ -71,8 +70,7 @@ class BangChips extends HookConsumerWidget {
|
||||
Expanded(
|
||||
child: SelectableChips(
|
||||
itemId: (bang) => bang.trigger,
|
||||
itemAvatar:
|
||||
(bang) =>
|
||||
itemAvatar: (bang) =>
|
||||
UrlIcon([bang.getTemplateUrl('')], iconSize: 20),
|
||||
itemLabel: (bang) => Text(bang.websiteName),
|
||||
availableItems: availableBangs,
|
||||
@@ -100,8 +98,7 @@ class BangChips extends HookConsumerWidget {
|
||||
final searchText = searchTextController?.text.trim();
|
||||
|
||||
final trigger = await BangSearchRoute(
|
||||
searchText:
|
||||
(searchText.isEmpty)
|
||||
searchText: (searchText.isEmpty)
|
||||
? BangSearchRoute.emptySearchText
|
||||
: searchText!,
|
||||
).push<String?>(context);
|
||||
|
||||
@@ -77,8 +77,7 @@ class SearchField extends HookConsumerWidget {
|
||||
autofocus: autofocus,
|
||||
decoration: InputDecoration(
|
||||
border: InputBorder.none,
|
||||
prefixIcon:
|
||||
(showBangIcon && activeBang != null)
|
||||
prefixIcon: (showBangIcon && activeBang != null)
|
||||
? Padding(
|
||||
padding: const EdgeInsetsDirectional.all(12.0),
|
||||
child: UrlIcon([
|
||||
@@ -89,8 +88,7 @@ class SearchField extends HookConsumerWidget {
|
||||
label: label ?? const Text('Search'),
|
||||
// hintText: 'Ask anything...',
|
||||
floatingLabelBehavior: FloatingLabelBehavior.always,
|
||||
suffixIcon:
|
||||
hasText
|
||||
suffixIcon: hasText
|
||||
? IconButton(
|
||||
onPressed: () {
|
||||
textEditingController.clear();
|
||||
|
||||
+11
-20
@@ -64,8 +64,7 @@ class FeedSearch extends HookConsumerWidget {
|
||||
SliverSkeletonizer(
|
||||
enabled: articlesAsync.isLoading,
|
||||
child: articlesAsync.when(
|
||||
data:
|
||||
(articles) => SliverList.builder(
|
||||
data: (articles) => SliverList.builder(
|
||||
itemCount: articles.length,
|
||||
itemBuilder: (context, index) {
|
||||
final article = articles[index];
|
||||
@@ -96,16 +95,15 @@ class FeedSearch extends HookConsumerWidget {
|
||||
article.feedId.base,
|
||||
], iconSize: 24.0),
|
||||
),
|
||||
title:
|
||||
(titleHighlight.isNotEmpty)
|
||||
title: (titleHighlight.isNotEmpty)
|
||||
? MarkdownBody(
|
||||
data: titleHighlight!,
|
||||
styleSheet: MarkdownStyleSheet(
|
||||
p: Theme.of(
|
||||
p: Theme.of(context).textTheme.titleMedium
|
||||
?.copyWith(
|
||||
color: Theme.of(
|
||||
context,
|
||||
).textTheme.titleMedium?.copyWith(
|
||||
color:
|
||||
Theme.of(context).colorScheme.onSurface,
|
||||
).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -120,19 +118,13 @@ class FeedSearch extends HookConsumerWidget {
|
||||
MarkdownBody(
|
||||
data: searchSnippet!,
|
||||
styleSheet: MarkdownStyleSheet(
|
||||
p: Theme.of(
|
||||
context,
|
||||
).textTheme.bodyMedium?.copyWith(
|
||||
color:
|
||||
Theme.of(
|
||||
p: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
a: Theme.of(
|
||||
context,
|
||||
).textTheme.bodyMedium?.copyWith(
|
||||
color:
|
||||
Theme.of(
|
||||
a: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color: Theme.of(
|
||||
context,
|
||||
).colorScheme.onSurfaceVariant,
|
||||
decoration: TextDecoration.none,
|
||||
@@ -178,8 +170,7 @@ class FeedSearch extends HookConsumerWidget {
|
||||
),
|
||||
);
|
||||
},
|
||||
loading:
|
||||
() => SliverList.builder(
|
||||
loading: () => SliverList.builder(
|
||||
itemCount: articlesAsync.valueOrNull?.length ?? 3,
|
||||
itemBuilder: (context, index) {
|
||||
return const ListTile(title: Bone.text());
|
||||
|
||||
+1
-2
@@ -122,8 +122,7 @@ class HistorySuggestions extends HookConsumerWidget {
|
||||
),
|
||||
);
|
||||
},
|
||||
loading:
|
||||
() => SliverList.builder(
|
||||
loading: () => SliverList.builder(
|
||||
itemCount: historySuggestionsAsync.valueOrNull?.length ?? 3,
|
||||
itemBuilder: (context, index) {
|
||||
return const ListTile(title: Bone.text());
|
||||
|
||||
+6
-13
@@ -33,15 +33,12 @@ class TabSearch extends HookConsumerWidget {
|
||||
),
|
||||
);
|
||||
|
||||
final tabs =
|
||||
ref
|
||||
final tabs = ref
|
||||
.watch(
|
||||
seamlessFilteredTabPreviewsProvider(
|
||||
TabSearchPartition.search,
|
||||
(selectedContainer.value != null)
|
||||
? ContainerFilterById(
|
||||
containerId: selectedContainer.value!.id,
|
||||
)
|
||||
? ContainerFilterById(containerId: selectedContainer.value!.id)
|
||||
: ContainerFilterDisabled(),
|
||||
),
|
||||
)
|
||||
@@ -118,21 +115,17 @@ class TabSearch extends HookConsumerWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
subtitle:
|
||||
(bodyHasMatch || urlHasMatch)
|
||||
subtitle: (bodyHasMatch || urlHasMatch)
|
||||
? MarkdownBody(
|
||||
data:
|
||||
bodyHasMatch
|
||||
data: bodyHasMatch
|
||||
? result.content!
|
||||
: result.highlightedUrl!,
|
||||
styleSheet: MarkdownStyleSheet(
|
||||
p: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color:
|
||||
Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
),
|
||||
a: Theme.of(context).textTheme.bodyMedium?.copyWith(
|
||||
color:
|
||||
Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
color: Theme.of(context).colorScheme.onSurfaceVariant,
|
||||
decoration: TextDecoration.none,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -42,8 +42,7 @@ class ContainerDao extends DatabaseAccessor<TabDatabase>
|
||||
}
|
||||
|
||||
Selectable<Color> getDistinctColors() {
|
||||
final query =
|
||||
db.selectOnly(db.container, distinct: true)
|
||||
final query = db.selectOnly(db.container, distinct: true)
|
||||
..addColumns([db.container.color])
|
||||
..where(db.container.color.isNotNull());
|
||||
|
||||
@@ -53,8 +52,7 @@ class ContainerDao extends DatabaseAccessor<TabDatabase>
|
||||
}
|
||||
|
||||
Selectable<String> getContainerTabIds(String? containerId) {
|
||||
final query =
|
||||
selectOnly(db.tab)
|
||||
final query = selectOnly(db.tab)
|
||||
..addColumns([db.tab.id])
|
||||
..where(
|
||||
(containerId != null)
|
||||
@@ -67,11 +65,9 @@ class ContainerDao extends DatabaseAccessor<TabDatabase>
|
||||
}
|
||||
|
||||
Selectable<TabData> getContainerTabsData(String? containerId) {
|
||||
final query =
|
||||
db.tab.select()
|
||||
final query = db.tab.select()
|
||||
..where(
|
||||
(t) =>
|
||||
(containerId != null)
|
||||
(t) => (containerId != null)
|
||||
? t.containerId.equals(containerId)
|
||||
: t.containerId.isNull(),
|
||||
)
|
||||
|
||||
@@ -21,8 +21,7 @@ class TabDao extends DatabaseAccessor<TabDatabase> with _$TabDaoMixin {
|
||||
db.tab.select()..where((t) => t.id.equals(id));
|
||||
|
||||
Selectable<String> getAllTabIds() {
|
||||
final query =
|
||||
selectOnly(db.tab)
|
||||
final query = selectOnly(db.tab)
|
||||
..addColumns([db.tab.id])
|
||||
..orderBy([OrderingTerm.asc(db.tab.orderKey)]);
|
||||
|
||||
@@ -30,8 +29,7 @@ class TabDao extends DatabaseAccessor<TabDatabase> with _$TabDaoMixin {
|
||||
}
|
||||
|
||||
SingleOrNullSelectable<String?> getTabContainerId(String tabId) {
|
||||
final query =
|
||||
selectOnly(db.tab)
|
||||
final query = selectOnly(db.tab)
|
||||
..addColumns([db.tab.containerId])
|
||||
..where(db.tab.id.equals(tabId));
|
||||
|
||||
@@ -154,12 +152,10 @@ class TabDao extends DatabaseAccessor<TabDatabase> with _$TabDaoMixin {
|
||||
batch.update(
|
||||
db.tab,
|
||||
TabCompanion(
|
||||
url:
|
||||
(previousState?.url != state.url)
|
||||
url: (previousState?.url != state.url)
|
||||
? Value(state.url)
|
||||
: const Value.absent(),
|
||||
title:
|
||||
(previousState?.title != state.title)
|
||||
title: (previousState?.title != state.title)
|
||||
? Value(state.title)
|
||||
: const Value.absent(),
|
||||
),
|
||||
@@ -174,8 +170,9 @@ class TabDao extends DatabaseAccessor<TabDatabase> with _$TabDaoMixin {
|
||||
return db.transaction(() async {
|
||||
await (db.tab.delete()..where((t) => t.id.isNotIn(retainTabIds))).go();
|
||||
|
||||
var currentOrderKey =
|
||||
await db.containerDao.generateLeadingOrderKey(null).getSingle();
|
||||
var currentOrderKey = await db.containerDao
|
||||
.generateLeadingOrderKey(null)
|
||||
.getSingle();
|
||||
|
||||
await db.tab.insertAll(
|
||||
retainTabIds.map((id) {
|
||||
|
||||
@@ -55,8 +55,7 @@ class Container extends Table with TableInfo<Container, ContainerData> {
|
||||
ContainerData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||
return ContainerData(
|
||||
id:
|
||||
attachedDatabase.typeMapping.read(
|
||||
id: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}id'],
|
||||
)!,
|
||||
@@ -306,8 +305,7 @@ class Tab extends Table with TableInfo<Tab, TabData> {
|
||||
TabData map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||
return TabData(
|
||||
id:
|
||||
attachedDatabase.typeMapping.read(
|
||||
id: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}id'],
|
||||
)!,
|
||||
@@ -315,8 +313,7 @@ class Tab extends Table with TableInfo<Tab, TabData> {
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}container_id'],
|
||||
),
|
||||
orderKey:
|
||||
attachedDatabase.typeMapping.read(
|
||||
orderKey: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}order_key'],
|
||||
)!,
|
||||
@@ -350,8 +347,7 @@ class Tab extends Table with TableInfo<Tab, TabData> {
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}full_content_plain'],
|
||||
),
|
||||
timestamp:
|
||||
attachedDatabase.typeMapping.read(
|
||||
timestamp: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.dateTime,
|
||||
data['${effectivePrefix}timestamp'],
|
||||
)!,
|
||||
@@ -499,24 +495,19 @@ class TabData extends DataClass implements Insertable<TabData> {
|
||||
orderKey: orderKey ?? this.orderKey,
|
||||
url: url.present ? url.value : this.url,
|
||||
title: title.present ? title.value : this.title,
|
||||
isProbablyReaderable:
|
||||
isProbablyReaderable.present
|
||||
isProbablyReaderable: isProbablyReaderable.present
|
||||
? isProbablyReaderable.value
|
||||
: this.isProbablyReaderable,
|
||||
extractedContentMarkdown:
|
||||
extractedContentMarkdown.present
|
||||
extractedContentMarkdown: extractedContentMarkdown.present
|
||||
? extractedContentMarkdown.value
|
||||
: this.extractedContentMarkdown,
|
||||
extractedContentPlain:
|
||||
extractedContentPlain.present
|
||||
extractedContentPlain: extractedContentPlain.present
|
||||
? extractedContentPlain.value
|
||||
: this.extractedContentPlain,
|
||||
fullContentMarkdown:
|
||||
fullContentMarkdown.present
|
||||
fullContentMarkdown: fullContentMarkdown.present
|
||||
? fullContentMarkdown.value
|
||||
: this.fullContentMarkdown,
|
||||
fullContentPlain:
|
||||
fullContentPlain.present
|
||||
fullContentPlain: fullContentPlain.present
|
||||
? fullContentPlain.value
|
||||
: this.fullContentPlain,
|
||||
timestamp: timestamp ?? this.timestamp,
|
||||
@@ -524,29 +515,25 @@ class TabData extends DataClass implements Insertable<TabData> {
|
||||
TabData copyWithCompanion(TabCompanion data) {
|
||||
return TabData(
|
||||
id: data.id.present ? data.id.value : this.id,
|
||||
containerId:
|
||||
data.containerId.present ? data.containerId.value : this.containerId,
|
||||
containerId: data.containerId.present
|
||||
? data.containerId.value
|
||||
: this.containerId,
|
||||
orderKey: data.orderKey.present ? data.orderKey.value : this.orderKey,
|
||||
url: data.url.present ? data.url.value : this.url,
|
||||
title: data.title.present ? data.title.value : this.title,
|
||||
isProbablyReaderable:
|
||||
data.isProbablyReaderable.present
|
||||
isProbablyReaderable: data.isProbablyReaderable.present
|
||||
? data.isProbablyReaderable.value
|
||||
: this.isProbablyReaderable,
|
||||
extractedContentMarkdown:
|
||||
data.extractedContentMarkdown.present
|
||||
extractedContentMarkdown: data.extractedContentMarkdown.present
|
||||
? data.extractedContentMarkdown.value
|
||||
: this.extractedContentMarkdown,
|
||||
extractedContentPlain:
|
||||
data.extractedContentPlain.present
|
||||
extractedContentPlain: data.extractedContentPlain.present
|
||||
? data.extractedContentPlain.value
|
||||
: this.extractedContentPlain,
|
||||
fullContentMarkdown:
|
||||
data.fullContentMarkdown.present
|
||||
fullContentMarkdown: data.fullContentMarkdown.present
|
||||
? data.fullContentMarkdown.value
|
||||
: this.fullContentMarkdown,
|
||||
fullContentPlain:
|
||||
data.fullContentPlain.present
|
||||
fullContentPlain: data.fullContentPlain.present
|
||||
? data.fullContentPlain.value
|
||||
: this.fullContentPlain,
|
||||
timestamp: data.timestamp.present ? data.timestamp.value : this.timestamp,
|
||||
@@ -838,23 +825,19 @@ class TabFts extends Table
|
||||
TabFt map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||
return TabFt(
|
||||
title:
|
||||
attachedDatabase.typeMapping.read(
|
||||
title: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}title'],
|
||||
)!,
|
||||
url:
|
||||
attachedDatabase.typeMapping.read(
|
||||
url: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}url'],
|
||||
)!,
|
||||
extractedContentPlain:
|
||||
attachedDatabase.typeMapping.read(
|
||||
extractedContentPlain: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}extracted_content_plain'],
|
||||
)!,
|
||||
fullContentPlain:
|
||||
attachedDatabase.typeMapping.read(
|
||||
fullContentPlain: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}full_content_plain'],
|
||||
)!,
|
||||
@@ -936,12 +919,10 @@ class TabFt extends DataClass implements Insertable<TabFt> {
|
||||
return TabFt(
|
||||
title: data.title.present ? data.title.value : this.title,
|
||||
url: data.url.present ? data.url.value : this.url,
|
||||
extractedContentPlain:
|
||||
data.extractedContentPlain.present
|
||||
extractedContentPlain: data.extractedContentPlain.present
|
||||
? data.extractedContentPlain.value
|
||||
: this.extractedContentPlain,
|
||||
fullContentPlain:
|
||||
data.fullContentPlain.present
|
||||
fullContentPlain: data.fullContentPlain.present
|
||||
? data.fullContentPlain.value
|
||||
: this.fullContentPlain,
|
||||
);
|
||||
@@ -1431,12 +1412,12 @@ class $ContainerTableManager
|
||||
TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
createFilteringComposer:
|
||||
() => $ContainerFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer:
|
||||
() => $ContainerOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer:
|
||||
() => $ContainerAnnotationComposer($db: db, $table: table),
|
||||
createFilteringComposer: () =>
|
||||
$ContainerFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer: () =>
|
||||
$ContainerOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer: () =>
|
||||
$ContainerAnnotationComposer($db: db, $table: table),
|
||||
updateCompanionCallback:
|
||||
({
|
||||
Value<String> id = const Value.absent(),
|
||||
@@ -1465,14 +1446,9 @@ class $ContainerTableManager
|
||||
metadata: metadata,
|
||||
rowid: rowid,
|
||||
),
|
||||
withReferenceMapper:
|
||||
(p0) =>
|
||||
p0
|
||||
withReferenceMapper: (p0) => p0
|
||||
.map(
|
||||
(e) => (
|
||||
e.readTable(table),
|
||||
$ContainerReferences(db, table, e),
|
||||
),
|
||||
(e) => (e.readTable(table), $ContainerReferences(db, table, e)),
|
||||
)
|
||||
.toList(),
|
||||
prefetchHooksCallback: ({tabRefs = false}) {
|
||||
@@ -1490,10 +1466,10 @@ class $ContainerTableManager
|
||||
>(
|
||||
currentTable: table,
|
||||
referencedTable: $ContainerReferences._tabRefsTable(db),
|
||||
managerFromTypedResult:
|
||||
(p0) => $ContainerReferences(db, table, p0).tabRefs,
|
||||
referencedItemsForCurrentItem:
|
||||
(item, referencedItems) => referencedItems.where(
|
||||
managerFromTypedResult: (p0) =>
|
||||
$ContainerReferences(db, table, p0).tabRefs,
|
||||
referencedItemsForCurrentItem: (item, referencedItems) =>
|
||||
referencedItems.where(
|
||||
(e) => e.containerId == item.id,
|
||||
),
|
||||
typedResults: items,
|
||||
@@ -1829,12 +1805,12 @@ class $TabTableManager
|
||||
TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
createFilteringComposer:
|
||||
() => $TabFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer:
|
||||
() => $TabOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer:
|
||||
() => $TabAnnotationComposer($db: db, $table: table),
|
||||
createFilteringComposer: () =>
|
||||
$TabFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer: () =>
|
||||
$TabOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer: () =>
|
||||
$TabAnnotationComposer($db: db, $table: table),
|
||||
updateCompanionCallback:
|
||||
({
|
||||
Value<String> id = const Value.absent(),
|
||||
@@ -1891,21 +1867,15 @@ class $TabTableManager
|
||||
timestamp: timestamp,
|
||||
rowid: rowid,
|
||||
),
|
||||
withReferenceMapper:
|
||||
(p0) =>
|
||||
p0
|
||||
.map(
|
||||
(e) => (
|
||||
e.readTable(table),
|
||||
$TabReferences(db, table, e),
|
||||
),
|
||||
)
|
||||
withReferenceMapper: (p0) => p0
|
||||
.map((e) => (e.readTable(table), $TabReferences(db, table, e)))
|
||||
.toList(),
|
||||
prefetchHooksCallback: ({containerId = false}) {
|
||||
return PrefetchHooks(
|
||||
db: db,
|
||||
explicitlyWatchedTables: [],
|
||||
addJoins: <
|
||||
addJoins:
|
||||
<
|
||||
T extends TableManagerState<
|
||||
dynamic,
|
||||
dynamic,
|
||||
@@ -1925,11 +1895,11 @@ class $TabTableManager
|
||||
state.withJoin(
|
||||
currentTable: table,
|
||||
currentColumn: table.containerId,
|
||||
referencedTable: $TabReferences._containerIdTable(
|
||||
db,
|
||||
),
|
||||
referencedColumn:
|
||||
$TabReferences._containerIdTable(db).id,
|
||||
referencedTable: $TabReferences
|
||||
._containerIdTable(db),
|
||||
referencedColumn: $TabReferences
|
||||
._containerIdTable(db)
|
||||
.id,
|
||||
)
|
||||
as T;
|
||||
}
|
||||
@@ -2079,12 +2049,12 @@ class $TabFtsTableManager
|
||||
TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
createFilteringComposer:
|
||||
() => $TabFtsFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer:
|
||||
() => $TabFtsOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer:
|
||||
() => $TabFtsAnnotationComposer($db: db, $table: table),
|
||||
createFilteringComposer: () =>
|
||||
$TabFtsFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer: () =>
|
||||
$TabFtsOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer: () =>
|
||||
$TabFtsAnnotationComposer($db: db, $table: table),
|
||||
updateCompanionCallback:
|
||||
({
|
||||
Value<String> title = const Value.absent(),
|
||||
@@ -2113,15 +2083,8 @@ class $TabFtsTableManager
|
||||
fullContentPlain: fullContentPlain,
|
||||
rowid: rowid,
|
||||
),
|
||||
withReferenceMapper:
|
||||
(p0) =>
|
||||
p0
|
||||
.map(
|
||||
(e) => (
|
||||
e.readTable(table),
|
||||
BaseReferences(db, table, e),
|
||||
),
|
||||
)
|
||||
withReferenceMapper: (p0) => p0
|
||||
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
||||
.toList(),
|
||||
prefetchHooksCallback: null,
|
||||
),
|
||||
|
||||
@@ -63,13 +63,11 @@ class _$ContainerAuthSettingsCWProxyImpl
|
||||
? _value.authenticationRequired
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: authenticationRequired as bool,
|
||||
lockOnAppBackground:
|
||||
lockOnAppBackground == const $CopyWithPlaceholder()
|
||||
lockOnAppBackground: lockOnAppBackground == const $CopyWithPlaceholder()
|
||||
? _value.lockOnAppBackground
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: lockOnAppBackground as bool,
|
||||
lockTimeout:
|
||||
lockTimeout == const $CopyWithPlaceholder()
|
||||
lockTimeout: lockTimeout == const $CopyWithPlaceholder()
|
||||
? _value.lockTimeout
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: lockTimeout as Duration?,
|
||||
@@ -141,23 +139,19 @@ class _$ContainerMetadataCWProxyImpl implements _$ContainerMetadataCWProxy {
|
||||
Object? useProxy = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return ContainerMetadata(
|
||||
iconData:
|
||||
iconData == const $CopyWithPlaceholder()
|
||||
iconData: iconData == const $CopyWithPlaceholder()
|
||||
? _value.iconData
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: iconData as IconData?,
|
||||
contextualIdentity:
|
||||
contextualIdentity == const $CopyWithPlaceholder()
|
||||
contextualIdentity: contextualIdentity == const $CopyWithPlaceholder()
|
||||
? _value.contextualIdentity
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: contextualIdentity as String?,
|
||||
authSettings:
|
||||
authSettings == const $CopyWithPlaceholder()
|
||||
authSettings: authSettings == const $CopyWithPlaceholder()
|
||||
? _value.authSettings
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: authSettings as ContainerAuthSettings,
|
||||
useProxy:
|
||||
useProxy == const $CopyWithPlaceholder()
|
||||
useProxy: useProxy == const $CopyWithPlaceholder()
|
||||
? _value.useProxy
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: useProxy as bool,
|
||||
@@ -228,23 +222,19 @@ class _$ContainerDataCWProxyImpl implements _$ContainerDataCWProxy {
|
||||
Object? metadata = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return ContainerData(
|
||||
id:
|
||||
id == const $CopyWithPlaceholder()
|
||||
id: id == const $CopyWithPlaceholder()
|
||||
? _value.id
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: id as String,
|
||||
name:
|
||||
name == const $CopyWithPlaceholder()
|
||||
name: name == const $CopyWithPlaceholder()
|
||||
? _value.name
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: name as String?,
|
||||
color:
|
||||
color == const $CopyWithPlaceholder()
|
||||
color: color == const $CopyWithPlaceholder()
|
||||
? _value.color
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: color as Color,
|
||||
metadata:
|
||||
metadata == const $CopyWithPlaceholder()
|
||||
metadata: metadata == const $CopyWithPlaceholder()
|
||||
? _value.metadata
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: metadata as ContainerMetadata?,
|
||||
@@ -267,8 +257,7 @@ ContainerAuthSettings _$ContainerAuthSettingsFromJson(
|
||||
) => ContainerAuthSettings(
|
||||
authenticationRequired: json['authenticationRequired'] as bool,
|
||||
lockOnAppBackground: json['lockOnAppBackground'] as bool,
|
||||
lockTimeout:
|
||||
json['lockTimeout'] == null
|
||||
lockTimeout: json['lockTimeout'] == null
|
||||
? null
|
||||
: Duration(microseconds: (json['lockTimeout'] as num).toInt()),
|
||||
);
|
||||
@@ -288,8 +277,7 @@ ContainerMetadata _$ContainerMetadataFromJson(Map<String, dynamic> json) =>
|
||||
const IconDataJsonConverter().fromJson,
|
||||
),
|
||||
contextualIdentity: json['contextualIdentity'] as String?,
|
||||
authSettings:
|
||||
json['authSettings'] == null
|
||||
authSettings: json['authSettings'] == null
|
||||
? null
|
||||
: ContainerAuthSettings.fromJson(
|
||||
json['authSettings'] as Map<String, dynamic>,
|
||||
|
||||
@@ -13,8 +13,9 @@ String _$tabDatabaseHash() => r'422bd4789296dc271fabbd5906f2e2ab16bccaa3';
|
||||
final tabDatabaseProvider = Provider<TabDatabase>.internal(
|
||||
tabDatabase,
|
||||
name: r'tabDatabaseProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$tabDatabaseHash,
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$tabDatabaseHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@@ -26,8 +26,7 @@ AsyncValue<List<ContainerDataWithCount>> matchSortedContainersWithCount(
|
||||
}
|
||||
|
||||
return value.whenData(
|
||||
(cb) =>
|
||||
TokenizedFilter.sort(
|
||||
(cb) => TokenizedFilter.sort(
|
||||
items: cb,
|
||||
toString: (item) => item.name,
|
||||
query: searchText!,
|
||||
|
||||
@@ -15,8 +15,7 @@ final containersWithCountProvider =
|
||||
AutoDisposeStreamProvider<List<ContainerDataWithCount>>.internal(
|
||||
containersWithCount,
|
||||
name: r'containersWithCountProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$containersWithCountHash,
|
||||
dependencies: null,
|
||||
@@ -101,8 +100,7 @@ class MatchSortedContainersWithCountProvider
|
||||
),
|
||||
from: matchSortedContainersWithCountProvider,
|
||||
name: r'matchSortedContainersWithCountProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$matchSortedContainersWithCountHash,
|
||||
dependencies: MatchSortedContainersWithCountFamily._dependencies,
|
||||
@@ -229,8 +227,7 @@ class ContainerTabIdsProvider extends AutoDisposeStreamProvider<List<String>> {
|
||||
(ref) => containerTabIds(ref as ContainerTabIdsRef, containerFilter),
|
||||
from: containerTabIdsProvider,
|
||||
name: r'containerTabIdsProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$containerTabIdsHash,
|
||||
dependencies: ContainerTabIdsFamily._dependencies,
|
||||
|
||||
@@ -52,8 +52,8 @@ class SelectedContainer extends _$SelectedContainer {
|
||||
|
||||
if (passAuth) {
|
||||
if (container.metadata.useProxy) {
|
||||
final proxyPluginHealthy =
|
||||
await GeckoContainerProxyService().healthcheck();
|
||||
final proxyPluginHealthy = await GeckoContainerProxyService()
|
||||
.healthcheck();
|
||||
|
||||
if (proxyPluginHealthy) {
|
||||
state = id;
|
||||
|
||||
@@ -15,8 +15,7 @@ final selectedContainerDataProvider =
|
||||
AutoDisposeStreamProvider<ContainerData?>.internal(
|
||||
selectedContainerData,
|
||||
name: r'selectedContainerDataProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$selectedContainerDataHash,
|
||||
dependencies: null,
|
||||
@@ -34,8 +33,7 @@ final selectedContainerProvider =
|
||||
NotifierProvider<SelectedContainer, String?>.internal(
|
||||
SelectedContainer.new,
|
||||
name: r'selectedContainerProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$selectedContainerHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -15,8 +15,7 @@ final containerRepositoryProvider =
|
||||
NotifierProvider<ContainerRepository, void>.internal(
|
||||
ContainerRepository.new,
|
||||
name: r'containerRepositoryProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$containerRepositoryHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -21,8 +21,7 @@ class TabDataRepository extends _$TabDataRepository {
|
||||
}
|
||||
|
||||
Future<void> closeAllTabsByContainer(String? containerId) async {
|
||||
final tabIds =
|
||||
await ref
|
||||
final tabIds = await ref
|
||||
.read(tabDatabaseProvider)
|
||||
.containerDao
|
||||
.getContainerTabIds(containerId)
|
||||
@@ -34,15 +33,13 @@ class TabDataRepository extends _$TabDataRepository {
|
||||
}
|
||||
|
||||
Future<void> closeAllTabsByHost(String? containerId, String host) async {
|
||||
final tabs =
|
||||
await ref
|
||||
final tabs = await ref
|
||||
.read(tabDatabaseProvider)
|
||||
.containerDao
|
||||
.getContainerTabsData(containerId)
|
||||
.get();
|
||||
|
||||
final filtered =
|
||||
tabs
|
||||
final filtered = tabs
|
||||
.where((tab) => tab.url?.host == host)
|
||||
.map((tab) => tab.id)
|
||||
.toList();
|
||||
|
||||
@@ -14,8 +14,7 @@ final tabDataRepositoryProvider =
|
||||
NotifierProvider<TabDataRepository, void>.internal(
|
||||
TabDataRepository.new,
|
||||
name: r'tabDataRepositoryProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$tabDataRepositoryHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -19,8 +19,7 @@ class TabSearchRepository extends _$TabSearchRepository {
|
||||
}) async {
|
||||
if (input.isNotEmpty) {
|
||||
state = await AsyncValue.guard(
|
||||
() =>
|
||||
ref
|
||||
() => ref
|
||||
.read(tabDatabaseProvider)
|
||||
.tabDao
|
||||
.queryTabs(
|
||||
|
||||
@@ -87,8 +87,7 @@ class TabSearchRepositoryProvider
|
||||
() => TabSearchRepository()..partition = partition,
|
||||
from: tabSearchRepositoryProvider,
|
||||
name: r'tabSearchRepositoryProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$tabSearchRepositoryHash,
|
||||
dependencies: TabSearchRepositoryFamily._dependencies,
|
||||
|
||||
@@ -149,8 +149,7 @@ class ContainerEditScreen extends HookConsumerWidget {
|
||||
onPressed: () async {
|
||||
final color = await showDialog<Color?>(
|
||||
context: context,
|
||||
builder:
|
||||
(context) =>
|
||||
builder: (context) =>
|
||||
ColorPickerDialog(selectedColor.value),
|
||||
);
|
||||
|
||||
@@ -164,11 +163,9 @@ class ContainerEditScreen extends HookConsumerWidget {
|
||||
title: const Text('Cookie Isolation'),
|
||||
secondary: const Icon(MdiIcons.cookieLock),
|
||||
contentPadding: EdgeInsets.zero,
|
||||
onChanged:
|
||||
(_mode == _DialogMode.create)
|
||||
onChanged: (_mode == _DialogMode.create)
|
||||
? (value) {
|
||||
contextualIdentity.value =
|
||||
value
|
||||
contextualIdentity.value = value
|
||||
? initialContainer
|
||||
.metadata
|
||||
.contextualIdentity ??
|
||||
@@ -230,8 +227,9 @@ class ContainerEditScreen extends HookConsumerWidget {
|
||||
title: const Text('Timeout'),
|
||||
controlAffinity: ListTileControlAffinity.leading,
|
||||
onChanged: (value) {
|
||||
final newValue =
|
||||
value! ? _timeoutOptions[1].value : null;
|
||||
final newValue = value!
|
||||
? _timeoutOptions[1].value
|
||||
: null;
|
||||
|
||||
authSettings.value = authSettings.value.copyWith
|
||||
.lockTimeout(newValue);
|
||||
|
||||
@@ -28,8 +28,7 @@ class ContainerListScreen extends HookConsumerWidget {
|
||||
enabled: containersAsync.isLoading,
|
||||
child: containersAsync.when(
|
||||
skipLoadingOnReload: true,
|
||||
data:
|
||||
(containers) => FadingScroll(
|
||||
data: (containers) => FadingScroll(
|
||||
fadingSize: 25,
|
||||
builder: (context, controller) {
|
||||
return ListView.builder(
|
||||
@@ -46,29 +45,23 @@ class ContainerListScreen extends HookConsumerWidget {
|
||||
SlidableAction(
|
||||
onPressed: (context) async {
|
||||
final result = await ref
|
||||
.read(
|
||||
selectedContainerProvider.notifier,
|
||||
)
|
||||
.read(selectedContainerProvider.notifier)
|
||||
.setContainerId(container.id);
|
||||
|
||||
if (context.mounted &&
|
||||
result ==
|
||||
SetContainerResult
|
||||
.successHasProxy) {
|
||||
SetContainerResult.successHasProxy) {
|
||||
await ref
|
||||
.read(
|
||||
startProxyControllerProvider
|
||||
.notifier,
|
||||
startProxyControllerProvider.notifier,
|
||||
)
|
||||
.maybeStartProxy(context);
|
||||
}
|
||||
},
|
||||
foregroundColor:
|
||||
Theme.of(
|
||||
foregroundColor: Theme.of(
|
||||
context,
|
||||
).colorScheme.onPrimaryContainer,
|
||||
backgroundColor:
|
||||
Theme.of(
|
||||
backgroundColor: Theme.of(
|
||||
context,
|
||||
).colorScheme.primaryContainer,
|
||||
icon: Icons.check,
|
||||
@@ -78,17 +71,13 @@ class ContainerListScreen extends HookConsumerWidget {
|
||||
SlidableAction(
|
||||
onPressed: (context) {
|
||||
ref
|
||||
.read(
|
||||
selectedContainerProvider.notifier,
|
||||
)
|
||||
.read(selectedContainerProvider.notifier)
|
||||
.clearContainer();
|
||||
},
|
||||
foregroundColor:
|
||||
Theme.of(
|
||||
foregroundColor: Theme.of(
|
||||
context,
|
||||
).colorScheme.onPrimaryContainer,
|
||||
backgroundColor:
|
||||
Theme.of(
|
||||
backgroundColor: Theme.of(
|
||||
context,
|
||||
).colorScheme.primaryContainer,
|
||||
icon: Icons.close,
|
||||
@@ -102,17 +91,13 @@ class ContainerListScreen extends HookConsumerWidget {
|
||||
SlidableAction(
|
||||
onPressed: (context) async {
|
||||
await ref
|
||||
.read(
|
||||
containerRepositoryProvider.notifier,
|
||||
)
|
||||
.read(containerRepositoryProvider.notifier)
|
||||
.deleteContainer(container.id);
|
||||
},
|
||||
backgroundColor:
|
||||
Theme.of(
|
||||
backgroundColor: Theme.of(
|
||||
context,
|
||||
).colorScheme.errorContainer,
|
||||
foregroundColor:
|
||||
Theme.of(
|
||||
foregroundColor: Theme.of(
|
||||
context,
|
||||
).colorScheme.onErrorContainer,
|
||||
icon: Icons.delete,
|
||||
@@ -130,11 +115,9 @@ class ContainerListScreen extends HookConsumerWidget {
|
||||
},
|
||||
),
|
||||
error: (error, stackTrace) => SizedBox.shrink(),
|
||||
loading:
|
||||
() => ListView.builder(
|
||||
loading: () => ListView.builder(
|
||||
itemCount: 3,
|
||||
itemBuilder:
|
||||
(context, index) => ContainerListTile(
|
||||
itemBuilder: (context, index) => ContainerListTile(
|
||||
ContainerData(id: 'null', color: Colors.transparent),
|
||||
isSelected: false,
|
||||
),
|
||||
@@ -145,8 +128,7 @@ class ContainerListScreen extends HookConsumerWidget {
|
||||
),
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
onPressed: () async {
|
||||
final initialColor =
|
||||
await ref
|
||||
final initialColor = await ref
|
||||
.read(containerRepositoryProvider.notifier)
|
||||
.unusedRandomContainerColor();
|
||||
|
||||
|
||||
@@ -68,8 +68,7 @@ class ContainerChips extends HookConsumerWidget {
|
||||
child: SelectableChips(
|
||||
deleteIcon: false,
|
||||
itemId: (container) => container.id,
|
||||
itemAvatar:
|
||||
(container) => Container(
|
||||
itemAvatar: (container) => Container(
|
||||
width: 20.0,
|
||||
height: 20.0,
|
||||
decoration: BoxDecoration(
|
||||
@@ -77,8 +76,8 @@ class ContainerChips extends HookConsumerWidget {
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
itemLabel:
|
||||
(container) => Text(container.name ?? 'New Container'),
|
||||
itemLabel: (container) =>
|
||||
Text(container.name ?? 'New Container'),
|
||||
itemBadgeCount: (container) => container.tabCount,
|
||||
itemWrap: (child, container) {
|
||||
return HookBuilder(
|
||||
@@ -150,8 +149,7 @@ class ContainerChips extends HookConsumerWidget {
|
||||
|
||||
return OverlayPortal(
|
||||
controller: overlayController,
|
||||
overlayChildBuilder:
|
||||
(context) => Positioned(
|
||||
overlayChildBuilder: (context) => Positioned(
|
||||
top: position.dy,
|
||||
left: position.dx,
|
||||
child: IgnorePointer(
|
||||
|
||||
+19
-35
@@ -54,8 +54,7 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: const BoxDecoration(),
|
||||
child: Container(
|
||||
margin:
|
||||
isPortrait
|
||||
margin: isPortrait
|
||||
? const EdgeInsets.only(right: 10)
|
||||
: const EdgeInsets.only(bottom: 10),
|
||||
width: isPortrait ? 60 : null,
|
||||
@@ -64,8 +63,7 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
||||
color: Theme.of(context).cardColor,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color:
|
||||
(Theme.of(context).brightness == Brightness.light)
|
||||
color: (Theme.of(context).brightness == Brightness.light)
|
||||
? (Theme.of(context).brightness == Brightness.light)
|
||||
? Colors.grey[300]!
|
||||
: Colors.black38
|
||||
@@ -73,20 +71,17 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
||||
blurRadius: 10,
|
||||
),
|
||||
],
|
||||
border:
|
||||
isPortrait
|
||||
border: isPortrait
|
||||
? Border(
|
||||
right: BorderSide(
|
||||
color:
|
||||
(Theme.of(context).brightness == Brightness.light)
|
||||
color: (Theme.of(context).brightness == Brightness.light)
|
||||
? Colors.grey[300]!
|
||||
: Colors.black38,
|
||||
),
|
||||
)
|
||||
: Border(
|
||||
top: BorderSide(
|
||||
color:
|
||||
(Theme.of(context).brightness == Brightness.light)
|
||||
color: (Theme.of(context).brightness == Brightness.light)
|
||||
? Colors.grey[300]!
|
||||
: Colors.black38,
|
||||
),
|
||||
@@ -118,8 +113,7 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
||||
},
|
||||
child: Container(
|
||||
color: const Color(0x00000000),
|
||||
padding:
|
||||
isPortrait
|
||||
padding: isPortrait
|
||||
? const EdgeInsets.fromLTRB(0, 7, 0, 7)
|
||||
: const EdgeInsets.fromLTRB(7, 0, 7, 0),
|
||||
child: Align(
|
||||
@@ -130,16 +124,13 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
||||
decoration: BoxDecoration(
|
||||
color: colorType,
|
||||
shape: BoxShape.circle,
|
||||
boxShadow:
|
||||
_currentColorType == colors
|
||||
boxShadow: _currentColorType == colors
|
||||
? [
|
||||
if (colorType ==
|
||||
Theme.of(context).cardColor)
|
||||
BoxShadow(
|
||||
color:
|
||||
(Theme.of(
|
||||
context,
|
||||
).brightness ==
|
||||
(Theme.of(context).brightness ==
|
||||
Brightness.light)
|
||||
? Colors.grey[300]!
|
||||
: Colors.black38,
|
||||
@@ -152,8 +143,7 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
||||
),
|
||||
]
|
||||
: null,
|
||||
border:
|
||||
colorType == Theme.of(context).cardColor
|
||||
border: colorType == Theme.of(context).cardColor
|
||||
? Border.all(
|
||||
color:
|
||||
(Theme.of(context).brightness ==
|
||||
@@ -208,27 +198,23 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
||||
},
|
||||
child: Container(
|
||||
color: const Color(0x00000000),
|
||||
margin:
|
||||
isPortrait
|
||||
margin: isPortrait
|
||||
? const EdgeInsets.only(right: 10)
|
||||
: const EdgeInsets.only(bottom: 10),
|
||||
padding:
|
||||
isPortrait
|
||||
padding: isPortrait
|
||||
? const EdgeInsets.fromLTRB(0, 7, 0, 7)
|
||||
: const EdgeInsets.fromLTRB(7, 0, 7, 0),
|
||||
child: Align(
|
||||
child: AnimatedContainer(
|
||||
curve: Curves.fastOutSlowIn,
|
||||
duration: const Duration(milliseconds: 500),
|
||||
width:
|
||||
isPortrait
|
||||
width: isPortrait
|
||||
? (_currentShading == color ? 250 : 230)
|
||||
: (_currentShading == color ? 50 : 30),
|
||||
height: isPortrait ? 50 : 220,
|
||||
decoration: BoxDecoration(
|
||||
color: color,
|
||||
boxShadow:
|
||||
_currentShading == color
|
||||
boxShadow: _currentShading == color
|
||||
? [
|
||||
if ((color == Colors.white) ||
|
||||
(color == Colors.black))
|
||||
@@ -256,16 +242,14 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
||||
)
|
||||
: null,
|
||||
),
|
||||
child:
|
||||
widget.enableLabel
|
||||
child: widget.enableLabel
|
||||
? isPortrait
|
||||
? Row(
|
||||
children: [
|
||||
Text(
|
||||
' ${colors.values.first}',
|
||||
style: TextStyle(
|
||||
color:
|
||||
useWhiteForeground(color)
|
||||
color: useWhiteForeground(color)
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
),
|
||||
@@ -291,8 +275,9 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
||||
duration: const Duration(
|
||||
milliseconds: 300,
|
||||
),
|
||||
opacity:
|
||||
_currentShading == color ? 1 : 0,
|
||||
opacity: _currentShading == color
|
||||
? 1
|
||||
: 0,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 16,
|
||||
@@ -301,8 +286,7 @@ class _MaterialPickerState extends State<MaterialPicker> {
|
||||
child: Text(
|
||||
colors.values.first,
|
||||
style: TextStyle(
|
||||
color:
|
||||
useWhiteForeground(color)
|
||||
color: useWhiteForeground(color)
|
||||
? Colors.white
|
||||
: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
@@ -17,8 +17,7 @@ bool useWhiteForeground(Color backgroundColor, {double bias = 0.0}) {
|
||||
// return 1.05 / (color.computeLuminance() + 0.05) > 4.5;
|
||||
|
||||
// New:
|
||||
final v =
|
||||
sqrt(
|
||||
final v = sqrt(
|
||||
pow(backgroundColor.r, 2) * 0.299 +
|
||||
pow(backgroundColor.g, 2) * 0.587 +
|
||||
pow(backgroundColor.b, 2) * 0.114,
|
||||
|
||||
@@ -15,8 +15,7 @@ final kagiAutosuggestServiceProvider =
|
||||
NotifierProvider<KagiAutosuggestService, void>.internal(
|
||||
KagiAutosuggestService.new,
|
||||
name: r'kagiAutosuggestServiceProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product')
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$kagiAutosuggestServiceHash,
|
||||
dependencies: null,
|
||||
|
||||
@@ -37,8 +37,7 @@ sealed class FtsQueryBuilder {
|
||||
}) {
|
||||
final matches = _tokenizePattern.allMatches(input);
|
||||
|
||||
final barewords =
|
||||
matches
|
||||
final barewords = matches
|
||||
.map((match) {
|
||||
if (match.group(1) != null) {
|
||||
return EnclosedBareword(match.group(1)!);
|
||||
@@ -55,8 +54,7 @@ sealed class FtsQueryBuilder {
|
||||
//Merge short tokens
|
||||
_mergeShortBarewords(barewords, minTokenLength);
|
||||
|
||||
_tokens =
|
||||
barewords
|
||||
_tokens = barewords
|
||||
.where((bareword) => bareword.word.length >= minTokenLength)
|
||||
.take(tokenLimit)
|
||||
.toList();
|
||||
|
||||
@@ -33,8 +33,7 @@ sealed class UnixTokenizer {
|
||||
}) {
|
||||
final matches = _tokenizePattern.allMatches(input);
|
||||
|
||||
final barewords =
|
||||
matches
|
||||
final barewords = matches
|
||||
.map((match) {
|
||||
if (match.group(1) != null) {
|
||||
return EnclosedBareword(match.group(1)!);
|
||||
|
||||
@@ -80,8 +80,7 @@ class TokenizedFilter<T> {
|
||||
}) {
|
||||
final queryTokens = _tokenize(query);
|
||||
|
||||
final scoredItems =
|
||||
items.map((item) {
|
||||
final scoredItems = items.map((item) {
|
||||
final itemString = toString(item);
|
||||
if (itemString == null || itemString.isEmpty) {
|
||||
return (item, 0.0);
|
||||
@@ -108,8 +107,7 @@ class TokenizedFilter<T> {
|
||||
}) {
|
||||
final queryTokens = _tokenize(query);
|
||||
|
||||
final filtered =
|
||||
items.where((item) {
|
||||
final filtered = items.where((item) {
|
||||
final itemString = toString(item);
|
||||
if (itemString == null || itemString.isEmpty) {
|
||||
return false;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user