FLUTTER ECOSYSTEM

zuvola/flutter_simple_calculator

提供簡單計算器的 Flutter 小部件。

flutter_simple_calculator 專案封面
Stars
26
Forks
27
最近推送(UTC)
2026年3月4日
專案狀態
未封存
zuvola GitHub avatar
GITHUB User

zuvola ↗

語言DartC++CMakeHTMLCSwiftKotlinObjective-C

此儲存庫發佈的套件

使用的依賴

依賴清單 7 項

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

展開 / 收合專案 README

flutter_simple_calculator

Flutter widget that provides simple calculator. You can easily integrate a calculator to your apps.

pub package

Default style
https://github.com/zuvola/flutter_simple_calculator/blob/master/example/screenshot_1.png?raw=true
With custom styles
https://github.com/zuvola/flutter_simple_calculator/blob/master/example/screenshot_2.png?raw=true
SimpleCalculator(
  theme: const CalculatorThemeData(
    displayColor: Colors.black,
    displayStyle: const TextStyle(fontSize: 80, color: Colors.yellow),
    /*...*/
  ),
)
Localize
https://github.com/zuvola/flutter_simple_calculator/blob/master/example/screenshot_3.png?raw=true
SimpleCalculator(
  numberFormat: NumberFormat.decimalPattern("fa_IR")
    ..maximumFractionDigits = 6,
)

Getting Started

To use this plugin, add flutter_simple_calculator as a dependency in your pubspec.yaml file.

dependencies:
 flutter_simple_calculator: 

Import the library in your file.

import 'package:flutter_simple_calculator/flutter_simple_calculator.dart';

See the example directory for a complete sample app using SimpleCalculator. Or use the SimpleCalculator like below.

SimpleCalculator(
  value: 123.45,
  hideExpression: true,
  onChanged: (key, value, expression) {
    /*...*/
  },
  theme: const CalculatorThemeData(
    displayColor: Colors.black,
    displayStyle: const TextStyle(fontSize: 80, color: Colors.yellow),
  ),
)