getGiftEmotionUrlByUrl static method
Implementation
static String? getGiftEmotionUrlByUrl(String? emotionUrl) {
if (emotionUrl == null || emotionUrl.isEmpty) return null;
var matches = giftEmotionUrlRegExp.firstMatch(emotionUrl);
if (matches == null) return null;
var name = matches.group(0);
if (name == null || name.isEmpty) return null;
var emotion = getEmotionByName("[$name]");
if (emotion is NetworkEmotion) {
return emotion.url;
}
return null;
}