Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/counter/lib/main.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions examples/pub/lib/detail.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions examples/pub/lib/search.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions examples/stackoverflow/lib/common.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions examples/stackoverflow/lib/question.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions examples/stackoverflow/lib/tag.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ final class ChangeNotifierProvider<NotifierT extends ChangeNotifier?>
/// An implementation detail of Riverpod
/// @nodoc
@internal
const ChangeNotifierProvider.internal(
ChangeNotifierProvider.internal(
this._createFn, {
required super.name,
required super.dependencies,
Expand Down
8 changes: 4 additions & 4 deletions packages/riverpod/lib/src/core/family.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ typedef FamilyCreate<CreatedT, ArgT> = CreatedT Function(Ref ref, ArgT arg);
@publicInMisc
final class Family extends ProviderOrFamily implements _FamilyOverride {
/// A base class for all families
const Family({
Family({
required super.name,
required super.dependencies,
required super.$allTransitiveDependencies,
Expand All @@ -67,7 +67,7 @@ final class Family extends ProviderOrFamily implements _FamilyOverride {
@internal
base class $Family extends Family {
/// A base class for all families
const $Family({
$Family({
required super.name,
required super.dependencies,
required super.$allTransitiveDependencies,
Expand Down Expand Up @@ -129,7 +129,7 @@ base class FunctionalFamily<
/// help them define a [Family].
///
/// This API is not meant for public consumption.
const FunctionalFamily(
FunctionalFamily(
this._createFn, {
required FunctionalProviderFactory<ProviderT, CreatedT, ArgT>
providerFactory,
Expand Down Expand Up @@ -227,7 +227,7 @@ base class ClassFamily<
/// help them define a [Family].
///
/// This API is not meant for public consumption.
const ClassFamily(
ClassFamily(
this._createFn, {
required ClassProviderFactory<NotifierT, ProviderT, CreatedT, ArgT>
providerFactory,
Expand Down
3 changes: 1 addition & 2 deletions packages/riverpod/lib/src/core/foundation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface class ProviderListenableOrFamily {}
@publicInMisc
sealed class ProviderOrFamily implements ProviderListenableOrFamily {
/// A common interface shared by [ProviderBase] and [Family]
const ProviderOrFamily({
ProviderOrFamily({
required this.name,
required this.dependencies,
required this.$allTransitiveDependencies,
Expand Down Expand Up @@ -194,7 +194,6 @@ String shortHash(Object? object) {
///
/// See also:
/// - [SyncProviderTransformerMixin] for making custom [ProviderListenable]s.
@immutable
@publicInCodegen
@publicInMisc
abstract interface class ProviderListenable<StateT>
Expand Down
4 changes: 3 additions & 1 deletion packages/riverpod/lib/src/core/mutations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ final class _MutationProvider<ValueT>
_MutationNotifier<ValueT>,
_MutationNotifier<ValueT>
> {
const _MutationProvider(this.mutation)
_MutationProvider(this.mutation)
: super(
from: null,
argument: null,
Expand All @@ -86,11 +86,13 @@ final class _MutationProvider<ValueT>
String? debugGetCreateSourceHash() => null;

@override
// ignore: avoid_equals_and_hash_code_on_mutable_classes
bool operator ==(Object other) {
return other is _MutationProvider<ValueT> && mutation == other.mutation;
}

@override
// ignore: avoid_equals_and_hash_code_on_mutable_classes
int get hashCode => mutation.hashCode;
}

Expand Down
6 changes: 3 additions & 3 deletions packages/riverpod/lib/src/core/override_with_value.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ abstract base class _ValueProvider<StateT, ValueT>
extends $ProviderBaseImpl<StateT>
with LegacyProviderMixin<StateT> {
/// Creates a [_ValueProvider].
const _ValueProvider(this._value)
_ValueProvider(this._value)
: super(
name: null,
from: null,
Expand Down Expand Up @@ -40,7 +40,7 @@ abstract base class _ValueProvider<StateT, ValueT>
@internal
final class $SyncValueProvider<ValueT> extends _ValueProvider<ValueT, ValueT> {
/// Creates a [$SyncValueProvider].
const $SyncValueProvider(super._value);
$SyncValueProvider(super._value);

@override
Iterable<ProviderOrFamily>? get dependencies => null;
Expand Down Expand Up @@ -132,7 +132,7 @@ class _SyncValueProviderElement<ValueT>
final class $AsyncValueProvider<ValueT>
extends _ValueProvider<AsyncValue<ValueT>, ValueT> {
/// Creates a [$AsyncValueProvider].
const $AsyncValueProvider(super._value);
$AsyncValueProvider(super._value);

/// @nodoc
@internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ abstract base class $FunctionalProvider<
extends $ProviderBaseImpl<StateT> {
/// Implementation detail of `riverpod_generator`.
/// Do not use, as this can be removed at any time.
const $FunctionalProvider({
$FunctionalProvider({
required super.name,
required super.from,
required super.argument,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ abstract base class $ClassProvider<
CreatedT
>
extends $ProviderBaseImpl<StateT> {
const $ClassProvider({
$ClassProvider({
required super.name,
required super.from,
required super.argument,
Expand Down
6 changes: 2 additions & 4 deletions packages/riverpod/lib/src/core/provider/provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,14 @@ typedef Create<CreatedT> = CreatedT Function(Ref ref);
typedef OnError = void Function(Object error, StackTrace stackTrace);

/// A base class for _all_ providers.
@immutable
@publicInMisc
sealed class ProviderBase<StateT> extends ProviderOrFamily
implements
ProviderListenable<StateT>,
Refreshable<StateT>,
_ProviderOverride {
/// A base class for _all_ providers.
const ProviderBase({
ProviderBase({
required super.name,
required this.from,
required this.argument,
Expand Down Expand Up @@ -90,11 +89,10 @@ sealed class ProviderBase<StateT> extends ProviderOrFamily
}

/// A base class for _all_ providers.
@immutable
@internal
abstract final class $ProviderBaseImpl<StateT> extends ProviderBase<StateT> {
/// A base class for _all_ providers.
const $ProviderBaseImpl({
$ProviderBaseImpl({
required super.name,
required super.from,
required super.argument,
Expand Down
Loading
Loading