mergeValue method

dynamic mergeValue(
  1. dynamic valueA,
  2. dynamic valueB
)

Implementation

dynamic mergeValue(dynamic valueA, dynamic valueB) {
  if (valueA is String && valueB is String) {
    if (valueA.isEmpty) {
      return valueB;
    }

    return valueA;
  }

  return valueA;
}