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

Open the phone dialer or place calls from your Flutter app on Android and iOS, with or without the CALL_PHONE permission.

Flutter Phone Dialer #

CI GitHub license pub package package publisher

Open the phone dialer or place calls from your Flutter app on Android and iOS.

  • dialNumber opens the system dialer pre-filled with the number. The user presses the call button — no permission required.
  • callNumber places the call directly (Android only; requires the CALL_PHONE permission).

Getting started #

dependencies:
  flutter_phone_dialer: ^0.1.0
import 'package:flutter_phone_dialer/flutter_phone_dialer.dart';

// Open the dialer with the number pre-filled (no permission needed).
await FlutterPhoneDialer.dialNumber('+441234567890');

// Place the call directly (see platform setup below).
await FlutterPhoneDialer.callNumber('+441234567890');

Both methods return a Future<bool> indicating whether the dialer/call was started. USSD-style codes work too, e.g. dialNumber('*400#').

Platform setup #

Android #

dialNumber works out of the box — no configuration or permission needed.

callNumber requires the CALL_PHONE permission. Add it to your app's android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.CALL_PHONE" />

The plugin requests the runtime permission on first use; if the user denies it, callNumber returns false. Note that Google Play restricts apps that use CALL_PHONE, so prefer dialNumber unless you truly need direct calls.

iOS #

iOS never allows placing a call without user interaction, so both methods show the system call prompt. Add the tel scheme to your Info.plist (the plugin uses canOpenURL to check that calling is available):

<key>LSApplicationQueriesSchemes</key>
<array>
  <string>tel</string>
</array>

Complete example #

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

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: ElevatedButton(
            onPressed: () => FlutterPhoneDialer.dialNumber('+441234567890'),
            child: const Text('Dial Number'),
          ),
        ),
      ),
    );
  }
}

See the example directory for a runnable app.

License #

BSD 2-Clause

8
likes
150
points
161
downloads

Documentation

API reference

Publisher

verified publishersumanrajpathak.com.np

Weekly Downloads

Open the phone dialer or place calls from your Flutter app on Android and iOS, with or without the CALL_PHONE permission.

Repository (GitHub)
View/report issues

Topics

#phone #dialer #call #telephony

License

BSD-2-Clause (license)

Dependencies

flutter

More

Packages that depend on flutter_phone_dialer

Packages that implement flutter_phone_dialer