200 words
1 minutes
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#

WindowsAndroidChrome
windowsandroidchrome

Try#

You can try static android builds:

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#

  1. Clone this repository:
    git clone https://gitlab.com/fr0stb1rd/debhm.git
  2. Navigate into the project directory:
    cd debhm
  3. Fetch the necessary packages:
    flutter pub get
  4. Run the app:
    flutter run

Usage#

  1. Enter two numbers in the provided input fields.
  2. Choose one of the operations: +, -, X, or ÷.
  3. 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.

World's Simplest Calculator - A Flutter Project for Basic Arithmetic Operations
https://b1rdfr0st.github.io/posts/2024-10-20-debhm/
Author
fr0stb1rd
Published at
2024-10-20
License
CC BY-NC-SA 4.0