This is a simple calculator app built using Flutter. It features basic arithmetic operations with a modern UI. The app demonstrates how to design a functional interface using Flutter widgets and layouts.
- User-friendly interface with large buttons for easy input.
- Basic arithmetic operations: Addition, Subtraction, Multiplication, Division.
- Cross-platform support for Android and iOS.
- Minimalist design with a dark theme for comfortable usage.
- Flutter SDK: Used for building the user interface.
- Dart Language: Core language for implementing logic.
- Layouts (Column and Row): Used to arrange buttons and the display neatly.
- Container Decorations: To design rounded buttons with colors based on functions.
Problem: The calculator uses a StatelessWidget, which doesn’t allow dynamic updates for the display.
Solution: Replace with a StatefulWidget to manage input and result updates more effectively.
Problem: The display shows a static "0" without updating as the user presses buttons.
Solution: Store input and result values in a state variable and use setState() to update the display on user interaction.
Migrate to StatefulWidget to handle state changes properly.
Consider Provider or Riverpod if the app becomes more complex.
Use Expanded or Flexible to adapt the layout across all screen sizes.
- Advanced Operations: Add functions like square roots, power, and memory storage.
- Theme Toggle: Add light and dark mode support.
- Landscape Mode Support: Optimize the layout for both portrait and landscape orientations.
- Java 17: Ensure it is installed. Download from Oracle Archive.
- Flutter SDK: Get Flutter.
https://github.com/smnasimahmed/versity_flutter_calculator.git
flutter pub get
java -version
- Linux/Mac:
export JAVA_HOME=/path-to-java-17
- Windows: Update the JAVA_HOME environment variable.
flutter run
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

