ApiProvider class
A provider class for managing API logs data and UI state.
This provider handles the data flow for API logs, including filtering, sorting, and managing user interactions with the logs. It extends BaseProvider to inherit common provider functionality.
- Inheritance
-
- Object
- ChangeNotifier
- BaseProvider
- ApiProvider
Constructors
- ApiProvider()
- Creates an ApiProvider instance.
Properties
-
filtered
↔ List<
BaseModel> -
The filtered list of models based on current filters.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
-
mainMenus
→ List<
MenuItem< ApiActionType> > -
The main menu items for API actions.
final
-
root
↔ List<
BaseModel> -
The complete list of all models (requests and errors).
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selected ↔ BaseModel?
-
The currently selected model item.
getter/setter pair
- text ↔ String?
-
The text used for filtering the models.
getter/setter pair
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
copyToClipboard(
String? content) → void -
inherited
-
dispose(
) → void -
Disposes the provider and removes the listener.
override
-
filter(
{String? text}) → void - Filters the models based on current criteria.
-
handleMainMenuClick(
ApiActionType? result) → void - Handles main menu item clicks.
-
handleUpdateLog(
List< BaseModel> requestModels) → void - Handles updates to the log data.
-
init(
) → void - Initializes the provider by setting up listeners and loading initial data.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
onChanged(
String value) → void - Updates the filter text.
-
onLongTapItem(
BaseModel model, BuildContext context) → Future< void> - Handles item long press events.
-
onTapItem(
BaseModel model) → void - Handles item tap events.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited