Last active
March 7, 2024 11:32
-
-
Save Ayush783/be42d5a0c3570e87d0aa4e1e4a633940 to your computer and use it in GitHub Desktop.
Show a call notification in Flutter using flutter_callkit_incoming
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void showCallNotification(Map payload) { | |
var params = CallKitParams( | |
id: Uuid().v1(), | |
nameCaller: payload['name'], | |
appName: 'App Name', | |
avatar: payload['imageUrl'], | |
handle: '0123456789', | |
appLogo: 'assets/images/app_logo.png', | |
duration: 45000, | |
// This is the data that you will be extracting once app is opened | |
extra: payload, | |
android: AndroidParams(), | |
ios: IOSParams(), | |
); | |
await FlutterCallkitIncoming.showCallkitIncoming(params); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment