Example
Pitel UI Kit Demo
pitel_ui_kit is demo project.
Installation
Note Pitel UI Kit requires flutter version 3.29.3, dart version 3.7.2
- Setup to wake up app: please follow guide in here to setting push notification (FCM for android), Pushkit (for IOS).
- In file
firebase_options.dart, fill information from your google_service.json
// Replace information from your google_service.json
static const FirebaseOptions android = FirebaseOptions(
apiKey: '${apiKey}',
appId: '${appId}',
messagingSenderId: '${messagingSenderId}',
projectId: '${projectId}',
storageBucket: '${storageBucket}',
);
static const FirebaseOptions ios = FirebaseOptions(
apiKey: '${apiKey}',
appId: '${appId}',
messagingSenderId: '${messagingSenderId}',
projectId: '${projectId}',
storageBucket: '${storageBucket}',
iosClientId: '${iosClientId}',
iosBundleId: '${iosBundleId}',
);
- In file
app.dartfill sip info data
final sipInfoData = SipInfoData.fromJson({
"authPass": "${Password}",
"registerServer": "${Domain}",
"outboundServer": "${Outbound Proxy}",
"port": PORT,
"accountName": "${UUser}", // Example 101
"displayName": "${UUser}@${Domain}",
"wssUrl": "${URL WSS}"
});
- In file
app.dartfill sip info data
final PushNotifParams pushNotifParams = PushNotifParams(
teamId: '${apple_team_id}',
bundleId: '${bundle_id}',
);
pitelService.setExtensionInfo(sipInfoData, pushNotifParams);
- Get device token from function (to test notification)
await PushVoipNotif.getDeviceToken();
- Get package
flutter pub get
- Run source code
flutter run