veilidchat/lib/providers/veilid_instance.dart

10 lines
301 B
Dart
Raw Normal View History

2023-08-01 00:39:50 -04:00
import 'package:riverpod_annotation/riverpod_annotation.dart';
import '../veilid_support/veilid_support.dart';
part 'veilid_instance.g.dart';
// Expose the Veilid instance as a FutureProvider
@riverpod
FutureOr<Veilid> veilidInstance(VeilidInstanceRef ref) async =>
await eventualVeilid.future;