Giter Site home page Giter Site logo

cedric-song / flutter_calculator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chenyuantao/flutter_calculator

0.0 1.0 0.0 107 KB

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

Java 1.96% Objective-C 4.01% Dart 94.03%

flutter_calculator's Introduction

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]

flutter_calculator's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.