getSpinnerVerbs function

List<String> getSpinnerVerbs([
  1. SpinnerVerbsConfig? config
])

Returns the active spinner verbs list, respecting user configuration.

When config is null, returns the default spinnerVerbs. When mode is SpinnerVerbsMode.replace, returns the custom verbs (or defaults if the custom list is empty). When mode is SpinnerVerbsMode.append, returns the defaults followed by the custom verbs.

Implementation

List<String> getSpinnerVerbs([SpinnerVerbsConfig? config]) {
  if (config == null) return spinnerVerbs;

  switch (config.mode) {
    case SpinnerVerbsMode.replace:
      return config.verbs.isNotEmpty ? config.verbs : spinnerVerbs;
    case SpinnerVerbsMode.append:
      return [...spinnerVerbs, ...config.verbs];
  }
}