createDataModelBody method
Implementation
void createDataModelBody(
String pathPage,
String pageName,
String apiName,
bool bodyList,
) {
final apiClassName = apiName.pascalCase;
final path = join(pathPage, 'data', 'models', 'body');
DirectoryHelper.createDir(path);
join(path, '${apiName}_body.dart').write('''import 'package:core/core.dart';
class ${apiClassName}Body extends Equatable {
const ${apiClassName}Body({
required this.email,
required this.password,
});
final String email;
final String password;
Map<String, dynamic> toMap() {
return {
'email': email,
'password': password,
};
}
@override
List<Object?> get props => [email, password];
}''');
StatusHelper.generated(join(path, '${apiName}_body.dart'));
}