base method

ConsoleLoaderBase base(
  1. String task, {
  2. ConsoleColor? animationColor,
  3. Duration? animationSpeed,
  4. LoaderPosition? animationPosition,
})

Implementation

ConsoleLoaderBase base(
  String task, {
  ConsoleColor? animationColor,
  Duration? animationSpeed,
  LoaderPosition? animationPosition,
}) {
  switch (this) {
    case ConsoleLoader.spinner:
      return SpinnerLoader(
          task: task,
          animationColor: animationColor,
          speed: animationSpeed,
          animationPosition: animationPosition);
    case ConsoleLoader.progressBar:
      return ProgressBarLoader(
          task: task,
          animationColor: animationColor!,
          speed: animationSpeed!,
          animationPosition: animationPosition!);
  }
}