Skip to content

Commit

Permalink
Add displayTickets interface (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
theVinesh authored Sep 6, 2023
1 parent 02faac6 commit 62f5779
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
4 changes: 4 additions & 0 deletions intercom_flutter_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.3.2

* Added method `displayTickets`

## 1.3.1

* Added method `displayConversation`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,4 +278,9 @@ abstract class IntercomFlutterPlatform extends PlatformInterface {
Future<void> displayConversation(String conversationId) {
throw UnimplementedError('displayConversation() has not been implemented.');
}

/// To display an activity with all your tickets.
Future<void> displayTickets() {
throw UnimplementedError('displayTickets() has not been implemented.');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ class MethodChannelIntercomFlutter extends IntercomFlutterPlatform {
'displayConversation', {'conversationId': conversationId});
}

@override
Future<void> displayTickets() async {
await _channel.invokeMethod('displayTickets');
}

/// Convert the [PlatformException] details to [IntercomError].
/// From the Platform side if the intercom operation failed then error details
/// will be sent as details in [PlatformException].
Expand Down
2 changes: 1 addition & 1 deletion intercom_flutter_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: intercom_flutter_platform_interface
description: A common platform interface for the intercom_flutter plugin.
version: 1.3.1
version: 1.3.2
homepage: https://github.com/v3rm0n/intercom_flutter

dependencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,14 @@ void main() {
],
);
});

test('displayTickets', () async {
await intercom.displayTickets();
expect(
log,
<Matcher>[isMethodCall('displayTickets', arguments: null)],
);
});
});
}

Expand Down

0 comments on commit 62f5779

Please sign in to comment.