Skip to content

Commit

Permalink
Make lint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
rrousselGit committed Oct 30, 2023
1 parent f8481a9 commit ab4d869
Show file tree
Hide file tree
Showing 27 changed files with 81 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

part of '../change_notifier_provider.dart';

/// {@macro riverpod.providerrefbase}
/// {@macro riverpod.provider_ref_base}
abstract class AutoDisposeChangeNotifierProviderRef<
NotifierT extends ChangeNotifier?>
extends ChangeNotifierProviderRef<NotifierT>
implements AutoDisposeRef<NotifierT> {}

// ignore: subtype_of_sealed_class
/// {@macro riverpod.ChangeNotifierprovider}
/// {@macro riverpod.change_notifier_provider}
class AutoDisposeChangeNotifierProvider<NotifierT extends ChangeNotifier?>
extends _ChangeNotifierProviderBase<NotifierT> {
/// {@macro riverpod.ChangeNotifierprovider}
/// {@macro riverpod.change_notifier_provider}
AutoDisposeChangeNotifierProvider(
this._createFn, {
super.name,
Expand Down Expand Up @@ -56,7 +56,7 @@ class AutoDisposeChangeNotifierProvider<NotifierT extends ChangeNotifier?>
@override
late final Refreshable<NotifierT> notifier = _notifier<NotifierT>(this);

/// {@macro riverpod.overridewith}
/// {@macro riverpod.override_with}
Override overrideWith(
Create<NotifierT, AutoDisposeChangeNotifierProviderRef<NotifierT>> create,
) {
Expand Down Expand Up @@ -109,7 +109,7 @@ class AutoDisposeChangeNotifierProviderFamily<NotifierT extends ChangeNotifier?,
computeAllTransitiveDependencies(dependencies),
);

/// {@macro riverpod.overridewith}
/// {@macro riverpod.override_with}
Override overrideWith(
NotifierT Function(
AutoDisposeChangeNotifierProviderRef<NotifierT> ref,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

part of '../change_notifier_provider.dart';

/// {@macro riverpod.providerrefbase}
/// {@macro riverpod.provider_ref_base}
abstract class ChangeNotifierProviderRef<NotifierT extends ChangeNotifier?>
implements Ref<NotifierT> {
/// The [ChangeNotifier] currently exposed by this provider.
Expand All @@ -12,7 +12,7 @@ abstract class ChangeNotifierProviderRef<NotifierT extends ChangeNotifier?>
}

// ignore: subtype_of_sealed_class
/// {@template riverpod.ChangeNotifierprovider}
/// {@template riverpod.change_notifier_provider}
/// Creates a [ChangeNotifier] and exposes its current state.
///
/// Combined with [ChangeNotifier], [ChangeNotifierProvider] can be used to manipulate
Expand Down Expand Up @@ -75,7 +75,7 @@ abstract class ChangeNotifierProviderRef<NotifierT extends ChangeNotifier?>
class ChangeNotifierProvider<NotifierT extends ChangeNotifier?>
extends _ChangeNotifierProviderBase<NotifierT>
with AlwaysAliveProviderBase<NotifierT> {
/// {@macro riverpod.ChangeNotifierprovider}
/// {@macro riverpod.change_notifier_provider}
ChangeNotifierProvider(
this._createFn, {
super.name,
Expand Down Expand Up @@ -122,7 +122,7 @@ class ChangeNotifierProvider<NotifierT extends ChangeNotifier?>
late final AlwaysAliveRefreshable<NotifierT> notifier =
_notifier<NotifierT>(this);

/// {@template riverpod.overridewith}
/// {@template riverpod.override_with}
/// Override the provider with a new initialization function.
///
/// This will also disable the auto-scoping mechanism, meaning that if the
Expand Down Expand Up @@ -256,7 +256,7 @@ class ChangeNotifierProviderFamily<NotifierT extends ChangeNotifier?, Arg>
computeAllTransitiveDependencies(dependencies),
);

/// {@macro riverpod.overridewith}
/// {@macro riverpod.override_with}
Override overrideWith(
NotifierT Function(ChangeNotifierProviderRef<NotifierT> ref, Arg arg)
create,
Expand Down
6 changes: 3 additions & 3 deletions packages/riverpod/lib/src/async_notifier/auto_dispose.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ abstract class BuildlessAutoDisposeAsyncNotifier<State>
/// {@macro riverpod.async_notifier_provider_modifier}
abstract class AutoDisposeAsyncNotifier<State>
extends BuildlessAutoDisposeAsyncNotifier<State> {
/// {@macro riverpod.asyncnotifier.build}
/// {@macro riverpod.async_notifier.build}
@visibleForOverriding
FutureOr<State> build();
}

/// {@macro riverpod.providerrefbase}
/// {@macro riverpod.provider_ref_base}
abstract class AutoDisposeAsyncNotifierProviderRef<T>
implements AsyncNotifierProviderRef<T>, AutoDisposeRef<AsyncValue<T>> {}

Expand Down Expand Up @@ -96,7 +96,7 @@ class AutoDisposeAsyncNotifierProviderImpl<
return (notifier as AutoDisposeAsyncNotifier<T>).build();
}

/// {@macro riverpod.overridewith}
/// {@macro riverpod.override_with}
@mustBeOverridden
Override overrideWith(NotifierT Function() create) {
return ProviderOverride(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ abstract class AutoDisposeFamilyAsyncNotifier<State, Arg>
arg = element.origin.argument as Arg;
}

/// {@macro riverpod.asyncnotifier.build}
/// {@macro riverpod.async_notifier.build}
@visibleForOverriding
FutureOr<State> build(Arg arg);
}
Expand Down Expand Up @@ -102,7 +102,7 @@ class AutoDisposeAsyncNotifierProviderFamily<
debugGetCreateSourceHash: null,
);

/// {@macro riverpod.overridewith}
/// {@macro riverpod.override_with}
Override overrideWith(NotifierT Function() create) {
return FamilyOverrideImpl<AsyncValue<T>, Arg,
AutoDisposeFamilyAsyncNotifierProvider<NotifierT, T, Arg>>(
Expand Down
8 changes: 4 additions & 4 deletions packages/riverpod/lib/src/async_notifier/base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ abstract class BuildlessAsyncNotifier<State> extends AsyncNotifierBase<State> {
AsyncNotifierProviderRef<State> get ref => _element;
}

/// {@template riverpod.asyncnotifier}
/// {@template riverpod.async_notifier}
/// A [Notifier] implementation that is asynchronously initialized.
///
/// This is similar to a [FutureProvider] but allows to perform side-effects
Expand All @@ -36,7 +36,7 @@ abstract class BuildlessAsyncNotifier<State> extends AsyncNotifierBase<State> {
///
/// {@macro riverpod.async_notifier_provider_modifier}
abstract class AsyncNotifier<State> extends BuildlessAsyncNotifier<State> {
/// {@template riverpod.asyncnotifier.build}
/// {@template riverpod.async_notifier.build}
/// Initialize an [AsyncNotifier].
///
/// It is safe to use [Ref.watch] or [Ref.listen] inside this method.
Expand All @@ -53,7 +53,7 @@ abstract class AsyncNotifier<State> extends BuildlessAsyncNotifier<State> {
FutureOr<State> build();
}

/// {@macro riverpod.providerrefbase}
/// {@macro riverpod.provider_ref_base}
abstract class AsyncNotifierProviderRef<T> implements Ref<AsyncValue<T>> {}

/// {@template riverpod.async_notifier_provider}
Expand Down Expand Up @@ -139,7 +139,7 @@ class AsyncNotifierProviderImpl<NotifierT extends AsyncNotifierBase<T>, T>
return (notifier as AsyncNotifier<T>).build();
}

/// {@macro riverpod.overridewith}
/// {@macro riverpod.override_with}
@mustBeOverridden
Override overrideWith(NotifierT Function() create) {
return ProviderOverride(
Expand Down
6 changes: 3 additions & 3 deletions packages/riverpod/lib/src/async_notifier/family.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
part of '../async_notifier.dart';

/// {@macro riverpod.asyncnotifier}
/// {@macro riverpod.async_notifier}
///
/// {@macro riverpod.async_notifier_provider_modifier}
abstract class FamilyAsyncNotifier<State, Arg>
Expand All @@ -24,7 +24,7 @@ abstract class FamilyAsyncNotifier<State, Arg>
arg = element.origin.argument as Arg;
}

/// {@macro riverpod.asyncnotifier.build}
/// {@macro riverpod.async_notifier.build}
@visibleForOverriding
FutureOr<State> build(Arg arg);
}
Expand Down Expand Up @@ -109,7 +109,7 @@ class AsyncNotifierProviderFamily<NotifierT extends FamilyAsyncNotifier<T, Arg>,
debugGetCreateSourceHash: null,
);

/// {@macro riverpod.overridewith}
/// {@macro riverpod.override_with}
Override overrideWith(NotifierT Function() create) {
return FamilyOverrideImpl<AsyncValue<T>, Arg,
AsyncNotifierFamilyProvider<NotifierT, T, Arg>>(
Expand Down
6 changes: 3 additions & 3 deletions packages/riverpod/lib/src/framework/container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class _StateReader {

var _debugVerifyDependenciesAreRespectedEnabled = true;

/// {@template riverpod.providercontainer}
/// {@template riverpod.provider_container}
/// An object that stores the state of the providers and allows overriding the
/// behavior of a specific provider.
///
Expand All @@ -98,7 +98,7 @@ var _debugVerifyDependenciesAreRespectedEnabled = true;
/// {@endtemplate}
@sealed
class ProviderContainer implements Node {
/// {@macro riverpod.providercontainer}
/// {@macro riverpod.provider_container}
ProviderContainer({
ProviderContainer? parent,
List<Override> overrides = const [],
Expand Down Expand Up @@ -779,7 +779,7 @@ class ProviderOverride implements Override {
/// The provider that is overridden.
final ProviderBase<Object?> _origin;

/// The new provider behaviour.
/// The new provider behavior.
final ProviderBase<Object?> _override;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/riverpod/lib/src/framework/ref.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
part of '../framework.dart';

/// {@template riverpod.providerrefbase}
/// {@template riverpod.provider_ref_base}
/// An object used by providers to interact with other providers and the life-cycles
/// of the application.
///
Expand Down
2 changes: 1 addition & 1 deletion packages/riverpod/lib/src/future_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ProviderElementProxy<AsyncValue<T>, Future<T>> _future<T>(
);
}

/// {@template riverpod.futureprovider}
/// {@template riverpod.future_provider}
/// A provider that asynchronously creates a value.
///
/// [FutureProvider] can be considered as a combination of [Provider] and
Expand Down
10 changes: 5 additions & 5 deletions packages/riverpod/lib/src/future_provider/auto_dispose.dart
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
part of '../future_provider.dart';

/// {@macro riverpod.providerrefbase}
/// {@macro riverpod.provider_ref_base}
/// - [FutureProviderRef.state], the value currently exposed by this provider.
abstract class AutoDisposeFutureProviderRef<State>
extends FutureProviderRef<State>
implements AutoDisposeRef<AsyncValue<State>> {}

/// {@macro riverpod.futureprovider}
/// {@macro riverpod.future_provider}
class AutoDisposeFutureProvider<T> extends _FutureProviderBase<T>
with AsyncSelector<T> {
/// {@macro riverpod.futureprovider}
/// {@macro riverpod.future_provider}
AutoDisposeFutureProvider(
this._createFn, {
super.name,
Expand Down Expand Up @@ -51,7 +51,7 @@ class AutoDisposeFutureProvider<T> extends _FutureProviderBase<T>
@override
late final Refreshable<Future<T>> future = _future(this);

/// {@macro riverpod.overridewith}
/// {@macro riverpod.override_with}
Override overrideWith(
Create<FutureOr<T>, AutoDisposeFutureProviderRef<T>> create,
) {
Expand Down Expand Up @@ -110,7 +110,7 @@ class AutoDisposeFutureProviderFamily<R, Arg> extends AutoDisposeFamilyBase<
required super.debugGetCreateSourceHash,
}) : super(providerFactory: AutoDisposeFutureProvider<R>.internal);

/// {@macro riverpod.overridewith}
/// {@macro riverpod.override_with}
Override overrideWith(
FutureOr<R> Function(AutoDisposeFutureProviderRef<R> ref, Arg arg) create,
) {
Expand Down
10 changes: 5 additions & 5 deletions packages/riverpod/lib/src/future_provider/base.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
part of '../future_provider.dart';

/// {@macro riverpod.providerrefbase}
/// {@macro riverpod.provider_ref_base}
/// - [state], the value currently exposed by this provider.
abstract class FutureProviderRef<State> implements Ref<AsyncValue<State>> {
/// Obtains the state currently exposed by this provider.
Expand All @@ -22,10 +22,10 @@ abstract class FutureProviderRef<State> implements Ref<AsyncValue<State>> {
Future<State> get future;
}

/// {@macro riverpod.futureprovider}
/// {@macro riverpod.future_provider}
class FutureProvider<T> extends _FutureProviderBase<T>
with AlwaysAliveProviderBase<AsyncValue<T>>, AlwaysAliveAsyncSelector<T> {
/// {@macro riverpod.futureprovider}
/// {@macro riverpod.future_provider}
FutureProvider(
this._createFn, {
super.name,
Expand Down Expand Up @@ -67,7 +67,7 @@ class FutureProvider<T> extends _FutureProviderBase<T>
@override
FutureProviderElement<T> createElement() => FutureProviderElement(this);

/// {@macro riverpod.overridewith}
/// {@macro riverpod.override_with}
Override overrideWith(Create<FutureOr<T>, FutureProviderRef<T>> create) {
return ProviderOverride(
origin: this,
Expand Down Expand Up @@ -135,7 +135,7 @@ class FutureProviderFamily<R, Arg> extends FamilyBase<FutureProviderRef<R>,
required super.debugGetCreateSourceHash,
}) : super(providerFactory: FutureProvider<R>.internal);

/// {@macro riverpod.overridewith}
/// {@macro riverpod.override_with}
Override overrideWith(
FutureOr<R> Function(FutureProviderRef<R> ref, Arg arg) create,
) {
Expand Down
6 changes: 3 additions & 3 deletions packages/riverpod/lib/src/notifier/auto_dispose.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ abstract class BuildlessAutoDisposeNotifier<State> extends NotifierBase<State> {
/// {@macro riverpod.notifier_provider_modifier}
abstract class AutoDisposeNotifier<State>
extends BuildlessAutoDisposeNotifier<State> {
/// {@macro riverpod.asyncnotifier.build}
/// {@macro riverpod.async_notifier.build}
@visibleForOverriding
State build();
}

/// {@macro riverpod.providerrefbase}
/// {@macro riverpod.provider_ref_base}
abstract class AutoDisposeNotifierProviderRef<T>
implements NotifierProviderRef<T>, AutoDisposeRef<T> {}

Expand Down Expand Up @@ -91,7 +91,7 @@ class AutoDisposeNotifierProviderImpl<NotifierT extends NotifierBase<T>, T>
return (notifier as AutoDisposeNotifier<T>).build();
}

/// {@macro riverpod.overridewith}
/// {@macro riverpod.override_with}
@mustBeOverridden
Override overrideWith(NotifierT Function() create) {
return ProviderOverride(
Expand Down
4 changes: 2 additions & 2 deletions packages/riverpod/lib/src/notifier/auto_dispose_family.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ abstract class AutoDisposeFamilyNotifier<State, Arg>
arg = element.origin.argument as Arg;
}

/// {@macro riverpod.asyncnotifier.build}
/// {@macro riverpod.async_notifier.build}
@visibleForOverriding
State build(Arg arg);
}
Expand Down Expand Up @@ -104,7 +104,7 @@ class AutoDisposeNotifierProviderFamily<
required super.debugGetCreateSourceHash,
}) : super(providerFactory: AutoDisposeFamilyNotifierProvider.internal);

/// {@macro riverpod.overridewith}
/// {@macro riverpod.override_with}
Override overrideWith(NotifierT Function() create) {
return FamilyOverrideImpl<T, Arg,
AutoDisposeFamilyNotifierProvider<NotifierT, T, Arg>>(
Expand Down
4 changes: 2 additions & 2 deletions packages/riverpod/lib/src/notifier/base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ abstract class Notifier<State> extends BuildlessNotifier<State> {
State build();
}

/// {@macro riverpod.providerrefbase}
/// {@macro riverpod.provider_ref_base}
abstract class NotifierProviderRef<T> implements Ref<T> {}

/// {@template riverpod.notifier_provider}
Expand Down Expand Up @@ -160,7 +160,7 @@ class NotifierProviderImpl<NotifierT extends NotifierBase<T>, T>
return (notifier as Notifier<T>).build();
}

/// {@macro riverpod.overridewith}
/// {@macro riverpod.override_with}
@mustBeOverridden
Override overrideWith(NotifierT Function() create) {
return ProviderOverride(
Expand Down
4 changes: 2 additions & 2 deletions packages/riverpod/lib/src/notifier/family.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ abstract class FamilyNotifier<State, Arg> extends BuildlessNotifier<State> {
arg = element.origin.argument as Arg;
}

/// {@macro riverpod.asyncnotifier.build}
/// {@macro riverpod.async_notifier.build}
@visibleForOverriding
State build(Arg arg);
}
Expand Down Expand Up @@ -106,7 +106,7 @@ class NotifierProviderFamily<NotifierT extends FamilyNotifier<T, Arg>, T, Arg>
required super.debugGetCreateSourceHash,
}) : super(providerFactory: NotifierFamilyProvider.internal);

/// {@macro riverpod.overridewith}
/// {@macro riverpod.override_with}
Override overrideWith(NotifierT Function() create) {
return FamilyOverrideImpl<T, Arg,
NotifierFamilyProvider<NotifierT, T, Arg>>(
Expand Down
Loading

0 comments on commit ab4d869

Please sign in to comment.