input_calculator 1.0.1 copy "input_calculator: ^1.0.1" to clipboard
input_calculator: ^1.0.1 copied to clipboard

outdated

With Input Calculator you can add functionality of calculation in an TextField.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'home_page.dart';
import 'package:input_calculator/input_calculator.dart';

Route<dynamic> _generateRoute(RouteSettings settings) {
  switch (settings.name) {
    case HomePage.id:
      return MaterialPageRoute(builder: (_) => HomePage());
    case InputCalculator.id:
      final args = settings.arguments;
      return MaterialPageRoute(builder: (_) => InputCalculator(args: args));
    default:
      return MaterialPageRoute(
        builder: (context) => Scaffold(
          body: Center(
            child: Text('No route defined for ${settings.name}'),
          ),
        ),
      );
  }
}

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      initialRoute: HomePage.id,
      onGenerateRoute: _generateRoute,
    );
  }
}
13
likes
0
pub points
67%
popularity

Publisher

unverified uploader

With Input Calculator you can add functionality of calculation in an TextField.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, intl

More

Packages that depend on input_calculator