Post

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

Windows Android Chrome
windows android chrome

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:
    1
    
    git clone https://gitlab.com/fr0stb1rd/debhm.git
    
  2. Navigate into the project directory:
    1
    
    cd debhm
    
  3. Fetch the necessary packages:
    1
    
    flutter pub get
    
  4. Run the app:
    1
    
    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.

This post is licensed under CC BY 4.0 by the author.