in_app_calculator 0.0.3 copy "in_app_calculator: ^0.0.3" to clipboard
in_app_calculator: ^0.0.3 copied to clipboard

A customizable, easy-to-integrate in-app calculator widget for Flutter apps with light and dark mode support, result storage, and responsive design.

In App Calculator #

A beautifully designed, fully functional calculator widget that can be easily embedded into any Flutter app. Whether you're building a shopping app, a financial planner, or any application that benefits from in-app calculations—this package helps your users perform quick math without leaving your app.


Features #

  • Basic Arithmetic: Supports addition, subtraction, multiplication, division, percentages, and more.
  • Light & Dark Mode: Automatically adapts to your theme or can be toggled manually.
  • Result Callback: Get calculated results using a callback (onResultCalculated) to store or use elsewhere in your app.
  • Smart Percentage Handling: Understands expressions like 100 + 20%, 200 * 10%, etc.
  • Custom UI: Modern, responsive, and scrollable layout with dynamic font resizing.
  • Easy Integration: Just drop the widget in and pass the required parameters.

Why Use This Package? #

Many apps, especially in the e-commerce, finance, and utility domains, require users to perform quick calculations. Redirecting users to a separate calculator app disrupts the experience. With In App Calculator, you can keep users engaged within your app, offering them the convenience of a powerful calculator built right in.

It's lightweight, easy to implement, and adds real usability value to your app.

Getting Started #

To use this package, add it to your pubspec.yaml file:

dependencies: in_app_calculator: ^1.0.0

Then run flutter pub get

Screenshots #


Calculator displaying as widget Dark Mode

Calculator displaying as widget Light Mode

Calculator displaying on button press

Calculator displaying as Dialog

Usage #

Import the package to use in your Flutter project import 'package:in_app_calculator/in_app_calculator.dart';.

import 'package:flutter/material.dart';
import 'package:in_app_calculator/in_app_calculator.dart';

class MyAppCenter extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('Calculator in Center'),
        ),
        body: Center(
          child: InAppCalculator(
            isDarkMode: true,
            onResultCalculated: (result) {
              // Optionally handle result here
              print('Calculated Result: $result');
            },
          ),
        ),
      ),
    );
  }
}

Additional information #

Contributions are welcome. If you find any issues or have feature requests, Connect with me at chalwadivaishu0880@gmail.com..

3
likes
150
points
185
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable, easy-to-integrate in-app calculator widget for Flutter apps with light and dark mode support, result storage, and responsive design.

Repository (GitLab)
View/report issues

Topics

#calculator #in-app-calculator #flutter-calculator

Documentation

API reference

License

MIT (license)

Dependencies

flutter, math_expressions

More

Packages that depend on in_app_calculator