migration done
This commit is contained in:
@@ -19,15 +19,15 @@
|
||||
*/
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:nullability/nullability.dart';
|
||||
import 'package:weblibre/features/bangs/data/database/daos/bang.drift.dart';
|
||||
import 'package:weblibre/features/bangs/data/database/database.dart';
|
||||
import 'package:weblibre/features/bangs/data/database/definitions.drift.dart';
|
||||
import 'package:weblibre/features/bangs/data/models/bang.dart';
|
||||
import 'package:weblibre/features/bangs/data/models/bang_data.dart';
|
||||
import 'package:weblibre/features/bangs/data/models/bang_group.dart';
|
||||
|
||||
part 'bang.g.dart';
|
||||
|
||||
@DriftAccessor()
|
||||
class BangDao extends DatabaseAccessor<BangDatabase> with _$BangDaoMixin {
|
||||
class BangDao extends DatabaseAccessor<BangDatabase> with $BangDaoMixin {
|
||||
BangDao(super.db);
|
||||
|
||||
Selectable<Bang> getBangList({Iterable<BangGroup>? groups}) {
|
||||
@@ -122,9 +122,11 @@ class BangDao extends DatabaseAccessor<BangDatabase> with _$BangDaoMixin {
|
||||
final ftsQuery = db.buildFtsQuery(searchString);
|
||||
|
||||
if (ftsQuery.isNotEmpty) {
|
||||
return db.queryBangs(query: ftsQuery);
|
||||
return db.definitionsDrift.queryBangs(query: ftsQuery);
|
||||
} else {
|
||||
return db.queryBangsBasic(query: db.buildLikeQuery(searchString));
|
||||
return db.definitionsDrift.queryBangsBasic(
|
||||
query: db.buildLikeQuery(searchString),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// dart format width=80
|
||||
// ignore_for_file: type=lint
|
||||
import 'package:drift/drift.dart' as i0;
|
||||
import 'package:weblibre/features/bangs/data/database/database.dart' as i1;
|
||||
|
||||
mixin $BangDaoMixin on i0.DatabaseAccessor<i1.BangDatabase> {}
|
||||
@@ -1,6 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'bang.dart';
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
mixin _$BangDaoMixin on DatabaseAccessor<BangDatabase> {}
|
||||
@@ -18,14 +18,14 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:weblibre/features/bangs/data/database/daos/sync.drift.dart';
|
||||
import 'package:weblibre/features/bangs/data/database/database.dart';
|
||||
import 'package:weblibre/features/bangs/data/database/definitions.drift.dart';
|
||||
import 'package:weblibre/features/bangs/data/models/bang.dart';
|
||||
import 'package:weblibre/features/bangs/data/models/bang_group.dart';
|
||||
|
||||
part 'sync.g.dart';
|
||||
|
||||
@DriftAccessor()
|
||||
class SyncDao extends DatabaseAccessor<BangDatabase> with _$SyncDaoMixin {
|
||||
class SyncDao extends DatabaseAccessor<BangDatabase> with $SyncDaoMixin {
|
||||
SyncDao(super.db);
|
||||
|
||||
SingleOrNullSelectable<DateTime?> getLastSyncOfGroup(BangGroup group) {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
// dart format width=80
|
||||
// ignore_for_file: type=lint
|
||||
import 'package:drift/drift.dart' as i0;
|
||||
import 'package:weblibre/features/bangs/data/database/database.dart' as i1;
|
||||
|
||||
mixin $SyncDaoMixin on i0.DatabaseAccessor<i1.BangDatabase> {}
|
||||
@@ -1,6 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'sync.dart';
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
mixin _$SyncDaoMixin on DatabaseAccessor<BangDatabase> {}
|
||||
@@ -20,17 +20,11 @@
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:weblibre/features/bangs/data/database/daos/bang.dart';
|
||||
import 'package:weblibre/features/bangs/data/database/daos/sync.dart';
|
||||
import 'package:weblibre/features/bangs/data/database/drift/converters/bang_format.dart';
|
||||
import 'package:weblibre/features/bangs/data/models/bang.dart';
|
||||
import 'package:weblibre/features/bangs/data/models/bang_data.dart';
|
||||
import 'package:weblibre/features/bangs/data/models/bang_group.dart';
|
||||
import 'package:weblibre/features/bangs/data/models/search_history_entry.dart';
|
||||
import 'package:weblibre/features/bangs/data/database/database.drift.dart';
|
||||
import 'package:weblibre/features/search/domain/fts_tokenizer.dart';
|
||||
|
||||
part 'database.g.dart';
|
||||
|
||||
@DriftDatabase(include: {'database.drift'}, daos: [BangDao, SyncDao])
|
||||
class BangDatabase extends _$BangDatabase with PrefixQueryBuilderMixin {
|
||||
@DriftDatabase(include: {'definitions.drift'}, daos: [BangDao, SyncDao])
|
||||
class BangDatabase extends $BangDatabase with PrefixQueryBuilderMixin {
|
||||
@override
|
||||
final int schemaVersion = 1;
|
||||
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
// dart format width=80
|
||||
// ignore_for_file: type=lint
|
||||
import 'package:drift/drift.dart' as i0;
|
||||
import 'package:weblibre/features/bangs/data/database/definitions.drift.dart'
|
||||
as i1;
|
||||
import 'package:weblibre/features/bangs/data/database/daos/bang.dart' as i2;
|
||||
import 'package:weblibre/features/bangs/data/database/database.dart' as i3;
|
||||
import 'package:weblibre/features/bangs/data/database/daos/sync.dart' as i4;
|
||||
import 'package:drift/internal/modular.dart' as i5;
|
||||
import 'package:sqlite3/common.dart' as i6;
|
||||
|
||||
abstract class $BangDatabase extends i0.GeneratedDatabase {
|
||||
$BangDatabase(i0.QueryExecutor e) : super(e);
|
||||
$BangDatabaseManager get managers => $BangDatabaseManager(this);
|
||||
late final i1.BangTable bang = i1.BangTable(this);
|
||||
late final i1.BangSync bangSync = i1.BangSync(this);
|
||||
late final i1.BangFrequency bangFrequency = i1.BangFrequency(this);
|
||||
late final i1.BangHistory bangHistory = i1.BangHistory(this);
|
||||
late final i1.BangFts bangFts = i1.BangFts(this);
|
||||
late final i1.BangDataView bangDataView = i1.BangDataView(this);
|
||||
late final i2.BangDao bangDao = i2.BangDao(this as i3.BangDatabase);
|
||||
late final i4.SyncDao syncDao = i4.SyncDao(this as i3.BangDatabase);
|
||||
i1.DefinitionsDrift get definitionsDrift => i5.ReadDatabaseContainer(
|
||||
this,
|
||||
).accessor<i1.DefinitionsDrift>(i1.DefinitionsDrift.new);
|
||||
@override
|
||||
Iterable<i0.TableInfo<i0.Table, Object?>> get allTables =>
|
||||
allSchemaEntities.whereType<i0.TableInfo<i0.Table, Object?>>();
|
||||
@override
|
||||
List<i0.DatabaseSchemaEntity> get allSchemaEntities => [
|
||||
bang,
|
||||
bangSync,
|
||||
bangFrequency,
|
||||
bangHistory,
|
||||
bangFts,
|
||||
bangDataView,
|
||||
i1.bangAfterInsert,
|
||||
i1.bangAfterDelete,
|
||||
i1.bangAfterUpdate,
|
||||
];
|
||||
@override
|
||||
i0.StreamQueryUpdateRules get streamUpdateRules =>
|
||||
const i0.StreamQueryUpdateRules([
|
||||
i0.WritePropagation(
|
||||
on: i0.TableUpdateQuery.onTableName(
|
||||
'bang',
|
||||
limitUpdateKind: i0.UpdateKind.delete,
|
||||
),
|
||||
result: [
|
||||
i0.TableUpdate('bang_frequency', kind: i0.UpdateKind.delete),
|
||||
],
|
||||
),
|
||||
i0.WritePropagation(
|
||||
on: i0.TableUpdateQuery.onTableName(
|
||||
'bang',
|
||||
limitUpdateKind: i0.UpdateKind.insert,
|
||||
),
|
||||
result: [i0.TableUpdate('bang_fts', kind: i0.UpdateKind.insert)],
|
||||
),
|
||||
i0.WritePropagation(
|
||||
on: i0.TableUpdateQuery.onTableName(
|
||||
'bang',
|
||||
limitUpdateKind: i0.UpdateKind.delete,
|
||||
),
|
||||
result: [i0.TableUpdate('bang_fts', kind: i0.UpdateKind.insert)],
|
||||
),
|
||||
i0.WritePropagation(
|
||||
on: i0.TableUpdateQuery.onTableName(
|
||||
'bang',
|
||||
limitUpdateKind: i0.UpdateKind.update,
|
||||
),
|
||||
result: [i0.TableUpdate('bang_fts', kind: i0.UpdateKind.insert)],
|
||||
),
|
||||
]);
|
||||
}
|
||||
|
||||
class $BangDatabaseManager {
|
||||
final $BangDatabase _db;
|
||||
$BangDatabaseManager(this._db);
|
||||
i1.$BangTableTableManager get bang =>
|
||||
i1.$BangTableTableManager(_db, _db.bang);
|
||||
i1.$BangSyncTableManager get bangSync =>
|
||||
i1.$BangSyncTableManager(_db, _db.bangSync);
|
||||
i1.$BangFrequencyTableManager get bangFrequency =>
|
||||
i1.$BangFrequencyTableManager(_db, _db.bangFrequency);
|
||||
i1.$BangHistoryTableManager get bangHistory =>
|
||||
i1.$BangHistoryTableManager(_db, _db.bangHistory);
|
||||
i1.$BangFtsTableManager get bangFts =>
|
||||
i1.$BangFtsTableManager(_db, _db.bangFts);
|
||||
}
|
||||
|
||||
extension DefineFunctions on i6.CommonDatabase {
|
||||
void defineFunctions({
|
||||
required String Function(int, String?) lexoRankNext,
|
||||
required String Function(int, String?) lexoRankPrevious,
|
||||
required String Function(String?, String?) lexoRankReorderAfter,
|
||||
required String Function(String?, String?) lexoRankReorderBefore,
|
||||
}) {
|
||||
createFunction(
|
||||
functionName: 'lexo_rank_next',
|
||||
argumentCount: const i6.AllowedArgumentCount(2),
|
||||
function: (args) {
|
||||
final arg0 = args[0] as int;
|
||||
final arg1 = args[1] as String?;
|
||||
return lexoRankNext(arg0, arg1);
|
||||
},
|
||||
);
|
||||
createFunction(
|
||||
functionName: 'lexo_rank_previous',
|
||||
argumentCount: const i6.AllowedArgumentCount(2),
|
||||
function: (args) {
|
||||
final arg0 = args[0] as int;
|
||||
final arg1 = args[1] as String?;
|
||||
return lexoRankPrevious(arg0, arg1);
|
||||
},
|
||||
);
|
||||
createFunction(
|
||||
functionName: 'lexo_rank_reorder_after',
|
||||
argumentCount: const i6.AllowedArgumentCount(2),
|
||||
function: (args) {
|
||||
final arg0 = args[0] as String?;
|
||||
final arg1 = args[1] as String?;
|
||||
return lexoRankReorderAfter(arg0, arg1);
|
||||
},
|
||||
);
|
||||
createFunction(
|
||||
functionName: 'lexo_rank_reorder_before',
|
||||
argumentCount: const i6.AllowedArgumentCount(2),
|
||||
function: (args) {
|
||||
final arg0 = args[0] as String?;
|
||||
final arg1 = args[1] as String?;
|
||||
return lexoRankReorderBefore(arg0, arg1);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -21,8 +21,7 @@ import 'package:copy_with_extension/copy_with_extension.dart';
|
||||
import 'package:drift/drift.dart' show Expression, Insertable, Value;
|
||||
import 'package:fast_equatable/fast_equatable.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:weblibre/features/bangs/data/database/database.dart'
|
||||
show BangCompanion;
|
||||
import 'package:weblibre/features/bangs/data/database/definitions.drift.dart';
|
||||
import 'package:weblibre/features/bangs/data/models/bang_group.dart';
|
||||
|
||||
part 'bang.g.dart';
|
||||
|
||||
@@ -23,12 +23,13 @@ abstract class _$BangCWProxy {
|
||||
|
||||
Bang format(Set<BangFormat>? format);
|
||||
|
||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `Bang(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
||||
/// Creates a new instance with the provided field values.
|
||||
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `Bang(...).copyWith.fieldName(value)`.
|
||||
///
|
||||
/// Usage
|
||||
/// Example:
|
||||
/// ```dart
|
||||
/// Bang(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
Bang call({
|
||||
String websiteName,
|
||||
String domain,
|
||||
@@ -41,43 +42,45 @@ abstract class _$BangCWProxy {
|
||||
});
|
||||
}
|
||||
|
||||
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfBang.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfBang.copyWith.fieldName(...)`
|
||||
/// Callable proxy for `copyWith` functionality.
|
||||
/// Use as `instanceOfBang.copyWith(...)` or call `instanceOfBang.copyWith.fieldName(value)` for a single field.
|
||||
class _$BangCWProxyImpl implements _$BangCWProxy {
|
||||
const _$BangCWProxyImpl(this._value);
|
||||
|
||||
final Bang _value;
|
||||
|
||||
@override
|
||||
Bang websiteName(String websiteName) => this(websiteName: websiteName);
|
||||
Bang websiteName(String websiteName) => call(websiteName: websiteName);
|
||||
|
||||
@override
|
||||
Bang domain(String domain) => this(domain: domain);
|
||||
Bang domain(String domain) => call(domain: domain);
|
||||
|
||||
@override
|
||||
Bang trigger(String trigger) => this(trigger: trigger);
|
||||
Bang trigger(String trigger) => call(trigger: trigger);
|
||||
|
||||
@override
|
||||
Bang urlTemplate(String urlTemplate) => this(urlTemplate: urlTemplate);
|
||||
Bang urlTemplate(String urlTemplate) => call(urlTemplate: urlTemplate);
|
||||
|
||||
@override
|
||||
Bang group(BangGroup? group) => this(group: group);
|
||||
Bang group(BangGroup? group) => call(group: group);
|
||||
|
||||
@override
|
||||
Bang category(String? category) => this(category: category);
|
||||
Bang category(String? category) => call(category: category);
|
||||
|
||||
@override
|
||||
Bang subCategory(String? subCategory) => this(subCategory: subCategory);
|
||||
Bang subCategory(String? subCategory) => call(subCategory: subCategory);
|
||||
|
||||
@override
|
||||
Bang format(Set<BangFormat>? format) => this(format: format);
|
||||
Bang format(Set<BangFormat>? format) => call(format: format);
|
||||
|
||||
@override
|
||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `Bang(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
||||
/// Creates a new instance with the provided field values.
|
||||
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `Bang(...).copyWith.fieldName(value)`.
|
||||
///
|
||||
/// Usage
|
||||
/// Example:
|
||||
/// ```dart
|
||||
/// Bang(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
Bang call({
|
||||
Object? websiteName = const $CopyWithPlaceholder(),
|
||||
Object? domain = const $CopyWithPlaceholder(),
|
||||
@@ -89,19 +92,21 @@ class _$BangCWProxyImpl implements _$BangCWProxy {
|
||||
Object? format = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return Bang(
|
||||
websiteName: websiteName == const $CopyWithPlaceholder()
|
||||
websiteName:
|
||||
websiteName == const $CopyWithPlaceholder() || websiteName == null
|
||||
? _value.websiteName
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: websiteName as String,
|
||||
domain: domain == const $CopyWithPlaceholder()
|
||||
domain: domain == const $CopyWithPlaceholder() || domain == null
|
||||
? _value.domain
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: domain as String,
|
||||
trigger: trigger == const $CopyWithPlaceholder()
|
||||
trigger: trigger == const $CopyWithPlaceholder() || trigger == null
|
||||
? _value.trigger
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: trigger as String,
|
||||
urlTemplate: urlTemplate == const $CopyWithPlaceholder()
|
||||
urlTemplate:
|
||||
urlTemplate == const $CopyWithPlaceholder() || urlTemplate == null
|
||||
? _value.urlTemplate
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: urlTemplate as String,
|
||||
@@ -126,7 +131,8 @@ class _$BangCWProxyImpl implements _$BangCWProxy {
|
||||
}
|
||||
|
||||
extension $BangCopyWith on Bang {
|
||||
/// Returns a callable class that can be used as follows: `instanceOfBang.copyWith(...)` or like so:`instanceOfBang.copyWith.fieldName(...)`.
|
||||
/// Returns a callable class used to build a new instance with modified fields.
|
||||
/// Example: `instanceOfBang.copyWith(...)` or `instanceOfBang.copyWith.fieldName(...)`.
|
||||
// ignore: library_private_types_in_public_api
|
||||
_$BangCWProxy get copyWith => _$BangCWProxyImpl(this);
|
||||
}
|
||||
|
||||
@@ -27,12 +27,13 @@ abstract class _$BangDataCWProxy {
|
||||
|
||||
BangData icon(BrowserIcon? icon);
|
||||
|
||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `BangData(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
||||
/// Creates a new instance with the provided field values.
|
||||
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `BangData(...).copyWith.fieldName(value)`.
|
||||
///
|
||||
/// Usage
|
||||
/// Example:
|
||||
/// ```dart
|
||||
/// BangData(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
BangData call({
|
||||
String websiteName,
|
||||
String domain,
|
||||
@@ -47,49 +48,51 @@ abstract class _$BangDataCWProxy {
|
||||
});
|
||||
}
|
||||
|
||||
/// Proxy class for `copyWith` functionality. This is a callable class and can be used as follows: `instanceOfBangData.copyWith(...)`. Additionally contains functions for specific fields e.g. `instanceOfBangData.copyWith.fieldName(...)`
|
||||
/// Callable proxy for `copyWith` functionality.
|
||||
/// Use as `instanceOfBangData.copyWith(...)` or call `instanceOfBangData.copyWith.fieldName(value)` for a single field.
|
||||
class _$BangDataCWProxyImpl implements _$BangDataCWProxy {
|
||||
const _$BangDataCWProxyImpl(this._value);
|
||||
|
||||
final BangData _value;
|
||||
|
||||
@override
|
||||
BangData websiteName(String websiteName) => this(websiteName: websiteName);
|
||||
BangData websiteName(String websiteName) => call(websiteName: websiteName);
|
||||
|
||||
@override
|
||||
BangData domain(String domain) => this(domain: domain);
|
||||
BangData domain(String domain) => call(domain: domain);
|
||||
|
||||
@override
|
||||
BangData trigger(String trigger) => this(trigger: trigger);
|
||||
BangData trigger(String trigger) => call(trigger: trigger);
|
||||
|
||||
@override
|
||||
BangData urlTemplate(String urlTemplate) => this(urlTemplate: urlTemplate);
|
||||
BangData urlTemplate(String urlTemplate) => call(urlTemplate: urlTemplate);
|
||||
|
||||
@override
|
||||
BangData category(String? category) => this(category: category);
|
||||
BangData category(String? category) => call(category: category);
|
||||
|
||||
@override
|
||||
BangData subCategory(String? subCategory) => this(subCategory: subCategory);
|
||||
BangData subCategory(String? subCategory) => call(subCategory: subCategory);
|
||||
|
||||
@override
|
||||
BangData format(Set<BangFormat>? format) => this(format: format);
|
||||
BangData format(Set<BangFormat>? format) => call(format: format);
|
||||
|
||||
@override
|
||||
BangData frequency(int? frequency) => this(frequency: frequency);
|
||||
BangData frequency(int? frequency) => call(frequency: frequency);
|
||||
|
||||
@override
|
||||
BangData lastUsed(DateTime? lastUsed) => this(lastUsed: lastUsed);
|
||||
BangData lastUsed(DateTime? lastUsed) => call(lastUsed: lastUsed);
|
||||
|
||||
@override
|
||||
BangData icon(BrowserIcon? icon) => this(icon: icon);
|
||||
BangData icon(BrowserIcon? icon) => call(icon: icon);
|
||||
|
||||
@override
|
||||
/// This function **does support** nullification of nullable fields. All `null` values passed to `non-nullable` fields will be ignored. You can also use `BangData(...).copyWith.fieldName(...)` to override fields one at a time with nullification support.
|
||||
/// Creates a new instance with the provided field values.
|
||||
/// Passing `null` to a nullable field nullifies it, while `null` for a non-nullable field is ignored. To update a single field use `BangData(...).copyWith.fieldName(value)`.
|
||||
///
|
||||
/// Usage
|
||||
/// Example:
|
||||
/// ```dart
|
||||
/// BangData(...).copyWith(id: 12, name: "My name")
|
||||
/// ````
|
||||
/// ```
|
||||
BangData call({
|
||||
Object? websiteName = const $CopyWithPlaceholder(),
|
||||
Object? domain = const $CopyWithPlaceholder(),
|
||||
@@ -103,19 +106,21 @@ class _$BangDataCWProxyImpl implements _$BangDataCWProxy {
|
||||
Object? icon = const $CopyWithPlaceholder(),
|
||||
}) {
|
||||
return BangData(
|
||||
websiteName: websiteName == const $CopyWithPlaceholder()
|
||||
websiteName:
|
||||
websiteName == const $CopyWithPlaceholder() || websiteName == null
|
||||
? _value.websiteName
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: websiteName as String,
|
||||
domain: domain == const $CopyWithPlaceholder()
|
||||
domain: domain == const $CopyWithPlaceholder() || domain == null
|
||||
? _value.domain
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: domain as String,
|
||||
trigger: trigger == const $CopyWithPlaceholder()
|
||||
trigger: trigger == const $CopyWithPlaceholder() || trigger == null
|
||||
? _value.trigger
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: trigger as String,
|
||||
urlTemplate: urlTemplate == const $CopyWithPlaceholder()
|
||||
urlTemplate:
|
||||
urlTemplate == const $CopyWithPlaceholder() || urlTemplate == null
|
||||
? _value.urlTemplate
|
||||
// ignore: cast_nullable_to_non_nullable
|
||||
: urlTemplate as String,
|
||||
@@ -148,7 +153,8 @@ class _$BangDataCWProxyImpl implements _$BangDataCWProxy {
|
||||
}
|
||||
|
||||
extension $BangDataCopyWith on BangData {
|
||||
/// Returns a callable class that can be used as follows: `instanceOfBangData.copyWith(...)` or like so:`instanceOfBangData.copyWith.fieldName(...)`.
|
||||
/// Returns a callable class used to build a new instance with modified fields.
|
||||
/// Example: `instanceOfBangData.copyWith(...)` or `instanceOfBangData.copyWith.fieldName(...)`.
|
||||
// ignore: library_private_types_in_public_api
|
||||
_$BangDataCWProxy get copyWith => _$BangDataCWProxyImpl(this);
|
||||
}
|
||||
|
||||
@@ -6,22 +6,46 @@ part of 'providers.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$bangDatabaseHash() => r'e31cf4b499300aff65174a16fb74c7dd8ec3d6f0';
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
/// See also [bangDatabase].
|
||||
@ProviderFor(bangDatabase)
|
||||
final bangDatabaseProvider = Provider<BangDatabase>.internal(
|
||||
bangDatabase,
|
||||
name: r'bangDatabaseProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$bangDatabaseHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
const bangDatabaseProvider = BangDatabaseProvider._();
|
||||
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
typedef BangDatabaseRef = ProviderRef<BangDatabase>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
final class BangDatabaseProvider
|
||||
extends $FunctionalProvider<BangDatabase, BangDatabase, BangDatabase>
|
||||
with $Provider<BangDatabase> {
|
||||
const BangDatabaseProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'bangDatabaseProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$bangDatabaseHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
$ProviderElement<BangDatabase> $createElement($ProviderPointer pointer) =>
|
||||
$ProviderElement(pointer);
|
||||
|
||||
@override
|
||||
BangDatabase create(Ref ref) {
|
||||
return bangDatabase(ref);
|
||||
}
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(BangDatabase value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<BangDatabase>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$bangDatabaseHash() => r'e31cf4b499300aff65174a16fb74c7dd8ec3d6f0';
|
||||
|
||||
@@ -6,22 +6,59 @@ part of 'data_source.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint, type=warning
|
||||
|
||||
@ProviderFor(BangDataSourceService)
|
||||
const bangDataSourceServiceProvider = BangDataSourceServiceProvider._();
|
||||
|
||||
final class BangDataSourceServiceProvider
|
||||
extends $NotifierProvider<BangDataSourceService, void> {
|
||||
const BangDataSourceServiceProvider._()
|
||||
: super(
|
||||
from: null,
|
||||
argument: null,
|
||||
retry: null,
|
||||
name: r'bangDataSourceServiceProvider',
|
||||
isAutoDispose: false,
|
||||
dependencies: null,
|
||||
$allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
@override
|
||||
String debugGetCreateSourceHash() => _$bangDataSourceServiceHash();
|
||||
|
||||
@$internal
|
||||
@override
|
||||
BangDataSourceService create() => BangDataSourceService();
|
||||
|
||||
/// {@macro riverpod.override_with_value}
|
||||
Override overrideWithValue(void value) {
|
||||
return $ProviderOverride(
|
||||
origin: this,
|
||||
providerOverride: $SyncValueProvider<void>(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
String _$bangDataSourceServiceHash() =>
|
||||
r'2ff811ece417ae498dacc04a2fa963cffb34c8a9';
|
||||
|
||||
/// See also [BangDataSourceService].
|
||||
@ProviderFor(BangDataSourceService)
|
||||
final bangDataSourceServiceProvider =
|
||||
NotifierProvider<BangDataSourceService, void>.internal(
|
||||
BangDataSourceService.new,
|
||||
name: r'bangDataSourceServiceProvider',
|
||||
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
|
||||
? null
|
||||
: _$bangDataSourceServiceHash,
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
);
|
||||
|
||||
typedef _$BangDataSourceService = Notifier<void>;
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package
|
||||
abstract class _$BangDataSourceService extends $Notifier<void> {
|
||||
void build();
|
||||
@$mustCallSuper
|
||||
@override
|
||||
void runBuild() {
|
||||
build();
|
||||
final ref = this.ref as $Ref<void, void>;
|
||||
final element =
|
||||
ref.element
|
||||
as $ClassProviderElement<
|
||||
AnyNotifier<void, void>,
|
||||
void,
|
||||
Object?,
|
||||
Object?
|
||||
>;
|
||||
element.handleValue(ref, null);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user