import 'package:flutter/foundation.dart'; import '../data/interfaces/hashtag_repo_intf.dart'; import '../globals.dart'; import '../models/hashtag.dart'; class HashtagService extends ChangeNotifier { late final IHashtagRepo repo; HashtagService() { repo = getIt(); } Future clear() async { await repo.clear(); notifyListeners(); } void add(Hashtag tag) { repo.add(tag); notifyListeners(); } List getMatchingHashTags(String searchString) { return repo.getMatchingHashTags(searchString); } }