✨ Add developer projects
This commit is contained in:
@@ -6,7 +6,7 @@ part of 'edit_bot.dart';
|
||||
// RiverpodGenerator
|
||||
// **************************************************************************
|
||||
|
||||
String _$botHash() => r'267c75029a194fe180aeaebf12cbb0c1da9b8529';
|
||||
String _$botHash() => r'a3e412ed575c513434bc718b7920db1d017111f4';
|
||||
|
||||
/// Copied from Dart SDK
|
||||
class _SystemHash {
|
||||
@@ -39,13 +39,13 @@ class BotFamily extends Family<AsyncValue<Bot?>> {
|
||||
const BotFamily();
|
||||
|
||||
/// See also [bot].
|
||||
BotProvider call(String id) {
|
||||
return BotProvider(id);
|
||||
BotProvider call(String publisherName, String projectId, String id) {
|
||||
return BotProvider(publisherName, projectId, id);
|
||||
}
|
||||
|
||||
@override
|
||||
BotProvider getProviderOverride(covariant BotProvider provider) {
|
||||
return call(provider.id);
|
||||
return call(provider.publisherName, provider.projectId, provider.id);
|
||||
}
|
||||
|
||||
static const Iterable<ProviderOrFamily>? _dependencies = null;
|
||||
@@ -66,15 +66,17 @@ class BotFamily extends Family<AsyncValue<Bot?>> {
|
||||
/// See also [bot].
|
||||
class BotProvider extends AutoDisposeFutureProvider<Bot?> {
|
||||
/// See also [bot].
|
||||
BotProvider(String id)
|
||||
BotProvider(String publisherName, String projectId, String id)
|
||||
: this._internal(
|
||||
(ref) => bot(ref as BotRef, id),
|
||||
(ref) => bot(ref as BotRef, publisherName, projectId, id),
|
||||
from: botProvider,
|
||||
name: r'botProvider',
|
||||
debugGetCreateSourceHash:
|
||||
const bool.fromEnvironment('dart.vm.product') ? null : _$botHash,
|
||||
dependencies: BotFamily._dependencies,
|
||||
allTransitiveDependencies: BotFamily._allTransitiveDependencies,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
id: id,
|
||||
);
|
||||
|
||||
@@ -85,9 +87,13 @@ class BotProvider extends AutoDisposeFutureProvider<Bot?> {
|
||||
required super.allTransitiveDependencies,
|
||||
required super.debugGetCreateSourceHash,
|
||||
required super.from,
|
||||
required this.publisherName,
|
||||
required this.projectId,
|
||||
required this.id,
|
||||
}) : super.internal();
|
||||
|
||||
final String publisherName;
|
||||
final String projectId;
|
||||
final String id;
|
||||
|
||||
@override
|
||||
@@ -101,6 +107,8 @@ class BotProvider extends AutoDisposeFutureProvider<Bot?> {
|
||||
dependencies: null,
|
||||
allTransitiveDependencies: null,
|
||||
debugGetCreateSourceHash: null,
|
||||
publisherName: publisherName,
|
||||
projectId: projectId,
|
||||
id: id,
|
||||
),
|
||||
);
|
||||
@@ -113,12 +121,17 @@ class BotProvider extends AutoDisposeFutureProvider<Bot?> {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is BotProvider && other.id == id;
|
||||
return other is BotProvider &&
|
||||
other.publisherName == publisherName &&
|
||||
other.projectId == projectId &&
|
||||
other.id == id;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode {
|
||||
var hash = _SystemHash.combine(0, runtimeType.hashCode);
|
||||
hash = _SystemHash.combine(hash, publisherName.hashCode);
|
||||
hash = _SystemHash.combine(hash, projectId.hashCode);
|
||||
hash = _SystemHash.combine(hash, id.hashCode);
|
||||
|
||||
return _SystemHash.finish(hash);
|
||||
@@ -128,6 +141,12 @@ class BotProvider extends AutoDisposeFutureProvider<Bot?> {
|
||||
@Deprecated('Will be removed in 3.0. Use Ref instead')
|
||||
// ignore: unused_element
|
||||
mixin BotRef on AutoDisposeFutureProviderRef<Bot?> {
|
||||
/// The parameter `publisherName` of this provider.
|
||||
String get publisherName;
|
||||
|
||||
/// The parameter `projectId` of this provider.
|
||||
String get projectId;
|
||||
|
||||
/// The parameter `id` of this provider.
|
||||
String get id;
|
||||
}
|
||||
@@ -136,6 +155,10 @@ class _BotProviderElement extends AutoDisposeFutureProviderElement<Bot?>
|
||||
with BotRef {
|
||||
_BotProviderElement(super.provider);
|
||||
|
||||
@override
|
||||
String get publisherName => (origin as BotProvider).publisherName;
|
||||
@override
|
||||
String get projectId => (origin as BotProvider).projectId;
|
||||
@override
|
||||
String get id => (origin as BotProvider).id;
|
||||
}
|
||||
|
Reference in New Issue
Block a user