apiStep function

Future<APIConfig> apiStep()

Prompts for API pack configuration.

Implementation

Future<APIConfig> apiStep() async {
  final enabled = Confirm(
    prompt: 'Include API client (Dio)?',
    defaultValue: true,
  ).interact();

  bool dip = false;
  if (enabled) {
    dip = Confirm(
      prompt: 'Use Dependency Inversion (abstract repository interface)?',
      defaultValue: true,
    ).interact();
  }

  return APIConfig(enabled: enabled, dip: dip);
}