Skip to content

Commit 2484ff2

Browse files
committed
Android build
1 parent 1084b8f commit 2484ff2

File tree

4 files changed

+10
-20
lines changed

4 files changed

+10
-20
lines changed

example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
buildscript {
2-
ext.kotlin_version = '1.6.10'
2+
ext.kotlin_version = '1.8.0'
33
repositories {
44
google()
55
mavenCentral()

example/lib/main.dart

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ Future<void> main() async {
2424
runApp(
2525
MaterialApp(
2626
theme: ThemeData(
27-
// primaryColor: Colors.pink,
28-
// TODO: Add more theme colors here if you would like Inbox to automatically inherit styles
29-
),
27+
// primaryColor: Colors.pink,
28+
// TODO: Add more theme colors here if you would like Inbox to automatically inherit styles
29+
),
3030
home: const MyApp(),
3131
),
3232
);
@@ -63,30 +63,20 @@ class _MyAppState extends State<MyApp> {
6363
}
6464

6565
Future _start() async {
66-
6766
// Set the brand of the inbox
6867
await Courier.shared.setBrandId(id: 'AR1TTFKXSA49G2PGEKQ81Q9R9PT5');
6968

70-
_inboxListener = await Courier.shared.addInboxListener(onMessagesChanged: (messages, unreadMessageCount, totalMessageCount, canPaginate) async {
71-
72-
setState(() {
73-
_unreadMessageCount = unreadMessageCount;
74-
});
75-
69+
_inboxListener = await Courier.shared.addInboxListener(onMessagesChanged: (messages, unreadMessageCount, totalMessageCount, canPaginate) {
70+
setState(() => _unreadMessageCount = unreadMessageCount);
7671
});
7772

7873
_pushListener = Courier.shared.addPushListener(
79-
onPushClicked: (push) {
80-
showAlert(context, 'Push Clicked', push.toString());
81-
},
82-
onPushDelivered: (push) {
83-
showAlert(context, 'Push Delivered', push.toString());
84-
},
74+
onPushClicked: (push) => showAlert(context, 'Push Clicked', push.toString()),
75+
onPushDelivered: (push) => showAlert(context, 'Push Delivered', push.toString()),
8576
);
8677

8778
try {
8879
final token = await FirebaseMessaging.instance.getToken();
89-
9080
if (token != null) {
9181
Courier.shared.setTokenForProvider(provider: CourierPushProvider.firebaseFcm, token: token);
9282
}

example/pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ packages:
6363
path: ".."
6464
relative: true
6565
source: path
66-
version: "2.1.0"
66+
version: "2.1.1"
6767
crypto:
6868
dependency: transitive
6969
description:

example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Demonstrates how to use the courier_flutter plugin.
55
# pub.dev using `flutter pub publish`. This is preferred for private packages.
66
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
77

8-
version: 1.0.0+3
8+
version: 1.0.0+5
99

1010
environment:
1111
sdk: '>=2.18.1 <3.0.0'

0 commit comments

Comments
 (0)