|
1 | 1 | import 'dart:async'; |
2 | | -import 'package:flutter/foundation.dart'; |
3 | 2 | import 'package:flutter/material.dart'; |
4 | 3 | import 'package:flutter_webrtc/flutter_webrtc.dart'; |
5 | | -import 'package:flutter_dtmf/flutter_dtmf.dart'; |
6 | 4 |
|
7 | 5 | import 'widgets/action_button.dart'; |
8 | 6 | import 'package:sip_ua/sip_ua.dart'; |
@@ -272,9 +270,6 @@ class _MyCallScreenWidget extends State<CallScreenWidget> |
272 | 270 |
|
273 | 271 | void _handleDtmf(String tone) { |
274 | 272 | print('Dtmf tone => $tone'); |
275 | | - if (WebRTC.platformIsMobile) { |
276 | | - FlutterDtmf.playTone(digits: tone); |
277 | | - } |
278 | 273 | call.sendDTMF(tone); |
279 | 274 | } |
280 | 275 |
|
@@ -490,40 +485,41 @@ class _MyCallScreenWidget extends State<CallScreenWidget> |
490 | 485 | } |
491 | 486 |
|
492 | 487 | stackWidgets.addAll([ |
493 | | - Positioned( |
494 | | - top: voiceonly ? 48 : 6, |
495 | | - left: 0, |
496 | | - right: 0, |
497 | | - child: Center( |
498 | | - child: Column( |
499 | | - crossAxisAlignment: CrossAxisAlignment.center, |
500 | | - mainAxisAlignment: MainAxisAlignment.center, |
501 | | - children: <Widget>[ |
502 | | - Center( |
503 | | - child: Padding( |
504 | | - padding: const EdgeInsets.all(6), |
505 | | - child: Text( |
506 | | - (voiceonly ? 'VOICE CALL' : 'VIDEO CALL') + |
507 | | - (_hold |
508 | | - ? ' PAUSED BY ${this._holdOriginator.toUpperCase()}' |
509 | | - : ''), |
510 | | - style: TextStyle(fontSize: 24, color: Colors.black54), |
511 | | - ))), |
512 | | - Center( |
513 | | - child: Padding( |
514 | | - padding: const EdgeInsets.all(6), |
515 | | - child: Text( |
516 | | - '$remote_identity', |
517 | | - style: TextStyle(fontSize: 18, color: Colors.black54), |
518 | | - ))), |
519 | | - Center( |
520 | | - child: Padding( |
521 | | - padding: const EdgeInsets.all(6), |
522 | | - child: Text(_timeLabel, |
523 | | - style: TextStyle(fontSize: 14, color: Colors.black54)))) |
524 | | - ], |
525 | | - )), |
526 | | - ), |
| 488 | + Positioned( |
| 489 | + top: voiceonly ? 48 : 6, |
| 490 | + left: 0, |
| 491 | + right: 0, |
| 492 | + child: Center( |
| 493 | + child: Column( |
| 494 | + crossAxisAlignment: CrossAxisAlignment.center, |
| 495 | + mainAxisAlignment: MainAxisAlignment.center, |
| 496 | + children: <Widget>[ |
| 497 | + Center( |
| 498 | + child: Padding( |
| 499 | + padding: const EdgeInsets.all(6), |
| 500 | + child: Text( |
| 501 | + (voiceonly ? 'VOICE CALL' : 'VIDEO CALL') + |
| 502 | + (_hold |
| 503 | + ? ' PAUSED BY ${this._holdOriginator.toUpperCase()}' |
| 504 | + : ''), |
| 505 | + style: TextStyle(fontSize: 24, color: Colors.black54), |
| 506 | + ))), |
| 507 | + Center( |
| 508 | + child: Padding( |
| 509 | + padding: const EdgeInsets.all(6), |
| 510 | + child: Text( |
| 511 | + '$remote_identity', |
| 512 | + style: TextStyle(fontSize: 18, color: Colors.black54), |
| 513 | + ))), |
| 514 | + Center( |
| 515 | + child: Padding( |
| 516 | + padding: const EdgeInsets.all(6), |
| 517 | + child: Text(_timeLabel, |
| 518 | + style: |
| 519 | + TextStyle(fontSize: 14, color: Colors.black54)))) |
| 520 | + ], |
| 521 | + )), |
| 522 | + ), |
527 | 523 | ]); |
528 | 524 |
|
529 | 525 | return Stack( |
|
0 commit comments