DefaultFunctions class

A class containing default functions for API response handling

This class provides utility functions for checking API success, getting error messages, and getting error codes from API responses.

Constructors

DefaultFunctions()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

checkApiSuccess(Map<String, dynamic> response) bool
Checks if an API response is successful
getErrorCode(Map<String, dynamic> response) MapEntry<String, dynamic>?
Gets the error code from an API response
getErrorMessage(Map<String, dynamic> response) String?
Gets the error message from an API response