diff --git a/example/push_notifications/lib/main.dart b/example/push_notifications/lib/main.dart index 77e9d0e..c579dc5 100644 --- a/example/push_notifications/lib/main.dart +++ b/example/push_notifications/lib/main.dart @@ -1,17 +1,15 @@ -import 'dart:io' show Platform; +import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; import 'package:talkjs_flutter/talkjs_flutter.dart'; -import 'package:firebase_core/firebase_core.dart'; + import 'firebase_options.dart'; Future main() async { WidgetsFlutterBinding.ensureInitialized(); - if (Platform.isAndroid) { - await Firebase.initializeApp( - options: DefaultFirebaseOptions.currentPlatform, - ); - } + await Firebase.initializeApp( + options: DefaultFirebaseOptions.currentPlatform, + ); await Talk.registerPushNotificationHandlers( androidChannel: const AndroidChannel( @@ -34,7 +32,8 @@ class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { - final session = Session(appId: 'YOUR_APP_ID', enablePushNotifications: true); + final session = + Session(appId: 'YOUR_APP_ID', enablePushNotifications: true); final me = session.getUser( id: '123456', diff --git a/example/push_notifications/pubspec.lock b/example/push_notifications/pubspec.lock index 94e2dae..eae5c56 100644 --- a/example/push_notifications/pubspec.lock +++ b/example/push_notifications/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: "867b77e2367bc502dcd4d5a66302615409f04eb20ed82ba1c0ba073f9107e018" + sha256: "3dee3db3468c5f4640a4e8aa9c1e22561c298976d8c39ed2fdd456a9a3db26e1" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.32" args: dependency: transitive description: name: args - sha256: c372bb384f273f0c2a8aaaa226dad84dc27c8519a691b888725dec59518ad53a + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.5.0" async: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" boolean_selector: dependency: transitive description: @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" clock: dependency: transitive description: @@ -53,10 +53,10 @@ packages: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.18.0" crypto: dependency: transitive description: @@ -69,18 +69,18 @@ packages: dependency: "direct main" description: name: cupertino_icons - sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.8" dbus: dependency: transitive description: name: dbus - sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263" + sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" url: "https://pub.dev" source: hosted - version: "0.7.8" + version: "0.7.10" fake_async: dependency: transitive description: @@ -93,119 +93,103 @@ packages: dependency: transitive description: name: ffi - sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.0.1" - file: - dependency: transitive - description: - name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" - url: "https://pub.dev" - source: hosted - version: "6.1.4" + version: "2.1.2" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: dcf54c170c5371ad0e79229d0fb372c58262ae0968b7de222bf28e51dd236be0 + sha256: "4aef2a23d0f3265545807d68fbc2f76a6b994ca3c778d88453b99325abd63284" url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.30.1" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface - sha256: ae79f335f6c7f2dadb00c98c429da2ca905d265e0225fb5e7dfa62ac3accad48 + sha256: c437ae5d17e6b5cc7981cf6fd458a5db4d12979905f9aafd1fea930428a9fe63 url: "https://pub.dev" source: hosted - version: "4.7.0" + version: "5.0.0" firebase_core_web: dependency: transitive description: name: firebase_core_web - sha256: e57ef862257a0d977c1308d02e2fbb9b68525e6d85711b08f3df8cec836fb444 + sha256: "67f2fcc600fc78c2f731c370a3a5e6c87ee862e3a2fba6f951eca6d5dafe5c29" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.16.0" firebase_messaging: dependency: "direct main" description: name: firebase_messaging - sha256: "88a4bf569899344d863db26a73092681b590274f570f0a431051b92c4dd9bee3" + sha256: "73a43445a7f8c6e6327f0ec3922b1c99a9f4a0e4896197bfe10a88259f775aad" url: "https://pub.dev" source: hosted - version: "14.5.0" + version: "14.9.1" firebase_messaging_platform_interface: dependency: transitive description: name: firebase_messaging_platform_interface - sha256: "482fa6998f6cb10b30324ca8bfa0e2fcc0defed9484ccccce118b1b347e39a24" + sha256: "675527aadccb679c9dfd43a4558690427123ac1e99f03eef5bbce9dc216edc91" url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.5.34" firebase_messaging_web: dependency: transitive description: name: firebase_messaging_web - sha256: "61f7d323085704fbcc7b056a49d75211b2eb698610b878fec6cda18dd04d754f" + sha256: "66deff69307f54fc7a20732b4278af327ae378b86607d5ac877d8f2201fe881e" url: "https://pub.dev" source: hosted - version: "3.4.0" + version: "3.8.4" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" - flutter_apns_only: - dependency: transitive - description: - name: flutter_apns_only - sha256: "70da0d520a5b8088dc7a52abb9a63d3191521c7ec2360461af776cdaee50ab74" - url: "https://pub.dev" - source: hosted - version: "1.6.0" flutter_inappwebview_internal_annotations: dependency: transitive description: name: flutter_inappwebview_internal_annotations - sha256: "064a8ccbc76217dcd3b0fd6c6ea6f549e69b2849a0233b5bb46af9632c3ce2ff" + sha256: "5f80fd30e208ddded7dbbcd0d569e7995f9f63d45ea3f548d8dd4c0b473fb4c8" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: b543301ad291598523947dc534aaddc5aaad597b709d2426d3a0e0d44c5cb493 + sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "3.0.2" flutter_local_notifications: dependency: transitive description: name: flutter_local_notifications - sha256: "293995f94e120c8afce768981bd1fa9c5d6de67c547568e3b42ae2defdcbb4a0" + sha256: "8cdc719114ab1c86c64bb7a86d3a679674c3637edd229e3a994797d4a1504ce4" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "17.1.0" flutter_local_notifications_linux: dependency: transitive description: name: flutter_local_notifications_linux - sha256: ccb08b93703aeedb58856e5637450bf3ffec899adb66dc325630b68994734b89 + sha256: "33f741ef47b5f63cc7f78fe75eeeac7e19f171ff3c3df054d84c1e38bedb6a03" url: "https://pub.dev" source: hosted - version: "3.0.0+1" + version: "4.0.0+1" flutter_local_notifications_platform_interface: dependency: transitive description: name: flutter_local_notifications_platform_interface - sha256: "5ec1feac5f7f7d9266759488bc5f76416152baba9aa1b26fe572246caa00d1ab" + sha256: "340abf67df238f7f0ef58f4a26d2a83e1ab74c77ab03cd2b2d5018ac64db30b7" url: "https://pub.dev" source: hosted - version: "6.0.0" + version: "7.1.0" flutter_test: dependency: "direct dev" description: flutter @@ -220,10 +204,10 @@ packages: dependency: transitive description: name: http - sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "0.13.6" + version: "1.2.1" http_parser: dependency: transitive description: @@ -236,122 +220,138 @@ packages: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + url: "https://pub.dev" + source: hosted + version: "0.6.7" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "2.0.1" lints: dependency: transitive description: name: lints - sha256: a2c3d198cb5ea2e179926622d433331d8b58374ab8f29cdda6e863bd62fd369c + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "3.0.0" matcher: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.13" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.11.0" path: dependency: transitive description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.9.0" permission_handler: dependency: transitive description: name: permission_handler - sha256: "33c6a1253d1f95fd06fa74b65b7ba907ae9811f9d5c1d3150e51417d04b8d6a8" + sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb" url: "https://pub.dev" source: hosted - version: "10.2.0" + version: "11.3.1" permission_handler_android: dependency: transitive description: name: permission_handler_android - sha256: "8028362b40c4a45298f1cbfccd227c8dd6caf0e27088a69f2ba2ab15464159e2" + sha256: "1acac6bae58144b442f11e66621c062aead9c99841093c38f5bcdcc24c1c3474" url: "https://pub.dev" source: hosted - version: "10.2.0" + version: "12.0.5" permission_handler_apple: dependency: transitive description: name: permission_handler_apple - sha256: ee96ac32f5a8e6f80756e25b25b9f8e535816c8e6665a96b6d70681f8c4f7e85 + sha256: e9ad66020b89ff1b63908f247c2c6f931c6e62699b756ef8b3c4569350cd8662 url: "https://pub.dev" source: hosted - version: "9.0.8" + version: "9.4.4" + permission_handler_html: + dependency: transitive + description: + name: permission_handler_html + sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" + url: "https://pub.dev" + source: hosted + version: "0.1.1" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - sha256: "68abbc472002b5e6dfce47fe9898c6b7d8328d58b5d2524f75e277c07a97eb84" + sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20" url: "https://pub.dev" source: hosted - version: "3.9.0" + version: "4.2.1" permission_handler_windows: dependency: transitive description: name: permission_handler_windows - sha256: f67cab14b4328574938ecea2db3475dad7af7ead6afab6338772c5f88963e38b + sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" url: "https://pub.dev" source: hosted - version: "0.1.2" + version: "0.2.1" petitparser: dependency: transitive description: name: petitparser - sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" - url: "https://pub.dev" - source: hosted - version: "5.1.0" - platform: - dependency: transitive - description: - name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "6.0.2" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "4.2.4" + version: "2.1.8" sky_engine: dependency: transitive description: flutter @@ -361,26 +361,26 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" string_scanner: dependency: transitive description: @@ -395,15 +395,15 @@ packages: path: "../.." relative: true source: path - version: "0.7.0" + version: "0.8.1" talkjs_flutter_inappwebview: dependency: transitive description: name: talkjs_flutter_inappwebview - sha256: "32f26a14d2cd88a19fae823e4eea47b30a1ed6b37f5226030c7add9fb1605db3" + sha256: "7622377a1f21f7b0205cb5e4d6989687f98040e1a164e25726ed3638be77320d" url: "https://pub.dev" source: hosted - version: "6.0.2" + version: "6.0.7" term_glyph: dependency: transitive description: @@ -416,90 +416,90 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.6.1" timezone: dependency: transitive description: name: timezone - sha256: "1cfd8ddc2d1cfd836bc93e67b9be88c3adaeca6f40a00ca999104c30693cdca0" + sha256: a6ccda4a69a442098b602c44e61a1e2b4bf6f5516e875bbf0f427d5df14745d5 url: "https://pub.dev" source: hosted - version: "0.9.2" + version: "0.9.3" typed_data: dependency: transitive description: name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" url_launcher: dependency: transitive description: name: url_launcher - sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e" + sha256: "6ce1e04375be4eed30548f10a315826fd933c1e493206eab82eed01f438c8d2e" url: "https://pub.dev" source: hosted - version: "6.1.10" + version: "6.2.6" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "22f8db4a72be26e9e3a4aa3f194b1f7afbc76d20ec141f84be1d787db2155cbd" + sha256: "360a6ed2027f18b73c8d98e159dda67a61b7f2e0f6ec26e86c3ada33b0621775" url: "https://pub.dev" source: hosted - version: "6.0.31" + version: "6.3.1" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2" + sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "6.2.5" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5" + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.1.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "91ee3e75ea9dadf38036200c5d3743518f4a5eb77a8d13fda1ee5764373f185e" + sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234 url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.1.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - sha256: "6c9ca697a5ae218ce56cece69d46128169a58aa8653c1b01d26fcd4aad8c4370" + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.3.2" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: "81fe91b6c4f84f222d186a9d23c73157dc4c8e1c71489c4d08be1ad3b228f1aa" + sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a" url: "https://pub.dev" source: hosted - version: "2.0.16" + version: "2.3.1" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "254708f17f7c20a9c8c471f67d86d76d4a3f9c1591aad1e15292008aceb82771" + sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.1.1" vector_math: dependency: transitive description: @@ -508,22 +508,38 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: bd512f03919aac5f1313eb8249f223bacf4927031bf60b02601f81f687689e86 + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d url: "https://pub.dev" source: hosted - version: "0.2.0+3" + version: "1.0.4" xml: dependency: transitive description: name: xml - sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 url: "https://pub.dev" source: hosted - version: "6.2.2" + version: "6.5.0" sdks: - dart: ">=2.19.0 <3.0.0" - flutter: ">=3.3.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.19.0" diff --git a/example/push_notifications/pubspec.yaml b/example/push_notifications/pubspec.yaml index ab61f35..17b362d 100644 --- a/example/push_notifications/pubspec.yaml +++ b/example/push_notifications/pubspec.yaml @@ -1,40 +1,21 @@ name: push_notifications description: A new Flutter project. -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: "none" # Remove this line if you wish to publish to pub.dev +publish_to: "none" -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html version: 1.0.0+1 environment: - sdk: ">=2.16.2 <3.0.0" + sdk: ">=3.0.0 <4.0.0" -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. dependencies: flutter: sdk: flutter - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.2 - firebase_core: ^2.3.0 - firebase_messaging: ^14.1.1 + + cupertino_icons: ^1.0.8 + firebase_core: ^2.30.1 + firebase_messaging: ^14.9.1 talkjs_flutter: path: ../../ @@ -43,50 +24,7 @@ dev_dependencies: flutter_test: sdk: flutter - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. - flutter_lints: ^1.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec + flutter_lints: ^3.0.2 -# The following section is specific to Flutter. flutter: - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages + uses-material-design: true \ No newline at end of file diff --git a/lib/src/notification.dart b/lib/src/notification.dart index 7a58c66..3ff68da 100644 --- a/lib/src/notification.dart +++ b/lib/src/notification.dart @@ -1,19 +1,22 @@ +import 'dart:convert'; import 'dart:core'; +import 'dart:isolate'; import 'dart:typed_data'; import 'dart:ui'; -import 'dart:convert'; -import 'dart:isolate'; -import 'package:flutter/services.dart'; + import 'package:firebase_messaging/firebase_messaging.dart'; +import 'package:flutter/services.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:http/http.dart' as http; -import 'package:flutter_apns_only/flutter_apns_only.dart'; +// import 'package:flutter_apns_only/flutter_apns_only.dart'; enum AndroidVisibility { /// Show the notification on all lockscreens, but conceal sensitive or private information on secure lockscreens. PRIVATE, + /// Show this notification in its entirety on all lockscreens. PUBLIC, + /// Do not reveal any part of this notification on a secure lockscreen. /// /// Useful for notifications showing sensitive information such as banking apps. @@ -98,9 +101,10 @@ class IOSPermissions { } String? fcmToken; -String? apnsToken; +// String? apnsToken; -final FlutterLocalNotificationsPlugin _flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); +final FlutterLocalNotificationsPlugin _flutterLocalNotificationsPlugin = + FlutterLocalNotificationsPlugin(); AndroidChannel? _androidChannel; final _activeNotifications = >{}; int _nextId = 0; @@ -148,7 +152,8 @@ Future _onFCMBackgroundMessage(RemoteMessage firebaseMessage) async { print('📘 Message data: ${firebaseMessage.data}'); if (firebaseMessage.notification != null) { - print('📘 Message also contained a notification: ${firebaseMessage.notification}'); + print( + '📘 Message also contained a notification: ${firebaseMessage.notification}'); } // onBackgroundMessage runs on a separate isolate, so we're passing the message to the main isolate @@ -175,7 +180,8 @@ Future _onReceiveMessageFromPort(Map firebaseMessageMap) showId = _showIdFromNotificationId[notificationId]!; - final timestamp = DateTime.fromMillisecondsSinceEpoch(talkjsData['timestamp']); + final timestamp = + DateTime.fromMillisecondsSinceEpoch(talkjsData['timestamp']); final activeNotifications = _activeNotifications[notificationId]; @@ -201,7 +207,8 @@ Future _onReceiveMessageFromPort(Map firebaseMessageMap) Person( name: 'me', ), - groupConversation: talkjsData['conversation']['participants'].length > 2, + groupConversation: + talkjsData['conversation']['participants'].length > 2, messages: [ Message( talkjsData['message']['text'], @@ -220,8 +227,10 @@ Future _onReceiveMessageFromPort(Map firebaseMessageMap) activeNotifications.add(data['talkjs']); final messages = []; for (final talkjsString in activeNotifications) { - final Map messageTalkjsData = json.decode(talkjsString); - final messageTimestamp = DateTime.fromMillisecondsSinceEpoch(messageTalkjsData['timestamp']); + final Map messageTalkjsData = + json.decode(talkjsString); + final messageTimestamp = + DateTime.fromMillisecondsSinceEpoch(messageTalkjsData['timestamp']); final messageSender = talkjsData['sender']; messages.add( @@ -241,7 +250,8 @@ Future _onReceiveMessageFromPort(Map firebaseMessageMap) Person( name: 'me', ), - groupConversation: talkjsData['conversation']['participants'].length > 2, + groupConversation: + talkjsData['conversation']['participants'].length > 2, messages: messages, ); } @@ -267,7 +277,8 @@ Future _onReceiveMessageFromPort(Map firebaseMessageMap) _androidChannel!.channelId, _androidChannel!.channelName, channelDescription: _androidChannel!.channelDescription, - importance: _androidChannel!.importance?.toLocalNotification() ?? Importance.high, + importance: + _androidChannel!.importance?.toLocalNotification() ?? Importance.high, playSound: playSound, sound: sound, enableVibration: _androidChannel!.vibrate ?? true, @@ -281,8 +292,8 @@ Future _onReceiveMessageFromPort(Map firebaseMessageMap) ); await _flutterLocalNotificationsPlugin.show( - showId, // id - data['title'], // title + showId, // id + data['title'], // title data['message'], // body platformChannelSpecifics, // notificationDetails payload: data['talkjs'], @@ -310,7 +321,8 @@ void _onFCMTokenRefresh(String token) { // TODO: Update the token on the Talkjs server once we have the data layer SDK ready } -Future registerAndroidPushNotificationHandlers(AndroidChannel androidChannel) async { +Future registerAndroidPushNotificationHandlers( + AndroidChannel androidChannel) async { // Get the token each time the application loads fcmToken = await FirebaseMessaging.instance.getToken(); print('📘 Firebase token: $fcmToken'); @@ -329,74 +341,114 @@ Future registerAndroidPushNotificationHandlers(AndroidChannel androidChann try { final activeNotifications = await _flutterLocalNotificationsPlugin - .resolvePlatformSpecificImplementation() - ?.getActiveNotifications(); - - if (activeNotifications != null) { - for (final displayedNotification in activeNotifications) { - if (displayedNotification.payload != null) { - final Map talkjsData = json.decode(displayedNotification.payload!); - - if ((talkjsData['conversation'] != null) && (talkjsData['conversation']['id'] != null)) { - print('📘 Existing notification: ${displayedNotification.payload}'); - final String notificationId = talkjsData['conversation']['id']; - - if (!_showIdFromNotificationId.containsKey(notificationId)) { - _showIdFromNotificationId[notificationId] = _nextId; - _nextId += 1; - } - - if (_activeNotifications[notificationId] == null) { - _activeNotifications[notificationId] = [displayedNotification.payload!]; - } else { - _activeNotifications[notificationId]!.add(displayedNotification.payload!); - } + .resolvePlatformSpecificImplementation< + AndroidFlutterLocalNotificationsPlugin>() + ?.getActiveNotifications(); + + if (activeNotifications != null) { + for (final displayedNotification in activeNotifications) { + if (displayedNotification.payload != null) { + final Map talkjsData = + json.decode(displayedNotification.payload!); + + if ((talkjsData['conversation'] != null) && + (talkjsData['conversation']['id'] != null)) { + print('📘 Existing notification: ${displayedNotification.payload}'); + final String notificationId = talkjsData['conversation']['id']; + + if (!_showIdFromNotificationId.containsKey(notificationId)) { + _showIdFromNotificationId[notificationId] = _nextId; + _nextId += 1; + } + + if (_activeNotifications[notificationId] == null) { + _activeNotifications[notificationId] = [ + displayedNotification.payload! + ]; + } else { + _activeNotifications[notificationId]! + .add(displayedNotification.payload!); } } } } + } } on PlatformException { // PlatformException is raised on Android < 6.0 // Simply ignoring this part } - IsolateNameServer.registerPortWithName(_receivePort.sendPort, 'talkjsFCMPort'); - _receivePort.listen((message) async => await _onReceiveMessageFromPort(message)); + IsolateNameServer.registerPortWithName( + _receivePort.sendPort, 'talkjsFCMPort'); + _receivePort + .listen((message) async => await _onReceiveMessageFromPort(message)); FirebaseMessaging.onBackgroundMessage(_onFCMBackgroundMessage); } -Future _onPush(String name, ApnsRemoteMessage message) async { - final payload = message.payload; - print('📘 _onPush $name: ${payload["notification"]?["title"]}'); - - final action = UNNotificationAction.getIdentifier(payload['data']); - - if (action != null && action != UNNotificationAction.defaultIdentifier) { - print('📘 _onPush action: $action'); - } -} +Future registerIOSPushNotificationHandlers( + IOSPermissions iosPermissions) async { + fcmToken = await FirebaseMessaging.instance.getToken(); + print('📘 Firebase token: $fcmToken'); + // Get the token each time the application loads -Future registerIOSPushNotificationHandlers(IOSPermissions iosPermissions) async { - final connector = ApnsPushConnectorOnly(); + // Update the token each time it refreshes + FirebaseMessaging.instance.onTokenRefresh.listen(_onFCMTokenRefresh); - connector.configureApns( - onLaunch: (data) => _onPush('onLaunch', data), - onResume: (data) => _onPush('onResume', data), - onMessage: (data) => _onPush('onMessage', data), - onBackgroundMessage: (data) => _onPush('onBackgroundMessage', data), + await _flutterLocalNotificationsPlugin.initialize( + InitializationSettings( + iOS: DarwinInitializationSettings( + requestSoundPermission: iosPermissions.sound, + requestAlertPermission: iosPermissions.alert, + requestBadgePermission: iosPermissions.badge, + ), + ), + onDidReceiveNotificationResponse: _onSelectNotification, ); - connector.token.addListener(() { - print('📘 apns token refresh: ${connector.token.value}'); + try { + final activeNotifications = await _flutterLocalNotificationsPlugin + .resolvePlatformSpecificImplementation< + AndroidFlutterLocalNotificationsPlugin>() + ?.getActiveNotifications(); + + if (activeNotifications != null) { + for (final displayedNotification in activeNotifications) { + if (displayedNotification.payload != null) { + final Map talkjsData = + json.decode(displayedNotification.payload!); + + if ((talkjsData['conversation'] != null) && + (talkjsData['conversation']['id'] != null)) { + print('📘 Existing notification: ${displayedNotification.payload}'); + final String notificationId = talkjsData['conversation']['id']; + + if (!_showIdFromNotificationId.containsKey(notificationId)) { + _showIdFromNotificationId[notificationId] = _nextId; + _nextId += 1; + } - apnsToken = connector.token.value; - }); + if (_activeNotifications[notificationId] == null) { + _activeNotifications[notificationId] = [ + displayedNotification.payload! + ]; + } else { + _activeNotifications[notificationId]! + .add(displayedNotification.payload!); + } + } + } + } + } + } on PlatformException { + // PlatformException is raised on Android < 6.0 + // Simply ignoring this part + } - connector.requestNotificationPermissions(IosNotificationSettings( - sound: iosPermissions.sound, - alert: iosPermissions.alert, - badge: iosPermissions.badge, - )); -} + IsolateNameServer.registerPortWithName( + _receivePort.sendPort, 'talkjsFCMPort'); + _receivePort + .listen((message) async => await _onReceiveMessageFromPort(message)); + FirebaseMessaging.onBackgroundMessage(_onFCMBackgroundMessage); +} diff --git a/lib/src/webview_common.dart b/lib/src/webview_common.dart index 277b4e0..cb8c861 100644 --- a/lib/src/webview_common.dart +++ b/lib/src/webview_common.dart @@ -1,7 +1,7 @@ import 'dart:convert'; -import './session.dart'; import './notification.dart'; +import './session.dart'; typedef FnExecute = void Function(String statement); @@ -9,7 +9,7 @@ void createSession({ required FnExecute execute, required Session session, required String variableName, - }) { +}) { // Initialize Session object final options = {}; @@ -27,19 +27,13 @@ void createSession({ if (session.enablePushNotifications) { if (fcmToken != null) { - execute('session.setPushRegistration({provider: "fcm", pushRegistrationId: "$fcmToken"});'); - } - - if (apnsToken != null) { - execute('session.setPushRegistration({provider: "apns", pushRegistrationId: "$apnsToken"});'); + execute( + 'session.setPushRegistration({provider: "fcm", pushRegistrationId: "$fcmToken"});'); } } else { if (fcmToken != null) { - execute('session.unsetPushRegistration({provider: "fcm", pushRegistrationId: "$fcmToken"});'); - } - - if (apnsToken != null) { - execute('session.unsetPushRegistration({provider: "apns", pushRegistrationId: "$apnsToken"});'); + execute( + 'session.unsetPushRegistration({provider: "fcm", pushRegistrationId: "$fcmToken"});'); } } } diff --git a/lib/talkjs_flutter.dart b/lib/talkjs_flutter.dart index f054f1d..abb2c2c 100644 --- a/lib/talkjs_flutter.dart +++ b/lib/talkjs_flutter.dart @@ -2,21 +2,22 @@ library talkjs; import 'dart:convert' show json, utf8; import 'dart:io' show Platform; + import 'package:crypto/crypto.dart' show sha1; + import 'src/notification.dart'; +export 'src/chatbox.dart'; export 'src/chatoptions.dart'; export 'src/conversation.dart'; -export 'src/session.dart'; -export 'src/chatbox.dart'; -export 'src/user.dart'; export 'src/conversationlist.dart'; -export 'src/predicate.dart'; export 'src/notification.dart'; +export 'src/predicate.dart'; +export 'src/session.dart'; +export 'src/user.dart'; /// The [Talk] object provides utility functions to help use TalkJS. class Talk { - /// Compute a Conversation ID based on participants' ids given. /// /// The order of the parameters does not matter. @@ -27,13 +28,14 @@ class Talk { ids.sort(); final encoded = json.encode(ids); - final digest = sha1.convert(utf8.encode(encoded)); + final digest = sha1.convert(utf8.encode(encoded)); final hash = digest.toString().toLowerCase(); return hash.substring(0, 20); } - static Future registerPushNotificationHandlers({AndroidChannel? androidChannel, IOSPermissions? iosPermissions}) async { + static Future registerPushNotificationHandlers( + {AndroidChannel? androidChannel, IOSPermissions? iosPermissions}) async { if ((Platform.isAndroid) && (androidChannel != null)) { await registerAndroidPushNotificationHandlers(androidChannel); } diff --git a/pubspec.lock b/pubspec.lock index a0d96bb..8f5f213 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _flutterfire_internals - sha256: "8eb354cb8ebed8a9fdf63699d15deff533bc133128898afaf754926b57d611b6" + sha256: "3dee3db3468c5f4640a4e8aa9c1e22561c298976d8c39ed2fdd456a9a3db26e1" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.32" args: dependency: transitive description: name: args - sha256: c372bb384f273f0c2a8aaaa226dad84dc27c8519a691b888725dec59518ad53a + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" url: "https://pub.dev" source: hosted - version: "2.4.1" + version: "2.5.0" async: dependency: transitive description: @@ -53,10 +53,10 @@ packages: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.18.0" crypto: dependency: "direct main" description: @@ -69,10 +69,10 @@ packages: dependency: transitive description: name: dbus - sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263" + sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac" url: "https://pub.dev" source: hosted - version: "0.7.8" + version: "0.7.10" fake_async: dependency: transitive description: @@ -85,111 +85,103 @@ packages: dependency: transitive description: name: ffi - sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.0.1" - file: - dependency: transitive - description: - name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" - url: "https://pub.dev" - source: hosted - version: "6.1.4" + version: "2.1.2" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: "250678b816279b3240c3a33e1f76bf712c00718f1fbeffc85873a5da8c077379" + sha256: "4aef2a23d0f3265545807d68fbc2f76a6b994ca3c778d88453b99325abd63284" url: "https://pub.dev" source: hosted - version: "2.13.0" + version: "2.30.1" firebase_core_platform_interface: dependency: transitive description: name: firebase_core_platform_interface - sha256: b63e3be6c96ef5c33bdec1aab23c91eb00696f6452f0519401d640938c94cba2 + sha256: c437ae5d17e6b5cc7981cf6fd458a5db4d12979905f9aafd1fea930428a9fe63 url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "5.0.0" firebase_core_web: dependency: transitive description: name: firebase_core_web - sha256: "8c0f4c87d20e2d001a5915df238c1f9c88704231f591324205f5a5d2a7740a45" + sha256: "67f2fcc600fc78c2f731c370a3a5e6c87ee862e3a2fba6f951eca6d5dafe5c29" url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.16.0" firebase_messaging: dependency: "direct main" description: name: firebase_messaging - sha256: "9cfe5c4560fb83393511ca7620f8fb3f22c9a80303052f10290e732fcfb801bd" + sha256: "73a43445a7f8c6e6327f0ec3922b1c99a9f4a0e4896197bfe10a88259f775aad" url: "https://pub.dev" source: hosted - version: "14.6.1" + version: "14.9.1" firebase_messaging_platform_interface: dependency: transitive description: name: firebase_messaging_platform_interface - sha256: "7e25cb71019ccef8b1fd7b37969af79f04c467974cce4dfc291fa36974edd7ba" + sha256: "675527aadccb679c9dfd43a4558690427123ac1e99f03eef5bbce9dc216edc91" url: "https://pub.dev" source: hosted - version: "4.5.1" + version: "4.5.34" firebase_messaging_web: dependency: transitive description: name: firebase_messaging_web - sha256: "5d9840cc8126ea723b1bda901389cb542902f664f2653c16d4f8114e95f13cec" + sha256: "66deff69307f54fc7a20732b4278af327ae378b86607d5ac877d8f2201fe881e" url: "https://pub.dev" source: hosted - version: "3.5.1" + version: "3.8.4" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" - flutter_apns_only: - dependency: "direct main" - description: - name: flutter_apns_only - sha256: "70da0d520a5b8088dc7a52abb9a63d3191521c7ec2360461af776cdaee50ab74" - url: "https://pub.dev" - source: hosted - version: "1.6.0" flutter_inappwebview_internal_annotations: dependency: transitive description: name: flutter_inappwebview_internal_annotations - sha256: "064a8ccbc76217dcd3b0fd6c6ea6f549e69b2849a0233b5bb46af9632c3ce2ff" + sha256: "5f80fd30e208ddded7dbbcd0d569e7995f9f63d45ea3f548d8dd4c0b473fb4c8" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "3.0.2" flutter_local_notifications: dependency: "direct main" description: name: flutter_local_notifications - sha256: "2876372952b65ca7f684e698eba22bda1cf581fa071dd30ba2f01900f507d0d1" + sha256: "8cdc719114ab1c86c64bb7a86d3a679674c3637edd229e3a994797d4a1504ce4" url: "https://pub.dev" source: hosted - version: "14.0.0+1" + version: "17.1.0" flutter_local_notifications_linux: dependency: transitive description: name: flutter_local_notifications_linux - sha256: "909bb95de05a2e793503a2437146285a2f600cd0b3f826e26b870a334d8586d7" + sha256: "33f741ef47b5f63cc7f78fe75eeeac7e19f171ff3c3df054d84c1e38bedb6a03" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.0+1" flutter_local_notifications_platform_interface: dependency: transitive description: name: flutter_local_notifications_platform_interface - sha256: "63235c42de5b6c99846969a27ad0209c401e6b77b0498939813725b5791c107c" + sha256: "340abf67df238f7f0ef58f4a26d2a83e1ab74c77ab03cd2b2d5018ac64db30b7" url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.1.0" flutter_test: dependency: "direct dev" description: flutter @@ -204,10 +196,10 @@ packages: dependency: "direct main" description: name: http - sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "0.13.6" + version: "1.2.1" http_parser: dependency: transitive description: @@ -224,110 +216,134 @@ packages: url: "https://pub.dev" source: hosted version: "0.6.7" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + url: "https://pub.dev" + source: hosted + version: "3.0.0" matcher: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.11.0" path: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" permission_handler: dependency: "direct main" description: name: permission_handler - sha256: "33c6a1253d1f95fd06fa74b65b7ba907ae9811f9d5c1d3150e51417d04b8d6a8" + sha256: "18bf33f7fefbd812f37e72091a15575e72d5318854877e0e4035a24ac1113ecb" url: "https://pub.dev" source: hosted - version: "10.2.0" + version: "11.3.1" permission_handler_android: dependency: transitive description: name: permission_handler_android - sha256: "8028362b40c4a45298f1cbfccd227c8dd6caf0e27088a69f2ba2ab15464159e2" + sha256: "1acac6bae58144b442f11e66621c062aead9c99841093c38f5bcdcc24c1c3474" url: "https://pub.dev" source: hosted - version: "10.2.0" + version: "12.0.5" permission_handler_apple: dependency: transitive description: name: permission_handler_apple - sha256: ee96ac32f5a8e6f80756e25b25b9f8e535816c8e6665a96b6d70681f8c4f7e85 + sha256: e9ad66020b89ff1b63908f247c2c6f931c6e62699b756ef8b3c4569350cd8662 url: "https://pub.dev" source: hosted - version: "9.0.8" + version: "9.4.4" + permission_handler_html: + dependency: transitive + description: + name: permission_handler_html + sha256: "54bf176b90f6eddd4ece307e2c06cf977fb3973719c35a93b85cc7093eb6070d" + url: "https://pub.dev" + source: hosted + version: "0.1.1" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - sha256: "68abbc472002b5e6dfce47fe9898c6b7d8328d58b5d2524f75e277c07a97eb84" + sha256: "48d4fcf201a1dad93ee869ab0d4101d084f49136ec82a8a06ed9cfeacab9fd20" url: "https://pub.dev" source: hosted - version: "3.9.0" + version: "4.2.1" permission_handler_windows: dependency: transitive description: name: permission_handler_windows - sha256: f67cab14b4328574938ecea2db3475dad7af7ead6afab6338772c5f88963e38b + sha256: "1a790728016f79a41216d88672dbc5df30e686e811ad4e698bfc51f76ad91f1e" url: "https://pub.dev" source: hosted - version: "0.1.2" + version: "0.2.1" petitparser: dependency: transitive description: name: petitparser - sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted - version: "5.1.0" - platform: - dependency: transitive - description: - name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" - url: "https://pub.dev" - source: hosted - version: "3.1.0" + version: "6.0.2" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "4.2.4" + version: "2.1.8" sky_engine: dependency: transitive description: flutter @@ -337,26 +353,26 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" stack_trace: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" string_scanner: dependency: transitive description: @@ -369,10 +385,10 @@ packages: dependency: "direct main" description: name: talkjs_flutter_inappwebview - sha256: "916c0032f88a3a35cc7939e20744b580aa5767a675d87cdc03de2dad7e9e4264" + sha256: "7622377a1f21f7b0205cb5e4d6989687f98040e1a164e25726ed3638be77320d" url: "https://pub.dev" source: hosted - version: "6.0.3" + version: "6.0.7" term_glyph: dependency: transitive description: @@ -385,90 +401,90 @@ packages: dependency: transitive description: name: test_api - sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.6.1" timezone: dependency: transitive description: name: timezone - sha256: "1cfd8ddc2d1cfd836bc93e67b9be88c3adaeca6f40a00ca999104c30693cdca0" + sha256: a6ccda4a69a442098b602c44e61a1e2b4bf6f5516e875bbf0f427d5df14745d5 url: "https://pub.dev" source: hosted - version: "0.9.2" + version: "0.9.3" typed_data: dependency: transitive description: name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" url_launcher: dependency: "direct main" description: name: url_launcher - sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3 + sha256: "6ce1e04375be4eed30548f10a315826fd933c1e493206eab82eed01f438c8d2e" url: "https://pub.dev" source: hosted - version: "6.1.11" + version: "6.2.6" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "22f8db4a72be26e9e3a4aa3f194b1f7afbc76d20ec141f84be1d787db2155cbd" + sha256: "360a6ed2027f18b73c8d98e159dda67a61b7f2e0f6ec26e86c3ada33b0621775" url: "https://pub.dev" source: hosted - version: "6.0.31" + version: "6.3.1" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2" + sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "6.2.5" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5" + sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811 url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.1.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "91ee3e75ea9dadf38036200c5d3743518f4a5eb77a8d13fda1ee5764373f185e" + sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234 url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.1.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - sha256: "6c9ca697a5ae218ce56cece69d46128169a58aa8653c1b01d26fcd4aad8c4370" + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.3.2" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: "81fe91b6c4f84f222d186a9d23c73157dc4c8e1c71489c4d08be1ad3b228f1aa" + sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a" url: "https://pub.dev" source: hosted - version: "2.0.16" + version: "2.3.1" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "254708f17f7c20a9c8c471f67d86d76d4a3f9c1591aad1e15292008aceb82771" + sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7 url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.1.1" vector_math: dependency: transitive description: @@ -477,22 +493,38 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: bd512f03919aac5f1313eb8249f223bacf4927031bf60b02601f81f687689e86 + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d url: "https://pub.dev" source: hosted - version: "0.2.0+3" + version: "1.0.4" xml: dependency: transitive description: name: xml - sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 url: "https://pub.dev" source: hosted - version: "6.2.2" + version: "6.5.0" sdks: - dart: ">=3.0.0-0 <4.0.0" - flutter: ">=3.3.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.19.0" diff --git a/pubspec.yaml b/pubspec.yaml index 560ae27..3ec2480 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.8.1 homepage: https://talkjs.com environment: - sdk: ">=2.15.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" flutter: ">=2.8.1" platforms: @@ -15,55 +15,21 @@ dependencies: flutter: sdk: flutter - talkjs_flutter_inappwebview: ^6.0.3 - crypto: ^3.0.2 - firebase_core: ^2.13.0 - firebase_messaging: ^14.6.1 - flutter_local_notifications: ^14.0.0+1 - http: ^0.13.5 - flutter_apns_only: ^1.6.0 - permission_handler: ^10.2.0 - url_launcher: ^6.1.11 + talkjs_flutter_inappwebview: ^6.0.7 + crypto: ^3.0.3 + firebase_core: ^2.30.1 + firebase_messaging: ^14.9.1 + flutter_local_notifications: ^17.1.0 + http: ^1.2.1 + permission_handler: ^11.3.1 + url_launcher: ^6.2.6 dev_dependencies: flutter_test: sdk: flutter -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec + flutter_lints: ^3.0.2 -# The following section is specific to Flutter. flutter: assets: - packages/talkjs_flutter/assets/index.html - - # To add assets to your package, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - # - # For details regarding assets in packages, see - # https://flutter.dev/assets-and-images/#from-packages - # - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # To add custom fonts to your package, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts in packages, see - # https://flutter.dev/custom-fonts/#from-packages