mirror of
https://github.com/austinried/subtracks.git
synced 2025-12-27 00:59:28 +01:00
11 lines
341 B
Dart
11 lines
341 B
Dart
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:package_info_plus/package_info_plus.dart';
|
|
|
|
final packageInfoInitializer = FutureProvider<PackageInfo>((ref) {
|
|
return PackageInfo.fromPlatform();
|
|
});
|
|
|
|
final packageInfoProvider = Provider<PackageInfo>((ref) {
|
|
return ref.watch(packageInfoInitializer).requireValue;
|
|
});
|