A modern and feature-rich calculator app built using Flutter. This app provides a sleek and intuitive interface for performing various mathematical operations.
- Basic Operations: Addition, Subtraction, Multiplication, and Division.
- Advanced Operations:
- Calculate percentages.
- Compute square roots.
- Responsive Design: Adapts seamlessly to different screen sizes.
- Calculation History: View your previous calculations.
- Error Handling: Clear and user-friendly error messages for invalid operations (e.g., division by zero).
- Language: Dart
- Framework: Flutter
- UI Components: Material Design
- Install Flutter SDK from the official site.
- Ensure you have an emulator or a physical device set up for development.
- Clone the repository:
git clone https://github.com/chathumiamarasinghe/Calculator_App.git
- Navigate to the project directory:
cd calculator-app
- Run the app on an emulator or physical device:
flutter run
- How to Use
- Launch the app.
- Perform calculations by tapping the buttons for numbers and operations.
- Use the "√" button for square root and "%" for percentage.
- Tap the history icon (top-right) to view past calculations.
- Use "C" to clear the current input and "⌫" to delete the last digit or operator.
- Code Overview
-
The core functionality of the app is in the CalculatorScreen class, which manages:
-
UI Rendering: Builds a responsive calculator interface.
-
State Management: Handles user input, operations, and results dynamically.
-
Error Handling: Displays error dialogs for invalid inputs.