Skip to content

Commit

Permalink
Merge pull request #2 from DanbiEduCorp/issue_solve_conflicts
Browse files Browse the repository at this point in the history
solve conflicts
  • Loading branch information
jrkim123us authored Feb 6, 2021
2 parents add7266 + d207525 commit 4f03999
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
3 changes: 3 additions & 0 deletions ios/Classes/FlutterCallKitPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ + (CXProviderConfiguration *)getProviderConfiguration:(NSDictionary*)settings
providerConfiguration.maximumCallGroups = 3;
providerConfiguration.maximumCallsPerCallGroup = 1;
providerConfiguration.supportedHandleTypes = [NSSet setWithObjects:[NSNumber numberWithInteger:CXHandleTypeGeneric],[NSNumber numberWithInteger:CXHandleTypePhoneNumber], [NSNumber numberWithInteger:CXHandleTypeEmailAddress], nil];
if (@available(iOS 11.0, *)) {
providerConfiguration.includesCallsInRecents = [settings[@"includesCallsInRecents"] boolValue];
}
if (settings[@"supportsVideo"]) {
providerConfiguration.supportsVideo = [settings[@"supportsVideo"] boolValue];
}
Expand Down
31 changes: 21 additions & 10 deletions lib/flutter_call_kit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ typedef Future<dynamic> OnStartCall(String handle, bool video);

enum HandleType { phoneNumber, generic, email }

enum EndReason { failed, remoteEnded, unanswered, }
enum EndReason {
failed,
remoteEnded,
unanswered,
}

class IOSOptions {
/// It will be displayed on system UI when incoming calls received
Expand All @@ -81,18 +85,24 @@ class IOSOptions {
/// If provided, whether or not the application supports video calling (Default: true)
final bool supportsVideo;

IOSOptions(this.appName,
{this.imageName = "",
this.ringtoneSound = "",
this.maximumCallGroups = 3,
this.maximumCallsPerCallGroup = 1,
this.supportsVideo = true})
: assert(appName != null),
/// If provided, whether or not the application saves calls in users recents call log (Default: true, iOS 11+ only)
final bool includesCallsInRecents;

IOSOptions(
this.appName, {
this.imageName = "",
this.ringtoneSound = "",
this.maximumCallGroups = 3,
this.maximumCallsPerCallGroup = 1,
this.supportsVideo = true,
this.includesCallsInRecents = true,
}) : assert(appName != null),
assert(imageName != null),
assert(ringtoneSound != null),
assert(maximumCallGroups != null),
assert(maximumCallsPerCallGroup != null),
assert(supportsVideo != null);
assert(supportsVideo != null),
assert(includesCallsInRecents != null);

Map<String, dynamic> toMap() {
return {
Expand All @@ -101,7 +111,8 @@ class IOSOptions {
"ringtoneSound": ringtoneSound,
"maximumCallGroups": maximumCallGroups?.toString(),
"maximumCallsPerCallGroup": maximumCallsPerCallGroup?.toString(),
"supportsVideo": supportsVideo
"supportsVideo": supportsVideo,
"includesCallsInRecents": includesCallsInRecents,
};
}
}
Expand Down

0 comments on commit 4f03999

Please sign in to comment.