Configuration constructor
Configuration({
- required ProjectType projectType,
- required List<
FeatureConfiguration> features, - String? projectDirPath,
Create a Configuration with the projectType list of features and
projectDirPath
.
Implementation
Configuration({
required this.projectType,
required this.features,
String? projectDirPath,
}) : projectDirPath = projectDirPath ?? Directory.current.path {
if (this.projectDirPath.trim().isEmpty == true ||
!Directory(this.projectDirPath).existsSync()) {
throw ArgumentError.value(
this.projectDirPath,
'Project dir path',
'Not specified or does not exist',
);
}
if (features.isEmpty == true) {
throw ArgumentError.value(
features,
'features',
'At least one feature need to be specified',
);
}
}