safeGet static method

String safeGet(
  1. String? value, [
  2. String? suffix
])

Gracefully handles null values, and skips the suffix when null

Implementation

static String safeGet(String? value, [String? suffix]) {
  return (value ?? "") + (!isEmpty(value) ? suffix ?? "" : "");
}