filterEmojiDefinitions function

Future<EmojiDefinition> filterEmojiDefinitions (
  1. bool predicate(
    1. EmojiDefinition
    ),
  2. {bool cache: false}
)

Returns emoji based on given predicate. Allows to cache results via cache parameter.

Implementation

Future<EmojiDefinition> filterEmojiDefinitions(bool Function(EmojiDefinition) predicate, {bool cache = false}) async =>
    (await getAllEmojiDefinitions(cache: cache)).firstWhere(predicate);