copyWith method

Definitions copyWith(
  1. Map<String, dynamic> data
)

Implementation

Definitions copyWith(Map<String, dynamic> data) {
  return Definitions(
    packageName: data['packageName'] ?? packageName,
    superModelPath: data['superModelPath'] ?? superModelPath,
    modelPath: data['modelPath'] ?? modelPath,
    controllerPath: data['controllerPath'] ?? controllerPath,
    servicePath: data['servicePath'] ?? servicePath,
    httpClientPath: data['httpClientPath'] ?? httpClientPath,
    stub: data['stubs'] != null ? Stub.fromDynamic(data['stubs']) : stub,
    modules:
        data['modules'] != null && data['modules'] is List
            ? data['modules'].map<Module>((model) => Module.fromDynamic(model)).toList()
            : modules,
  );
}