In this episode, I’ll show you how to develop and debug Flutter applications directly on Avnet Embedded SMARC modules using SimpleSwitch™. Buckle up for advanced features like Hot Reload and DevTools at your fingertips!
Prerequisites:
- SimpleSwitch setup with RDP enabled on your Avnet Embedded SMARC module
- VS Code with Flutter extension installed
Let’s Dive In!
- Start a New Project:
- Open VS Code and hit F1 to access the Command Palette
- Select “SimpleSwitch: Initialize Project”
- Choose the desired SDK and name your app (e.g., “MyApp”)
- Select “SimpleSwitch Flutter” as the container and enable debug mode
- Build, Package, and Deploy:
- Click the F1 button to compile and package your app.
- Deploy the app using SimpleSwitch.
- Open the remote desktop to see your app running!
- Debug with Ease:
- Hit F5 and Set breakpoints in your code.
- Click the “Debug” button (bug icon)
- VS Code will connect and you can step through your code, inspect variables, and fix issues on the fly
- Experience Hot Reload:
- Modify your code (e.g., change app color).
- Save the changes – Hot Reload takes care of the rest!
- See the changes reflected instantly on your device without recompiling.
- Utilize DevTools:
- Click the “Debug” button and select “Open Flutter DevTools”.
- A browser window opens, displaying detailed insights into your app’s performance, memory usage, and more.
- Expand Your Horizons:
- Explore the vast ecosystem of Flutter plugins using the “pubspec.yaml” file.
- Add animations, layouts, and other cool features without restarting your app.
That’s it! You’re now equipped to develop and debug Flutter apps efficiently on SMARC modules with SimpleSwitch. Happy coding!
Bonus Tip:
Subscribe to our YouTube channel and follow us on LinkedIn for more informative content and upcoming episodes. Don’t hesitate to share your thoughts and experiences in the comments below!
Talk to the experts!
Let us know about your product or your challenge and our team will get in touch to discuss how we can help.