flutter_phone_direct_caller 2.0.0 copy "flutter_phone_direct_caller: ^2.0.0" to clipboard
flutter_phone_direct_caller: ^2.0.0 copied to clipboard

outdated

Simple flutter plugin to call a number directly, without going to phone dialer, from app

example/lib/main.dart

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

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

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

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

class _MyAppState extends State<MyApp> {
  TextEditingController _numberCtrl = new TextEditingController();

  @override
  void initState() {
    super.initState();
    _numberCtrl.text = "085921191121";
  }

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: const Text('Plugin example app'),
        ),
        body: new Column(children: <Widget>[
          Padding(
            padding: EdgeInsets.all(8.0),
            child: TextField(
              controller: _numberCtrl,
              decoration: InputDecoration(labelText: "Phone Number"),
              keyboardType: TextInputType.number,
            ),
          ),
          ElevatedButton(
            child: Text("Test Call"),
            onPressed: () async {
              FlutterPhoneDirectCaller.callNumber(_numberCtrl.text);
            },
          )
        ]),
      ),
    );
  }
}
349
likes
0
pub points
98%
popularity

Publisher

unverified uploader

Simple flutter plugin to call a number directly, without going to phone dialer, from app

Homepage

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_phone_direct_caller