realtime_calculator 0.0.1 copy "realtime_calculator: ^0.0.1" to clipboard
realtime_calculator: ^0.0.1 copied to clipboard

A flutter package for a realtime calculator.

Features #

A realtime updating calculator

Usage #

Example To use this package:

dependencies:
  flutter:
    sdk: flutter
  realtime_calculator:

How to Use #

class MyHomePage extends StatefulWidget {
  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  String? answer;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: const Text("Calculator"),
        ),
        body: Container(
          height: 200,
          child:
              Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
            TextButton(
                onPressed: () async {
                  final answer = await showDialog(
                      context: context,
                      builder: (context) => const CalculatorDialog());
                },
                child: const Text("Calculator")),
            const SizedBox(height: 20),
            answer==null? const Text("Couldn't get Answer"):
            Text("Answer: ${answer!}"),
          ]),
        ));
  }
}

0
likes
110
pub points
0%
popularity

Publisher

unverified uploader

A flutter package for a realtime calculator.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, math_expressions

More

Packages that depend on realtime_calculator