searchMetadatas method

  1. @override
Future<Iterable<Metadata>> searchMetadatas(
  1. String search,
  2. int limit
)
override

Search for metadata by name

Implementation

@override

/// Search for metadata by name
Future<Iterable<Metadata>> searchMetadatas(String search, int limit) async {
  try {
    final result = metadatas.values
        .where((element) => element.name!.contains(search))
        .take(limit);
    return result;
  } catch (_) {}

  return [];
}