flutter_dtmf 0.0.4
flutter_dtmf: ^0.0.4 copied to clipboard
Generates DTFM Tones for Flutter Applications.
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: "#1234", samplingRate: 8000, durationMs: 160);
},
)),
),
);
}
}