getAddressFromMessage static method

String getAddressFromMessage(
  1. String message
)

Implementation

static String getAddressFromMessage(String message) {
  try {
    final regexp = RegExp('0x[a-fA-F0-9]{40}');
    final matches = regexp.allMatches(message);
    for (final Match m in matches) {
      return m[0]!;
    }
    return '';
  } catch (_) {}
  return '';
}