diff --git a/example/lib/main.dart b/example/lib/main.dart index b885caa..cb0ff98 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -26,7 +26,7 @@ class MyApp extends StatelessWidget { } class MyHomePage extends StatefulWidget { - MyHomePage({Key key, this.title}) : super(key: key); + MyHomePage({Key? key, required this.title}) : super(key: key); final String title; @@ -88,7 +88,7 @@ class _MyHomePageState extends State { final imageData = await photo.readAsBytes(); final decodedImage = image.decodeImage(imageData); - final scaledImage = image.copyResize(decodedImage, width: 500); + final scaledImage = image.copyResize(decodedImage!, width: 500); final jpg = image.encodeJpg(scaledImage, quality: 90); final filePath = (await getTemporaryDirectory()).uri.resolve( diff --git a/example/pubspec.lock b/example/pubspec.lock index 2913c99..48a15be 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: archive - sha256: d6347d54a2d8028e0437e3c099f66fdb8ae02c4720c1e7534c9f24c10351f85d + sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d url: "https://pub.dev" source: hosted - version: "3.3.6" + version: "3.6.1" 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: @@ -29,10 +29,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" chatwoot_sdk: dependency: "direct main" description: @@ -52,74 +52,74 @@ packages: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 - url: "https://pub.dev" - source: hosted - version: "1.17.0" - convert: - dependency: transitive - description: - name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "1.18.0" cross_file: dependency: transitive description: name: cross_file - sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9" + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+4" + version: "0.3.4+2" crypto: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.6" csslib: dependency: transitive description: name: csslib - sha256: b36c7f7e24c0bdf1bf9a3da461c837d1de64b9f8beb190c9011d8c72a3dfd745 + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" url: "https://pub.dev" source: hosted - version: "0.17.2" + version: "1.0.2" cupertino_icons: 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" diffutil_dart: dependency: transitive description: name: diffutil_dart - sha256: "21bcad3fcc89389da5c72c59b9da31eabb301a6548f715c17b0dfdd27d2ac6d5" + sha256: "5e74883aedf87f3b703cb85e815bdc1ed9208b33501556e4a8a5572af9845c81" url: "https://pub.dev" source: hosted - version: "2.0.0+1" + version: "4.0.1" dio: dependency: transitive description: name: dio - sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8" + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" + url: "https://pub.dev" + source: hosted + version: "5.7.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8" url: "https://pub.dev" source: hosted - version: "4.0.6" + version: "2.0.0" equatable: dependency: transitive description: name: equatable - sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7" url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.0.7" fake_async: dependency: transitive description: @@ -132,18 +132,50 @@ packages: dependency: transitive description: name: ffi - sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + url: "https://pub.dev" + source: hosted + version: "2.1.3" + file_selector_linux: + dependency: transitive + description: + name: file_selector_linux + sha256: b2b91daf8a68ecfa4a01b778a6f52edef9b14ecd506e771488ea0f2e0784198b url: "https://pub.dev" source: hosted - version: "2.0.1" - file: + version: "0.9.3+1" + file_selector_macos: dependency: transitive description: - name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + name: file_selector_macos + sha256: "271ab9986df0c135d45c3cdb6bd0faa5db6f4976d3e4b437cf7d0f258d941bfc" url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "0.9.4+2" + file_selector_platform_interface: + dependency: transitive + description: + name: file_selector_platform_interface + sha256: a3994c26f10378a039faa11de174d7b78eb8f79e4dd0af2a451410c1a5c3f66b + url: "https://pub.dev" + source: hosted + version: "2.6.2" + file_selector_windows: + dependency: transitive + description: + name: file_selector_windows + sha256: "8f5d2f6590d51ecd9179ba39c64f722edc15226cc93dcc8698466ad36a4a85a4" + url: "https://pub.dev" + source: hosted + version: "0.9.3+3" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -153,90 +185,98 @@ packages: dependency: transitive description: name: flutter_chat_types - sha256: cb9e72c6dee5f32e4b379b6b953dff95253c54242ee4e21ad81652b11902d5a8 + sha256: e285b588f6d19d907feb1f6d912deaf22e223656769c34093b64e1c59b094fb9 url: "https://pub.dev" source: hosted - version: "2.4.3" + version: "3.6.2" flutter_chat_ui: dependency: transitive description: name: flutter_chat_ui - sha256: "9c19396e59de978da092a935a04542ecf9746e3d75b9b7a038638e2a1982a5a1" + sha256: "168a4231464ad00a17ea5f0813f1b58393bdd4035683ea4dc37bbe26be62891e" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.6.15" flutter_link_previewer: dependency: transitive description: name: flutter_link_previewer - sha256: "0adc16359ce8385d623ee4b2985e702d7766d52e351bf0fd6a12366f8e49a63f" + sha256: "007069e60f42419fb59872beb7a3cc3ea21e9f1bdff5d40239f376fa62ca9f20" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "3.2.2" flutter_linkify: dependency: transitive description: name: flutter_linkify - sha256: c89fe74de985ec22f23d3538d2249add085a4f37ac1c29fd79e1a207efb81d63 + sha256: "74669e06a8f358fee4512b4320c0b80e51cffc496607931de68d28f099254073" + url: "https://pub.dev" + source: hosted + version: "6.0.0" + flutter_parsed_text: + dependency: transitive + description: + name: flutter_parsed_text + sha256: "529cf5793b7acdf16ee0f97b158d0d4ba0bf06e7121ef180abe1a5b59e32c1e2" url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "2.2.1" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: c224ac897bed083dabf11f238dd11a239809b446740be0c2044608c50029ffdf + sha256: "9b78450b89f059e96c9ebb355fa6b3df1d6b330436e0b885fb49594c41721398" url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.0.23" flutter_secure_storage: dependency: transitive description: name: flutter_secure_storage - sha256: "98352186ee7ad3639ccc77ad7924b773ff6883076ab952437d20f18a61f0a7c5" + sha256: "165164745e6afb5c0e3e3fcc72a012fb9e58496fb26ffb92cf22e16a821e85d0" url: "https://pub.dev" source: hosted - version: "8.0.0" + version: "9.2.2" flutter_secure_storage_linux: dependency: transitive description: name: flutter_secure_storage_linux - sha256: "0912ae29a572230ad52d8a4697e5518d7f0f429052fd51df7e5a7952c7efe2a3" + sha256: "4d91bfc23047422cbcd73ac684bc169859ee766482517c22172c86596bf1464b" url: "https://pub.dev" source: hosted - version: "1.1.3" + version: "1.2.1" flutter_secure_storage_macos: dependency: transitive description: name: flutter_secure_storage_macos - sha256: "083add01847fc1c80a07a08e1ed6927e9acd9618a35e330239d4422cd2a58c50" + sha256: "1693ab11121a5f925bbea0be725abfcfbbcf36c1e29e571f84a0c0f436147a81" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.2" flutter_secure_storage_platform_interface: dependency: transitive description: name: flutter_secure_storage_platform_interface - sha256: b3773190e385a3c8a382007893d678ae95462b3c2279e987b55d140d3b0cb81b + sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8 url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.2" flutter_secure_storage_web: dependency: transitive description: name: flutter_secure_storage_web - sha256: "42938e70d4b872e856e678c423cc0e9065d7d294f45bc41fc1981a4eb4beaffe" + sha256: f4ebff989b4f07b2656fb16b47852c0aab9fed9b4ec1c70103368337bc1886a9 url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.1" flutter_secure_storage_windows: dependency: transitive description: name: flutter_secure_storage_windows - sha256: fc2910ec9b28d60598216c29ea763b3a96c401f0ce1d13cdf69ccb0e5c93c3ee + sha256: b20b07cb5ed4ed74fc567b78a72936203f587eba460af1df11281c9326cd3709 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "3.1.2" flutter_test: dependency: "direct dev" description: flutter @@ -247,14 +287,6 @@ packages: description: flutter source: sdk version: "0.0.0" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - sha256: "70776c4541e5cacfe45bcaf00fe79137b8c61aa34fb5765a05ce6c57fd72c6e9" - url: "https://pub.dev" - source: hosted - version: "0.14.3" hive: dependency: transitive description: @@ -275,18 +307,18 @@ packages: dependency: transitive description: name: html - sha256: d9793e10dbe0e6c364f4c59bf3e01fb33a9b2a674bc7a1081693dba0614b6269 + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" url: "https://pub.dev" source: hosted - version: "0.15.1" + version: "0.15.5" http: dependency: transitive description: name: http - sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "1.2.2" http_parser: dependency: transitive description: @@ -299,218 +331,266 @@ packages: dependency: "direct main" description: name: image - sha256: "483a389d6ccb292b570c31b3a193779b1b0178e7eb571986d9a49904b6861227" + sha256: f31d52537dc417fdcde36088fdf11d191026fd5e4fae742491ebd40e5a8bea7d url: "https://pub.dev" source: hosted - version: "4.0.15" + version: "4.3.0" image_picker: dependency: "direct main" description: name: image_picker - sha256: "64b21d9f0e065f9ab0e4dde458076226c97382cc0c6949144cb874c62bf8e9f8" + sha256: b6951e25b795d053a6ba03af5f710069c99349de9341af95155d52665cb4607c url: "https://pub.dev" source: hosted - version: "0.8.7" + version: "0.8.9" image_picker_android: dependency: transitive description: name: image_picker_android - sha256: "420ed22d2c9ce767ed96df723aaebfeb20ce92dfda8665cd2ba72d72a51ae669" + sha256: "8faba09ba361d4b246dc0a17cb4289b3324c2b9f6db7b3d457ee69106a86bd32" url: "https://pub.dev" source: hosted - version: "0.8.6+1" + version: "0.8.12+17" image_picker_for_web: dependency: transitive description: name: image_picker_for_web - sha256: "98f50d6b9f294c8ba35e25cc0d13b04bfddd25dbc8d32fa9d566a6572f2c081c" + sha256: "869fe8a64771b7afbc99fc433a5f7be2fea4d1cb3d7c11a48b6b579eb9c797f0" url: "https://pub.dev" source: hosted - version: "2.1.12" + version: "2.2.0" image_picker_ios: dependency: transitive description: name: image_picker_ios - sha256: "50e882fe0a06bf0c8f7f5bce78d30975f279213293afc9471dc35f05617c50ff" + sha256: "4f0568120c6fcc0aaa04511cb9f9f4d29fc3d0139884b1d06be88dcec7641d6b" url: "https://pub.dev" source: hosted - version: "0.8.7+1" + version: "0.8.12+1" + image_picker_linux: + dependency: transitive + description: + name: image_picker_linux + sha256: "4ed1d9bb36f7cd60aa6e6cd479779cc56a4cb4e4de8f49d487b1aaad831300fa" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" + image_picker_macos: + dependency: transitive + description: + name: image_picker_macos + sha256: "3f5ad1e8112a9a6111c46d0b57a7be2286a9a07fc6e1976fdf5be2bd31d4ff62" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" image_picker_platform_interface: dependency: transitive description: name: image_picker_platform_interface - sha256: "1991219d9dbc42a99aff77e663af8ca51ced592cd6685c9485e3458302d3d4f8" + sha256: "9ec26d410ff46f483c5519c29c02ef0e02e13a543f882b152d4bfd2f06802f80" url: "https://pub.dev" source: hosted - version: "2.6.3" + version: "2.10.0" + image_picker_windows: + dependency: transitive + description: + name: image_picker_windows + sha256: "6ad07afc4eb1bc25f3a01084d28520496c4a3bb0cb13685435838167c9dcedeb" + url: "https://pub.dev" + source: hosted + version: "0.2.1+1" intl: dependency: transitive description: name: intl - sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + sha256: "99f282cb0e02edcbbf8c6b3bbc7c90b65635156c412e58f3975a7e55284ce685" url: "https://pub.dev" source: hosted - version: "0.17.0" + version: "0.20.0" js: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.7" json_annotation: dependency: transitive description: name: json_annotation - sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" linkify: dependency: transitive description: name: linkify - sha256: bdfbdafec6cdc9cd0ebb333a868cafc046714ad508e48be8095208c54691d959 + sha256: "4139ea77f4651ab9c315b577da2dd108d9aa0bd84b5d03d33323f1970c645832" url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "5.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: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + url: "https://pub.dev" + source: hosted + version: "1.15.0" + mime: + dependency: transitive + description: + name: mime + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.0.6" path: dependency: transitive description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.9.0" path_provider: dependency: "direct main" description: name: path_provider - sha256: "04890b994ee89bfa80bf3080bfec40d5a92c5c7a785ebb02c13084a099d2b6f9" + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.0.13" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: a776c088d671b27f6e3aa8881d64b87b3e80201c64e8869b811325de7a76c15e + sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a url: "https://pub.dev" source: hosted - version: "2.0.22" + version: "2.2.12" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "026b97a6c29da75181a37aae2eba9227f5fe13cb2838c6b975ce209328b8ab4e" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.4.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: ab0987bf95bc591da42dffb38c77398fc43309f0b9b894dcc5d6f40c4b26c379 + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 url: "https://pub.dev" source: hosted - version: "2.1.7" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: f0abc8ebd7253741f05488b4813d936b4d07c6bae3e86148a09e342ee4b08e76 + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.1.2" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: bcabbe399d4042b8ee687e17548d5d3f527255253b4a639f5f8d2094a9c2b45c + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.3.0" petitparser: dependency: transitive description: name: petitparser - sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "6.0.2" photo_view: dependency: transitive description: name: photo_view - sha256: aedb4371e5bf67546ecd92aed341df714f9de5db7c417ce7538a91c2b43d931a + sha256: "1fc3d970a91295fbd1364296575f854c9863f225505c28c46e0a03e48960c75e" url: "https://pub.dev" source: hosted - version: "0.12.0" + version: "0.15.0" platform: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: dbf0f707c78beedc9200146ad3cb0ab4d5da13c246336987be6940f026500d3a + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.3" - pointycastle: + version: "2.1.8" + riverpod: dependency: transitive description: - name: pointycastle - sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346 + name: riverpod + sha256: "59062512288d3056b2321804332a13ffdd1bf16df70dcc8e506e411280a72959" url: "https://pub.dev" source: hosted - version: "3.6.2" - process: + version: "2.6.1" + scroll_to_index: dependency: transitive description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" + name: scroll_to_index + sha256: b707546e7500d9f070d63e5acf74fd437ec7eeeb68d3412ef7b0afada0b4f176 url: "https://pub.dev" source: hosted - version: "4.2.4" - riverpod: - dependency: transitive - description: - name: riverpod - sha256: "13cbe0e17b659f38027986df967b3eaf7f42c519786352167fc3db1be44eae07" - url: "https://pub.dev" - source: hosted - version: "0.14.0+3" + version: "3.0.1" sky_engine: dependency: transitive description: flutter @@ -520,34 +600,42 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "7.0.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" state_notifier: dependency: transitive description: name: state_notifier - sha256: "8fe42610f179b843b12371e40db58c9444f8757f8b69d181c97e50787caed289" + sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb url: "https://pub.dev" source: hosted - version: "0.7.2+1" + version: "1.0.0" 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: @@ -560,10 +648,10 @@ packages: dependency: transitive description: name: synchronized - sha256: "33b31b6beb98100bf9add464a36a8dd03eb10c7a8cf15aeec535e9b054aaf04b" + sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.3.0+3" term_glyph: dependency: transitive description: @@ -576,90 +664,90 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.7.2" typed_data: dependency: transitive description: name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.4.0" url_launcher: dependency: transitive description: name: url_launcher - sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e" + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" url: "https://pub.dev" source: hosted - version: "6.1.10" + version: "6.3.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "3e2f6dfd2c7d9cd123296cab8ef66cfc2c1a13f5845f42c7a0f365690a8a7dd1" + sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193" url: "https://pub.dev" source: hosted - version: "6.0.23" + version: "6.3.14" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: bb328b24d3bccc20bdf1024a0990ac4f869d57663660de9c936fb8c043edefe3 + sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e url: "https://pub.dev" source: hosted - version: "6.0.18" + version: "6.3.1" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: "318c42cba924e18180c029be69caf0a1a710191b9ec49bb42b5998fdcccee3cc" + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.2.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "41988b55570df53b3dd2a7fc90c76756a963de6a8c5f8e113330cb35992e2094" + sha256: "769549c999acdb42b8bcfa7c43d72bf79a382ca7441ab18a808e101149daf672" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.2.1" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - sha256: "4eae912628763eb48fc214522e58e942fd16ce195407dbf45638239523c759a6" + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.3.2" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: "44d79408ce9f07052095ef1f9a693c258d6373dc3944249374e30eff7219ccb0" + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.0.14" + version: "2.3.3" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "387e227c4b979034cc52afb11d66b04ed9b288ca1f45beeef39b2ea69e714fa5" + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.1.3" uuid: dependency: transitive description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_math: dependency: transitive description: @@ -668,70 +756,102 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + url: "https://pub.dev" + source: hosted + version: "14.2.5" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: ca49c0bc209c687b887f30527fb6a9d80040b072cc2990f34b9bec3e7663101b + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "3.0.1" webview_flutter: dependency: transitive description: name: webview_flutter - sha256: b6cd42db3ced5411f3d01599906156885b18e4188f7065a8a351eb84bee347e0 + sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec" url: "https://pub.dev" source: hosted - version: "4.0.6" + version: "4.10.0" webview_flutter_android: dependency: transitive description: name: webview_flutter_android - sha256: c849dcb6bf7367f696869006fb9575c15bdc6a1d624ae13f12de5a147a740b12 + sha256: "285cedfd9441267f6cca8843458620b5fda1af75b04f5818d0441acda5d7df19" url: "https://pub.dev" source: hosted - version: "3.4.2" + version: "4.1.0" webview_flutter_platform_interface: dependency: transitive description: name: webview_flutter_platform_interface - sha256: "1939c39e2150fb4d30fd3cc59a891a49fed9935db53007df633ed83581b6117b" + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.10.0" webview_flutter_wkwebview: dependency: transitive description: name: webview_flutter_wkwebview - sha256: ab12479f7a0cf112b9420c36aaf206a1ca47cd60cd42de74a4be2e97a697587b + sha256: b7e92f129482460951d96ef9a46b49db34bd2e1621685de26e9eaafd9674e7eb url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.16.3" win32: dependency: transitive description: name: win32 - sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 + sha256: "84ba388638ed7a8cb3445a320c8273136ab2631cd5f2c57888335504ddab1bc2" url: "https://pub.dev" source: hosted - version: "3.1.3" + version: "5.8.0" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: bd512f03919aac5f1313eb8249f223bacf4927031bf60b02601f81f687689e86 + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "0.2.0+3" + version: "1.1.0" 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.18.0 <3.0.0" - flutter: ">=3.3.0" + dart: ">=3.5.3 <4.0.0" + flutter: ">=3.24.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 8631553..66fe961 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -18,7 +18,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.7.0 <3.0.0" + sdk: "^3.5.3" dependencies: flutter: diff --git a/lib/data/local/entity/chatwoot_user.dart b/lib/data/local/entity/chatwoot_user.dart index 159f593..05f8576 100644 --- a/lib/data/local/entity/chatwoot_user.dart +++ b/lib/data/local/entity/chatwoot_user.dart @@ -35,6 +35,11 @@ class ChatwootUser extends Equatable { @HiveField(4) final String? avatarUrl; + ///phone number of user + @JsonKey(name: "phone_number") + @HiveField(6) + final String? phoneNumber; + ///any other custom attributes to be linked to the user @JsonKey(name: "custom_attributes") @HiveField(5) @@ -45,6 +50,7 @@ class ChatwootUser extends Equatable { this.identifierHash, this.name, this.email, + this.phoneNumber, this.avatarUrl, this.customAttributes}); diff --git a/lib/data/remote/service/chatwoot_client_auth_service.dart b/lib/data/remote/service/chatwoot_client_auth_service.dart index e809b5c..438c3bb 100644 --- a/lib/data/remote/service/chatwoot_client_auth_service.dart +++ b/lib/data/remote/service/chatwoot_client_auth_service.dart @@ -44,9 +44,9 @@ class ChatwootClientAuthServiceImpl extends ChatwootClientAuthService { createResponse.statusMessage ?? "unknown error", ChatwootClientExceptionType.CREATE_CONTACT_FAILED); } - } on DioError catch (e) { + } on DioException catch (e) { throw ChatwootClientException( - e.message, ChatwootClientExceptionType.CREATE_CONTACT_FAILED); + e.message ?? '', ChatwootClientExceptionType.CREATE_CONTACT_FAILED); } } @@ -67,9 +67,9 @@ class ChatwootClientAuthServiceImpl extends ChatwootClientAuthService { createResponse.statusMessage ?? "unknown error", ChatwootClientExceptionType.CREATE_CONVERSATION_FAILED); } - } on DioError catch (e) { + } on DioException catch (e) { throw ChatwootClientException( - e.message, ChatwootClientExceptionType.CREATE_CONVERSATION_FAILED); + e.message ?? '', ChatwootClientExceptionType.CREATE_CONVERSATION_FAILED); } } } diff --git a/lib/data/remote/service/chatwoot_client_service.dart b/lib/data/remote/service/chatwoot_client_service.dart index 3a7a965..f1223ba 100644 --- a/lib/data/remote/service/chatwoot_client_service.dart +++ b/lib/data/remote/service/chatwoot_client_service.dart @@ -58,9 +58,9 @@ class ChatwootClientServiceImpl extends ChatwootClientService { createResponse.statusMessage ?? "unknown error", ChatwootClientExceptionType.SEND_MESSAGE_FAILED); } - } on DioError catch (e) { + } on DioException catch (e) { throw ChatwootClientException( - e.message, ChatwootClientExceptionType.SEND_MESSAGE_FAILED); + e.message ?? '', ChatwootClientExceptionType.SEND_MESSAGE_FAILED); } } @@ -79,9 +79,9 @@ class ChatwootClientServiceImpl extends ChatwootClientService { createResponse.statusMessage ?? "unknown error", ChatwootClientExceptionType.GET_MESSAGES_FAILED); } - } on DioError catch (e) { + } on DioException catch (e) { throw ChatwootClientException( - e.message, ChatwootClientExceptionType.GET_MESSAGES_FAILED); + e.message ?? '', ChatwootClientExceptionType.GET_MESSAGES_FAILED); } } @@ -98,9 +98,9 @@ class ChatwootClientServiceImpl extends ChatwootClientService { createResponse.statusMessage ?? "unknown error", ChatwootClientExceptionType.GET_CONTACT_FAILED); } - } on DioError catch (e) { + } on DioException catch (e) { throw ChatwootClientException( - e.message, ChatwootClientExceptionType.GET_CONTACT_FAILED); + e.message ?? '', ChatwootClientExceptionType.GET_CONTACT_FAILED); } } @@ -119,9 +119,9 @@ class ChatwootClientServiceImpl extends ChatwootClientService { createResponse.statusMessage ?? "unknown error", ChatwootClientExceptionType.GET_CONVERSATION_FAILED); } - } on DioError catch (e) { + } on DioException catch (e) { throw ChatwootClientException( - e.message, ChatwootClientExceptionType.GET_CONVERSATION_FAILED); + e.message ?? '', ChatwootClientExceptionType.GET_CONVERSATION_FAILED); } } @@ -139,9 +139,9 @@ class ChatwootClientServiceImpl extends ChatwootClientService { updateResponse.statusMessage ?? "unknown error", ChatwootClientExceptionType.UPDATE_CONTACT_FAILED); } - } on DioError catch (e) { + } on DioException catch (e) { throw ChatwootClientException( - e.message, ChatwootClientExceptionType.UPDATE_CONTACT_FAILED); + e.message ?? '', ChatwootClientExceptionType.UPDATE_CONTACT_FAILED); } } @@ -160,9 +160,9 @@ class ChatwootClientServiceImpl extends ChatwootClientService { updateResponse.statusMessage ?? "unknown error", ChatwootClientExceptionType.UPDATE_MESSAGE_FAILED); } - } on DioError catch (e) { + } on DioException catch (e) { throw ChatwootClientException( - e.message, ChatwootClientExceptionType.UPDATE_MESSAGE_FAILED); + e.message ?? '', ChatwootClientExceptionType.UPDATE_MESSAGE_FAILED); } } diff --git a/lib/ui/chatwoot_chat_page.dart b/lib/ui/chatwoot_chat_page.dart index 19ed99a..0ab26b1 100644 --- a/lib/ui/chatwoot_chat_page.dart +++ b/lib/ui/chatwoot_chat_page.dart @@ -43,7 +43,7 @@ class ChatwootChat extends StatefulWidget { final double? onEndReachedThreshold; /// See [Message.onMessageLongPress] - final void Function(types.Message)? onMessageLongPress; + final void Function(BuildContext context, types.Message)? onMessageLongPress; /// See [Message.onMessageTap] final void Function(types.Message)? onMessageTap; @@ -51,16 +51,13 @@ class ChatwootChat extends StatefulWidget { /// See [Input.onSendPressed] final void Function(types.PartialText)? onSendPressed; - /// See [Input.onTextChanged] - final void Function(String)? onTextChanged; - /// Show avatars for received messages. final bool showUserAvatars; /// Show user names for received messages. final bool showUserNames; - final ChatwootChatTheme theme; + final ChatwootChatTheme? theme; /// See [ChatwootL10n] final ChatwootL10n l10n; @@ -128,10 +125,9 @@ class ChatwootChat extends StatefulWidget { this.onMessageLongPress, this.onMessageTap, this.onSendPressed, - this.onTextChanged, this.showUserAvatars = true, this.showUserNames = true, - this.theme = const ChatwootChatTheme(), + this.theme, this.l10n = const ChatwootL10n(), this.timeFormat, this.dateFormat, @@ -333,7 +329,7 @@ class _ChatwootChatState extends State { }); } - void _handleMessageTap(types.Message message) async { + void _handleMessageTap(BuildContext context, types.Message message) async { if (message.status == types.Status.error && message is types.TextMessage) { _handleResendMessage(message); } @@ -345,7 +341,9 @@ class _ChatwootChatState extends State { types.PreviewData previewData, ) { final index = _messages.indexWhere((element) => element.id == message.id); - final updatedMessage = _messages[index].copyWith(previewData: previewData); + final updatedMetaData = _messages[index].metadata ?? Map(); + updatedMetaData["previewData"] = previewData; + final updatedMessage = _messages[index].copyWith(metadata: updatedMetaData); WidgetsBinding.instance.addPostFrameCallback((_) { setState(() { @@ -402,7 +400,7 @@ class _ChatwootChatState extends State { final horizontalPadding = widget.isPresentedInDialog ? 8.0 : 16.0; return Scaffold( appBar: widget.appBar, - backgroundColor: widget.theme.backgroundColor, + backgroundColor: widget.theme?.backgroundColor, body: Column( children: [ Flexible( @@ -418,12 +416,11 @@ class _ChatwootChatState extends State { onEndReached: widget.onEndReached, onEndReachedThreshold: widget.onEndReachedThreshold, onMessageLongPress: widget.onMessageLongPress, - onTextChanged: widget.onTextChanged, showUserAvatars: widget.showUserAvatars, showUserNames: widget.showUserNames, timeFormat: widget.timeFormat ?? DateFormat.Hm(), dateFormat: widget.timeFormat ?? DateFormat("EEEE MMMM d"), - theme: widget.theme, + theme: widget.theme ?? ChatwootChatTheme(), l10n: widget.l10n, ), ), diff --git a/lib/ui/chatwoot_chat_theme.dart b/lib/ui/chatwoot_chat_theme.dart index a8d5c24..9b7a1bd 100644 --- a/lib/ui/chatwoot_chat_theme.dart +++ b/lib/ui/chatwoot_chat_theme.dart @@ -4,6 +4,11 @@ import 'package:flutter_chat_ui/flutter_chat_ui.dart'; const CHATWOOT_COLOR_PRIMARY = Color(0xff1f93ff); const CHATWOOT_BG_COLOR = Color(0xfff4f6fb); const CHATWOOT_AVATAR_COLORS = [CHATWOOT_COLOR_PRIMARY]; +const NEUTRAL_2 = Colors.grey; +const NEUTRAL_0 = Colors.black26; +const NEUTRAL_7 = Colors.black; +const NEUTRAL_7_WITH_OPACITY = Colors.black54; +const PRIMARY = CHATWOOT_COLOR_PRIMARY; /// Default chatwoot chat theme which extends [ChatTheme] @immutable @@ -27,7 +32,7 @@ class ChatwootChatTheme extends ChatTheme { fontWeight: FontWeight.w500, height: 1.5, ), - Color errorColor = ERROR, + Color errorColor = Colors.red, Widget? errorIcon, Color inputBackgroundColor = Colors.white, BorderRadius inputBorderRadius = const BorderRadius.all( @@ -108,6 +113,38 @@ class ChatwootChatTheme extends ChatTheme { fontWeight: FontWeight.w800, height: 1.333, ), + EdgeInsets? attachmentButtonMargin, + EdgeInsets dateDividerMargin = const EdgeInsets.all(8), + Color inputSurfaceTintColor = Colors.blueAccent, + double inputElevation= 0, + EdgeInsets inputMargin = const EdgeInsets.all(8), + EdgeInsets inputPadding= const EdgeInsets.all(8), + InputDecoration inputTextDecoration= const InputDecoration(), + double messageInsetsHorizontal= 8, + double messageInsetsVertical= 8, + double messageMaxWidth= 500, + TextStyle receivedEmojiMessageTextStyle= const TextStyle(), + EdgeInsets sendButtonMargin= const EdgeInsets.all(8), + TextStyle sentEmojiMessageTextStyle= const TextStyle(), + EdgeInsets statusIconPadding= const EdgeInsets.all(8), + SystemMessageTheme systemMessageTheme= const SystemMessageTheme( + margin: const EdgeInsets.all(8), + textStyle: const TextStyle() + ), + TypingIndicatorTheme typingIndicatorTheme= const TypingIndicatorTheme( + animatedCirclesColor: CHATWOOT_COLOR_PRIMARY, + animatedCircleSize: 8, + bubbleBorder: const BorderRadius.all(const Radius.circular(8)), + bubbleColor: CHATWOOT_COLOR_PRIMARY, + countAvatarColor: CHATWOOT_COLOR_PRIMARY, + countTextColor: NEUTRAL_7, + multipleUserTextStyle: const TextStyle() + ), + UnreadHeaderTheme unreadHeaderTheme= const UnreadHeaderTheme( + color: CHATWOOT_COLOR_PRIMARY, + textStyle: const TextStyle() + ), + Color userAvatarImageBackgroundColor= Colors.grey, }) : super( attachmentButtonIcon: attachmentButtonIcon, backgroundColor: backgroundColor, @@ -142,5 +179,23 @@ class ChatwootChatTheme extends ChatTheme { userAvatarNameColors: userAvatarNameColors, userAvatarTextStyle: userAvatarTextStyle, userNameTextStyle: userNameTextStyle, + attachmentButtonMargin: attachmentButtonMargin, + dateDividerMargin: dateDividerMargin, + inputSurfaceTintColor: inputSurfaceTintColor, + inputElevation: inputElevation, + inputMargin: inputMargin, + inputPadding: inputPadding, + inputTextDecoration: inputTextDecoration, + messageInsetsHorizontal: messageInsetsHorizontal, + messageInsetsVertical: messageInsetsVertical, + messageMaxWidth: messageMaxWidth, + receivedEmojiMessageTextStyle: receivedEmojiMessageTextStyle, + sendButtonMargin: sendButtonMargin, + sentEmojiMessageTextStyle: sentEmojiMessageTextStyle, + statusIconPadding: statusIconPadding, + systemMessageTheme: systemMessageTheme, + typingIndicatorTheme: typingIndicatorTheme, + unreadHeaderTheme: unreadHeaderTheme, + userAvatarImageBackgroundColor: userAvatarImageBackgroundColor, ); } diff --git a/lib/ui/chatwoot_l10n.dart b/lib/ui/chatwoot_l10n.dart index ed6d187..0cbd89d 100644 --- a/lib/ui/chatwoot_l10n.dart +++ b/lib/ui/chatwoot_l10n.dart @@ -29,6 +29,18 @@ class ChatwootL10n extends ChatL10n { /// Message when agent resolves conversation final String conversationResolvedMessage; + /// Message when agent resolves conversation + final String and; + + /// Message when agent resolves conversation + final String isTyping; + + /// Message when agent resolves conversation + final String others; + + /// Message when agent resolves conversation + final String unreadMessagesLabel; + /// Creates a new chatwoot l10n const ChatwootL10n( {this.attachmentButtonAccessibilityLabel = "", @@ -39,13 +51,22 @@ class ChatwootL10n extends ChatL10n { this.typingText = "typing...", this.inputPlaceholder = "Type your message", this.sendButtonAccessibilityLabel = "Send Message", - this.conversationResolvedMessage = - "Your ticket has been marked as resolved"}) + this.conversationResolvedMessage = "Your ticket has been marked as resolved", + this.and = "and", + this.isTyping = "is typing...", + this.others = "others", + this.unreadMessagesLabel = "Your ticket has been marked as resolved" + }) : super( attachmentButtonAccessibilityLabel: attachmentButtonAccessibilityLabel, emptyChatPlaceholder: emptyChatPlaceholder, fileButtonAccessibilityLabel: fileButtonAccessibilityLabel, inputPlaceholder: inputPlaceholder, - sendButtonAccessibilityLabel: sendButtonAccessibilityLabel); + sendButtonAccessibilityLabel: sendButtonAccessibilityLabel, + and: and, + isTyping: isTyping, + others: others, + unreadMessagesLabel: unreadMessagesLabel + ); } diff --git a/pubspec.lock b/pubspec.lock index 0d1087e..85ec771 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,34 +5,39 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "98d1d33ed129b372846e862de23a0fc365745f4d7b5e786ce667fcbbb7ac5c07" + sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 url: "https://pub.dev" source: hosted - version: "55.0.0" + version: "72.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.3.2" analyzer: dependency: transitive description: name: analyzer - sha256: "881348aed9b0b425882c97732629a6a31093c8ff20fc4b3b03fb9d3d50a3a126" + sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 url: "https://pub.dev" source: hosted - version: "5.7.1" + version: "6.7.0" args: dependency: transitive description: name: args - sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440" + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.6.0" async: dependency: "direct main" 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: @@ -45,10 +50,10 @@ packages: dependency: transitive description: name: build - sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.1" build_config: dependency: transitive description: @@ -61,34 +66,34 @@ packages: dependency: transitive description: name: build_daemon - sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "4.0.2" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: db49b8609ef8c81cca2b310618c3017c00f03a92af44c04d310b907b2d692d95 + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.4.2" build_runner: dependency: "direct dev" description: name: build_runner - sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 + sha256: "028819cfb90051c6b5440c7e574d1896f8037e3c96cf17aaeb054c9311cfbf4d" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.4.13" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "0db1b64c84fa803603fa406f8721959036e898cc9575d6ce4a3067581b9276c0" + sha256: f8126682b87a7282a339b871298cc12009cb67109cfa1614d6436fb0289193e0 url: "https://pub.dev" source: hosted - version: "7.2.2" + version: "7.3.2" built_collection: dependency: transitive description: @@ -101,26 +106,26 @@ packages: dependency: transitive description: name: built_value - sha256: "31b7c748fd4b9adf8d25d72a4c4a59ef119f12876cf414f94f8af5131d5fa2b0" + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb url: "https://pub.dev" source: hosted - version: "8.4.4" + version: "8.9.2" characters: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" checked_yaml: dependency: transitive description: name: checked_yaml - sha256: dd007e4fb8270916820a0d66e24f619266b60773cddd082c6439341645af2659 + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.3" clock: dependency: transitive description: @@ -133,74 +138,82 @@ packages: dependency: transitive description: name: code_builder - sha256: "0d43dd1288fd145de1ecc9a3948ad4a6d5a82f0a14c4fdd0892260787d975cbe" + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" url: "https://pub.dev" source: hosted - version: "4.4.0" + version: "4.10.1" collection: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.18.0" convert: dependency: transitive description: name: convert - sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" crypto: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.6" csslib: dependency: transitive description: name: csslib - sha256: b36c7f7e24c0bdf1bf9a3da461c837d1de64b9f8beb190c9011d8c72a3dfd745 + sha256: "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e" url: "https://pub.dev" source: hosted - version: "0.17.2" + version: "1.0.2" dart_style: dependency: transitive description: name: dart_style - sha256: "6d691edde054969f0e0f26abb1b30834b5138b963793e56f69d3a9a4435e6352" + sha256: "7856d364b589d1f08986e140938578ed36ed948581fbc3bc9aef1805039ac5ab" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.7" diffutil_dart: dependency: transitive description: name: diffutil_dart - sha256: "21bcad3fcc89389da5c72c59b9da31eabb301a6548f715c17b0dfdd27d2ac6d5" + sha256: "5e74883aedf87f3b703cb85e815bdc1ed9208b33501556e4a8a5572af9845c81" url: "https://pub.dev" source: hosted - version: "2.0.0+1" + version: "4.0.1" dio: dependency: "direct main" description: name: dio - sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8" + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" + url: "https://pub.dev" + source: hosted + version: "5.7.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8" url: "https://pub.dev" source: hosted - version: "4.0.6" + version: "2.0.0" equatable: dependency: "direct main" description: name: equatable - sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 + sha256: "567c64b3cb4cf82397aac55f4f0cbd3ca20d77c6c03bedbc4ceaddc08904aef7" url: "https://pub.dev" source: hosted - version: "2.0.5" + version: "2.0.7" fake_async: dependency: transitive description: @@ -213,26 +226,26 @@ packages: dependency: transitive description: name: ffi - sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.3" file: dependency: transitive description: name: file - sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "7.0.1" fixnum: dependency: transitive description: name: fixnum - sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" flutter: dependency: "direct main" description: flutter @@ -242,90 +255,98 @@ packages: dependency: "direct main" description: name: flutter_chat_types - sha256: cb9e72c6dee5f32e4b379b6b953dff95253c54242ee4e21ad81652b11902d5a8 + sha256: e285b588f6d19d907feb1f6d912deaf22e223656769c34093b64e1c59b094fb9 url: "https://pub.dev" source: hosted - version: "2.4.3" + version: "3.6.2" flutter_chat_ui: dependency: "direct main" description: name: flutter_chat_ui - sha256: "9c19396e59de978da092a935a04542ecf9746e3d75b9b7a038638e2a1982a5a1" + sha256: "168a4231464ad00a17ea5f0813f1b58393bdd4035683ea4dc37bbe26be62891e" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.6.15" flutter_link_previewer: dependency: transitive description: name: flutter_link_previewer - sha256: "0adc16359ce8385d623ee4b2985e702d7766d52e351bf0fd6a12366f8e49a63f" + sha256: "007069e60f42419fb59872beb7a3cc3ea21e9f1bdff5d40239f376fa62ca9f20" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "3.2.2" flutter_linkify: dependency: transitive description: name: flutter_linkify - sha256: c89fe74de985ec22f23d3538d2249add085a4f37ac1c29fd79e1a207efb81d63 + sha256: "74669e06a8f358fee4512b4320c0b80e51cffc496607931de68d28f099254073" url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "6.0.0" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "5.0.0" + flutter_parsed_text: + dependency: transitive + description: + name: flutter_parsed_text + sha256: "529cf5793b7acdf16ee0f97b158d0d4ba0bf06e7121ef180abe1a5b59e32c1e2" + url: "https://pub.dev" + source: hosted + version: "2.2.1" flutter_secure_storage: dependency: "direct main" description: name: flutter_secure_storage - sha256: "98352186ee7ad3639ccc77ad7924b773ff6883076ab952437d20f18a61f0a7c5" + sha256: "165164745e6afb5c0e3e3fcc72a012fb9e58496fb26ffb92cf22e16a821e85d0" url: "https://pub.dev" source: hosted - version: "8.0.0" + version: "9.2.2" flutter_secure_storage_linux: dependency: transitive description: name: flutter_secure_storage_linux - sha256: "0912ae29a572230ad52d8a4697e5518d7f0f429052fd51df7e5a7952c7efe2a3" + sha256: "4d91bfc23047422cbcd73ac684bc169859ee766482517c22172c86596bf1464b" url: "https://pub.dev" source: hosted - version: "1.1.3" + version: "1.2.1" flutter_secure_storage_macos: dependency: transitive description: name: flutter_secure_storage_macos - sha256: "083add01847fc1c80a07a08e1ed6927e9acd9618a35e330239d4422cd2a58c50" + sha256: "1693ab11121a5f925bbea0be725abfcfbbcf36c1e29e571f84a0c0f436147a81" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "3.1.2" flutter_secure_storage_platform_interface: dependency: transitive description: name: flutter_secure_storage_platform_interface - sha256: b3773190e385a3c8a382007893d678ae95462b3c2279e987b55d140d3b0cb81b + sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8 url: "https://pub.dev" source: hosted - version: "1.0.1" + version: "1.1.2" flutter_secure_storage_web: dependency: transitive description: name: flutter_secure_storage_web - sha256: "42938e70d4b872e856e678c423cc0e9065d7d294f45bc41fc1981a4eb4beaffe" + sha256: f4ebff989b4f07b2656fb16b47852c0aab9fed9b4ec1c70103368337bc1886a9 url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.1" flutter_secure_storage_windows: dependency: transitive description: name: flutter_secure_storage_windows - sha256: fc2910ec9b28d60598216c29ea763b3a96c401f0ce1d13cdf69ccb0e5c93c3ee + sha256: b20b07cb5ed4ed74fc567b78a72936203f587eba460af1df11281c9326cd3709 url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "3.1.2" flutter_test: dependency: "direct dev" description: flutter @@ -336,38 +357,30 @@ packages: description: flutter source: sdk version: "0.0.0" - freezed_annotation: - dependency: transitive - description: - name: freezed_annotation - sha256: "70776c4541e5cacfe45bcaf00fe79137b8c61aa34fb5765a05ce6c57fd72c6e9" - url: "https://pub.dev" - source: hosted - version: "0.14.3" frontend_server_client: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" glob: dependency: transitive description: name: glob - sha256: "4515b5b6ddb505ebdd242a5f2cc5d22d3d6a80013789debfbda7777f47ea308c" + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" graphs: dependency: transitive description: name: graphs - sha256: f9e130f3259f52d26f0cfc0e964513796dafed572fa52e45d2f8d6ca14db39b2 + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.2" hive: dependency: "direct main" description: @@ -388,26 +401,26 @@ packages: dependency: "direct dev" description: name: hive_generator - sha256: "65998cc4d2cd9680a3d9709d893d2f6bb15e6c1f92626c3f1fa650b4b3281521" + sha256: "06cb8f58ace74de61f63500564931f9505368f45f98958bd7a6c35ba24159db4" url: "https://pub.dev" source: hosted - version: "2.0.0" + version: "2.0.1" html: dependency: transitive description: name: html - sha256: "79d498e6d6761925a34ee5ea8fa6dfef38607781d2fa91e37523474282af55cb" + sha256: "1fc58edeaec4307368c60d59b7e15b9d658b57d7f3125098b6294153c75337ec" url: "https://pub.dev" source: hosted - version: "0.15.2" + version: "0.15.5" http: dependency: transitive description: name: http - sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "1.2.2" http_multi_server: dependency: transitive description: @@ -428,10 +441,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + sha256: "99f282cb0e02edcbbf8c6b3bbc7c90b65635156c412e58f3975a7e55284ce685" url: "https://pub.dev" source: hosted - version: "0.17.0" + version: "0.20.0" io: dependency: transitive description: @@ -444,90 +457,122 @@ packages: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.7" json_annotation: dependency: "direct main" description: name: json_annotation - sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "4.9.0" json_serializable: dependency: "direct dev" description: name: json_serializable - sha256: dadc08bd61f72559f938dd08ec20dbfec6c709bba83515085ea943d2078d187a + sha256: c2fcb3920cf2b6ae6845954186420fca40bc0a8abcc84903b7801f17d7050d7c + url: "https://pub.dev" + source: hosted + version: "6.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + url: "https://pub.dev" + source: hosted + version: "10.0.5" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + url: "https://pub.dev" + source: hosted + version: "3.0.5" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "6.6.1" + version: "3.0.1" linkify: dependency: transitive description: name: linkify - sha256: bdfbdafec6cdc9cd0ebb333a868cafc046714ad508e48be8095208c54691d959 + sha256: "4139ea77f4651ab9c315b577da2dd108d9aa0bd84b5d03d33323f1970c645832" url: "https://pub.dev" source: hosted - version: "4.1.0" + version: "5.0.0" lints: dependency: transitive description: name: lints - sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "5.0.0" logging: dependency: transitive description: name: logging - sha256: "04094f2eb032cbb06c6f6e8d3607edcfcb0455e2bb6cbc010cb01171dcb64e6d" + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.3.0" + macros: + dependency: transitive + description: + name: macros + sha256: "0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536" + url: "https://pub.dev" + source: hosted + version: "0.1.2-main.4" 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: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.15.0" mime: dependency: transitive description: name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" mockito: dependency: "direct dev" description: name: mockito - sha256: "2a8a17b82b1bde04d514e75d90d634a0ac23f6cb4991f6098009dd56836aeafe" + sha256: "6841eed20a7befac0ce07df8116c8b8233ed1f4486a7647c7fc5a02ae6163917" url: "https://pub.dev" source: hosted - version: "5.3.2" + version: "5.4.4" package_config: dependency: transitive description: @@ -540,82 +585,82 @@ packages: dependency: transitive description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.9.0" path_provider: dependency: "direct main" description: name: path_provider - sha256: "04890b994ee89bfa80bf3080bfec40d5a92c5c7a785ebb02c13084a099d2b6f9" + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.0.13" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "019f18c9c10ae370b08dce1f3e3b73bc9f58e7f087bb5e921f06529438ac0ae7" + sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a url: "https://pub.dev" source: hosted - version: "2.0.24" + version: "2.2.12" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "026b97a6c29da75181a37aae2eba9227f5fe13cb2838c6b975ce209328b8ab4e" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.4.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: "2ae08f2216225427e64ad224a24354221c2c7907e448e6e0e8b57b1eb9f10ad1" + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 url: "https://pub.dev" source: hosted - version: "2.1.10" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: "57585299a729335f1298b43245842678cb9f43a6310351b18fb577d6e33165ec" + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.1.2" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: f53720498d5a543f9607db4b0e997c4b5438884de25b0f73098cc2671a51b130 + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.3.0" photo_view: dependency: transitive description: name: photo_view - sha256: aedb4371e5bf67546ecd92aed341df714f9de5db7c417ce7538a91c2b43d931a + sha256: "1fc3d970a91295fbd1364296575f854c9863f225505c28c46e0a03e48960c75e" url: "https://pub.dev" source: hosted - version: "0.12.0" + version: "0.15.0" platform: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc" + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.8" pool: dependency: transitive description: @@ -624,54 +669,54 @@ packages: url: "https://pub.dev" source: hosted version: "1.5.1" - process: - dependency: transitive - description: - name: process - sha256: "53fd8db9cec1d37b0574e12f07520d582019cb6c44abf5479a01505099a34a09" - url: "https://pub.dev" - source: hosted - version: "4.2.4" pub_semver: dependency: transitive description: name: pub_semver - sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" pubspec_parse: dependency: transitive description: name: pubspec_parse - sha256: "0e01f805457ef610ccaf8d18067596afc34107a27149778b06b2083edbc140c1" + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.3.0" riverpod: dependency: "direct main" description: name: riverpod - sha256: "13cbe0e17b659f38027986df967b3eaf7f42c519786352167fc3db1be44eae07" + sha256: "59062512288d3056b2321804332a13ffdd1bf16df70dcc8e506e411280a72959" + url: "https://pub.dev" + source: hosted + version: "2.6.1" + scroll_to_index: + dependency: transitive + description: + name: scroll_to_index + sha256: b707546e7500d9f070d63e5acf74fd437ec7eeeb68d3412ef7b0afada0b4f176 url: "https://pub.dev" source: hosted - version: "0.14.0+3" + version: "3.0.1" shelf: dependency: transitive description: name: shelf - sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8 + sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67 url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "2.0.1" sky_engine: dependency: transitive description: flutter @@ -681,50 +726,58 @@ packages: dependency: transitive description: name: source_gen - sha256: c2bea18c95cfa0276a366270afaa2850b09b4a76db95d546f3d003dcc7011298 + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" url: "https://pub.dev" source: hosted - version: "1.2.7" + version: "1.5.0" source_helper: dependency: transitive description: name: source_helper - sha256: "3b67aade1d52416149c633ba1bb36df44d97c6b51830c2198e934e3fca87ca1f" + sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd" url: "https://pub.dev" source: hosted - version: "1.3.3" + version: "1.3.4" source_span: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "7.0.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" state_notifier: dependency: transitive description: name: state_notifier - sha256: "8fe42610f179b843b12371e40db58c9444f8757f8b69d181c97e50787caed289" + sha256: b8677376aa54f2d7c58280d5a007f9e8774f1968d1fb1c096adcb4792fba29bb url: "https://pub.dev" source: hosted - version: "0.7.2+1" + version: "1.0.0" stream_channel: dependency: "direct main" description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -745,10 +798,10 @@ packages: dependency: "direct main" description: name: synchronized - sha256: "33b31b6beb98100bf9add464a36a8dd03eb10c7a8cf15aeec535e9b054aaf04b" + sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.3.0+3" term_glyph: dependency: transitive description: @@ -761,98 +814,98 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.7.2" timing: dependency: transitive description: name: timing - sha256: c386d07d7f5efc613479a7c4d9d64b03710b03cfaa7e8ad5f2bfb295a1f0dfad + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.0.1" typed_data: dependency: transitive description: name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.4.0" url_launcher: dependency: "direct main" description: name: url_launcher - sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e" + sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" url: "https://pub.dev" source: hosted - version: "6.1.10" + version: "6.3.1" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "845530e5e05db5500c1a4c1446785d60cbd8f9bd45e21e7dd643a3273bb4bbd1" + sha256: "6fc2f56536ee873eeb867ad176ae15f304ccccc357848b351f6f0d8d4a40d193" url: "https://pub.dev" source: hosted - version: "6.0.25" + version: "6.3.14" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "7ab1e5b646623d6a2537aa59d5d039f90eebef75a7c25e105f6f75de1f7750c3" + sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e url: "https://pub.dev" source: hosted - version: "6.1.2" + version: "6.3.1" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: "206fb8334a700ef7754d6a9ed119e7349bc830448098f21a69bf1b4ed038cabc" + sha256: "4e9ba368772369e3e08f231d2301b4ef72b9ff87c31192ef471b380ef29a4935" url: "https://pub.dev" source: hosted - version: "3.0.4" + version: "3.2.1" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "0ef2b4f97942a16523e51256b799e9aa1843da6c60c55eefbfa9dbc2dcb8331a" + sha256: "769549c999acdb42b8bcfa7c43d72bf79a382ca7441ab18a808e101149daf672" url: "https://pub.dev" source: hosted - version: "3.0.4" + version: "3.2.1" 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: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.0.16" + version: "2.3.3" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: a83ba3607a507758669cfafb03f9de09bf6e6280c14d9b9cb18f013e406dcacd + sha256: "44cf3aabcedde30f2dba119a9dea3b0f2672fbe6fa96e85536251d678216b3c4" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.1.3" uuid: dependency: "direct main" description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "4.5.1" vector_math: dependency: transitive description: @@ -861,78 +914,110 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + visibility_detector: + dependency: transitive + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + url: "https://pub.dev" + source: hosted + version: "14.2.5" watcher: dependency: transitive description: name: watcher - sha256: "6a7f46926b01ce81bfc339da6a7f20afbe7733eff9846f6d6a5466aa4c6667c0" + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" web_socket_channel: dependency: "direct main" description: name: web_socket_channel - sha256: ca49c0bc209c687b887f30527fb6a9d80040b072cc2990f34b9bec3e7663101b + sha256: "9f187088ed104edd8662ca07af4b124465893caf063ba29758f97af57e61da8f" url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "3.0.1" webview_flutter: dependency: "direct main" description: name: webview_flutter - sha256: b6cd42db3ced5411f3d01599906156885b18e4188f7065a8a351eb84bee347e0 + sha256: "889a0a678e7c793c308c68739996227c9661590605e70b1f6cf6b9a6634f7aec" url: "https://pub.dev" source: hosted - version: "4.0.6" + version: "4.10.0" webview_flutter_android: dependency: transitive description: name: webview_flutter_android - sha256: c849dcb6bf7367f696869006fb9575c15bdc6a1d624ae13f12de5a147a740b12 + sha256: "285cedfd9441267f6cca8843458620b5fda1af75b04f5818d0441acda5d7df19" url: "https://pub.dev" source: hosted - version: "3.4.2" + version: "4.1.0" webview_flutter_platform_interface: dependency: transitive description: name: webview_flutter_platform_interface - sha256: "1939c39e2150fb4d30fd3cc59a891a49fed9935db53007df633ed83581b6117b" + sha256: d937581d6e558908d7ae3dc1989c4f87b786891ab47bb9df7de548a151779d8d url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.10.0" webview_flutter_wkwebview: dependency: transitive description: name: webview_flutter_wkwebview - sha256: ab12479f7a0cf112b9420c36aaf206a1ca47cd60cd42de74a4be2e97a697587b + sha256: b7e92f129482460951d96ef9a46b49db34bd2e1621685de26e9eaafd9674e7eb url: "https://pub.dev" source: hosted - version: "3.2.1" + version: "3.16.3" win32: dependency: transitive description: name: win32 - sha256: c9ebe7ee4ab0c2194e65d3a07d8c54c5d00bb001b76081c4a04cdb8448b59e46 + sha256: "84ba388638ed7a8cb3445a320c8273136ab2631cd5f2c57888335504ddab1bc2" url: "https://pub.dev" source: hosted - version: "3.1.3" + version: "5.8.0" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1 + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.0" + version: "1.1.0" yaml: dependency: transitive description: name: yaml - sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: - dart: ">=2.19.0 <3.0.0" - flutter: ">=3.3.0" + dart: ">=3.5.3 <4.0.0" + flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index a40f874..43021d1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,8 +4,7 @@ version: 0.0.9 homepage: https://github.com/chatwoot/chatwoot-flutter-sdk environment: - sdk: ">=2.12.0 <3.0.0" - flutter: ">=1.17.0" + sdk: "^3.5.3" dependencies: flutter: @@ -13,19 +12,19 @@ dependencies: flutter_chat_ui: ^1.1.9 hive: ^2.2.3 hive_flutter: ^1.1.0 - uuid: ^3.0.4 - web_socket_channel: ^2.1.0 + uuid: ^4.5.1 + web_socket_channel: ^3.0.1 json_annotation: ^4.0.1 - dio: ^4.0.0 + dio: ^5.7.0 equatable: ^2.0.3 - riverpod: ^0.14.0+3 + riverpod: ^2.6.1 synchronized: ^3.0.0 - intl: ^0.17.0 - flutter_chat_types: ^2.4.0 + intl: ^0.20.0 + flutter_chat_types: ^3.6.2 stream_channel: ^2.1.0 async: ^2.5.0 webview_flutter: ^4.0.6 - flutter_secure_storage: ^8.0.0 + flutter_secure_storage: ^9.2.2 url_launcher: ^6.1.10 path_provider: ^2.0.13 @@ -36,7 +35,7 @@ dev_dependencies: json_serializable: ^6.6.1 hive_generator: ^2.0.0 build_runner: ^2.3.3 - flutter_lints: ^2.0.1 + flutter_lints: ^5.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/test/chatwoot_client_test.dart b/test/chatwoot_client_test.dart index 9d141a4..21a0576 100644 --- a/test/chatwoot_client_test.dart +++ b/test/chatwoot_client_test.dart @@ -21,7 +21,9 @@ void main() { final testBaseUrl = "https://testbaseurl.com"; late ProviderContainer mockProviderContainer; final mockLocalStorage = MockLocalStorage(); + final mockLocalStorageProvider = Provider.family((ref,params)=>mockLocalStorage); final mockRepository = MockChatwootRepository(); + final mockRepositoryProvider = Provider.family((ref,params)=>mockRepository); final testUser = ChatwootUser( identifier: "identifier", @@ -38,13 +40,14 @@ void main() { setUp(() async { when(mockRepository.initialize(testUser)) .thenAnswer((realInvocation) => Future.microtask(() {})); - mockProviderContainer = ProviderContainer(); - mockProviderContainer.updateOverrides([ - localStorageProvider - .overrideWithProvider((ref, param) => mockLocalStorage), - chatwootRepositoryProvider - .overrideWithProvider((ref, param) => mockRepository) - ]); + mockProviderContainer = ProviderContainer( + overrides:[ + localStorageProvider + .overrideWithProvider(mockLocalStorageProvider), + chatwootRepositoryProvider + .overrideWithProvider(mockRepositoryProvider) + ] + ); ChatwootClient.providerContainerMap.update( testClientInstanceKey, (_) => mockProviderContainer, ifAbsent: () => mockProviderContainer); diff --git a/test/chatwoot_client_test.mocks.dart b/test/chatwoot_client_test.mocks.dart index b66c3de..9284703 100644 --- a/test/chatwoot_client_test.mocks.dart +++ b/test/chatwoot_client_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.15 from annotations +// Mocks generated by Mockito 5.4.4 from annotations // in chatwoot_sdk/test/chatwoot_client_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i6; import 'package:chatwoot_sdk/chatwoot_callbacks.dart' as _i4; @@ -16,21 +17,50 @@ import 'package:chatwoot_sdk/data/remote/service/chatwoot_client_service.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeChatwootClientService_0 extends _i1.Fake - implements _i2.ChatwootClientService {} +class _FakeChatwootClientService_0 extends _i1.SmartFake + implements _i2.ChatwootClientService { + _FakeChatwootClientService_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeLocalStorage_1 extends _i1.Fake implements _i3.LocalStorage {} +class _FakeLocalStorage_1 extends _i1.SmartFake implements _i3.LocalStorage { + _FakeLocalStorage_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeChatwootCallbacks_2 extends _i1.Fake - implements _i4.ChatwootCallbacks {} +class _FakeChatwootCallbacks_2 extends _i1.SmartFake + implements _i4.ChatwootCallbacks { + _FakeChatwootCallbacks_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [ChatwootRepository]. /// @@ -42,56 +72,115 @@ class MockChatwootRepository extends _i1.Mock } @override - _i2.ChatwootClientService get clientService => - (super.noSuchMethod(Invocation.getter(#clientService), - returnValue: _FakeChatwootClientService_0()) - as _i2.ChatwootClientService); + _i2.ChatwootClientService get clientService => (super.noSuchMethod( + Invocation.getter(#clientService), + returnValue: _FakeChatwootClientService_0( + this, + Invocation.getter(#clientService), + ), + ) as _i2.ChatwootClientService); + @override - _i3.LocalStorage get localStorage => - (super.noSuchMethod(Invocation.getter(#localStorage), - returnValue: _FakeLocalStorage_1()) as _i3.LocalStorage); + _i3.LocalStorage get localStorage => (super.noSuchMethod( + Invocation.getter(#localStorage), + returnValue: _FakeLocalStorage_1( + this, + Invocation.getter(#localStorage), + ), + ) as _i3.LocalStorage); + @override - _i4.ChatwootCallbacks get callbacks => - (super.noSuchMethod(Invocation.getter(#callbacks), - returnValue: _FakeChatwootCallbacks_2()) as _i4.ChatwootCallbacks); + _i4.ChatwootCallbacks get callbacks => (super.noSuchMethod( + Invocation.getter(#callbacks), + returnValue: _FakeChatwootCallbacks_2( + this, + Invocation.getter(#callbacks), + ), + ) as _i4.ChatwootCallbacks); + @override - set callbacks(_i4.ChatwootCallbacks? _callbacks) => - super.noSuchMethod(Invocation.setter(#callbacks, _callbacks), - returnValueForMissingStub: null); + set callbacks(_i4.ChatwootCallbacks? _callbacks) => super.noSuchMethod( + Invocation.setter( + #callbacks, + _callbacks, + ), + returnValueForMissingStub: null, + ); + @override - _i6.Future initialize(_i7.ChatwootUser? user) => - (super.noSuchMethod(Invocation.method(#initialize, [user]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + _i6.Future initialize(_i7.ChatwootUser? user) => (super.noSuchMethod( + Invocation.method( + #initialize, + [user], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override - void getPersistedMessages() => - super.noSuchMethod(Invocation.method(#getPersistedMessages, []), - returnValueForMissingStub: null); + void getPersistedMessages() => super.noSuchMethod( + Invocation.method( + #getPersistedMessages, + [], + ), + returnValueForMissingStub: null, + ); + @override - _i6.Future getMessages() => - (super.noSuchMethod(Invocation.method(#getMessages, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + _i6.Future getMessages() => (super.noSuchMethod( + Invocation.method( + #getMessages, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override - void listenForEvents() => - super.noSuchMethod(Invocation.method(#listenForEvents, []), - returnValueForMissingStub: null); + void listenForEvents() => super.noSuchMethod( + Invocation.method( + #listenForEvents, + [], + ), + returnValueForMissingStub: null, + ); + @override _i6.Future sendMessage(_i8.ChatwootNewMessageRequest? request) => - (super.noSuchMethod(Invocation.method(#sendMessage, [request]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); - @override - void sendAction(_i9.ChatwootActionType? action) => - super.noSuchMethod(Invocation.method(#sendAction, [action]), - returnValueForMissingStub: null); + (super.noSuchMethod( + Invocation.method( + #sendMessage, + [request], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override - _i6.Future clear() => (super.noSuchMethod(Invocation.method(#clear, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i6.Future); + void sendAction(_i9.ChatwootActionType? action) => super.noSuchMethod( + Invocation.method( + #sendAction, + [action], + ), + returnValueForMissingStub: null, + ); + @override - void dispose() => super.noSuchMethod(Invocation.method(#dispose, []), - returnValueForMissingStub: null); + _i6.Future clear() => (super.noSuchMethod( + Invocation.method( + #clear, + [], + ), + returnValue: _i6.Future.value(), + returnValueForMissingStub: _i6.Future.value(), + ) as _i6.Future); + @override - String toString() => super.toString(); + void dispose() => super.noSuchMethod( + Invocation.method( + #dispose, + [], + ), + returnValueForMissingStub: null, + ); } diff --git a/test/data/chatwoot_repository_test.mocks.dart b/test/data/chatwoot_repository_test.mocks.dart index 8beac8d..6e2973c 100644 --- a/test/data/chatwoot_repository_test.mocks.dart +++ b/test/data/chatwoot_repository_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.15 from annotations +// Mocks generated by Mockito 5.4.4 from annotations // in chatwoot_sdk/test/data/chatwoot_repository_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i11; import 'package:async/async.dart' as _i18; @@ -28,32 +29,104 @@ import 'package:mockito/mockito.dart' as _i1; import 'package:stream_channel/stream_channel.dart' as _i9; import 'package:web_socket_channel/web_socket_channel.dart' as _i8; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeChatwootUserDao_0 extends _i1.Fake implements _i2.ChatwootUserDao {} +class _FakeChatwootUserDao_0 extends _i1.SmartFake + implements _i2.ChatwootUserDao { + _FakeChatwootUserDao_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeChatwootConversationDao_1 extends _i1.Fake - implements _i3.ChatwootConversationDao {} +class _FakeChatwootConversationDao_1 extends _i1.SmartFake + implements _i3.ChatwootConversationDao { + _FakeChatwootConversationDao_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeChatwootContactDao_2 extends _i1.Fake - implements _i4.ChatwootContactDao {} +class _FakeChatwootContactDao_2 extends _i1.SmartFake + implements _i4.ChatwootContactDao { + _FakeChatwootContactDao_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeChatwootMessagesDao_3 extends _i1.Fake - implements _i5.ChatwootMessagesDao {} +class _FakeChatwootMessagesDao_3 extends _i1.SmartFake + implements _i5.ChatwootMessagesDao { + _FakeChatwootMessagesDao_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeChatwootContact_4 extends _i1.Fake implements _i6.ChatwootContact {} +class _FakeChatwootContact_4 extends _i1.SmartFake + implements _i6.ChatwootContact { + _FakeChatwootContact_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeChatwootMessage_5 extends _i1.Fake implements _i7.ChatwootMessage {} +class _FakeChatwootMessage_5 extends _i1.SmartFake + implements _i7.ChatwootMessage { + _FakeChatwootMessage_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeWebSocketSink_6 extends _i1.Fake implements _i8.WebSocketSink {} +class _FakeWebSocketSink_6 extends _i1.SmartFake implements _i8.WebSocketSink { + _FakeWebSocketSink_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeStreamChannel_7 extends _i1.Fake implements _i9.StreamChannel { +class _FakeStreamChannel_7 extends _i1.SmartFake + implements _i9.StreamChannel { + _FakeStreamChannel_7( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } /// A class which mocks [LocalStorage]. @@ -65,53 +138,99 @@ class MockLocalStorage extends _i1.Mock implements _i10.LocalStorage { } @override - _i2.ChatwootUserDao get userDao => - (super.noSuchMethod(Invocation.getter(#userDao), - returnValue: _FakeChatwootUserDao_0()) as _i2.ChatwootUserDao); + _i2.ChatwootUserDao get userDao => (super.noSuchMethod( + Invocation.getter(#userDao), + returnValue: _FakeChatwootUserDao_0( + this, + Invocation.getter(#userDao), + ), + ) as _i2.ChatwootUserDao); + @override - set userDao(_i2.ChatwootUserDao? _userDao) => - super.noSuchMethod(Invocation.setter(#userDao, _userDao), - returnValueForMissingStub: null); + set userDao(_i2.ChatwootUserDao? _userDao) => super.noSuchMethod( + Invocation.setter( + #userDao, + _userDao, + ), + returnValueForMissingStub: null, + ); + @override - _i3.ChatwootConversationDao get conversationDao => - (super.noSuchMethod(Invocation.getter(#conversationDao), - returnValue: _FakeChatwootConversationDao_1()) - as _i3.ChatwootConversationDao); + _i3.ChatwootConversationDao get conversationDao => (super.noSuchMethod( + Invocation.getter(#conversationDao), + returnValue: _FakeChatwootConversationDao_1( + this, + Invocation.getter(#conversationDao), + ), + ) as _i3.ChatwootConversationDao); + @override set conversationDao(_i3.ChatwootConversationDao? _conversationDao) => - super.noSuchMethod(Invocation.setter(#conversationDao, _conversationDao), - returnValueForMissingStub: null); + super.noSuchMethod( + Invocation.setter( + #conversationDao, + _conversationDao, + ), + returnValueForMissingStub: null, + ); + @override - _i4.ChatwootContactDao get contactDao => - (super.noSuchMethod(Invocation.getter(#contactDao), - returnValue: _FakeChatwootContactDao_2()) as _i4.ChatwootContactDao); + _i4.ChatwootContactDao get contactDao => (super.noSuchMethod( + Invocation.getter(#contactDao), + returnValue: _FakeChatwootContactDao_2( + this, + Invocation.getter(#contactDao), + ), + ) as _i4.ChatwootContactDao); + @override - set contactDao(_i4.ChatwootContactDao? _contactDao) => - super.noSuchMethod(Invocation.setter(#contactDao, _contactDao), - returnValueForMissingStub: null); + set contactDao(_i4.ChatwootContactDao? _contactDao) => super.noSuchMethod( + Invocation.setter( + #contactDao, + _contactDao, + ), + returnValueForMissingStub: null, + ); + @override _i5.ChatwootMessagesDao get messagesDao => (super.noSuchMethod( - Invocation.getter(#messagesDao), - returnValue: _FakeChatwootMessagesDao_3()) as _i5.ChatwootMessagesDao); + Invocation.getter(#messagesDao), + returnValue: _FakeChatwootMessagesDao_3( + this, + Invocation.getter(#messagesDao), + ), + ) as _i5.ChatwootMessagesDao); + @override - set messagesDao(_i5.ChatwootMessagesDao? _messagesDao) => - super.noSuchMethod(Invocation.setter(#messagesDao, _messagesDao), - returnValueForMissingStub: null); + set messagesDao(_i5.ChatwootMessagesDao? _messagesDao) => super.noSuchMethod( + Invocation.setter( + #messagesDao, + _messagesDao, + ), + returnValueForMissingStub: null, + ); + @override _i11.Future clear({bool? clearChatwootUserStorage = true}) => (super.noSuchMethod( - Invocation.method(#clear, [], - {#clearChatwootUserStorage: clearChatwootUserStorage}), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) - as _i11.Future); + Invocation.method( + #clear, + [], + {#clearChatwootUserStorage: clearChatwootUserStorage}, + ), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); + @override _i11.Future clearAll() => (super.noSuchMethod( - Invocation.method(#clearAll, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i11.Future); - @override - String toString() => super.toString(); + Invocation.method( + #clearAll, + [], + ), + returnValue: _i11.Future.value(), + returnValueForMissingStub: _i11.Future.value(), + ) as _i11.Future); } /// A class which mocks [ChatwootClientService]. @@ -124,63 +243,142 @@ class MockChatwootClientService extends _i1.Mock } @override - set connection(_i8.WebSocketChannel? _connection) => - super.noSuchMethod(Invocation.setter(#connection, _connection), - returnValueForMissingStub: null); + set connection(_i8.WebSocketChannel? _connection) => super.noSuchMethod( + Invocation.setter( + #connection, + _connection, + ), + returnValueForMissingStub: null, + ); + @override _i11.Future<_i6.ChatwootContact> updateContact(dynamic update) => - (super.noSuchMethod(Invocation.method(#updateContact, [update]), - returnValue: - Future<_i6.ChatwootContact>.value(_FakeChatwootContact_4())) - as _i11.Future<_i6.ChatwootContact>); + (super.noSuchMethod( + Invocation.method( + #updateContact, + [update], + ), + returnValue: + _i11.Future<_i6.ChatwootContact>.value(_FakeChatwootContact_4( + this, + Invocation.method( + #updateContact, + [update], + ), + )), + ) as _i11.Future<_i6.ChatwootContact>); + @override - _i11.Future<_i6.ChatwootContact> getContact() => - (super.noSuchMethod(Invocation.method(#getContact, []), - returnValue: - Future<_i6.ChatwootContact>.value(_FakeChatwootContact_4())) - as _i11.Future<_i6.ChatwootContact>); + _i11.Future<_i6.ChatwootContact> getContact() => (super.noSuchMethod( + Invocation.method( + #getContact, + [], + ), + returnValue: + _i11.Future<_i6.ChatwootContact>.value(_FakeChatwootContact_4( + this, + Invocation.method( + #getContact, + [], + ), + )), + ) as _i11.Future<_i6.ChatwootContact>); + @override _i11.Future> getConversations() => - (super.noSuchMethod(Invocation.method(#getConversations, []), - returnValue: Future>.value( - <_i13.ChatwootConversation>[])) - as _i11.Future>); + (super.noSuchMethod( + Invocation.method( + #getConversations, + [], + ), + returnValue: _i11.Future>.value( + <_i13.ChatwootConversation>[]), + ) as _i11.Future>); + @override _i11.Future<_i7.ChatwootMessage> createMessage( _i14.ChatwootNewMessageRequest? request) => - (super.noSuchMethod(Invocation.method(#createMessage, [request]), - returnValue: - Future<_i7.ChatwootMessage>.value(_FakeChatwootMessage_5())) - as _i11.Future<_i7.ChatwootMessage>); + (super.noSuchMethod( + Invocation.method( + #createMessage, + [request], + ), + returnValue: + _i11.Future<_i7.ChatwootMessage>.value(_FakeChatwootMessage_5( + this, + Invocation.method( + #createMessage, + [request], + ), + )), + ) as _i11.Future<_i7.ChatwootMessage>); + @override _i11.Future<_i7.ChatwootMessage> updateMessage( - String? messageIdentifier, dynamic update) => + String? messageIdentifier, + dynamic update, + ) => (super.noSuchMethod( - Invocation.method(#updateMessage, [messageIdentifier, update]), - returnValue: - Future<_i7.ChatwootMessage>.value(_FakeChatwootMessage_5())) - as _i11.Future<_i7.ChatwootMessage>); + Invocation.method( + #updateMessage, + [ + messageIdentifier, + update, + ], + ), + returnValue: + _i11.Future<_i7.ChatwootMessage>.value(_FakeChatwootMessage_5( + this, + Invocation.method( + #updateMessage, + [ + messageIdentifier, + update, + ], + ), + )), + ) as _i11.Future<_i7.ChatwootMessage>); + @override _i11.Future> getAllMessages() => - (super.noSuchMethod(Invocation.method(#getAllMessages, []), - returnValue: Future>.value( - <_i7.ChatwootMessage>[])) - as _i11.Future>); + (super.noSuchMethod( + Invocation.method( + #getAllMessages, + [], + ), + returnValue: _i11.Future>.value( + <_i7.ChatwootMessage>[]), + ) as _i11.Future>); + @override - void startWebSocketConnection(String? contactPubsubToken, - {_i8.WebSocketChannel Function(Uri)? onStartConnection}) => + void startWebSocketConnection( + String? contactPubsubToken, { + _i8.WebSocketChannel Function(Uri)? onStartConnection, + }) => super.noSuchMethod( - Invocation.method(#startWebSocketConnection, [contactPubsubToken], - {#onStartConnection: onStartConnection}), - returnValueForMissingStub: null); + Invocation.method( + #startWebSocketConnection, + [contactPubsubToken], + {#onStartConnection: onStartConnection}, + ), + returnValueForMissingStub: null, + ); + @override void sendAction( - String? contactPubsubToken, _i15.ChatwootActionType? action) => + String? contactPubsubToken, + _i15.ChatwootActionType? action, + ) => super.noSuchMethod( - Invocation.method(#sendAction, [contactPubsubToken, action]), - returnValueForMissingStub: null); - @override - String toString() => super.toString(); + Invocation.method( + #sendAction, + [ + contactPubsubToken, + action, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [ChatwootCallbacks]. @@ -192,89 +390,166 @@ class MockChatwootCallbacks extends _i1.Mock implements _i16.ChatwootCallbacks { } @override - set onWelcome(void Function()? _onWelcome) => - super.noSuchMethod(Invocation.setter(#onWelcome, _onWelcome), - returnValueForMissingStub: null); + set onWelcome(void Function()? _onWelcome) => super.noSuchMethod( + Invocation.setter( + #onWelcome, + _onWelcome, + ), + returnValueForMissingStub: null, + ); + @override - set onPing(void Function()? _onPing) => - super.noSuchMethod(Invocation.setter(#onPing, _onPing), - returnValueForMissingStub: null); + set onPing(void Function()? _onPing) => super.noSuchMethod( + Invocation.setter( + #onPing, + _onPing, + ), + returnValueForMissingStub: null, + ); + @override set onConfirmedSubscription(void Function()? _onConfirmedSubscription) => super.noSuchMethod( - Invocation.setter(#onConfirmedSubscription, _onConfirmedSubscription), - returnValueForMissingStub: null); + Invocation.setter( + #onConfirmedSubscription, + _onConfirmedSubscription, + ), + returnValueForMissingStub: null, + ); + @override set onConversationStartedTyping( void Function()? _onConversationStartedTyping) => super.noSuchMethod( - Invocation.setter( - #onConversationStartedTyping, _onConversationStartedTyping), - returnValueForMissingStub: null); + Invocation.setter( + #onConversationStartedTyping, + _onConversationStartedTyping, + ), + returnValueForMissingStub: null, + ); + @override set onConversationIsOnline(void Function()? _onConversationIsOnline) => super.noSuchMethod( - Invocation.setter(#onConversationIsOnline, _onConversationIsOnline), - returnValueForMissingStub: null); + Invocation.setter( + #onConversationIsOnline, + _onConversationIsOnline, + ), + returnValueForMissingStub: null, + ); + @override set onConversationIsOffline(void Function()? _onConversationIsOffline) => super.noSuchMethod( - Invocation.setter(#onConversationIsOffline, _onConversationIsOffline), - returnValueForMissingStub: null); + Invocation.setter( + #onConversationIsOffline, + _onConversationIsOffline, + ), + returnValueForMissingStub: null, + ); + @override set onConversationStoppedTyping( void Function()? _onConversationStoppedTyping) => super.noSuchMethod( - Invocation.setter( - #onConversationStoppedTyping, _onConversationStoppedTyping), - returnValueForMissingStub: null); + Invocation.setter( + #onConversationStoppedTyping, + _onConversationStoppedTyping, + ), + returnValueForMissingStub: null, + ); + @override set onMessageReceived( void Function(_i7.ChatwootMessage)? _onMessageReceived) => super.noSuchMethod( - Invocation.setter(#onMessageReceived, _onMessageReceived), - returnValueForMissingStub: null); + Invocation.setter( + #onMessageReceived, + _onMessageReceived, + ), + returnValueForMissingStub: null, + ); + @override set onMessageUpdated(void Function(_i7.ChatwootMessage)? _onMessageUpdated) => super.noSuchMethod( - Invocation.setter(#onMessageUpdated, _onMessageUpdated), - returnValueForMissingStub: null); + Invocation.setter( + #onMessageUpdated, + _onMessageUpdated, + ), + returnValueForMissingStub: null, + ); + @override set onMessageSent( - void Function(_i7.ChatwootMessage, String)? _onMessageSent) => - super.noSuchMethod(Invocation.setter(#onMessageSent, _onMessageSent), - returnValueForMissingStub: null); + void Function( + _i7.ChatwootMessage, + String, + )? _onMessageSent) => + super.noSuchMethod( + Invocation.setter( + #onMessageSent, + _onMessageSent, + ), + returnValueForMissingStub: null, + ); + @override set onMessageDelivered( - void Function(_i7.ChatwootMessage, String)? _onMessageDelivered) => + void Function( + _i7.ChatwootMessage, + String, + )? _onMessageDelivered) => super.noSuchMethod( - Invocation.setter(#onMessageDelivered, _onMessageDelivered), - returnValueForMissingStub: null); + Invocation.setter( + #onMessageDelivered, + _onMessageDelivered, + ), + returnValueForMissingStub: null, + ); + @override set onPersistedMessagesRetrieved( void Function(List<_i7.ChatwootMessage>)? _onPersistedMessagesRetrieved) => super.noSuchMethod( - Invocation.setter( - #onPersistedMessagesRetrieved, _onPersistedMessagesRetrieved), - returnValueForMissingStub: null); + Invocation.setter( + #onPersistedMessagesRetrieved, + _onPersistedMessagesRetrieved, + ), + returnValueForMissingStub: null, + ); + @override set onMessagesRetrieved( void Function(List<_i7.ChatwootMessage>)? _onMessagesRetrieved) => super.noSuchMethod( - Invocation.setter(#onMessagesRetrieved, _onMessagesRetrieved), - returnValueForMissingStub: null); + Invocation.setter( + #onMessagesRetrieved, + _onMessagesRetrieved, + ), + returnValueForMissingStub: null, + ); + @override set onConversationResolved(void Function()? _onConversationResolved) => super.noSuchMethod( - Invocation.setter(#onConversationResolved, _onConversationResolved), - returnValueForMissingStub: null); + Invocation.setter( + #onConversationResolved, + _onConversationResolved, + ), + returnValueForMissingStub: null, + ); + @override set onError(void Function(_i17.ChatwootClientException)? _onError) => - super.noSuchMethod(Invocation.setter(#onError, _onError), - returnValueForMissingStub: null); - @override - String toString() => super.toString(); + super.noSuchMethod( + Invocation.setter( + #onError, + _onError, + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [WebSocketChannel]. @@ -286,50 +561,133 @@ class MockWebSocketChannel extends _i1.Mock implements _i8.WebSocketChannel { } @override - _i11.Stream get stream => - (super.noSuchMethod(Invocation.getter(#stream), - returnValue: Stream.empty()) as _i11.Stream); + _i11.Future get ready => (super.noSuchMethod( + Invocation.getter(#ready), + returnValue: _i11.Future.value(), + ) as _i11.Future); + + @override + _i8.WebSocketSink get sink => (super.noSuchMethod( + Invocation.getter(#sink), + returnValue: _FakeWebSocketSink_6( + this, + Invocation.getter(#sink), + ), + ) as _i8.WebSocketSink); + @override - _i8.WebSocketSink get sink => (super.noSuchMethod(Invocation.getter(#sink), - returnValue: _FakeWebSocketSink_6()) as _i8.WebSocketSink); + _i11.Stream get stream => (super.noSuchMethod( + Invocation.getter(#stream), + returnValue: _i11.Stream.empty(), + ) as _i11.Stream); + @override - void pipe(_i9.StreamChannel? other) => - super.noSuchMethod(Invocation.method(#pipe, [other]), - returnValueForMissingStub: null); + void pipe(_i9.StreamChannel? other) => super.noSuchMethod( + Invocation.method( + #pipe, + [other], + ), + returnValueForMissingStub: null, + ); + @override _i9.StreamChannel transform( _i9.StreamChannelTransformer? transformer) => - (super.noSuchMethod(Invocation.method(#transform, [transformer]), - returnValue: _FakeStreamChannel_7()) as _i9.StreamChannel); + (super.noSuchMethod( + Invocation.method( + #transform, + [transformer], + ), + returnValue: _FakeStreamChannel_7( + this, + Invocation.method( + #transform, + [transformer], + ), + ), + ) as _i9.StreamChannel); + @override _i9.StreamChannel transformStream( _i11.StreamTransformer? transformer) => - (super.noSuchMethod(Invocation.method(#transformStream, [transformer]), - returnValue: _FakeStreamChannel_7()) - as _i9.StreamChannel); + (super.noSuchMethod( + Invocation.method( + #transformStream, + [transformer], + ), + returnValue: _FakeStreamChannel_7( + this, + Invocation.method( + #transformStream, + [transformer], + ), + ), + ) as _i9.StreamChannel); + @override _i9.StreamChannel transformSink( _i18.StreamSinkTransformer? transformer) => - (super.noSuchMethod(Invocation.method(#transformSink, [transformer]), - returnValue: _FakeStreamChannel_7()) - as _i9.StreamChannel); + (super.noSuchMethod( + Invocation.method( + #transformSink, + [transformer], + ), + returnValue: _FakeStreamChannel_7( + this, + Invocation.method( + #transformSink, + [transformer], + ), + ), + ) as _i9.StreamChannel); + @override _i9.StreamChannel changeStream( _i11.Stream Function(_i11.Stream)? change) => - (super.noSuchMethod(Invocation.method(#changeStream, [change]), - returnValue: _FakeStreamChannel_7()) - as _i9.StreamChannel); + (super.noSuchMethod( + Invocation.method( + #changeStream, + [change], + ), + returnValue: _FakeStreamChannel_7( + this, + Invocation.method( + #changeStream, + [change], + ), + ), + ) as _i9.StreamChannel); + @override _i9.StreamChannel changeSink( _i11.StreamSink Function(_i11.StreamSink)? change) => - (super.noSuchMethod(Invocation.method(#changeSink, [change]), - returnValue: _FakeStreamChannel_7()) - as _i9.StreamChannel); - @override - _i9.StreamChannel cast() => - (super.noSuchMethod(Invocation.method(#cast, []), - returnValue: _FakeStreamChannel_7()) as _i9.StreamChannel); + (super.noSuchMethod( + Invocation.method( + #changeSink, + [change], + ), + returnValue: _FakeStreamChannel_7( + this, + Invocation.method( + #changeSink, + [change], + ), + ), + ) as _i9.StreamChannel); + @override - String toString() => super.toString(); + _i9.StreamChannel cast() => (super.noSuchMethod( + Invocation.method( + #cast, + [], + ), + returnValue: _FakeStreamChannel_7( + this, + Invocation.method( + #cast, + [], + ), + ), + ) as _i9.StreamChannel); } diff --git a/test/data/local/local_storage_test.mocks.dart b/test/data/local/local_storage_test.mocks.dart index 40a89d9..29ff6f7 100644 --- a/test/data/local/local_storage_test.mocks.dart +++ b/test/data/local/local_storage_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.15 from annotations +// Mocks generated by Mockito 5.4.4 from annotations // in chatwoot_sdk/test/data/local/local_storage_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i3; import 'package:chatwoot_sdk/data/local/dao/chatwoot_contact_dao.dart' as _i5; @@ -16,13 +17,18 @@ import 'package:chatwoot_sdk/data/local/entity/chatwoot_message.dart' as _i8; import 'package:chatwoot_sdk/data/local/entity/chatwoot_user.dart' as _i10; import 'package:mockito/mockito.dart' as _i1; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class /// A class which mocks [ChatwootConversationDao]. /// @@ -35,26 +41,44 @@ class MockChatwootConversationDao extends _i1.Mock @override _i3.Future saveConversation(_i4.ChatwootConversation? conversation) => - (super.noSuchMethod(Invocation.method(#saveConversation, [conversation]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future deleteConversation() => - (super.noSuchMethod(Invocation.method(#deleteConversation, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future onDispose() => - (super.noSuchMethod(Invocation.method(#onDispose, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future clearAll() => - (super.noSuchMethod(Invocation.method(#clearAll, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - String toString() => super.toString(); + (super.noSuchMethod( + Invocation.method( + #saveConversation, + [conversation], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future deleteConversation() => (super.noSuchMethod( + Invocation.method( + #deleteConversation, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future onDispose() => (super.noSuchMethod( + Invocation.method( + #onDispose, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future clearAll() => (super.noSuchMethod( + Invocation.method( + #clearAll, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); } /// A class which mocks [ChatwootContactDao]. @@ -68,26 +92,44 @@ class MockChatwootContactDao extends _i1.Mock @override _i3.Future saveContact(_i6.ChatwootContact? contact) => - (super.noSuchMethod(Invocation.method(#saveContact, [contact]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future deleteContact() => - (super.noSuchMethod(Invocation.method(#deleteContact, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future onDispose() => - (super.noSuchMethod(Invocation.method(#onDispose, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future clearAll() => - (super.noSuchMethod(Invocation.method(#clearAll, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - String toString() => super.toString(); + (super.noSuchMethod( + Invocation.method( + #saveContact, + [contact], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future deleteContact() => (super.noSuchMethod( + Invocation.method( + #deleteContact, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future onDispose() => (super.noSuchMethod( + Invocation.method( + #onDispose, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + + @override + _i3.Future clearAll() => (super.noSuchMethod( + Invocation.method( + #clearAll, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); } /// A class which mocks [ChatwootMessagesDao]. @@ -101,43 +143,81 @@ class MockChatwootMessagesDao extends _i1.Mock @override _i3.Future saveMessage(_i8.ChatwootMessage? message) => - (super.noSuchMethod(Invocation.method(#saveMessage, [message]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + (super.noSuchMethod( + Invocation.method( + #saveMessage, + [message], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override _i3.Future saveAllMessages(List<_i8.ChatwootMessage>? messages) => - (super.noSuchMethod(Invocation.method(#saveAllMessages, [messages]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + (super.noSuchMethod( + Invocation.method( + #saveAllMessages, + [messages], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override _i8.ChatwootMessage? getMessage(int? messageId) => - (super.noSuchMethod(Invocation.method(#getMessage, [messageId])) - as _i8.ChatwootMessage?); - @override - List<_i8.ChatwootMessage> getMessages() => - (super.noSuchMethod(Invocation.method(#getMessages, []), - returnValue: <_i8.ChatwootMessage>[]) as List<_i8.ChatwootMessage>); + (super.noSuchMethod(Invocation.method( + #getMessage, + [messageId], + )) as _i8.ChatwootMessage?); + @override - _i3.Future clear() => (super.noSuchMethod(Invocation.method(#clear, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + List<_i8.ChatwootMessage> getMessages() => (super.noSuchMethod( + Invocation.method( + #getMessages, + [], + ), + returnValue: <_i8.ChatwootMessage>[], + ) as List<_i8.ChatwootMessage>); + @override - _i3.Future deleteMessage(int? messageId) => - (super.noSuchMethod(Invocation.method(#deleteMessage, [messageId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future clear() => (super.noSuchMethod( + Invocation.method( + #clear, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override - _i3.Future onDispose() => - (super.noSuchMethod(Invocation.method(#onDispose, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future deleteMessage(int? messageId) => (super.noSuchMethod( + Invocation.method( + #deleteMessage, + [messageId], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override - _i3.Future clearAll() => - (super.noSuchMethod(Invocation.method(#clearAll, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future onDispose() => (super.noSuchMethod( + Invocation.method( + #onDispose, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override - String toString() => super.toString(); + _i3.Future clearAll() => (super.noSuchMethod( + Invocation.method( + #clearAll, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); } /// A class which mocks [PersistedChatwootConversationDao]. @@ -150,27 +230,45 @@ class MockPersistedChatwootConversationDao extends _i1.Mock } @override - _i3.Future deleteConversation() => - (super.noSuchMethod(Invocation.method(#deleteConversation, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future deleteConversation() => (super.noSuchMethod( + Invocation.method( + #deleteConversation, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override _i3.Future saveConversation(_i4.ChatwootConversation? conversation) => - (super.noSuchMethod(Invocation.method(#saveConversation, [conversation]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future onDispose() => - (super.noSuchMethod(Invocation.method(#onDispose, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + (super.noSuchMethod( + Invocation.method( + #saveConversation, + [conversation], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override - _i3.Future clearAll() => - (super.noSuchMethod(Invocation.method(#clearAll, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future onDispose() => (super.noSuchMethod( + Invocation.method( + #onDispose, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override - String toString() => super.toString(); + _i3.Future clearAll() => (super.noSuchMethod( + Invocation.method( + #clearAll, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); } /// A class which mocks [PersistedChatwootContactDao]. @@ -183,27 +281,45 @@ class MockPersistedChatwootContactDao extends _i1.Mock } @override - _i3.Future deleteContact() => - (super.noSuchMethod(Invocation.method(#deleteContact, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future deleteContact() => (super.noSuchMethod( + Invocation.method( + #deleteContact, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override _i3.Future saveContact(_i6.ChatwootContact? contact) => - (super.noSuchMethod(Invocation.method(#saveContact, [contact]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future onDispose() => - (super.noSuchMethod(Invocation.method(#onDispose, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + (super.noSuchMethod( + Invocation.method( + #saveContact, + [contact], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override - _i3.Future clearAll() => - (super.noSuchMethod(Invocation.method(#clearAll, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future onDispose() => (super.noSuchMethod( + Invocation.method( + #onDispose, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override - String toString() => super.toString(); + _i3.Future clearAll() => (super.noSuchMethod( + Invocation.method( + #clearAll, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); } /// A class which mocks [PersistedChatwootMessagesDao]. @@ -216,44 +332,82 @@ class MockPersistedChatwootMessagesDao extends _i1.Mock } @override - _i3.Future clear() => (super.noSuchMethod(Invocation.method(#clear, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future clear() => (super.noSuchMethod( + Invocation.method( + #clear, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override _i3.Future saveMessage(_i8.ChatwootMessage? message) => - (super.noSuchMethod(Invocation.method(#saveMessage, [message]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + (super.noSuchMethod( + Invocation.method( + #saveMessage, + [message], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override _i3.Future saveAllMessages(List<_i8.ChatwootMessage>? messages) => - (super.noSuchMethod(Invocation.method(#saveAllMessages, [messages]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + (super.noSuchMethod( + Invocation.method( + #saveAllMessages, + [messages], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override - List<_i8.ChatwootMessage> getMessages() => - (super.noSuchMethod(Invocation.method(#getMessages, []), - returnValue: <_i8.ChatwootMessage>[]) as List<_i8.ChatwootMessage>); + List<_i8.ChatwootMessage> getMessages() => (super.noSuchMethod( + Invocation.method( + #getMessages, + [], + ), + returnValue: <_i8.ChatwootMessage>[], + ) as List<_i8.ChatwootMessage>); + @override - _i3.Future onDispose() => - (super.noSuchMethod(Invocation.method(#onDispose, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future onDispose() => (super.noSuchMethod( + Invocation.method( + #onDispose, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override - _i3.Future deleteMessage(int? messageId) => - (super.noSuchMethod(Invocation.method(#deleteMessage, [messageId]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future deleteMessage(int? messageId) => (super.noSuchMethod( + Invocation.method( + #deleteMessage, + [messageId], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override _i8.ChatwootMessage? getMessage(int? messageId) => - (super.noSuchMethod(Invocation.method(#getMessage, [messageId])) - as _i8.ChatwootMessage?); - @override - _i3.Future clearAll() => - (super.noSuchMethod(Invocation.method(#clearAll, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + (super.noSuchMethod(Invocation.method( + #getMessage, + [messageId], + )) as _i8.ChatwootMessage?); + @override - String toString() => super.toString(); + _i3.Future clearAll() => (super.noSuchMethod( + Invocation.method( + #clearAll, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); } /// A class which mocks [ChatwootUserDao]. @@ -265,27 +419,44 @@ class MockChatwootUserDao extends _i1.Mock implements _i9.ChatwootUserDao { } @override - _i3.Future saveUser(_i10.ChatwootUser? user) => - (super.noSuchMethod(Invocation.method(#saveUser, [user]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future deleteUser() => - (super.noSuchMethod(Invocation.method(#deleteUser, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future saveUser(_i10.ChatwootUser? user) => (super.noSuchMethod( + Invocation.method( + #saveUser, + [user], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override - _i3.Future onDispose() => - (super.noSuchMethod(Invocation.method(#onDispose, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future deleteUser() => (super.noSuchMethod( + Invocation.method( + #deleteUser, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override - _i3.Future clearAll() => - (super.noSuchMethod(Invocation.method(#clearAll, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future onDispose() => (super.noSuchMethod( + Invocation.method( + #onDispose, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override - String toString() => super.toString(); + _i3.Future clearAll() => (super.noSuchMethod( + Invocation.method( + #clearAll, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); } /// A class which mocks [PersistedChatwootUserDao]. @@ -298,25 +469,42 @@ class MockPersistedChatwootUserDao extends _i1.Mock } @override - _i3.Future deleteUser() => - (super.noSuchMethod(Invocation.method(#deleteUser, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); - @override - _i3.Future saveUser(_i10.ChatwootUser? user) => - (super.noSuchMethod(Invocation.method(#saveUser, [user]), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future deleteUser() => (super.noSuchMethod( + Invocation.method( + #deleteUser, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override - _i3.Future onDispose() => - (super.noSuchMethod(Invocation.method(#onDispose, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future saveUser(_i10.ChatwootUser? user) => (super.noSuchMethod( + Invocation.method( + #saveUser, + [user], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override - _i3.Future clearAll() => - (super.noSuchMethod(Invocation.method(#clearAll, []), - returnValue: Future.value(), - returnValueForMissingStub: Future.value()) as _i3.Future); + _i3.Future onDispose() => (super.noSuchMethod( + Invocation.method( + #onDispose, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); + @override - String toString() => super.toString(); + _i3.Future clearAll() => (super.noSuchMethod( + Invocation.method( + #clearAll, + [], + ), + returnValue: _i3.Future.value(), + returnValueForMissingStub: _i3.Future.value(), + ) as _i3.Future); } diff --git a/test/data/remote/chatwoot_client_api_interceptor_test.mocks.dart b/test/data/remote/chatwoot_client_api_interceptor_test.mocks.dart index 87098a9..d0b241d 100644 --- a/test/data/remote/chatwoot_client_api_interceptor_test.mocks.dart +++ b/test/data/remote/chatwoot_client_api_interceptor_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.15 from annotations +// Mocks generated by Mockito 5.4.4 from annotations // in chatwoot_sdk/test/data/remote/chatwoot_client_api_interceptor_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i7; import 'package:chatwoot_sdk/data/local/entity/chatwoot_contact.dart' as _i4; @@ -12,30 +13,68 @@ import 'package:chatwoot_sdk/data/remote/service/chatwoot_client_auth_service.da as _i11; import 'package:dio/dio.dart' as _i6; import 'package:dio/src/dio.dart' as _i3; -import 'package:dio/src/dio_error.dart' as _i9; +import 'package:dio/src/dio_exception.dart' as _i9; import 'package:dio/src/dio_mixin.dart' as _i2; import 'package:dio/src/options.dart' as _i10; import 'package:dio/src/response.dart' as _i8; import 'package:mockito/mockito.dart' as _i1; import 'package:web_socket_channel/web_socket_channel.dart' as _i12; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeInterceptorState_0 extends _i1.Fake - implements _i2.InterceptorState {} +class _FakeInterceptorState_0 extends _i1.SmartFake + implements _i2.InterceptorState { + _FakeInterceptorState_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeDio_1 extends _i1.Fake implements _i3.Dio {} +class _FakeDio_1 extends _i1.SmartFake implements _i3.Dio { + _FakeDio_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeChatwootContact_2 extends _i1.Fake implements _i4.ChatwootContact {} +class _FakeChatwootContact_2 extends _i1.SmartFake + implements _i4.ChatwootContact { + _FakeChatwootContact_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeChatwootConversation_3 extends _i1.Fake - implements _i5.ChatwootConversation {} +class _FakeChatwootConversation_3 extends _i1.SmartFake + implements _i5.ChatwootConversation { + _FakeChatwootConversation_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [ResponseInterceptorHandler]. /// @@ -47,31 +86,54 @@ class MockResponseInterceptorHandler extends _i1.Mock } @override - _i7.Future<_i2.InterceptorState> get future => - (super.noSuchMethod(Invocation.getter(#future), - returnValue: Future<_i2.InterceptorState>.value( - _FakeInterceptorState_0())) - as _i7.Future<_i2.InterceptorState>); + _i7.Future<_i2.InterceptorState> get future => (super.noSuchMethod( + Invocation.getter(#future), + returnValue: _i7.Future<_i2.InterceptorState>.value( + _FakeInterceptorState_0( + this, + Invocation.getter(#future), + )), + ) as _i7.Future<_i2.InterceptorState>); + @override - bool get isCompleted => - (super.noSuchMethod(Invocation.getter(#isCompleted), returnValue: false) - as bool); + bool get isCompleted => (super.noSuchMethod( + Invocation.getter(#isCompleted), + returnValue: false, + ) as bool); + @override - void next(_i8.Response? response) => - super.noSuchMethod(Invocation.method(#next, [response]), - returnValueForMissingStub: null); + void next(_i8.Response? response) => super.noSuchMethod( + Invocation.method( + #next, + [response], + ), + returnValueForMissingStub: null, + ); + @override - void resolve(_i8.Response? response) => - super.noSuchMethod(Invocation.method(#resolve, [response]), - returnValueForMissingStub: null); + void resolve(_i8.Response? response) => super.noSuchMethod( + Invocation.method( + #resolve, + [response], + ), + returnValueForMissingStub: null, + ); + @override - void reject(_i9.DioError? error, - [bool? callFollowingErrorInterceptor = false]) => + void reject( + _i9.DioException? error, [ + bool? callFollowingErrorInterceptor = false, + ]) => super.noSuchMethod( - Invocation.method(#reject, [error, callFollowingErrorInterceptor]), - returnValueForMissingStub: null); - @override - String toString() => super.toString(); + Invocation.method( + #reject, + [ + error, + callFollowingErrorInterceptor, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [RequestInterceptorHandler]. @@ -84,34 +146,61 @@ class MockRequestInterceptorHandler extends _i1.Mock } @override - _i7.Future<_i2.InterceptorState> get future => - (super.noSuchMethod(Invocation.getter(#future), - returnValue: Future<_i2.InterceptorState>.value( - _FakeInterceptorState_0())) - as _i7.Future<_i2.InterceptorState>); + _i7.Future<_i2.InterceptorState> get future => (super.noSuchMethod( + Invocation.getter(#future), + returnValue: _i7.Future<_i2.InterceptorState>.value( + _FakeInterceptorState_0( + this, + Invocation.getter(#future), + )), + ) as _i7.Future<_i2.InterceptorState>); + @override - bool get isCompleted => - (super.noSuchMethod(Invocation.getter(#isCompleted), returnValue: false) - as bool); + bool get isCompleted => (super.noSuchMethod( + Invocation.getter(#isCompleted), + returnValue: false, + ) as bool); + @override - void next(_i10.RequestOptions? requestOptions) => - super.noSuchMethod(Invocation.method(#next, [requestOptions]), - returnValueForMissingStub: null); + void next(_i10.RequestOptions? requestOptions) => super.noSuchMethod( + Invocation.method( + #next, + [requestOptions], + ), + returnValueForMissingStub: null, + ); + @override - void resolve(_i8.Response? response, - [bool? callFollowingResponseInterceptor = false]) => + void resolve( + _i8.Response? response, [ + bool? callFollowingResponseInterceptor = false, + ]) => super.noSuchMethod( - Invocation.method( - #resolve, [response, callFollowingResponseInterceptor]), - returnValueForMissingStub: null); + Invocation.method( + #resolve, + [ + response, + callFollowingResponseInterceptor, + ], + ), + returnValueForMissingStub: null, + ); + @override - void reject(_i9.DioError? error, - [bool? callFollowingErrorInterceptor = false]) => + void reject( + _i9.DioException? error, [ + bool? callFollowingErrorInterceptor = false, + ]) => super.noSuchMethod( - Invocation.method(#reject, [error, callFollowingErrorInterceptor]), - returnValueForMissingStub: null); - @override - String toString() => super.toString(); + Invocation.method( + #reject, + [ + error, + callFollowingErrorInterceptor, + ], + ), + returnValueForMissingStub: null, + ); } /// A class which mocks [ChatwootClientAuthService]. @@ -124,30 +213,72 @@ class MockChatwootClientAuthService extends _i1.Mock } @override - set connection(_i12.WebSocketChannel? _connection) => - super.noSuchMethod(Invocation.setter(#connection, _connection), - returnValueForMissingStub: null); + set connection(_i12.WebSocketChannel? _connection) => super.noSuchMethod( + Invocation.setter( + #connection, + _connection, + ), + returnValueForMissingStub: null, + ); + @override - _i3.Dio get dio => - (super.noSuchMethod(Invocation.getter(#dio), returnValue: _FakeDio_1()) - as _i3.Dio); + _i3.Dio get dio => (super.noSuchMethod( + Invocation.getter(#dio), + returnValue: _FakeDio_1( + this, + Invocation.getter(#dio), + ), + ) as _i3.Dio); + @override _i7.Future<_i4.ChatwootContact> createNewContact( - String? inboxIdentifier, _i13.ChatwootUser? user) => + String? inboxIdentifier, + _i13.ChatwootUser? user, + ) => (super.noSuchMethod( - Invocation.method(#createNewContact, [inboxIdentifier, user]), - returnValue: - Future<_i4.ChatwootContact>.value(_FakeChatwootContact_2())) - as _i7.Future<_i4.ChatwootContact>); + Invocation.method( + #createNewContact, + [ + inboxIdentifier, + user, + ], + ), + returnValue: + _i7.Future<_i4.ChatwootContact>.value(_FakeChatwootContact_2( + this, + Invocation.method( + #createNewContact, + [ + inboxIdentifier, + user, + ], + ), + )), + ) as _i7.Future<_i4.ChatwootContact>); + @override _i7.Future<_i5.ChatwootConversation> createNewConversation( - String? inboxIdentifier, String? contactIdentifier) => + String? inboxIdentifier, + String? contactIdentifier, + ) => (super.noSuchMethod( - Invocation.method( - #createNewConversation, [inboxIdentifier, contactIdentifier]), - returnValue: Future<_i5.ChatwootConversation>.value( - _FakeChatwootConversation_3())) - as _i7.Future<_i5.ChatwootConversation>); - @override - String toString() => super.toString(); + Invocation.method( + #createNewConversation, + [ + inboxIdentifier, + contactIdentifier, + ], + ), + returnValue: _i7.Future<_i5.ChatwootConversation>.value( + _FakeChatwootConversation_3( + this, + Invocation.method( + #createNewConversation, + [ + inboxIdentifier, + contactIdentifier, + ], + ), + )), + ) as _i7.Future<_i5.ChatwootConversation>); } diff --git a/test/data/remote/chatwoot_client_auth_service_test.dart b/test/data/remote/chatwoot_client_auth_service_test.dart index b747316..d16b935 100644 --- a/test/data/remote/chatwoot_client_auth_service_test.dart +++ b/test/data/remote/chatwoot_client_auth_service_test.dart @@ -86,7 +86,7 @@ void main() { 'Given contact creation fails when createNewContact is called, then throw error', () async { //GIVEN - final testError = DioError(requestOptions: RequestOptions(path: "")); + final testError = DioException(requestOptions: RequestOptions(path: "")); when(mockDio.post(any, data: testUser.toJson())).thenThrow(testError); //WHEN @@ -146,7 +146,7 @@ void main() { 'Given conversation creation fails when createNewConversation is called, then throw error', () async { //GIVEN - final testError = DioError(requestOptions: RequestOptions(path: "")); + final testError = DioException(requestOptions: RequestOptions(path: "")); when(mockDio.post(any)).thenThrow(testError); //WHEN diff --git a/test/data/remote/chatwoot_client_auth_service_test.mocks.dart b/test/data/remote/chatwoot_client_auth_service_test.mocks.dart index 3de2827..d966aca 100644 --- a/test/data/remote/chatwoot_client_auth_service_test.mocks.dart +++ b/test/data/remote/chatwoot_client_auth_service_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.15 from annotations +// Mocks generated by Mockito 5.4.4 from annotations // in chatwoot_sdk/test/data/remote/chatwoot_client_auth_service_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i8; import 'package:dio/src/adapter.dart' as _i3; @@ -13,24 +14,69 @@ import 'package:dio/src/response.dart' as _i6; import 'package:dio/src/transformer.dart' as _i4; import 'package:mockito/mockito.dart' as _i1; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeBaseOptions_0 extends _i1.Fake implements _i2.BaseOptions {} +class _FakeBaseOptions_0 extends _i1.SmartFake implements _i2.BaseOptions { + _FakeBaseOptions_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeHttpClientAdapter_1 extends _i1.Fake - implements _i3.HttpClientAdapter {} +class _FakeHttpClientAdapter_1 extends _i1.SmartFake + implements _i3.HttpClientAdapter { + _FakeHttpClientAdapter_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransformer_2 extends _i1.Fake implements _i4.Transformer {} +class _FakeTransformer_2 extends _i1.SmartFake implements _i4.Transformer { + _FakeTransformer_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeInterceptors_3 extends _i1.Fake implements _i5.Interceptors {} +class _FakeInterceptors_3 extends _i1.SmartFake implements _i5.Interceptors { + _FakeInterceptors_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeResponse_4 extends _i1.Fake implements _i6.Response {} +class _FakeResponse_4 extends _i1.SmartFake implements _i6.Response { + _FakeResponse_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} /// A class which mocks [Dio]. /// @@ -41,341 +87,700 @@ class MockDio extends _i1.Mock implements _i7.Dio { } @override - _i2.BaseOptions get options => - (super.noSuchMethod(Invocation.getter(#options), - returnValue: _FakeBaseOptions_0()) as _i2.BaseOptions); + _i2.BaseOptions get options => (super.noSuchMethod( + Invocation.getter(#options), + returnValue: _FakeBaseOptions_0( + this, + Invocation.getter(#options), + ), + ) as _i2.BaseOptions); + @override - set options(_i2.BaseOptions? _options) => - super.noSuchMethod(Invocation.setter(#options, _options), - returnValueForMissingStub: null); + set options(_i2.BaseOptions? _options) => super.noSuchMethod( + Invocation.setter( + #options, + _options, + ), + returnValueForMissingStub: null, + ); + @override - _i3.HttpClientAdapter get httpClientAdapter => - (super.noSuchMethod(Invocation.getter(#httpClientAdapter), - returnValue: _FakeHttpClientAdapter_1()) as _i3.HttpClientAdapter); + _i3.HttpClientAdapter get httpClientAdapter => (super.noSuchMethod( + Invocation.getter(#httpClientAdapter), + returnValue: _FakeHttpClientAdapter_1( + this, + Invocation.getter(#httpClientAdapter), + ), + ) as _i3.HttpClientAdapter); + @override - set httpClientAdapter(_i3.HttpClientAdapter? _httpClientAdapter) => super - .noSuchMethod(Invocation.setter(#httpClientAdapter, _httpClientAdapter), - returnValueForMissingStub: null); + set httpClientAdapter(_i3.HttpClientAdapter? _httpClientAdapter) => + super.noSuchMethod( + Invocation.setter( + #httpClientAdapter, + _httpClientAdapter, + ), + returnValueForMissingStub: null, + ); + @override - _i4.Transformer get transformer => - (super.noSuchMethod(Invocation.getter(#transformer), - returnValue: _FakeTransformer_2()) as _i4.Transformer); + _i4.Transformer get transformer => (super.noSuchMethod( + Invocation.getter(#transformer), + returnValue: _FakeTransformer_2( + this, + Invocation.getter(#transformer), + ), + ) as _i4.Transformer); + @override - set transformer(_i4.Transformer? _transformer) => - super.noSuchMethod(Invocation.setter(#transformer, _transformer), - returnValueForMissingStub: null); + set transformer(_i4.Transformer? _transformer) => super.noSuchMethod( + Invocation.setter( + #transformer, + _transformer, + ), + returnValueForMissingStub: null, + ); + @override - _i5.Interceptors get interceptors => - (super.noSuchMethod(Invocation.getter(#interceptors), - returnValue: _FakeInterceptors_3()) as _i5.Interceptors); + _i5.Interceptors get interceptors => (super.noSuchMethod( + Invocation.getter(#interceptors), + returnValue: _FakeInterceptors_3( + this, + Invocation.getter(#interceptors), + ), + ) as _i5.Interceptors); + @override - void close({bool? force = false}) => - super.noSuchMethod(Invocation.method(#close, [], {#force: force}), - returnValueForMissingStub: null); + void close({bool? force = false}) => super.noSuchMethod( + Invocation.method( + #close, + [], + {#force: force}, + ), + returnValueForMissingStub: null, + ); + @override - _i8.Future<_i6.Response> get(String? path, - {Map? queryParameters, - _i2.Options? options, - _i9.CancelToken? cancelToken, - _i2.ProgressCallback? onReceiveProgress}) => + _i8.Future<_i6.Response> head( + String? path, { + Object? data, + Map? queryParameters, + _i2.Options? options, + _i9.CancelToken? cancelToken, + }) => (super.noSuchMethod( - Invocation.method(#get, [ - path - ], { - #queryParameters: queryParameters, - #options: options, - #cancelToken: cancelToken, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i8.Future<_i6.Response>); + Invocation.method( + #head, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + }, + ), + returnValue: _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #head, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override - _i8.Future<_i6.Response> getUri(Uri? uri, - {_i2.Options? options, - _i9.CancelToken? cancelToken, - _i2.ProgressCallback? onReceiveProgress}) => + _i8.Future<_i6.Response> headUri( + Uri? uri, { + Object? data, + _i2.Options? options, + _i9.CancelToken? cancelToken, + }) => (super.noSuchMethod( - Invocation.method(#getUri, [ - uri - ], { - #options: options, - #cancelToken: cancelToken, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i8.Future<_i6.Response>); + Invocation.method( + #headUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + }, + ), + returnValue: _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #headUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override - _i8.Future<_i6.Response> post(String? path, - {dynamic data, - Map? queryParameters, - _i2.Options? options, - _i9.CancelToken? cancelToken, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + _i8.Future<_i6.Response> get( + String? path, { + Object? data, + Map? queryParameters, + _i2.Options? options, + _i9.CancelToken? cancelToken, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#post, [ - path - ], { - #data: data, - #queryParameters: queryParameters, - #options: options, - #cancelToken: cancelToken, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i8.Future<_i6.Response>); + Invocation.method( + #get, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #get, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override - _i8.Future<_i6.Response> postUri(Uri? uri, - {dynamic data, - _i2.Options? options, - _i9.CancelToken? cancelToken, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + _i8.Future<_i6.Response> getUri( + Uri? uri, { + Object? data, + _i2.Options? options, + _i9.CancelToken? cancelToken, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#postUri, [ - uri - ], { - #data: data, - #options: options, - #cancelToken: cancelToken, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i8.Future<_i6.Response>); + Invocation.method( + #getUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #getUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override - _i8.Future<_i6.Response> put(String? path, - {dynamic data, - Map? queryParameters, - _i2.Options? options, - _i9.CancelToken? cancelToken, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + _i8.Future<_i6.Response> post( + String? path, { + Object? data, + Map? queryParameters, + _i2.Options? options, + _i9.CancelToken? cancelToken, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#put, [ - path - ], { - #data: data, - #queryParameters: queryParameters, - #options: options, - #cancelToken: cancelToken, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i8.Future<_i6.Response>); + Invocation.method( + #post, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #post, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override - _i8.Future<_i6.Response> putUri(Uri? uri, - {dynamic data, - _i2.Options? options, - _i9.CancelToken? cancelToken, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + _i8.Future<_i6.Response> postUri( + Uri? uri, { + Object? data, + _i2.Options? options, + _i9.CancelToken? cancelToken, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#putUri, [ - uri - ], { - #data: data, - #options: options, - #cancelToken: cancelToken, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i8.Future<_i6.Response>); + Invocation.method( + #postUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #postUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override - _i8.Future<_i6.Response> head(String? path, - {dynamic data, - Map? queryParameters, - _i2.Options? options, - _i9.CancelToken? cancelToken}) => + _i8.Future<_i6.Response> put( + String? path, { + Object? data, + Map? queryParameters, + _i2.Options? options, + _i9.CancelToken? cancelToken, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#head, [ - path - ], { - #data: data, - #queryParameters: queryParameters, - #options: options, - #cancelToken: cancelToken - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i8.Future<_i6.Response>); + Invocation.method( + #put, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #put, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override - _i8.Future<_i6.Response> headUri(Uri? uri, - {dynamic data, _i2.Options? options, _i9.CancelToken? cancelToken}) => + _i8.Future<_i6.Response> putUri( + Uri? uri, { + Object? data, + _i2.Options? options, + _i9.CancelToken? cancelToken, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#headUri, [uri], - {#data: data, #options: options, #cancelToken: cancelToken}), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i8.Future<_i6.Response>); + Invocation.method( + #putUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #putUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override - _i8.Future<_i6.Response> delete(String? path, - {dynamic data, - Map? queryParameters, - _i2.Options? options, - _i9.CancelToken? cancelToken}) => + _i8.Future<_i6.Response> patch( + String? path, { + Object? data, + Map? queryParameters, + _i2.Options? options, + _i9.CancelToken? cancelToken, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#delete, [ - path - ], { - #data: data, - #queryParameters: queryParameters, - #options: options, - #cancelToken: cancelToken - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i8.Future<_i6.Response>); + Invocation.method( + #patch, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #patch, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override - _i8.Future<_i6.Response> deleteUri(Uri? uri, - {dynamic data, _i2.Options? options, _i9.CancelToken? cancelToken}) => + _i8.Future<_i6.Response> patchUri( + Uri? uri, { + Object? data, + _i2.Options? options, + _i9.CancelToken? cancelToken, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#deleteUri, [uri], - {#data: data, #options: options, #cancelToken: cancelToken}), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i8.Future<_i6.Response>); + Invocation.method( + #patchUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #patchUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override - _i8.Future<_i6.Response> patch(String? path, - {dynamic data, - Map? queryParameters, - _i2.Options? options, - _i9.CancelToken? cancelToken, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + _i8.Future<_i6.Response> delete( + String? path, { + Object? data, + Map? queryParameters, + _i2.Options? options, + _i9.CancelToken? cancelToken, + }) => (super.noSuchMethod( - Invocation.method(#patch, [ - path - ], { - #data: data, - #queryParameters: queryParameters, - #options: options, - #cancelToken: cancelToken, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i8.Future<_i6.Response>); + Invocation.method( + #delete, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + }, + ), + returnValue: _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #delete, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override - _i8.Future<_i6.Response> patchUri(Uri? uri, - {dynamic data, - _i2.Options? options, - _i9.CancelToken? cancelToken, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + _i8.Future<_i6.Response> deleteUri( + Uri? uri, { + Object? data, + _i2.Options? options, + _i9.CancelToken? cancelToken, + }) => (super.noSuchMethod( - Invocation.method(#patchUri, [ - uri - ], { - #data: data, - #options: options, - #cancelToken: cancelToken, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i8.Future<_i6.Response>); - @override - void lock() => super.noSuchMethod(Invocation.method(#lock, []), - returnValueForMissingStub: null); - @override - void unlock() => super.noSuchMethod(Invocation.method(#unlock, []), - returnValueForMissingStub: null); - @override - void clear() => super.noSuchMethod(Invocation.method(#clear, []), - returnValueForMissingStub: null); + Invocation.method( + #deleteUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + }, + ), + returnValue: _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #deleteUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override - _i8.Future<_i6.Response> download(String? urlPath, dynamic savePath, - {_i2.ProgressCallback? onReceiveProgress, - Map? queryParameters, - _i9.CancelToken? cancelToken, - bool? deleteOnError = true, - String? lengthHeader = r'content-length', - dynamic data, - _i2.Options? options}) => + _i8.Future<_i6.Response> download( + String? urlPath, + dynamic savePath, { + _i2.ProgressCallback? onReceiveProgress, + Map? queryParameters, + _i9.CancelToken? cancelToken, + bool? deleteOnError = true, + String? lengthHeader = r'content-length', + Object? data, + _i2.Options? options, + }) => (super.noSuchMethod( - Invocation.method(#download, [ - urlPath, - savePath - ], { - #onReceiveProgress: onReceiveProgress, - #queryParameters: queryParameters, - #cancelToken: cancelToken, - #deleteOnError: deleteOnError, - #lengthHeader: lengthHeader, - #data: data, - #options: options - }), - returnValue: Future<_i6.Response>.value( - _FakeResponse_4())) - as _i8.Future<_i6.Response>); + Invocation.method( + #download, + [ + urlPath, + savePath, + ], + { + #onReceiveProgress: onReceiveProgress, + #queryParameters: queryParameters, + #cancelToken: cancelToken, + #deleteOnError: deleteOnError, + #lengthHeader: lengthHeader, + #data: data, + #options: options, + }, + ), + returnValue: + _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #download, + [ + urlPath, + savePath, + ], + { + #onReceiveProgress: onReceiveProgress, + #queryParameters: queryParameters, + #cancelToken: cancelToken, + #deleteOnError: deleteOnError, + #lengthHeader: lengthHeader, + #data: data, + #options: options, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override - _i8.Future<_i6.Response> downloadUri(Uri? uri, dynamic savePath, - {_i2.ProgressCallback? onReceiveProgress, - _i9.CancelToken? cancelToken, - bool? deleteOnError = true, - String? lengthHeader = r'content-length', - dynamic data, - _i2.Options? options}) => + _i8.Future<_i6.Response> downloadUri( + Uri? uri, + dynamic savePath, { + _i2.ProgressCallback? onReceiveProgress, + _i9.CancelToken? cancelToken, + bool? deleteOnError = true, + String? lengthHeader = r'content-length', + Object? data, + _i2.Options? options, + }) => (super.noSuchMethod( - Invocation.method(#downloadUri, [ - uri, - savePath - ], { - #onReceiveProgress: onReceiveProgress, - #cancelToken: cancelToken, - #deleteOnError: deleteOnError, - #lengthHeader: lengthHeader, - #data: data, - #options: options - }), - returnValue: Future<_i6.Response>.value( - _FakeResponse_4())) - as _i8.Future<_i6.Response>); + Invocation.method( + #downloadUri, + [ + uri, + savePath, + ], + { + #onReceiveProgress: onReceiveProgress, + #cancelToken: cancelToken, + #deleteOnError: deleteOnError, + #lengthHeader: lengthHeader, + #data: data, + #options: options, + }, + ), + returnValue: + _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #downloadUri, + [ + uri, + savePath, + ], + { + #onReceiveProgress: onReceiveProgress, + #cancelToken: cancelToken, + #deleteOnError: deleteOnError, + #lengthHeader: lengthHeader, + #data: data, + #options: options, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override - _i8.Future<_i6.Response> request(String? path, - {dynamic data, - Map? queryParameters, - _i9.CancelToken? cancelToken, - _i2.Options? options, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + _i8.Future<_i6.Response> request( + String? url, { + Object? data, + Map? queryParameters, + _i9.CancelToken? cancelToken, + _i2.Options? options, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#request, [ - path - ], { - #data: data, - #queryParameters: queryParameters, - #cancelToken: cancelToken, - #options: options, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i8.Future<_i6.Response>); + Invocation.method( + #request, + [url], + { + #data: data, + #queryParameters: queryParameters, + #cancelToken: cancelToken, + #options: options, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #request, + [url], + { + #data: data, + #queryParameters: queryParameters, + #cancelToken: cancelToken, + #options: options, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override - _i8.Future<_i6.Response> requestUri(Uri? uri, - {dynamic data, - _i9.CancelToken? cancelToken, - _i2.Options? options, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + _i8.Future<_i6.Response> requestUri( + Uri? uri, { + Object? data, + _i9.CancelToken? cancelToken, + _i2.Options? options, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#requestUri, [ - uri - ], { - #data: data, - #cancelToken: cancelToken, - #options: options, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i8.Future<_i6.Response>); + Invocation.method( + #requestUri, + [uri], + { + #data: data, + #cancelToken: cancelToken, + #options: options, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #requestUri, + [uri], + { + #data: data, + #cancelToken: cancelToken, + #options: options, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i8.Future<_i6.Response>); + @override _i8.Future<_i6.Response> fetch(_i2.RequestOptions? requestOptions) => - (super.noSuchMethod(Invocation.method(#fetch, [requestOptions]), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i8.Future<_i6.Response>); - @override - String toString() => super.toString(); + (super.noSuchMethod( + Invocation.method( + #fetch, + [requestOptions], + ), + returnValue: _i8.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #fetch, + [requestOptions], + ), + )), + ) as _i8.Future<_i6.Response>); } diff --git a/test/data/remote/chatwoot_client_service_test.dart b/test/data/remote/chatwoot_client_service_test.dart index a3e4f20..92b61c9 100644 --- a/test/data/remote/chatwoot_client_service_test.dart +++ b/test/data/remote/chatwoot_client_service_test.dart @@ -86,7 +86,7 @@ void main() { 'Given sending message fails when createMessage is called, then throw error', () async { //GIVEN - final testError = DioError(requestOptions: RequestOptions(path: "")); + final testError = DioException(requestOptions: RequestOptions(path: "")); final request = ChatwootNewMessageRequest(content: "test message", echoId: "id"); when(mockDio.post(any, data: request.toJson())).thenThrow(testError); @@ -148,7 +148,7 @@ void main() { 'Given fetch messages fails when getAllMessages is called, then throw error', () async { //GIVEN - final testError = DioError(requestOptions: RequestOptions(path: "")); + final testError = DioException(requestOptions: RequestOptions(path: "")); when(mockDio.get(any)).thenThrow(testError); //WHEN @@ -206,7 +206,7 @@ void main() { 'Given fetch contact fails when getContact is called, then throw error', () async { //GIVEN - final testError = DioError(requestOptions: RequestOptions(path: "")); + final testError = DioException(requestOptions: RequestOptions(path: "")); when(mockDio.get(any)).thenThrow(testError); //WHEN @@ -266,7 +266,7 @@ void main() { 'Given fetch conversations fails when getConversations is called, then throw error', () async { //GIVEN - final testError = DioError(requestOptions: RequestOptions(path: "")); + final testError = DioException(requestOptions: RequestOptions(path: "")); when(mockDio.get(any)).thenThrow(testError); //WHEN @@ -327,7 +327,7 @@ void main() { () async { //GIVEN final update = {"name": "Updated name"}; - final testError = DioError(requestOptions: RequestOptions(path: "")); + final testError = DioException(requestOptions: RequestOptions(path: "")); when(mockDio.patch(any, data: update)).thenThrow(testError); //WHEN @@ -392,7 +392,7 @@ void main() { //GIVEN final testMessageId = "id"; final update = {"content": "Updated content"}; - final testError = DioError(requestOptions: RequestOptions(path: "")); + final testError = DioException(requestOptions: RequestOptions(path: "")); when(mockDio.patch(any, data: update)).thenThrow(testError); //WHEN diff --git a/test/data/remote/chatwoot_client_service_test.mocks.dart b/test/data/remote/chatwoot_client_service_test.mocks.dart index f7163d1..5fdac38 100644 --- a/test/data/remote/chatwoot_client_service_test.mocks.dart +++ b/test/data/remote/chatwoot_client_service_test.mocks.dart @@ -1,7 +1,8 @@ -// Mocks generated by Mockito 5.0.15 from annotations +// Mocks generated by Mockito 5.4.4 from annotations // in chatwoot_sdk/test/data/remote/chatwoot_client_service_test.dart. // Do not manually edit this file. +// ignore_for_file: no_leading_underscores_for_library_prefixes import 'dart:async' as _i10; import 'package:async/async.dart' as _i12; @@ -16,28 +17,89 @@ import 'package:mockito/mockito.dart' as _i1; import 'package:stream_channel/stream_channel.dart' as _i8; import 'package:web_socket_channel/src/channel.dart' as _i7; +// ignore_for_file: type=lint // ignore_for_file: avoid_redundant_argument_values // ignore_for_file: avoid_setters_without_getters // ignore_for_file: comment_references +// ignore_for_file: deprecated_member_use +// ignore_for_file: deprecated_member_use_from_same_package // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: prefer_const_constructors // ignore_for_file: unnecessary_parenthesis +// ignore_for_file: camel_case_types +// ignore_for_file: subtype_of_sealed_class -class _FakeBaseOptions_0 extends _i1.Fake implements _i2.BaseOptions {} +class _FakeBaseOptions_0 extends _i1.SmartFake implements _i2.BaseOptions { + _FakeBaseOptions_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeHttpClientAdapter_1 extends _i1.Fake - implements _i3.HttpClientAdapter {} +class _FakeHttpClientAdapter_1 extends _i1.SmartFake + implements _i3.HttpClientAdapter { + _FakeHttpClientAdapter_1( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeTransformer_2 extends _i1.Fake implements _i4.Transformer {} +class _FakeTransformer_2 extends _i1.SmartFake implements _i4.Transformer { + _FakeTransformer_2( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeInterceptors_3 extends _i1.Fake implements _i5.Interceptors {} +class _FakeInterceptors_3 extends _i1.SmartFake implements _i5.Interceptors { + _FakeInterceptors_3( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeResponse_4 extends _i1.Fake implements _i6.Response {} +class _FakeResponse_4 extends _i1.SmartFake implements _i6.Response { + _FakeResponse_4( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeWebSocketSink_5 extends _i1.Fake implements _i7.WebSocketSink {} +class _FakeWebSocketSink_5 extends _i1.SmartFake implements _i7.WebSocketSink { + _FakeWebSocketSink_5( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); +} -class _FakeStreamChannel_6 extends _i1.Fake implements _i8.StreamChannel { +class _FakeStreamChannel_6 extends _i1.SmartFake + implements _i8.StreamChannel { + _FakeStreamChannel_6( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } /// A class which mocks [Dio]. @@ -49,347 +111,702 @@ class MockDio extends _i1.Mock implements _i9.Dio { } @override - _i2.BaseOptions get options => - (super.noSuchMethod(Invocation.getter(#options), - returnValue: _FakeBaseOptions_0()) as _i2.BaseOptions); + _i2.BaseOptions get options => (super.noSuchMethod( + Invocation.getter(#options), + returnValue: _FakeBaseOptions_0( + this, + Invocation.getter(#options), + ), + ) as _i2.BaseOptions); + @override - set options(_i2.BaseOptions? _options) => - super.noSuchMethod(Invocation.setter(#options, _options), - returnValueForMissingStub: null); + set options(_i2.BaseOptions? _options) => super.noSuchMethod( + Invocation.setter( + #options, + _options, + ), + returnValueForMissingStub: null, + ); + @override - _i3.HttpClientAdapter get httpClientAdapter => - (super.noSuchMethod(Invocation.getter(#httpClientAdapter), - returnValue: _FakeHttpClientAdapter_1()) as _i3.HttpClientAdapter); + _i3.HttpClientAdapter get httpClientAdapter => (super.noSuchMethod( + Invocation.getter(#httpClientAdapter), + returnValue: _FakeHttpClientAdapter_1( + this, + Invocation.getter(#httpClientAdapter), + ), + ) as _i3.HttpClientAdapter); + @override - set httpClientAdapter(_i3.HttpClientAdapter? _httpClientAdapter) => super - .noSuchMethod(Invocation.setter(#httpClientAdapter, _httpClientAdapter), - returnValueForMissingStub: null); + set httpClientAdapter(_i3.HttpClientAdapter? _httpClientAdapter) => + super.noSuchMethod( + Invocation.setter( + #httpClientAdapter, + _httpClientAdapter, + ), + returnValueForMissingStub: null, + ); + @override - _i4.Transformer get transformer => - (super.noSuchMethod(Invocation.getter(#transformer), - returnValue: _FakeTransformer_2()) as _i4.Transformer); + _i4.Transformer get transformer => (super.noSuchMethod( + Invocation.getter(#transformer), + returnValue: _FakeTransformer_2( + this, + Invocation.getter(#transformer), + ), + ) as _i4.Transformer); + @override - set transformer(_i4.Transformer? _transformer) => - super.noSuchMethod(Invocation.setter(#transformer, _transformer), - returnValueForMissingStub: null); + set transformer(_i4.Transformer? _transformer) => super.noSuchMethod( + Invocation.setter( + #transformer, + _transformer, + ), + returnValueForMissingStub: null, + ); + @override - _i5.Interceptors get interceptors => - (super.noSuchMethod(Invocation.getter(#interceptors), - returnValue: _FakeInterceptors_3()) as _i5.Interceptors); + _i5.Interceptors get interceptors => (super.noSuchMethod( + Invocation.getter(#interceptors), + returnValue: _FakeInterceptors_3( + this, + Invocation.getter(#interceptors), + ), + ) as _i5.Interceptors); + @override - void close({bool? force = false}) => - super.noSuchMethod(Invocation.method(#close, [], {#force: force}), - returnValueForMissingStub: null); + void close({bool? force = false}) => super.noSuchMethod( + Invocation.method( + #close, + [], + {#force: force}, + ), + returnValueForMissingStub: null, + ); + @override - _i10.Future<_i6.Response> get(String? path, - {Map? queryParameters, - _i2.Options? options, - _i11.CancelToken? cancelToken, - _i2.ProgressCallback? onReceiveProgress}) => + _i10.Future<_i6.Response> head( + String? path, { + Object? data, + Map? queryParameters, + _i2.Options? options, + _i11.CancelToken? cancelToken, + }) => (super.noSuchMethod( - Invocation.method(#get, [ - path - ], { - #queryParameters: queryParameters, - #options: options, - #cancelToken: cancelToken, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - _i10.Future<_i6.Response> getUri(Uri? uri, - {_i2.Options? options, - _i11.CancelToken? cancelToken, - _i2.ProgressCallback? onReceiveProgress}) => + Invocation.method( + #head, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + }, + ), + returnValue: _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #head, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + + @override + _i10.Future<_i6.Response> headUri( + Uri? uri, { + Object? data, + _i2.Options? options, + _i11.CancelToken? cancelToken, + }) => (super.noSuchMethod( - Invocation.method(#getUri, [ - uri - ], { - #options: options, - #cancelToken: cancelToken, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - _i10.Future<_i6.Response> post(String? path, - {dynamic data, - Map? queryParameters, - _i2.Options? options, - _i11.CancelToken? cancelToken, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + Invocation.method( + #headUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + }, + ), + returnValue: _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #headUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + + @override + _i10.Future<_i6.Response> get( + String? path, { + Object? data, + Map? queryParameters, + _i2.Options? options, + _i11.CancelToken? cancelToken, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#post, [ - path - ], { - #data: data, - #queryParameters: queryParameters, - #options: options, - #cancelToken: cancelToken, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - _i10.Future<_i6.Response> postUri(Uri? uri, - {dynamic data, - _i2.Options? options, - _i11.CancelToken? cancelToken, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + Invocation.method( + #get, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #get, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + + @override + _i10.Future<_i6.Response> getUri( + Uri? uri, { + Object? data, + _i2.Options? options, + _i11.CancelToken? cancelToken, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#postUri, [ - uri - ], { - #data: data, - #options: options, - #cancelToken: cancelToken, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - _i10.Future<_i6.Response> put(String? path, - {dynamic data, - Map? queryParameters, - _i2.Options? options, - _i11.CancelToken? cancelToken, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + Invocation.method( + #getUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #getUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + + @override + _i10.Future<_i6.Response> post( + String? path, { + Object? data, + Map? queryParameters, + _i2.Options? options, + _i11.CancelToken? cancelToken, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#put, [ - path - ], { - #data: data, - #queryParameters: queryParameters, - #options: options, - #cancelToken: cancelToken, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - _i10.Future<_i6.Response> putUri(Uri? uri, - {dynamic data, - _i2.Options? options, - _i11.CancelToken? cancelToken, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + Invocation.method( + #post, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #post, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + + @override + _i10.Future<_i6.Response> postUri( + Uri? uri, { + Object? data, + _i2.Options? options, + _i11.CancelToken? cancelToken, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#putUri, [ - uri - ], { - #data: data, - #options: options, - #cancelToken: cancelToken, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - _i10.Future<_i6.Response> head(String? path, - {dynamic data, - Map? queryParameters, - _i2.Options? options, - _i11.CancelToken? cancelToken}) => + Invocation.method( + #postUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #postUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + + @override + _i10.Future<_i6.Response> put( + String? path, { + Object? data, + Map? queryParameters, + _i2.Options? options, + _i11.CancelToken? cancelToken, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#head, [ - path - ], { - #data: data, - #queryParameters: queryParameters, - #options: options, - #cancelToken: cancelToken - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - _i10.Future<_i6.Response> headUri(Uri? uri, - {dynamic data, - _i2.Options? options, - _i11.CancelToken? cancelToken}) => + Invocation.method( + #put, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #put, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + + @override + _i10.Future<_i6.Response> putUri( + Uri? uri, { + Object? data, + _i2.Options? options, + _i11.CancelToken? cancelToken, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#headUri, [uri], - {#data: data, #options: options, #cancelToken: cancelToken}), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - _i10.Future<_i6.Response> delete(String? path, - {dynamic data, - Map? queryParameters, - _i2.Options? options, - _i11.CancelToken? cancelToken}) => + Invocation.method( + #putUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #putUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + + @override + _i10.Future<_i6.Response> patch( + String? path, { + Object? data, + Map? queryParameters, + _i2.Options? options, + _i11.CancelToken? cancelToken, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#delete, [ - path - ], { - #data: data, - #queryParameters: queryParameters, - #options: options, - #cancelToken: cancelToken - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - _i10.Future<_i6.Response> deleteUri(Uri? uri, - {dynamic data, - _i2.Options? options, - _i11.CancelToken? cancelToken}) => + Invocation.method( + #patch, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #patch, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + + @override + _i10.Future<_i6.Response> patchUri( + Uri? uri, { + Object? data, + _i2.Options? options, + _i11.CancelToken? cancelToken, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#deleteUri, [uri], - {#data: data, #options: options, #cancelToken: cancelToken}), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - _i10.Future<_i6.Response> patch(String? path, - {dynamic data, - Map? queryParameters, - _i2.Options? options, - _i11.CancelToken? cancelToken, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + Invocation.method( + #patchUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #patchUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + + @override + _i10.Future<_i6.Response> delete( + String? path, { + Object? data, + Map? queryParameters, + _i2.Options? options, + _i11.CancelToken? cancelToken, + }) => (super.noSuchMethod( - Invocation.method(#patch, [ - path - ], { - #data: data, - #queryParameters: queryParameters, - #options: options, - #cancelToken: cancelToken, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - _i10.Future<_i6.Response> patchUri(Uri? uri, - {dynamic data, - _i2.Options? options, - _i11.CancelToken? cancelToken, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + Invocation.method( + #delete, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + }, + ), + returnValue: _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #delete, + [path], + { + #data: data, + #queryParameters: queryParameters, + #options: options, + #cancelToken: cancelToken, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + + @override + _i10.Future<_i6.Response> deleteUri( + Uri? uri, { + Object? data, + _i2.Options? options, + _i11.CancelToken? cancelToken, + }) => (super.noSuchMethod( - Invocation.method(#patchUri, [ - uri - ], { - #data: data, - #options: options, - #cancelToken: cancelToken, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - void lock() => super.noSuchMethod(Invocation.method(#lock, []), - returnValueForMissingStub: null); - @override - void unlock() => super.noSuchMethod(Invocation.method(#unlock, []), - returnValueForMissingStub: null); - @override - void clear() => super.noSuchMethod(Invocation.method(#clear, []), - returnValueForMissingStub: null); - @override - _i10.Future<_i6.Response> download(String? urlPath, dynamic savePath, - {_i2.ProgressCallback? onReceiveProgress, - Map? queryParameters, - _i11.CancelToken? cancelToken, - bool? deleteOnError = true, - String? lengthHeader = r'content-length', - dynamic data, - _i2.Options? options}) => + Invocation.method( + #deleteUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + }, + ), + returnValue: _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #deleteUri, + [uri], + { + #data: data, + #options: options, + #cancelToken: cancelToken, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + + @override + _i10.Future<_i6.Response> download( + String? urlPath, + dynamic savePath, { + _i2.ProgressCallback? onReceiveProgress, + Map? queryParameters, + _i11.CancelToken? cancelToken, + bool? deleteOnError = true, + String? lengthHeader = r'content-length', + Object? data, + _i2.Options? options, + }) => (super.noSuchMethod( - Invocation.method(#download, [ - urlPath, - savePath - ], { - #onReceiveProgress: onReceiveProgress, - #queryParameters: queryParameters, - #cancelToken: cancelToken, - #deleteOnError: deleteOnError, - #lengthHeader: lengthHeader, - #data: data, - #options: options - }), - returnValue: Future<_i6.Response>.value( - _FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - _i10.Future<_i6.Response> downloadUri(Uri? uri, dynamic savePath, - {_i2.ProgressCallback? onReceiveProgress, - _i11.CancelToken? cancelToken, - bool? deleteOnError = true, - String? lengthHeader = r'content-length', - dynamic data, - _i2.Options? options}) => + Invocation.method( + #download, + [ + urlPath, + savePath, + ], + { + #onReceiveProgress: onReceiveProgress, + #queryParameters: queryParameters, + #cancelToken: cancelToken, + #deleteOnError: deleteOnError, + #lengthHeader: lengthHeader, + #data: data, + #options: options, + }, + ), + returnValue: + _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #download, + [ + urlPath, + savePath, + ], + { + #onReceiveProgress: onReceiveProgress, + #queryParameters: queryParameters, + #cancelToken: cancelToken, + #deleteOnError: deleteOnError, + #lengthHeader: lengthHeader, + #data: data, + #options: options, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + + @override + _i10.Future<_i6.Response> downloadUri( + Uri? uri, + dynamic savePath, { + _i2.ProgressCallback? onReceiveProgress, + _i11.CancelToken? cancelToken, + bool? deleteOnError = true, + String? lengthHeader = r'content-length', + Object? data, + _i2.Options? options, + }) => (super.noSuchMethod( - Invocation.method(#downloadUri, [ - uri, - savePath - ], { - #onReceiveProgress: onReceiveProgress, - #cancelToken: cancelToken, - #deleteOnError: deleteOnError, - #lengthHeader: lengthHeader, - #data: data, - #options: options - }), - returnValue: Future<_i6.Response>.value( - _FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - _i10.Future<_i6.Response> request(String? path, - {dynamic data, - Map? queryParameters, - _i11.CancelToken? cancelToken, - _i2.Options? options, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + Invocation.method( + #downloadUri, + [ + uri, + savePath, + ], + { + #onReceiveProgress: onReceiveProgress, + #cancelToken: cancelToken, + #deleteOnError: deleteOnError, + #lengthHeader: lengthHeader, + #data: data, + #options: options, + }, + ), + returnValue: + _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #downloadUri, + [ + uri, + savePath, + ], + { + #onReceiveProgress: onReceiveProgress, + #cancelToken: cancelToken, + #deleteOnError: deleteOnError, + #lengthHeader: lengthHeader, + #data: data, + #options: options, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + + @override + _i10.Future<_i6.Response> request( + String? url, { + Object? data, + Map? queryParameters, + _i11.CancelToken? cancelToken, + _i2.Options? options, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#request, [ - path - ], { - #data: data, - #queryParameters: queryParameters, - #cancelToken: cancelToken, - #options: options, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - _i10.Future<_i6.Response> requestUri(Uri? uri, - {dynamic data, - _i11.CancelToken? cancelToken, - _i2.Options? options, - _i2.ProgressCallback? onSendProgress, - _i2.ProgressCallback? onReceiveProgress}) => + Invocation.method( + #request, + [url], + { + #data: data, + #queryParameters: queryParameters, + #cancelToken: cancelToken, + #options: options, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #request, + [url], + { + #data: data, + #queryParameters: queryParameters, + #cancelToken: cancelToken, + #options: options, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + + @override + _i10.Future<_i6.Response> requestUri( + Uri? uri, { + Object? data, + _i11.CancelToken? cancelToken, + _i2.Options? options, + _i2.ProgressCallback? onSendProgress, + _i2.ProgressCallback? onReceiveProgress, + }) => (super.noSuchMethod( - Invocation.method(#requestUri, [ - uri - ], { - #data: data, - #cancelToken: cancelToken, - #options: options, - #onSendProgress: onSendProgress, - #onReceiveProgress: onReceiveProgress - }), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i10.Future<_i6.Response>); + Invocation.method( + #requestUri, + [uri], + { + #data: data, + #cancelToken: cancelToken, + #options: options, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + returnValue: _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #requestUri, + [uri], + { + #data: data, + #cancelToken: cancelToken, + #options: options, + #onSendProgress: onSendProgress, + #onReceiveProgress: onReceiveProgress, + }, + ), + )), + ) as _i10.Future<_i6.Response>); + @override _i10.Future<_i6.Response> fetch(_i2.RequestOptions? requestOptions) => - (super.noSuchMethod(Invocation.method(#fetch, [requestOptions]), - returnValue: Future<_i6.Response>.value(_FakeResponse_4())) - as _i10.Future<_i6.Response>); - @override - String toString() => super.toString(); + (super.noSuchMethod( + Invocation.method( + #fetch, + [requestOptions], + ), + returnValue: _i10.Future<_i6.Response>.value(_FakeResponse_4( + this, + Invocation.method( + #fetch, + [requestOptions], + ), + )), + ) as _i10.Future<_i6.Response>); } /// A class which mocks [WebSocketChannel]. @@ -401,52 +818,135 @@ class MockWebSocketChannel extends _i1.Mock implements _i7.WebSocketChannel { } @override - _i10.Stream get stream => - (super.noSuchMethod(Invocation.getter(#stream), - returnValue: Stream.empty()) as _i10.Stream); + _i10.Future get ready => (super.noSuchMethod( + Invocation.getter(#ready), + returnValue: _i10.Future.value(), + ) as _i10.Future); + @override - _i7.WebSocketSink get sink => (super.noSuchMethod(Invocation.getter(#sink), - returnValue: _FakeWebSocketSink_5()) as _i7.WebSocketSink); + _i7.WebSocketSink get sink => (super.noSuchMethod( + Invocation.getter(#sink), + returnValue: _FakeWebSocketSink_5( + this, + Invocation.getter(#sink), + ), + ) as _i7.WebSocketSink); + @override - void pipe(_i8.StreamChannel? other) => - super.noSuchMethod(Invocation.method(#pipe, [other]), - returnValueForMissingStub: null); + _i10.Stream get stream => (super.noSuchMethod( + Invocation.getter(#stream), + returnValue: _i10.Stream.empty(), + ) as _i10.Stream); + + @override + void pipe(_i8.StreamChannel? other) => super.noSuchMethod( + Invocation.method( + #pipe, + [other], + ), + returnValueForMissingStub: null, + ); + @override _i8.StreamChannel transform( _i8.StreamChannelTransformer? transformer) => - (super.noSuchMethod(Invocation.method(#transform, [transformer]), - returnValue: _FakeStreamChannel_6()) as _i8.StreamChannel); + (super.noSuchMethod( + Invocation.method( + #transform, + [transformer], + ), + returnValue: _FakeStreamChannel_6( + this, + Invocation.method( + #transform, + [transformer], + ), + ), + ) as _i8.StreamChannel); + @override _i8.StreamChannel transformStream( _i10.StreamTransformer? transformer) => - (super.noSuchMethod(Invocation.method(#transformStream, [transformer]), - returnValue: _FakeStreamChannel_6()) - as _i8.StreamChannel); + (super.noSuchMethod( + Invocation.method( + #transformStream, + [transformer], + ), + returnValue: _FakeStreamChannel_6( + this, + Invocation.method( + #transformStream, + [transformer], + ), + ), + ) as _i8.StreamChannel); + @override _i8.StreamChannel transformSink( _i12.StreamSinkTransformer? transformer) => - (super.noSuchMethod(Invocation.method(#transformSink, [transformer]), - returnValue: _FakeStreamChannel_6()) - as _i8.StreamChannel); + (super.noSuchMethod( + Invocation.method( + #transformSink, + [transformer], + ), + returnValue: _FakeStreamChannel_6( + this, + Invocation.method( + #transformSink, + [transformer], + ), + ), + ) as _i8.StreamChannel); + @override _i8.StreamChannel changeStream( _i10.Stream Function(_i10.Stream)? change) => - (super.noSuchMethod(Invocation.method(#changeStream, [change]), - returnValue: _FakeStreamChannel_6()) - as _i8.StreamChannel); + (super.noSuchMethod( + Invocation.method( + #changeStream, + [change], + ), + returnValue: _FakeStreamChannel_6( + this, + Invocation.method( + #changeStream, + [change], + ), + ), + ) as _i8.StreamChannel); + @override _i8.StreamChannel changeSink( _i10.StreamSink Function(_i10.StreamSink)? change) => - (super.noSuchMethod(Invocation.method(#changeSink, [change]), - returnValue: _FakeStreamChannel_6()) - as _i8.StreamChannel); - @override - _i8.StreamChannel cast() => - (super.noSuchMethod(Invocation.method(#cast, []), - returnValue: _FakeStreamChannel_6()) as _i8.StreamChannel); + (super.noSuchMethod( + Invocation.method( + #changeSink, + [change], + ), + returnValue: _FakeStreamChannel_6( + this, + Invocation.method( + #changeSink, + [change], + ), + ), + ) as _i8.StreamChannel); + @override - String toString() => super.toString(); + _i8.StreamChannel cast() => (super.noSuchMethod( + Invocation.method( + #cast, + [], + ), + returnValue: _FakeStreamChannel_6( + this, + Invocation.method( + #cast, + [], + ), + ), + ) as _i8.StreamChannel); } /// A class which mocks [WebSocketSink]. @@ -458,23 +958,59 @@ class MockWebSocketSink extends _i1.Mock implements _i7.WebSocketSink { } @override - _i10.Future get done => (super.noSuchMethod(Invocation.getter(#done), - returnValue: Future.value()) as _i10.Future); + _i10.Future get done => (super.noSuchMethod( + Invocation.getter(#done), + returnValue: _i10.Future.value(), + ) as _i10.Future); + @override - _i10.Future close([int? closeCode, String? closeReason]) => - (super.noSuchMethod(Invocation.method(#close, [closeCode, closeReason]), - returnValue: Future.value()) as _i10.Future); + _i10.Future close([ + int? closeCode, + String? closeReason, + ]) => + (super.noSuchMethod( + Invocation.method( + #close, + [ + closeCode, + closeReason, + ], + ), + returnValue: _i10.Future.value(), + ) as _i10.Future); + @override - void add(dynamic data) => super.noSuchMethod(Invocation.method(#add, [data]), - returnValueForMissingStub: null); + void add(dynamic data) => super.noSuchMethod( + Invocation.method( + #add, + [data], + ), + returnValueForMissingStub: null, + ); + @override - void addError(Object? error, [StackTrace? stackTrace]) => - super.noSuchMethod(Invocation.method(#addError, [error, stackTrace]), - returnValueForMissingStub: null); + void addError( + Object? error, [ + StackTrace? stackTrace, + ]) => + super.noSuchMethod( + Invocation.method( + #addError, + [ + error, + stackTrace, + ], + ), + returnValueForMissingStub: null, + ); + @override _i10.Future addStream(_i10.Stream? stream) => - (super.noSuchMethod(Invocation.method(#addStream, [stream]), - returnValue: Future.value()) as _i10.Future); - @override - String toString() => super.toString(); + (super.noSuchMethod( + Invocation.method( + #addStream, + [stream], + ), + returnValue: _i10.Future.value(), + ) as _i10.Future); } diff --git a/test/di/modules_test.dart b/test/di/modules_test.dart index 88a5448..25b96c2 100644 --- a/test/di/modules_test.dart +++ b/test/di/modules_test.dart @@ -9,6 +9,7 @@ import 'package:chatwoot_sdk/data/local/dao/chatwoot_user_dao.dart'; import 'package:chatwoot_sdk/data/local/entity/chatwoot_contact.dart'; import 'package:chatwoot_sdk/data/local/entity/chatwoot_conversation.dart'; import 'package:chatwoot_sdk/data/remote/responses/chatwoot_event.dart'; +import 'package:chatwoot_sdk/data/remote/service/chatwoot_client_api_interceptor.dart'; import 'package:chatwoot_sdk/di/modules.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:hive_flutter/hive_flutter.dart'; @@ -50,7 +51,8 @@ void main() { //THEN expect(result.options.baseUrl, equals(testChatwootParameters.baseUrl)); - expect(result.interceptors.isEmpty, equals(true)); + final authInterceptorCount = result.interceptors.where((i)=>i is ChatwootClientApiInterceptor).length; + expect(authInterceptorCount, equals(0)); }); test( @@ -61,7 +63,8 @@ void main() { .read(chatwootClientAuthServiceProvider(testChatwootParameters)); //THEN - expect(result.dio.interceptors.length, equals(0)); + final authInterceptorCount = result.dio.interceptors.where((i)=>i is ChatwootClientApiInterceptor).length; + expect(authInterceptorCount, equals(0)); }); test( @@ -73,7 +76,8 @@ void main() { //THEN expect(result.options.baseUrl, equals(testChatwootParameters.baseUrl)); - expect(result.interceptors.length, equals(1)); + final authInterceptorCount = result.interceptors.where((i)=>i is ChatwootClientApiInterceptor).length; + expect(authInterceptorCount, equals(1)); }); test(