of static method
Call BetterFeedback.of(context)
to get an
instance of FeedbackData
on which you can call .show()
or .hide()
to enable or disable the feedback view.
For example:
BetterFeedback.of(context).show(...);
BetterFeedback.of(context).hide(...);
Implementation
static FeedbackController of(BuildContext context) {
final feedbackData =
context.dependOnInheritedWidgetOfExactType<FeedbackData>();
assert(
feedbackData != null,
'You need to add a $BetterFeedback widget above this context!',
);
return feedbackData!.controller;
}