diff --git a/lib/riverpods_community_extensions.dart b/lib/riverpods_community_extensions.dart index afa69cd..d36942d 100644 --- a/lib/riverpods_community_extensions.dart +++ b/lib/riverpods_community_extensions.dart @@ -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'; diff --git a/lib/src/auto_refresh_extension.dart b/lib/src/refresh_extension.dart similarity index 87% rename from lib/src/auto_refresh_extension.dart rename to lib/src/refresh_extension.dart index f0188ef..fa13b37 100644 --- a/lib/src/auto_refresh_extension.dart +++ b/lib/src/refresh_extension.dart @@ -2,11 +2,10 @@ import 'dart:async'; import 'package:flutter/widgets.dart'; import 'package:riverpod/riverpod.dart'; -/// Adds auto-refresh functionality to AutoDisposeRef objects. -/// allows you to refresh a value at a specified interval. +/// Adds auto-refresh functionalities to AutoDisposeRef objects. /// -/// See [autoRefresh] -extension AutoRefreshExtension on AutoDisposeRef { +/// See [autoRefresh] and [refreshWhenReturningToForeground] for more details. +extension RefreshExtension on AutoDisposeRef { /// Refreshes the value at the specified interval. /// /// This can be useful for scenarios where you want to refresh a value at a diff --git a/test/src/auto_refresh_extension_test.dart b/test/src/refresh_extension_test.dart similarity index 96% rename from test/src/auto_refresh_extension_test.dart rename to test/src/refresh_extension_test.dart index 7bdfc70..647163d 100644 --- a/test/src/auto_refresh_extension_test.dart +++ b/test/src/refresh_extension_test.dart @@ -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', () { @@ -74,7 +74,7 @@ void main() { }); }); - group('refreshWhenReturningToForeground', () { + group('refreshWhenReturningToForeground extension', () { var numberOfFetchDataCalls = 0; int fetchData() {