World's Simplest Calculator: A Flutter Project for Basic Arithmetic Operations
World's Simplest Calculator: A Flutter Project for Basic Arithmetic Operations
World’s Simplest Calculator (DEBHM): This is a basic calculator app built using Flutter. It allows users to perform simple arithmetic operations such as addition, subtraction, multiplication, and division. The application features a clean dark-themed interface and supports two numeric inputs. Source Code | Blog Post
Screenshots
Try
You can try static android builds:
- arm64-v8a
- armeabi-v7a
- x86_64
Features
- Addition (+)
- Subtraction (-)
- Multiplication (X)
- Division (÷)
- Handles division by zero
- Responsive and intuitive design
- Dark theme for better visual comfort
Getting Started
Prerequisites
Ensure you have Flutter installed. You can follow the instructions here to set up Flutter on your machine.
Installation
- Clone this repository:
1
git clone https://gitlab.com/fr0stb1rd/debhm.git
- Navigate into the project directory:
1
cd debhm
- Fetch the necessary packages:
1
flutter pub get
- Run the app:
1
flutter run
Usage
- Enter two numbers in the provided input fields.
- Choose one of the operations:
+
,-
,X
, or÷
. - The result will be displayed immediately.
Important Notes
- The app prevents non-numeric input by filtering the input fields to accept digits only.
- Division by zero is handled gracefully with an error message: “Error: Division by zero!”
License
You can use, study share and improve it at your will. Specifically you can redistribute and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This post is licensed under
CC BY 4.0
by the author.