INNER CODE UNIT · Dart
_imageUrlRegExp
SimformSolutionsPvtLtd/chatview · lib/src/extensions/extensions.dart:105
static final RegExp _imageUrlRegExp = RegExp(imageUrlRegExpression);
/// Shared [EmojiParser] instance.
///
/// The [EmojiParser] constructor decodes a large emoji JSON dataset and
/// builds lookup maps (thousands of entries). Previously a new instance was
/// created for every [isAllEmoji] call — which runs for every text bubble on
/// every rebuild — causing severe jank while scrolling. Reusing a single
/// instance removes that per-frame cost entirely.
static final EmojiParser _emojiParser = EmojiParser();
bool get isImageUrl {
return _imageUrlRegExp.hasMatch(this) || startsWith('data:image');
}
bool get fromMemory => startsWith('data:image');
MemoryImage? toMemoryImage() {