Environment class

Represents an API environment configuration.

Constructors

Environment({required String id, required String name, required String baseUrl, String? socketUrl, String? description, Map<String, dynamic> config = const {}, bool isActive = false})
Creates a new environment.
const
Environment.fromJson(Map<String, dynamic> json)
Create from JSON.
factory

Properties

baseUrl String
Base URL for API calls.
final
config Map<String, dynamic>
Custom configuration values.
final
description String?
Optional description.
final
hashCode int
The hash code for this object.
no setterinherited
id String
Unique identifier for the environment.
final
isActive bool
Whether this is the current active environment.
final
name String
Human-readable name.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
socketUrl String?
Optional socket URL.
final

Methods

copyWith({String? id, String? name, String? baseUrl, String? socketUrl, String? description, Map<String, dynamic>? config, bool? isActive}) Environment
Create a copy with updated values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Convert to JSON.
toString() String
A string representation of this object.
override

Operators

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