chore(style): merge separate ifs into if-elses in filter.dart