Your Second Flutter App

Nov 30 2021 Dart 2.13, Flutter 2.2.3, Visual Studio Code

Part 3: Navigate & Animate

20. Challenge: Add a Filter Screen

Lesson Complete

Play Next Lesson
Next
Save for later
About this episode
See versions
See forum comments
Cinema mode Mark as Complete Download course materials
Previous episode: 19. Complete the Course Details Page Next episode: 21. Use a Hero Animation

This video was last updated on Nov 30 2021

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

You can unlock the rest of this video course, and our entire catalogue of books and videos, with a kodeco.com Professional subscription.

It’s time for a challenge on Flutter widget creation. Currently, we have a an app that has lots of different domains. It’d be nice for the user to navigate to a filter page and to filter out all the courses.

class FilterPage extends StatefulWidget {
  const FilterPage({ Key? key }) : super(key: key);

  @override
  _FilterPageState createState() => _FilterPageState();
}

class _FilterPageState extends State<FilterPage> {
  @override
  Widget build(BuildContext context) {
    return Container(

    );
  }
}
class _FilterPageState extends State<FilterPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(Strings.filter),
      ),
      body: const Text('Filter'),
    );
  }
}
import '../../strings.dart';
  appBar: AppBar(
    title: Text(Strings.appTitle),
    actions: <Widget>[
      IconButton(
        icon: const Icon(Icons.filter_list),
        onPressed: () => Navigator.of(context).push<MaterialPageRoute>(
            MaterialPageRoute(builder: (_) => const FilterPage())),
      )
    ],
  ),
import 'ui/filter/filter_page.dart';