processRetroCompatibility method

  1. @visibleForTesting
void processRetroCompatibility(
  1. Map<String, dynamic> dataMap
)

Processes retro compatibility for older versions of the action button.

Implementation

@visibleForTesting
void processRetroCompatibility(Map<String, dynamic> dataMap) {
  if (dataMap.containsKey("autoCancel")) {
    developer
        .log("autoCancel is deprecated. Please use autoDismissible instead.");
    dataMap[NOTIFICATION_AUTO_DISMISSIBLE] =
        AwesomeAssertUtils.extractValue<bool>('autoCancel', dataMap);
  }

  if (dataMap.containsKey("buttonType")) {
    developer.log("buttonType is deprecated. Please use actionType instead.");
    _actionType = AwesomeAssertUtils.extractEnum<ActionType>(
        "buttonType", dataMap, ActionType.values);
  }

  adaptInputFieldToRequireText();
}