calculator_plugin 0.0.1 icon indicating copy to clipboard operation
calculator_plugin: ^0.0.1 copied to clipboard

outdated

A new Flutter plugin for calculator operations

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:calculator_plugin/calculator_plugin.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';

  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  Future<void> initPlatformState() async {
    try {
      CalculatorPlugin.calculatorAdd(10,5);
      CalculatorPlugin.calculatorsub(10,5);
       CalculatorPlugin.calculatordiv(10,5);
      CalculatorPlugin.calculatormul(10,5);
    } on PlatformException {}

  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Text('Running on'),
        ),
      ),
    );
  }
}
1
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter plugin for calculator operations

Homepage

License

Icon for licenses.unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on calculator_plugin