On this tutorial we will review the implementation of Flutter on the i.MX8MP using the Linux Desktop Image.
Requirements:
Evaluation Kit for the i.MX 8M Plus Applications Processor. (i.MX 8M Plus Evaluation Kit | NXP Semiconductors)
NXP Desktop Image for i.MX 8M Plus (GitHub - nxp-imx/meta-nxp-desktop at lf-6.1.1-1.0.0-langdale)
Note: This tutorial is based on the NXP Desktop Image with Yocto version 6.1.1 – Langdale.
Steps:
1. First, run commands to update packages.
$ sudo apt update
$ sudo apt upgrade
2. Install Flutter for Linux using the following command.
$ sudo snap install flutter --classic
3. Run the command to verify the correct installation.
$ flutter doctor
With this command you will find information about the installation. The important part for our purpose is the parameter "Linux toolchain - develop for Linux desktop".
4. Run the command “flutter create .” to create a flutter project, this framework will create different folders and files used to develop the application.
$ cd Documents
$ mkdir flutter_hello
$ cd flutter_hello
$ flutter create .
5. Finally, you can run the “hello world” application using:
$ flutter run
Verify the program behavior incrementing the number displayed on the window.