A cross-platform counter app made to demonstrate the macos_ui package and building native UI for multiple platforms.
- Android
- iOS
- macOS
- Windows
- Linux
- Web
This application is similar in nature to Flutter's default counter app. It demonstrates very basic usage of macos_ui and is useful for those looking to start out with macos_ui.
Additionally, this application is an exercise in building a modular Flutter application that builds native UI for
multiple platforms in a clean manner. You will find several main_platform_x
files in this project:
main_macos
main_windows
main_mobile
These main files exist so that the application can benefit from Flutter's tree shaking, which removes unused code from a build. For example, you can build this application for macOS with none of the code that is related to the Windows or mobile implementations by running
$ flutter run -t lib/main_macos.dart
or by creating a run configuration that loads in main_macos.dart
as the application's entrypoint. The macOS
implementation of this application will then run, and the UI will look appropriate for a macOS application.
- Fork or clone this repository
- Run on the platform of your choice