DebugEnvironment class
A backend the app can be switched to from the log page.
dio.addDebugLogger(environments: [
DebugEnvironment('Dev', baseUrl: 'https://dev.api.example.com'),
DebugEnvironment('Prod', baseUrl: 'https://api.example.com'),
]);
- Annotations
Constructors
- DebugEnvironment(String name, {required String baseUrl, Color? color})
-
const
Properties
- baseUrl → String
-
Base URL used for requests while this environment is selected.
final
- color → Color?
-
Optional color for the badge on the floating button.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- name → String
-
Name shown in the switcher. Environments with the same name on different
Dio instances are switched together.
final
- 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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override