@@ -217,10 +217,9 @@ Future<void> _createAndApplyFilter(BuildContext context) async {
217217 // We pop twice: once to close the filter page, and a second time to
218218 // close the "Saved Filters" page, returning the user directly to the feed.
219219 if (didSave == true && context.mounted) {
220- // Pop HeadlinesFilterPage.
221- context.pop ();
222- // Pop SavedHeadlinesFiltersPage.
223- context.pop ();
220+ context
221+ ..pop () // Pop HeadlinesFilterPage.
222+ ..pop (); // Pop SavedHeadlinesFiltersPage.
224223 }
225224}
226225
@@ -272,8 +271,9 @@ Future<void> _updateAndApplyFilter(
272271 if (didSave == true && context.mounted) {
273272 // Pop twice: once to close the filter page, and a second time to
274273 // close the "Saved Filters" page, returning the user directly to the feed.
275- context.pop ();
276- context.pop ();
274+ context
275+ ..pop ()
276+ ..pop ();
277277 }
278278}
279279
@@ -311,8 +311,9 @@ void _applyAndExit(BuildContext context) {
311311 _applyFilter (context);
312312 // Pop twice: once to close the filter page, and a second time to
313313 // close the "Saved Filters" page, returning the user directly to the feed.
314- context.pop (); // Pop HeadlinesFilterPage
315- context.pop (); // Pop SavedHeadlinesFiltersPage
314+ context
315+ ..pop () // Pop HeadlinesFilterPage
316+ ..pop (); // Pop SavedHeadlinesFiltersPage
316317}
317318
318319class _HeadlinesFilterView extends StatelessWidget {
0 commit comments