Skip to content

Commit

Permalink
doc(refresh): rename extension to be more generic
Browse files Browse the repository at this point in the history
  • Loading branch information
giboin committed Jul 4, 2024
1 parent ff7801e commit 246bb0f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/riverpods_community_extensions.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// Community extensions for Riverpods
library riverpods_community_extensions;

export 'src/auto_refresh_extension.dart';
export 'src/refresh_extension.dart';
export 'src/cache_data_for_extension.dart';
export 'src/cache_for_extension.dart';
export 'src/debounce_extension.dart';
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ import 'dart:async';
import 'package:flutter/widgets.dart';
import 'package:riverpod/riverpod.dart';

/// Adds auto-refresh functionality to AutoDisposeRef<T> objects.
/// allows you to refresh a value at a specified interval.
/// Adds auto-refresh functionalities to AutoDisposeRef<T> objects.
///
/// See [autoRefresh]
extension AutoRefreshExtension<T> on AutoDisposeRef<T> {
/// See [autoRefresh] and [refreshWhenReturningToForeground] for more details.
extension RefreshExtension<T> on AutoDisposeRef<T> {
/// Refreshes the value at the specified interval.
///
/// This can be useful for scenarios where you want to refresh a value at a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:riverpod/riverpod.dart';
import 'package:riverpods_community_extensions/src/auto_refresh_extension.dart';
import 'package:riverpods_community_extensions/src/refresh_extension.dart';

void main() {
group('auto-refresh extension', () {
Expand Down Expand Up @@ -74,7 +74,7 @@ void main() {
});
});

group('refreshWhenReturningToForeground', () {
group('refreshWhenReturningToForeground extension', () {
var numberOfFetchDataCalls = 0;

int fetchData() {
Expand Down

0 comments on commit 246bb0f

Please sign in to comment.