flutter_dtmf 0.0.2
flutter_dtmf: ^0.0.2 copied to clipboard
Generates DTFM Tones for Flutter Applications. You can change the Sampling Rate to get a different output for iOS.
example/lib/main.dart
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:flutter_dtmf/flutter_dtmf.dart';
void main() => runApp(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
String _platformVersion = 'Unknown';
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Center(
child: RaisedButton(child: Text("Play DTMF"),onPressed: ()async {
await FlutterDtmf.playTone(digits: "#", samplingRate: 8000);
},)
),
),
);
}
}