Build a calculator app in iOS and Android with the same code by using flutter.

Overview

flutter_calculator

Preview

preview

Structure

structure

Input Widgets

input widgets is all extends StatefulWidget, because they need to response the onTap gesture.

  • NumberButton. Rendering the number button (like 1,2,3...) and handling the onTap gesture.

  • OperatorButton. Rendering the operator button (like +,-,*...) and handling the onTap gesture.

  • ResultButton. Rendering the command button (like clear,equal...) and handling the onTap gesture.

Output Widgets

output widgets is all extends StatelessWidget, because they are just rendering.

  • ResultDisplay. Rendering the current result and changing display when user tap a number button.

  • HistoryBlock. Rendering the calculation histories and changing display every time when user tap a valid button.

CalculatorPage

CalculatorPage is extends StatefulWidget and holding the List of result.

CalculatorPage receives every input widgets onTap event, makes a logical calculation for these input and decide what to display to output widgets.

Thanks

This repo is inspired by react-calculator.

Thanks to the author's awesome idea and app ui.

Contact

[email protected]

You might also like...

Flutter-calculator - A flutter calculator appliacation which is made with dart

Flutter-calculator - A flutter calculator appliacation which is made with dart

A simple calculator A simple calculator app made with Flutter Screenshot This pr

Jan 23, 2022

Age-Calculator - Age Calculator For Flutter

Age-Calculator - Age Calculator For Flutter

Age-Calculator(Contributed by YEASEEN AHMED)

Oct 9, 2022

Age-Calculator-Lambda - Age Calculator Lambda With Flutter

Age-Calculator-Lambda - Age Calculator Lambda With Flutter

Age-Calculator-Lambda(Contributed by YEASEEN AHMED)

Nov 13, 2022

BMI Calculator - A Body Mass Index Calculator inspired by the beautiful user interface designs.

BMI Calculator A Body Mass Index Calculator inspired by the beautiful user interface designs. A multi screen app with simple functionality but full-on

Dec 2, 2021

[Flutter package] An easy and quick way to check if the local app is updated with the same version in their respective stores (Play Store / Apple Store ).

Retrieve version and url for local app update against store app Android and iOS Features Using as reference packages like in_app_update , version_chec

Nov 9, 2022

WooCommerce App template that uses Flutter. Integrated to work with WooCommerce stores, connect and create an IOS and Android app from Flutter for IOS and Android

WooCommerce App template that uses Flutter. Integrated to work with WooCommerce stores, connect and create an IOS and Android app from Flutter for IOS and Android

WooCommerce App: Label StoreMax Label StoreMax - v5.3.1 Official WooSignal WooCommerce App About Label StoreMax Label StoreMax is an App Template for

Jan 9, 2023

An isolated worker for Flutter (Isolate) and Web (Web Worker). Behaves almost the same as the compute function, except it is not a one-off worker.

A singleton isolated worker for all platforms. On most platforms, it uses Flutter's Isolate, except on the web, since Isolate is not available, it use

Nov 11, 2022

Taking many pictures and photos list in the same page

Taking many pictures and photos list in the same page

Custom Camera Preview A component has developed with Flutter Purpose Instead of taking photos of a product and taking them one by one when users need

Oct 28, 2022
Comments
  • 抱歉请教个问题

    抱歉请教个问题

                  if (widget.onPress != null) {
                    widget.onPress(widget.number);
                    setState(() {
                      pressed = true;
                    });
    

    这里的Widget.func 是调用什么地方的方法? 全局?

    opened by orangemio 2
  • hello

    hello

    Hi, I see that you are learning flutter, I am making an app to publish interactive chat stories, and I am recruiting a team of newcomers to flutter to study and work on the app. If you are interested write me an email [email protected] or in Issue on Github

    opened by frilancer1547 0
Owner
CYT
CYT
Mobile, desktop and website Apps with the same code

Mobile, desktop and website Apps with the same code This project shows how the source code can be architectured to run on multiple devices. As of now,

Benoit VALLON 5.2k Jan 1, 2023
A flutter plugin about qr code or bar code scan , it can scan from file、url、memory and camera qr code or bar code .Welcome to feedback your issue.

r_scan A flutter plugin about qr code or bar code scan , it can scan from file、url、memory and camera qr code or bar code .Welcome to feedback your iss

PengHui Li 112 Nov 11, 2022
Peek & Pop implementation for Flutter based on the iOS functionality of the same name.

peek_and_pop Peek & Pop implementation for Flutter based on the iOS functionality of the same name. Finally, the v1.0.0 release! More fluent, more opt

AliYigitBireroglu 227 Dec 17, 2022
Simple-Calculator-App - Simple Calculator App using Flutter

Simple Calculator App I created this calculator using Flutter. I took inspiratio

Harshitha Devi Ganajala 0 Jan 26, 2022
BMI calculator app - BMI calculator app written with dart language using flutter

BMI_calculator_app This app is written with dart language using flutter framewor

Elham Madjidi 0 Feb 5, 2022
Write iOS&Android Code using Dart. This package liberates you from redundant glue code and low performance of Flutter Channel.

Dart_Native Dart_Native operates as both a code generator tool and a bridge to communicate between Dart and native APIs. Replaces the low-performing F

DartNative 893 Jan 4, 2023
Body-Mass-Index-Calculator - Body Mass Index Calculator Using Flutter

Body-Mass-Index-Calculator Image Video Presentation bandicam.2022-02-18.00-33-22

Harsh Vardhan 3 Aug 15, 2022
Todo app - contains same UI and different state management techniques (without using StatefulWidget)

This repo contains same UI and different state management techniques (without using StatefulWidget) to compare and prefer based on your coding style.

Aravind Vemula 5 May 19, 2022
Flutter-calculator - An elegant calculator app written in Flutter

Elegant Calculator A simple and elegant Calculator app developer in Flutter. Preview Getting Started This project is a starting point for a Flutter ap

Shubham Soni 103 Oct 21, 2022
Love-Calculator-Flutter - A Love Calculator Flutter app created for learning basic stuffs in Dart

Love Calculator The same old Love Calculator ,but in flutter NB A simple flutter

Adithya Krishnan 3 Nov 14, 2022