Interacting with desktop menus
Desktop apps have menus that do not exist on mobile form factors. Typically, you expect to see the important actions of a desktop app in its top menu.
In this recipe, you will learn how to add a menu that works on Windows and macOS.
Getting ready
Before following this recipe, you should have completed the first recipe in this chapter, Creating a responsive app leveraging Flutter Web.
Depending on where you want to run your app, you should also have completed one of the previous recipes in this chapter:
- For Windows: Running your app on Windows
- For macOS: Running your app on macOS
How to do it...
In order to add a menu to your desktop app, follow the next steps:
- In your project, add the dependency to the
menu_bar
package by typing in your Terminal:flutter pub add menu_bar
- At the top of the
book_list_screen.dart
file, add themenubar
import, and hideMenuBar
from thematerial...