v2.2.1
flutter_phone_direct_caller
一个简单的 Flutter 插件,可在应用中直接拨打电话号码,无需进入电话拨号界面。
386喜欢 1.3万近 30 天下载135Pub 分数
AndroidiOS
从Flutter应用程序直接拨打电话
以下为英文项目原文快照,最新内容请访问 GitHub。
A simple plugin to call number directly from app, without going to phone dialer. Permission request is handled by plugin.
Add dependency to pubspec.yaml file
flutter_phone_direct_caller: ^2.2.1
No need any additional configuration.
Add this to your info.plist under dict
<key>LSApplicationQueriesSchemes</key>
<array>
<string>tel</string>
</array>
import 'package:flutter/material.dart';
import 'package:flutter_phone_direct_caller/flutter_phone_direct_caller.dart';
void main() {
runApp(Scaffold(
body: Center(
child: RaisedButton(
onPressed: _callNumber,
child: Text('Call Number'),
),
),
));
}
_callNumber() async{
const number = '08592119XXXX'; //set the number here
bool res = await FlutterPhoneDirectCaller.callNumber(number);
}
依赖清单 2 项
{"sdk":"flutter"}1.0.4先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗