FeedbackProviderState class
Provides a list of all Feedbacks in the database.
Note: The list will be empty if the user does not have the permission to view the feedbacks.
Also provides CRUD operations for Feedbacks (Read is implicitly provided by the list and does not have an explicit method).
- Inheritance
-
- Object
- AsyncNotifier<
List< Feedback> > - AutoRefreshAsyncNotifier<
List< Feedback> > - FeedbackProviderState
Constructors
- FeedbackProviderState()
- Provides a list of all Feedbacks in the database.
Properties
-
future
→ Future<
List< Feedback> > -
Obtains a Future that resolves with the first state value that is not
AsyncLoading.
read-onlyinherited
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- isPaused → bool
-
true
if auto refreshing is paused.read-onlyinherited -
ref
→ AsyncNotifierProviderRef<
List< Feedback> > -
The Ref from the provider associated with this AsyncNotifier.
read-onlyinherited
- refreshRate → Duration
-
The refresh rate of the data.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- setStateToLoadingOnRefresh → bool
-
If this is
true
the state will be set to AsyncValue.loading when the data is refreshed.finalinherited -
state
↔ AsyncValue<
List< Feedback> > -
The value currently exposed by this AsyncNotifier.
read / writeinherited
Methods
-
build(
) → FutureOr< List< Feedback> > -
Initialize an AsyncNotifier.
override
-
deleteFeedback(
Feedback feedback) → Future< void> -
Deletes the given
feedback
. -
filterBy(
{FeedbackType? type, bool? read, int? author, int? modifiedBy}) → List< Feedback> - Filters the feedbacks by the given parameters.
-
markFeedbackAsRead(
Feedback feedback, {String? comment}) → Future< void> -
Marks the given
feedback
as read. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onRefresh(
) → FutureOr< List< Feedback> > -
Returns the new state.
override
-
pause(
) → void -
Pauses auto refreshing.
inherited
-
resume(
) → void -
Resumes auto refreshing.
inherited
-
submitFeedback(
String message, FeedbackType type, {String? logFilePath}) → Future< void> -
Submits a new feedback with the given
message
andtype
. -
toString(
) → String -
A string representation of this object.
inherited
-
update(
FutureOr< List< cb(List<Feedback> >Feedback> ), {FutureOr<List< onError(Object err, StackTrace stackTrace)?}) → Future<Feedback> >List< Feedback> > -
A function to update state from its previous value, while
abstracting loading/error cases for state.
inherited
-
updateShouldNotify(
AsyncValue< List< previous, AsyncValue<Feedback> >List< next) → boolFeedback> > -
A method invoked when the state exposed by this AsyncNotifier changes.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited