flutter_phone_dialer 0.0.5 copy "flutter_phone_dialer: ^0.0.5" to clipboard
flutter_phone_dialer: ^0.0.5 copied to clipboard

Calls Made Simple: Integrate Phone Number Dialing into Your Flutter App Effortlessly!

example/lib/main.dart

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

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

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  _MyAppState createState() => _MyAppState();
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Dialer Example'),
        ),
        body: Column(
          children: <Widget>[
            Padding(
              padding: const EdgeInsets.all(8.0),
              child: TextField(
                controller: _numberCtrl,
                decoration: const InputDecoration(labelText: "Phone Number"),
                keyboardType: TextInputType.number,
              ),
            ),
            ElevatedButton(
              child: const Text("Call"),
              onPressed: () async {
                FlutterPhoneDialer.dialNumber(_numberCtrl.text);
              },
            ),
          ],
        ),
      ),
    );
  }

  @override
  void initState() {
    super.initState();
    _numberCtrl.text = "*400#";
  }
}
5
likes
160
pub points
73%
popularity

Publisher

verified publishersumanrajpathak.com.np

Calls Made Simple: Integrate Phone Number Dialing into Your Flutter App Effortlessly!

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (license)

Dependencies

flutter

More

Packages that depend on flutter_phone_dialer