version bump
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
## 0.2.0-alpha+6
|
||||||
|
|
||||||
|
- Update llc dependency
|
||||||
|
|
||||||
## 0.2.0-alpha+5
|
## 0.2.0-alpha+5
|
||||||
|
|
||||||
- Remove dependencies on notification service
|
- Remove dependencies on notification service
|
||||||
|
|||||||
@@ -433,7 +433,7 @@
|
|||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
||||||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = io.stream.flutter.Notifications;
|
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.flutter.Notifications;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||||
@@ -460,7 +460,7 @@
|
|||||||
IPHONEOS_DEPLOYMENT_TARGET = 13.3;
|
IPHONEOS_DEPLOYMENT_TARGET = 13.3;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = io.stream.flutter.Notifications;
|
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.flutter.Notifications;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -485,7 +485,7 @@
|
|||||||
IPHONEOS_DEPLOYMENT_TARGET = 13.3;
|
IPHONEOS_DEPLOYMENT_TARGET = 13.3;
|
||||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
|
||||||
MTL_FAST_MATH = YES;
|
MTL_FAST_MATH = YES;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = io.stream.flutter.Notifications;
|
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.flutter.Notifications;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@@ -568,7 +568,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = io.stream.flutter;
|
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.flutter;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -709,7 +709,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = io.stream.flutter;
|
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.flutter;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
@@ -743,7 +743,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"$(PROJECT_DIR)/Flutter",
|
"$(PROJECT_DIR)/Flutter",
|
||||||
);
|
);
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = io.stream.flutter;
|
PRODUCT_BUNDLE_IDENTIFIER = io.getstream.flutter;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
|||||||
+17
-15
@@ -17,7 +17,7 @@ void showLocalNotification(Message message, ChannelModel channel) async {
|
|||||||
initializationSettingsIOS,
|
initializationSettingsIOS,
|
||||||
);
|
);
|
||||||
await flutterLocalNotificationsPlugin.initialize(initializationSettings);
|
await flutterLocalNotificationsPlugin.initialize(initializationSettings);
|
||||||
flutterLocalNotificationsPlugin.show(
|
await flutterLocalNotificationsPlugin.show(
|
||||||
message.id.hashCode,
|
message.id.hashCode,
|
||||||
'${message.user.name} @ ${channel.name}',
|
'${message.user.name} @ ${channel.name}',
|
||||||
message.text,
|
message.text,
|
||||||
@@ -37,8 +37,6 @@ void showLocalNotification(Message message, ChannelModel channel) async {
|
|||||||
Future backgroundHandler(Map<String, dynamic> notification) async {
|
Future backgroundHandler(Map<String, dynamic> notification) async {
|
||||||
final messageId = notification['data']['message_id'];
|
final messageId = notification['data']['message_id'];
|
||||||
|
|
||||||
print('messageId: ${messageId}');
|
|
||||||
|
|
||||||
final notificationData =
|
final notificationData =
|
||||||
await NotificationService.getAndStoreMessage(messageId);
|
await NotificationService.getAndStoreMessage(messageId);
|
||||||
|
|
||||||
@@ -48,18 +46,7 @@ Future backgroundHandler(Map<String, dynamic> notification) async {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() async {
|
void _initNotifications(Client client) {
|
||||||
final client = Client(
|
|
||||||
's2dxdhpxd94g',
|
|
||||||
logLevel: Level.INFO,
|
|
||||||
showFakeNotification: Platform.isAndroid ? showLocalNotification : null,
|
|
||||||
);
|
|
||||||
|
|
||||||
await client.setUser(
|
|
||||||
User(id: 'user1'),
|
|
||||||
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidXNlcjEifQ.NGZPyPMx7KSVisJmh4tJhOIv7ZjCaMQpOh4gTINvCaU',
|
|
||||||
);
|
|
||||||
|
|
||||||
final connector = createPushConnector();
|
final connector = createPushConnector();
|
||||||
connector.configure(
|
connector.configure(
|
||||||
onBackgroundMessage: backgroundHandler,
|
onBackgroundMessage: backgroundHandler,
|
||||||
@@ -74,6 +61,21 @@ void main() async {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() async {
|
||||||
|
final client = Client(
|
||||||
|
's2dxdhpxd94g',
|
||||||
|
logLevel: Level.INFO,
|
||||||
|
showLocalNotification: Platform.isAndroid ? showLocalNotification : null,
|
||||||
|
);
|
||||||
|
|
||||||
|
await client.setUser(
|
||||||
|
User(id: 'user1'),
|
||||||
|
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidXNlcjEifQ.NGZPyPMx7KSVisJmh4tJhOIv7ZjCaMQpOh4gTINvCaU',
|
||||||
|
);
|
||||||
|
|
||||||
|
_initNotifications(client);
|
||||||
|
|
||||||
runApp(MyApp(client));
|
runApp(MyApp(client));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ class StreamChatState extends State<StreamChat> with WidgetsBindingObserver {
|
|||||||
@override
|
@override
|
||||||
void didChangeAppLifecycleState(AppLifecycleState state) {
|
void didChangeAppLifecycleState(AppLifecycleState state) {
|
||||||
if (state == AppLifecycleState.paused) {
|
if (state == AppLifecycleState.paused) {
|
||||||
if (client.showFakeNotification != null) {
|
if (client.showLocalNotification != null) {
|
||||||
_newMessageSubscription = client
|
_newMessageSubscription = client
|
||||||
.on(EventType.messageNew)
|
.on(EventType.messageNew)
|
||||||
.where((e) => e.user.id != user.id)
|
.where((e) => e.user.id != user.id)
|
||||||
@@ -207,7 +207,7 @@ class StreamChatState extends State<StreamChat> with WidgetsBindingObserver {
|
|||||||
await channel.query();
|
await channel.query();
|
||||||
}
|
}
|
||||||
|
|
||||||
client.showFakeNotification(
|
client.showLocalNotification(
|
||||||
event.message,
|
event.message,
|
||||||
ChannelModel(
|
ChannelModel(
|
||||||
id: channel.id,
|
id: channel.id,
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
name: stream_chat_flutter
|
name: stream_chat_flutter
|
||||||
homepage: https://github.com/GetStream/stream-chat-flutter
|
homepage: https://github.com/GetStream/stream-chat-flutter
|
||||||
description: Stream Chat official Flutter SDK. Build your own chat experience using Dart and Flutter.
|
description: Stream Chat official Flutter SDK. Build your own chat experience using Dart and Flutter.
|
||||||
version: 0.2.0-alpha+5
|
version: 0.2.0-alpha+6
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.3.0 <3.0.0"
|
sdk: ">=2.3.0 <3.0.0"
|
||||||
@@ -20,7 +20,7 @@ dependencies:
|
|||||||
file_picker: ^1.6.2
|
file_picker: ^1.6.2
|
||||||
image_picker: ^0.6.5
|
image_picker: ^0.6.5
|
||||||
flutter_keyboard_visibility: ^0.8.0
|
flutter_keyboard_visibility: ^0.8.0
|
||||||
stream_chat: ^0.2.0-alpha+3
|
stream_chat: ^0.2.0-alpha+4
|
||||||
mime: ^0.9.6+3
|
mime: ^0.9.6+3
|
||||||
visibility_detector: ^0.1.4
|
visibility_detector: ^0.1.4
|
||||||
http_parser: ^3.1.4
|
http_parser: ^3.1.4
|
||||||
|
|||||||
Reference in New Issue
Block a user