0. Prerequisites & SetUp
If you are new to Flutter, please first follow the Flutter Setup guide, and create new Flutter project.
This is my project structure, but you don’t have to follow my structure.
create lib/src/app.dart, and setup main.dart and app.dart file.
1. Build Calculator Screen UI
The first step, create lib/src/ui/screens/home_screen.dart and HomeScreen class extended from StatefulWidget
2. Add Logic to Calculator Screen
Add this inside of _HomeScreenState class
// Add onPressed function to OutlineButtononPressed: () => _pressButton(buttonText)
Congratulations 🎉
The result will be like this. Here is source code of HomeScreen.