mirror of
https://github.com/Iconica-Development/flutter_timeline.git
synced 2025-05-19 02:23:46 +02:00
fix: Proper service is being used for filtering
This commit is contained in:
parent
525d8d3be6
commit
d16cd74a33
1 changed files with 3 additions and 3 deletions
|
@ -94,9 +94,9 @@ class _TimelineScreenState extends State<TimelineScreen> {
|
|||
var posts = widget.posts ?? service.postService.getPosts(category);
|
||||
|
||||
if (widget.filterEnabled && filterWord != null) {
|
||||
if (service is TimelineFilterService?) {
|
||||
posts =
|
||||
(service as TimelineFilterService).filterPosts(filterWord!, {});
|
||||
if (service.postService is TimelineFilterService) {
|
||||
posts = (service.postService as TimelineFilterService)
|
||||
.filterPosts(filterWord!, {});
|
||||
} else {
|
||||
debugPrint('Timeline service needs to mixin'
|
||||
' with TimelineFilterService');
|
||||
|
|
Loading…
Reference in a new issue