Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
hiennguyen92 committed May 20, 2022
1 parent b5f3b5c commit 97af9e1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions example/lib/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,14 @@ class HomePageState extends State<HomePage> {
initCurrentCall() async {
//check current call from pushkit if possible
var calls = await FlutterCallkitIncoming.activeCalls();
print('initCurrentCall: $calls');
final objCalls = json.decode(calls);
if (objCalls is List) {
if (objCalls.isNotEmpty) {
this._currentUuid = objCalls[0]['id'];
if (calls is List) {
if (calls.isNotEmpty) {
print('DATA: $calls');
this._currentUuid = calls[0]['id'];
return calls[0];
} else {
this._currentUuid = "";
return null;
}
}
}
Expand Down

0 comments on commit 97af9e1

Please sign in to comment.