volt library

Classes

HasData<T>
NoData<T>
QueryClient
QueryClientProvider
Provides a QueryClient to the widget tree.
VoltListener
A listener for query events in Volt
VoltMutation<T>
VoltMutationState
VoltPersistor
VoltPersistorResult<T>
VoltQuery<T>
A query with a declarative data fetching and caching API

Functions

useMutationState<T>({required Future<bool> mutationFn(T params), void onSuccess(T? params)?, void onError(T? params)?}) VoltMutation<T>
Creates a mutation for example to modify data on a server.
useQueries<T>(List<VoltQuery<T>>? queries, {bool enabled = true, Duration? staleTime}) List<T>?
useQueries2<T1, T2>(VoltQuery<T1> query1, VoltQuery<T2> query2, {bool enabled = true, Duration? staleTime}) → (T1, T2)?
useQueries3<T1, T2, T3>(VoltQuery<T1> query1, VoltQuery<T2> query2, VoltQuery<T3> query3, {bool enabled = true, Duration? staleTime}) → (T1, T2, T3)?
useQueries4<T1, T2, T3, T4>(VoltQuery<T1> query1, VoltQuery<T2> query2, VoltQuery<T3> query3, VoltQuery<T4> query4, {bool enabled = true, Duration? staleTime}) → (T1, T2, T3, T4)?
useQueries5<T1, T2, T3, T4, T5>(VoltQuery<T1> query1, VoltQuery<T2> query2, VoltQuery<T3> query3, VoltQuery<T4> query4, VoltQuery<T5> query5, {bool enabled = true, Duration? staleTime}) → (T1, T2, T3, T4, T5)?
useQueries6<T1, T2, T3, T4, T5, T6>(VoltQuery<T1> query1, VoltQuery<T2> query2, VoltQuery<T3> query3, VoltQuery<T4> query4, VoltQuery<T5> query5, VoltQuery<T6> query6, {bool enabled = true, Duration? staleTime}) → (T1, T2, T3, T4, T5, T6)?
useQueries7<T1, T2, T3, T4, T5, T6, T7>(VoltQuery<T1> query1, VoltQuery<T2> query2, VoltQuery<T3> query3, VoltQuery<T4> query4, VoltQuery<T5> query5, VoltQuery<T6> query6, VoltQuery<T7> query7, {bool enabled = true, Duration? staleTime}) → (T1, T2, T3, T4, T5, T6, T7)?
useQueries8<T1, T2, T3, T4, T5, T6, T7, T8>(VoltQuery<T1> query1, VoltQuery<T2> query2, VoltQuery<T3> query3, VoltQuery<T4> query4, VoltQuery<T5> query5, VoltQuery<T6> query6, VoltQuery<T7> query7, VoltQuery<T8> query8, {bool enabled = true, Duration? staleTime}) → (T1, T2, T3, T4, T5, T6, T7, T8)?
useQueries9<T1, T2, T3, T4, T5, T6, T7, T8, T9>(VoltQuery<T1> query1, VoltQuery<T2> query2, VoltQuery<T3> query3, VoltQuery<T4> query4, VoltQuery<T5> query5, VoltQuery<T6> query6, VoltQuery<T7> query7, VoltQuery<T8> query8, VoltQuery<T9> query9, {bool enabled = true, Duration? staleTime}) → (T1, T2, T3, T4, T5, T6, T7, T8, T9)?
useQuery<T>(VoltQuery<T> query, {Duration? staleTime, bool enabled = true}) → T?
Listens to a query and returns the result data
useQueryClient() QueryClient
Returns the QueryClient instance from the nearest QueryClientProvider ancestor.