Json2DartConfig class

Configuration model for Json2Dart generation process

This class encapsulates all configuration options for the Json2Dart command, providing a centralized way to manage settings and validation.

Constructors

Json2DartConfig({bool isApi = true, bool isEndpoint = true, bool isUnitTest = false, bool isOnlyUnitTest = false, bool isReplace = false, bool isFormat = true, bool isCubit = true, String? featureName, String? pageName, String? appsName, String bodyDateFormat = '.toIso8601String()', String responseDateFormat = '.toIso8601String()'})
const

Properties

appsName String?
Specific apps name to generate (optional)
final
bodyDateFormat String
Date format for request body serialization
final
featureName String?
Specific feature name to generate (optional)
final
hashCode int
The hash code for this object.
no setterinherited
isApi bool
Whether to generate API implementation files
final
isCubit bool
Whether to generate with Cubit state management
final
isEndpoint bool
Whether to generate endpoint configurations
final
isFormat bool
Whether to format generated files
final
isOnlyUnitTest bool
Whether to generate only unit tests (skip other files)
final
isReplace bool
Whether to replace existing files
final
isUnitTest bool
Whether to generate unit tests
final
pageName String?
Specific page name to generate (optional)
final
responseDateFormat String
Date format for response deserialization
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({bool? isApi, bool? isEndpoint, bool? isUnitTest, bool? isOnlyUnitTest, bool? isReplace, bool? isFormat, bool? isCubit, String? featureName, String? pageName, String? appsName, String? bodyDateFormat, String? responseDateFormat}) Json2DartConfig
Creates a copy of this config with updated values
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
validate() List<String>
Validates the configuration and returns any errors

Operators

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