From 4d549c9bbca113d902c25412ee311c4d0bbec71a Mon Sep 17 00:00:00 2001 From: Aayushmaan Date: Wed, 28 Feb 2024 14:56:33 +0530 Subject: [PATCH 1/6] chore: bump dependencies --- pubspec.lock | 284 ++++++++++++++++++++++++++++----------------------- 1 file changed, 158 insertions(+), 126 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index ce024ffd..c62c632c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,26 +5,26 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" url: "https://pub.dev" source: hosted - version: "64.0.0" + version: "67.0.0" _flutterfire_internals: dependency: transitive description: name: _flutterfire_internals - sha256: f5628cd9c92ed11083f425fd1f8f1bc60ecdda458c81d73b143aeda036c35fe7 + sha256: "737321f9be522620ed3794937298fb0027a48a402624fa2500f7532f94aea810" url: "https://pub.dev" source: hosted - version: "1.3.16" + version: "1.3.22" analyzer: dependency: transitive description: name: analyzer - sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.4.1" ansicolor: dependency: transitive description: @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: archive - sha256: "7b875fd4a20b165a3084bd2d210439b22ebc653f21cea4842729c0c30c82596b" + sha256: "22600aa1e926be775fa5fe7e6894e7fb3df9efda8891c73f70fb3262399a432d" url: "https://pub.dev" source: hosted - version: "3.4.9" + version: "3.4.10" args: dependency: transitive description: @@ -77,10 +77,10 @@ packages: dependency: "direct main" description: name: bloc - sha256: "3820f15f502372d979121de1f6b97bfcf1630ebff8fe1d52fb2b0bfa49be5b49" + sha256: f53a110e3b48dcd78136c10daa5d51512443cea5e1348c9d80a320095fa2db9e url: "https://pub.dev" source: hosted - version: "8.1.2" + version: "8.1.3" boolean_selector: dependency: transitive description: @@ -125,18 +125,18 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "67d591d602906ef9201caf93452495ad1812bea2074f04e25dbd7c133785821b" + sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21" url: "https://pub.dev" source: hosted - version: "2.4.7" + version: "2.4.8" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: c9e32d21dd6626b5c163d48b037ce906bbe428bc23ab77bcd77bb21e593b6185 + sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" url: "https://pub.dev" source: hosted - version: "7.2.11" + version: "7.3.0" built_collection: dependency: transitive description: @@ -149,10 +149,10 @@ packages: dependency: transitive description: name: built_value - sha256: c9aabae0718ec394e5bc3c7272e6bb0dc0b32201a08fe185ec1d8401d3e39309 + sha256: fedde275e0a6b798c3296963c5cd224e3e1b55d0e478d5b7e65e6b540f363a0e url: "https://pub.dev" source: hosted - version: "8.8.1" + version: "8.9.1" characters: dependency: transitive description: @@ -189,10 +189,10 @@ packages: dependency: transitive description: name: code_builder - sha256: feee43a5c05e7b3199bb375a86430b8ada1b04104f2923d0e03cc01ca87b6d84 + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 url: "https://pub.dev" source: hosted - version: "4.9.0" + version: "4.10.0" collection: dependency: transitive description: @@ -261,10 +261,10 @@ packages: dependency: "direct main" description: name: dio - sha256: "797e1e341c3dd2f69f2dad42564a6feff3bfb87187d05abb93b9609e6f1645c3" + sha256: "49af28382aefc53562459104f64d16b9dfd1e8ef68c862d5af436cc8356ce5a8" url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "5.4.1" equatable: dependency: "direct main" description: @@ -285,10 +285,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" file: dependency: transitive description: @@ -301,34 +301,34 @@ packages: dependency: "direct main" description: name: firebase_analytics - sha256: "5e92d510eacd66c354718fd9cc8f66ffdfa025640b645c4742297fb973770508" + sha256: "54681f6a8c35ec782c86680919953edbae66517a718fe7606a7ba52cfa1b36ca" url: "https://pub.dev" source: hosted - version: "10.7.4" + version: "10.8.6" firebase_analytics_platform_interface: dependency: transitive description: name: firebase_analytics_platform_interface - sha256: "72977325a72af5ebb8e53b5c5533cb2e33eec481cd46210cfe5427f5efba55d8" + sha256: cf7378f407c26fd1f1cc808c0d791f2a15dd4f1fe0626bb2ce6a96663c4d8470 url: "https://pub.dev" source: hosted - version: "3.8.4" + version: "3.9.6" firebase_analytics_web: dependency: transitive description: name: firebase_analytics_web - sha256: "8b9710be7e292e2a5ad34fff449d4b668c5808fb339649e69181727a4534f579" + sha256: f62c7a2514771f6e122c5b55227c0c7fdaa253cc2fe6efce768897c0fb68a5ab url: "https://pub.dev" source: hosted - version: "0.5.5+11" + version: "0.5.5+18" firebase_core: dependency: "direct main" description: name: firebase_core - sha256: "96607c0e829a581c2a483c658f04e8b159964c3bae2730f73297070bc85d40bb" + sha256: "7e049e32a9d347616edb39542cf92cd53fdb4a99fb6af0a0bff327c14cd76445" url: "https://pub.dev" source: hosted - version: "2.24.2" + version: "2.25.4" firebase_core_platform_interface: dependency: transitive description: @@ -341,58 +341,58 @@ packages: dependency: transitive description: name: firebase_core_web - sha256: d585bdf3c656c3f7821ba1bd44da5f13365d22fcecaf5eb75c4295246aaa83c0 + sha256: "57e61d6010e253b36d38191cefd6199d7849152cdcd234b61ca290cdb278a0ba" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.4" firebase_messaging: dependency: "direct main" description: name: firebase_messaging - sha256: "199fe8186a5370d1cf5ce0819191079afc305914e8f38715f5e23943940dfe2d" + sha256: "799922b57d09fe89b5634be2a7fea66a2683eb1a02502c71fe90c212240f89ef" url: "https://pub.dev" source: hosted - version: "14.7.9" + version: "14.7.16" firebase_messaging_platform_interface: dependency: transitive description: name: firebase_messaging_platform_interface - sha256: "54e283a0e41d81d854636ad0dad73066adc53407a60a7c3189c9656e2f1b6107" + sha256: "789a3b26097e2bdad15a407dc552d6af74287b477ceb4aa6ec0d8aa967caf9e5" url: "https://pub.dev" source: hosted - version: "4.5.18" + version: "4.5.24" firebase_messaging_web: dependency: transitive description: name: firebase_messaging_web - sha256: "90dc7ed885e90a24bb0e56d661d4d2b5f84429697fd2cbb9e5890a0ca370e6f4" + sha256: "156a83d281bbcc92b17496f323c747802287520aece51a893a5fdb8078bccbe7" url: "https://pub.dev" source: hosted - version: "3.5.18" + version: "3.6.5" firebase_remote_config: dependency: "direct main" description: name: firebase_remote_config - sha256: "60fc92273d1db338a6fad1839c42dedc4ad64f812043acad0cbb200702f5c9ce" + sha256: "89a26478b96b831507a8eefbd517755bd5501cd5dd153d1ee70558d7762abbe9" url: "https://pub.dev" source: hosted - version: "4.3.8" + version: "4.3.14" firebase_remote_config_platform_interface: dependency: transitive description: name: firebase_remote_config_platform_interface - sha256: "41813ef8dfbc40ef7a59a73f9e5acef2608dbcb2933241b6c03d52e90677040f" + sha256: "9933c7b0ef2e74ff2bb526724bdcfd9c16f7af637a1b8e59d765bf83ee4c1c6f" url: "https://pub.dev" source: hosted - version: "1.4.16" + version: "1.4.22" firebase_remote_config_web: dependency: transitive description: name: firebase_remote_config_web - sha256: "089e92f333c2fb2c05c640c80fecea9d1e06dada0ba85efe34a580987ef94a0a" + sha256: "11ccb8c836dbbabecb3aa126a9b8195def5b228acdd64ed7c5623e9327fe4789" url: "https://pub.dev" source: hosted - version: "1.4.16" + version: "1.4.22" fixnum: dependency: transitive description: @@ -410,10 +410,10 @@ packages: dependency: "direct main" description: name: flutter_bloc - sha256: e74efb89ee6945bcbce74a5b3a5a3376b088e5f21f55c263fc38cbdc6237faae + sha256: "87325da1ac757fcc4813e6b34ed5dd61169973871fdf181d6c2109dd6935ece1" url: "https://pub.dev" source: hosted - version: "8.1.3" + version: "8.1.4" flutter_inappwebview: dependency: "direct main" description: @@ -426,10 +426,10 @@ packages: dependency: transitive description: name: flutter_inappwebview_android - sha256: fd4db51e46f49b140d83a3206851432c54ea920b381137c0ba82d0cf59be1dee + sha256: d247f6ed417f1f8c364612fa05a2ecba7f775c8d0c044c1d3b9ee33a6515c421 url: "https://pub.dev" source: hosted - version: "1.0.12" + version: "1.0.13" flutter_inappwebview_internal_annotations: dependency: transitive description: @@ -495,10 +495,10 @@ packages: dependency: "direct main" description: name: flutter_native_splash - sha256: "9cdb5d9665dab5d098dc50feab74301c2c228cd02ca25c9b546ab572cebcd6af" + sha256: "558f10070f03ee71f850a78f7136ab239a67636a294a44a06b6b7345178edb1e" url: "https://pub.dev" source: hosted - version: "2.3.9" + version: "2.3.10" flutter_screenutil: dependency: "direct main" description: @@ -511,10 +511,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: d39e7f95621fc84376bc0f7d504f05c3a41488c562f4a8ad410569127507402c + sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.0.10+1" flutter_svg_provider: dependency: "direct main" description: @@ -545,10 +545,10 @@ packages: dependency: "direct dev" description: name: freezed - sha256: "6c5031daae12c7072b3a87eff98983076434b4889ef2a44384d0cae3f82372ba" + sha256: "57247f692f35f068cae297549a46a9a097100685c6780fe67177503eea5ed4e5" url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.7" freezed_annotation: dependency: "direct main" description: @@ -585,10 +585,10 @@ packages: dependency: "direct main" description: name: get_it - sha256: f79870884de16d689cf9a7d15eedf31ed61d750e813c538a6efb92660fea83c3 + sha256: e6017ce7fdeaf218dc51a100344d8cb70134b80e28b760f8bb23c242437bafd7 url: "https://pub.dev" source: hosted - version: "7.6.4" + version: "7.6.7" glob: dependency: transitive description: @@ -633,10 +633,10 @@ packages: dependency: transitive description: name: http - sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139 + sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba url: "https://pub.dev" source: hosted - version: "1.1.2" + version: "1.2.0" http_multi_server: dependency: transitive description: @@ -657,10 +657,10 @@ packages: dependency: transitive description: name: image - sha256: "028f61960d56f26414eb616b48b04eb37d700cbe477b7fb09bf1d7ce57fd9271" + sha256: "4c68bfd5ae83e700b5204c1e74451e7bf3cf750e6843c6e158289cf56bda018e" url: "https://pub.dev" source: hosted - version: "4.1.3" + version: "4.1.7" intl: dependency: "direct main" description: @@ -701,6 +701,30 @@ packages: url: "https://pub.dev" source: hosted version: "6.7.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" lints: dependency: transitive description: @@ -721,34 +745,34 @@ packages: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" mime: dependency: transitive description: name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.5" mixpanel_flutter: dependency: "direct main" description: @@ -761,10 +785,10 @@ packages: dependency: "direct main" description: name: month_picker_dialog - sha256: a9cb49811d9b1c859211f70fe8e3542c86c4fc3e3667df7fca9526ceee4af675 + sha256: "480a19aac8db72bd89e3a34a651ea2e9e2551424e7a22ec52a79f7ffa927c622" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.11.0" nested: dependency: transitive description: @@ -801,10 +825,10 @@ packages: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_parsing: dependency: transitive description: @@ -817,10 +841,10 @@ packages: dependency: "direct main" description: name: path_provider - sha256: a1aa8aaa2542a6bc57e381f132af822420216c80d4781f7aa085ca3229208aaa + sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" path_provider_android: dependency: transitive description: @@ -833,10 +857,10 @@ packages: dependency: transitive description: name: path_provider_foundation - sha256: "19314d595120f82aca0ba62787d58dde2cc6b5df7d2f0daf72489e38d1b57f2d" + sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" path_provider_linux: dependency: transitive description: @@ -849,10 +873,10 @@ packages: dependency: transitive description: name: path_provider_platform_interface - sha256: "94b1e0dd80970c1ce43d5d4e050a9918fce4f4a775e6142424c30a29a363265c" + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" path_provider_windows: dependency: transitive description: @@ -873,26 +897,26 @@ packages: dependency: transitive description: name: platform - sha256: "0a279f0707af40c890e80b1e9df8bb761694c074ba7e1d4ab1bc4b728e200b59" + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted - version: "3.1.3" + version: "3.1.4" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: f4f88d4a900933e7267e2b353594774fc0d07fb072b47eedcd5b54e1ea3269f8 + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.7" + version: "2.1.8" pointycastle: dependency: transitive description: name: pointycastle - sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c" + sha256: "43ac87de6e10afabc85c445745a7b799e04de84cebaa4fd7bf55a5e1e9604d29" url: "https://pub.dev" source: hosted - version: "3.7.3" + version: "3.7.4" pool: dependency: transitive description: @@ -937,42 +961,42 @@ packages: dependency: "direct main" description: name: retrofit - sha256: "04ed77c82cadb655bb9357e8d0cb9da72ff704749a2d0cfe6540dd1f1f7ca4b9" + sha256: "13a2865c0d97da580ea4e3c64d412d81f365fd5b26be2a18fca9582e021da37a" url: "https://pub.dev" source: hosted - version: "4.0.3" + version: "4.1.0" retrofit_generator: dependency: "direct dev" description: name: retrofit_generator - sha256: "40f166d6e07fc3c8f77700093767fd0c1b4742d27fe049ecb15cea1245284bd8" + sha256: a962be21403c2ecdd82d06c863340cff759642ae6ecac5a2c74a9a60377592c3 url: "https://pub.dev" source: hosted - version: "8.0.6" + version: "8.1.0" sentry: dependency: transitive description: name: sentry - sha256: "89e426587b0879e53c46a0aae0eb312696d9d2d803ba14b252a65cc24b1416a2" + sha256: d2ee9c850d876d285f22e2e662f400ec2438df9939fe4acd5d780df9841794ce url: "https://pub.dev" source: hosted - version: "7.14.0" + version: "7.16.1" sentry_dio: dependency: "direct main" description: name: sentry_dio - sha256: b0ad68161625ee9bb45b687199e5fec4c55a0b0fe253cc5b47e773b7c53ca25e + sha256: "3812f44fb6657cb04806cbfbd1dd03d00fb6aceb06bf5dd236ecff56b754a1cf" url: "https://pub.dev" source: hosted - version: "7.14.0" + version: "7.16.1" sentry_flutter: dependency: "direct main" description: name: sentry_flutter - sha256: fd089ee4e75a927be037c56815a0a54af5a519f52b803a5ffecb589bb36e2401 + sha256: "5b428c189c825f16fb14e9166529043f06b965d5b59bfc3a1415e39c082398c0" url: "https://pub.dev" source: hosted - version: "7.14.0" + version: "7.16.1" shared_preferences: dependency: transitive description: @@ -993,10 +1017,10 @@ packages: dependency: transitive description: name: shared_preferences_foundation - sha256: "7bf53a9f2d007329ee6f3df7268fd498f8373602f943c975598bbb34649b62a7" + sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" url: "https://pub.dev" source: hosted - version: "2.3.4" + version: "2.3.5" shared_preferences_linux: dependency: transitive description: @@ -1009,10 +1033,10 @@ packages: dependency: transitive description: name: shared_preferences_platform_interface - sha256: d4ec5fc9ebb2f2e056c617112aa75dcf92fc2e4faaf2ae999caa297473f75d8a + sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.3.2" shared_preferences_web: dependency: transitive description: @@ -1166,26 +1190,26 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: e9aa5ea75c84cf46b3db4eea212523591211c3cf2e13099ee4ec147f54201c86 + sha256: "0ecc004c62fd3ed36a2ffcbe0dd9700aee63bd7532d0b642a488b1ec310f492e" url: "https://pub.dev" source: hosted - version: "6.2.2" + version: "6.2.5" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def" + sha256: d4ed0711849dd8e33eb2dd69c25db0d0d3fdc37e0a62e629fe32f57a22db2745 url: "https://pub.dev" source: hosted - version: "6.2.0" + version: "6.3.0" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: bba3373219b7abb6b5e0d071b0fe66dfbe005d07517a68e38d4fc3638f35c6d3 + sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5" url: "https://pub.dev" source: hosted - version: "6.2.1" + version: "6.2.5" url_launcher_linux: dependency: transitive description: @@ -1206,18 +1230,18 @@ packages: dependency: transitive description: name: url_launcher_platform_interface - sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50" + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.2" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: "7286aec002c8feecc338cc33269e96b73955ab227456e9fb2a91f7fab8a358e9" + sha256: fff0932192afeedf63cdd50ecbb1bc825d31aed259f02bb8dba0f3b729a5e88b url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.2.3" url_launcher_windows: dependency: transitive description: @@ -1230,34 +1254,34 @@ packages: dependency: transitive description: name: uuid - sha256: "22c94e5ad1e75f9934b766b53c742572ee2677c56bc871d850a57dad0f82127f" + sha256: cd210a09f7c18cbe5a02511718e0334de6559871052c90a90c0cca46a4aa81c8 url: "https://pub.dev" source: hosted - version: "4.2.2" + version: "4.3.3" vector_graphics: dependency: transitive description: name: vector_graphics - sha256: "0f0c746dd2d6254a0057218ff980fc7f5670fd0fcf5e4db38a490d31eed4ad43" + sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.11+1" vector_graphics_codec: dependency: transitive description: name: vector_graphics_codec - sha256: "0edf6d630d1bfd5589114138ed8fada3234deacc37966bec033d3047c29248b7" + sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.11+1" vector_graphics_compiler: dependency: transitive description: name: vector_graphics_compiler - sha256: d24333727332d9bd20990f1483af4e09abdb9b1fc7c3db940b56ab5c42790c26 + sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" url: "https://pub.dev" source: hosted - version: "1.1.9+1" + version: "1.1.11+1" vector_math: dependency: transitive description: @@ -1266,6 +1290,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" watcher: dependency: transitive description: @@ -1278,34 +1310,34 @@ packages: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "4188706108906f002b3a293509234588823c8c979dc83304e229ff400c996b05" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.4.2" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + sha256: "939ab60734a4f8fa95feacb55804fa278de28bdeef38e616dc08e44a84adea23" url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.3" win32: dependency: transitive description: name: win32 - sha256: b0f37db61ba2f2e9b7a78a1caece0052564d1bc70668156cf3a29d676fe4e574 + sha256: "464f5674532865248444b4c3daca12bd9bf2d7c47f759ce2617986e7229494a8" url: "https://pub.dev" source: hosted - version: "5.1.1" + version: "5.2.0" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: "589ada45ba9e39405c198fe34eb0f607cddb2108527e658136120892beac46d2" + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" xml: dependency: transitive description: @@ -1323,5 +1355,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.2.0 <4.0.0" - flutter: ">=3.16.0" + dart: ">=3.3.0-279.1.beta <4.0.0" + flutter: ">=3.16.6" From de306dbce2e00b9e947c92b56ba1f6c1dc06d1fc Mon Sep 17 00:00:00 2001 From: Aayushmaan Date: Thu, 29 Feb 2024 15:32:36 +0530 Subject: [PATCH 2/6] feat: integrates Feedback API --- .../models/feedback/appetizer_feedback.dart | 4 +- .../repositories/feedback_repository.dart | 4 +- .../feedback/bloc/feedback_page_bloc.dart | 43 ++++++++++++++++--- .../feedback/bloc/feedback_page_event.dart | 4 +- .../feedback/bloc/feedback_page_state.dart | 14 +++--- lib/presentation/feedback/feedback_view.dart | 17 +++++--- .../components/DayMenu/menu_card.dart | 2 +- 7 files changed, 67 insertions(+), 21 deletions(-) diff --git a/lib/domain/models/feedback/appetizer_feedback.dart b/lib/domain/models/feedback/appetizer_feedback.dart index 4584f706..873238a5 100644 --- a/lib/domain/models/feedback/appetizer_feedback.dart +++ b/lib/domain/models/feedback/appetizer_feedback.dart @@ -5,7 +5,6 @@ part 'appetizer_feedback.g.dart'; @JsonSerializable(fieldRename: FieldRename.snake) class AppetizerFeedback { int id; - String type; String title; String message; int timestamp; @@ -13,10 +12,10 @@ class AppetizerFeedback { dynamic imageUrl; int dateIssue; dynamic response; + List> ratings; AppetizerFeedback({ required this.id, - required this.type, required this.title, required this.message, required this.timestamp, @@ -24,6 +23,7 @@ class AppetizerFeedback { required this.imageUrl, required this.dateIssue, required this.response, + required this.ratings, }); factory AppetizerFeedback.fromJson(Map json) => diff --git a/lib/domain/repositories/feedback_repository.dart b/lib/domain/repositories/feedback_repository.dart index 64dad343..da23bfb0 100644 --- a/lib/domain/repositories/feedback_repository.dart +++ b/lib/domain/repositories/feedback_repository.dart @@ -30,10 +30,12 @@ class FeedbackRepository { Future newFeedback(AppetizerFeedback feedback) async { Map map = { - 'type': feedback.type, 'title': feedback.title, 'message': feedback.message, 'date_issue': feedback.dateIssue, + 'meal_id': feedback.mealId, + 'ratings': feedback.ratings, + 'image_url': feedback.imageUrl, }; try { return await _apiService.newFeedback(map); diff --git a/lib/presentation/feedback/bloc/feedback_page_bloc.dart b/lib/presentation/feedback/bloc/feedback_page_bloc.dart index 57d99997..5fcf656b 100644 --- a/lib/presentation/feedback/bloc/feedback_page_bloc.dart +++ b/lib/presentation/feedback/bloc/feedback_page_bloc.dart @@ -1,3 +1,4 @@ +import 'package:appetizer/domain/models/feedback/appetizer_feedback.dart'; import 'package:appetizer/domain/repositories/feedback_repository.dart'; import 'package:bloc/bloc.dart'; import 'package:equatable/equatable.dart'; @@ -10,26 +11,57 @@ class FeedbackPageBloc extends Bloc { FeedbackPageBloc({ required this.repo, }) : super( - const FeedbackPageState.initial(), + FeedbackPageState.initial(), ) { on(_onSubmit); on(_onDescriptionChange); } void _onSubmit( - FeedbackPageSubmitEvent event, Emitter emit) { - // TODO: implement repository call - bool submissionSuccessful = true; - if (submissionSuccessful) { + FeedbackPageSubmitEvent event, Emitter emit) async { + try { + List> ratings = [ + {"type": "am", "stars": event.rating[0]}, + {"type": "hc", "stars": event.rating[1]}, + {"type": "wm", "stars": event.rating[2]}, + {"type": "ws", "stars": event.rating[3]}, + {"type": "dn", "stars": event.rating[4]} + ]; + AppetizerFeedback feedback = AppetizerFeedback( + id: 0, + title: 'Feedback', + message: event.description, + timestamp: DateTime.now().millisecondsSinceEpoch, + mealId: event.mealId, + imageUrl: null, + dateIssue: DateTime.now().millisecondsSinceEpoch, + response: null, + ratings: ratings, + ); + await repo.newFeedback(feedback); emit( FeedbackPageState( rating: event.rating, description: event.description, submitted: true, error: false, + mealId: event.mealId, + ), + ); + } catch (e) { + emit( + FeedbackPageState( + rating: event.rating, + description: event.description, + submitted: false, + error: true, + mealId: event.mealId, ), ); } + + // bool submissionSuccessful = true; + // if (submissionSuccessful) {} // else { // emit( // FeedbackPageState( @@ -51,6 +83,7 @@ class FeedbackPageBloc extends Bloc { description: event.description, submitted: state.submitted, error: state.error, + mealId: state.mealId, ), ); } diff --git a/lib/presentation/feedback/bloc/feedback_page_event.dart b/lib/presentation/feedback/bloc/feedback_page_event.dart index cdfafabb..062af816 100644 --- a/lib/presentation/feedback/bloc/feedback_page_event.dart +++ b/lib/presentation/feedback/bloc/feedback_page_event.dart @@ -11,12 +11,14 @@ class FeedbackPageSubmitEvent extends FeedbackPageEvent { const FeedbackPageSubmitEvent({ required this.rating, required this.description, + required this.mealId, }); final List rating; final String description; + final int mealId; @override - List get props => [rating, description]; + List get props => [rating, description, mealId]; } class FeedbackPageDescriptionChangedEvent extends FeedbackPageEvent { diff --git a/lib/presentation/feedback/bloc/feedback_page_state.dart b/lib/presentation/feedback/bloc/feedback_page_state.dart index 5608fa2c..e8a7a634 100644 --- a/lib/presentation/feedback/bloc/feedback_page_state.dart +++ b/lib/presentation/feedback/bloc/feedback_page_state.dart @@ -1,24 +1,28 @@ part of 'feedback_page_bloc.dart'; +// ignore: must_be_immutable class FeedbackPageState extends Equatable { - const FeedbackPageState({ + FeedbackPageState({ required this.rating, required this.description, + required this.mealId, required this.submitted, required this.error, }); - const FeedbackPageState.initial() - : rating = const [0, 0, 0, 0, 0], + FeedbackPageState.initial() + : rating = [0, 0, 0, 0, 0], description = '', + mealId = 0, submitted = false, error = false; - final List rating; + List rating; final String description; + final int mealId; final bool submitted; final bool error; @override - List get props => [rating, description, error]; + List get props => [rating, description, mealId, error]; } diff --git a/lib/presentation/feedback/feedback_view.dart b/lib/presentation/feedback/feedback_view.dart index 2f90146a..d33d8d2f 100644 --- a/lib/presentation/feedback/feedback_view.dart +++ b/lib/presentation/feedback/feedback_view.dart @@ -12,8 +12,9 @@ import 'package:flutter_bloc/flutter_bloc.dart'; @RoutePage() class FeedbackScreen extends StatelessWidget { - FeedbackScreen({super.key}); + FeedbackScreen({required this.mealId, super.key}); final TextEditingController textController = TextEditingController(); + final int mealId; static const List feedbackHeadings = [ "Ambience", "Hygiene and Cleanliness", @@ -100,11 +101,15 @@ class FeedbackScreen extends StatelessWidget { Align( alignment: Alignment.bottomRight, child: BlackIconButton( - onTap: context.router.pop, - // onTap: () => context.read().add( - // FeedbackPageSubmitEvent( - // rating: state.rating, - // description: state.description)), + // onTap: context.router.pop, + onTap: () { + context.read().add( + FeedbackPageSubmitEvent( + mealId: mealId, + rating: state.rating, + description: state.description)); + context.router.pop(); + }, title: "SUBMIT", width: 102.toAutoScaledWidth, icon: Icons.keyboard_double_arrow_right_sharp, diff --git a/lib/presentation/week_menu/components/DayMenu/menu_card.dart b/lib/presentation/week_menu/components/DayMenu/menu_card.dart index 2d42bcf1..c633797e 100644 --- a/lib/presentation/week_menu/components/DayMenu/menu_card.dart +++ b/lib/presentation/week_menu/components/DayMenu/menu_card.dart @@ -128,7 +128,7 @@ class FeedbackOrCouponButton extends StatelessWidget { if (meal.isOutdated) { return GestureDetector( onTap: () { - context.router.navigate(FeedbackRoute()); + context.router.navigate(FeedbackRoute(mealId: meal.id)); }, child: const FeedbackAndCouponWidget(taken: false, coupon: false), ); From 139347d536d04da94aea9a37da5e31ace4f2cc42 Mon Sep 17 00:00:00 2001 From: Aayushmaan Date: Thu, 29 Feb 2024 16:18:52 +0530 Subject: [PATCH 3/6] fix: stays on the screen in case of any error --- .../feedback/bloc/feedback_page_bloc.dart | 2 +- lib/presentation/feedback/feedback_view.dart | 24 +++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/lib/presentation/feedback/bloc/feedback_page_bloc.dart b/lib/presentation/feedback/bloc/feedback_page_bloc.dart index 5fcf656b..bb7d47b6 100644 --- a/lib/presentation/feedback/bloc/feedback_page_bloc.dart +++ b/lib/presentation/feedback/bloc/feedback_page_bloc.dart @@ -82,7 +82,7 @@ class FeedbackPageBloc extends Bloc { rating: state.rating, description: event.description, submitted: state.submitted, - error: state.error, + error: false, mealId: state.mealId, ), ); diff --git a/lib/presentation/feedback/feedback_view.dart b/lib/presentation/feedback/feedback_view.dart index d33d8d2f..ee8ff910 100644 --- a/lib/presentation/feedback/feedback_view.dart +++ b/lib/presentation/feedback/feedback_view.dart @@ -9,6 +9,7 @@ import 'package:appetizer/presentation/feedback/components/feedback_banner.dart' import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:fluttertoast/fluttertoast.dart'; @RoutePage() class FeedbackScreen extends StatelessWidget { @@ -32,6 +33,27 @@ class FeedbackScreen extends StatelessWidget { FeedbackPageBloc(repo: context.read()), child: BlocBuilder( builder: (context, state) { + if (state.error) { + Fluttertoast.showToast( + msg: "Unable to submit feedback!", + toastLength: Toast.LENGTH_SHORT, + gravity: ToastGravity.BOTTOM, + timeInSecForIosWeb: 1, + textColor: Colors.white, + backgroundColor: AppTheme.red, + fontSize: 16.0); + } + if (state.submitted) { + Fluttertoast.showToast( + msg: "Feedback submitted successfully!", + toastLength: Toast.LENGTH_SHORT, + gravity: ToastGravity.BOTTOM, + timeInSecForIosWeb: 1, + textColor: Colors.white, + backgroundColor: AppTheme.green, + fontSize: 12.toAutoScaledFont); + context.router.pop(); + } return Column( children: [ const FeedbackBanner(), @@ -101,14 +123,12 @@ class FeedbackScreen extends StatelessWidget { Align( alignment: Alignment.bottomRight, child: BlackIconButton( - // onTap: context.router.pop, onTap: () { context.read().add( FeedbackPageSubmitEvent( mealId: mealId, rating: state.rating, description: state.description)); - context.router.pop(); }, title: "SUBMIT", width: 102.toAutoScaledWidth, From b8e5ed9fd2bd4ff930c8fa883045131220e676bb Mon Sep 17 00:00:00 2001 From: Aayushmaan Date: Thu, 29 Feb 2024 23:31:33 +0530 Subject: [PATCH 4/6] feat: makes all form fields required for submission --- lib/presentation/feedback/feedback_view.dart | 70 ++++++++++++++------ 1 file changed, 48 insertions(+), 22 deletions(-) diff --git a/lib/presentation/feedback/feedback_view.dart b/lib/presentation/feedback/feedback_view.dart index ee8ff910..5cea3e47 100644 --- a/lib/presentation/feedback/feedback_view.dart +++ b/lib/presentation/feedback/feedback_view.dart @@ -31,29 +31,8 @@ class FeedbackScreen extends StatelessWidget { body: BlocProvider( create: (context) => FeedbackPageBloc(repo: context.read()), - child: BlocBuilder( + child: BlocConsumer( builder: (context, state) { - if (state.error) { - Fluttertoast.showToast( - msg: "Unable to submit feedback!", - toastLength: Toast.LENGTH_SHORT, - gravity: ToastGravity.BOTTOM, - timeInSecForIosWeb: 1, - textColor: Colors.white, - backgroundColor: AppTheme.red, - fontSize: 16.0); - } - if (state.submitted) { - Fluttertoast.showToast( - msg: "Feedback submitted successfully!", - toastLength: Toast.LENGTH_SHORT, - gravity: ToastGravity.BOTTOM, - timeInSecForIosWeb: 1, - textColor: Colors.white, - backgroundColor: AppTheme.green, - fontSize: 12.toAutoScaledFont); - context.router.pop(); - } return Column( children: [ const FeedbackBanner(), @@ -124,6 +103,30 @@ class FeedbackScreen extends StatelessWidget { alignment: Alignment.bottomRight, child: BlackIconButton( onTap: () { + for (var rating in state.rating) { + if (rating == 0) { + Fluttertoast.showToast( + msg: "Please rate all the categories!", + toastLength: Toast.LENGTH_SHORT, + gravity: ToastGravity.BOTTOM, + timeInSecForIosWeb: 1, + textColor: Colors.white, + backgroundColor: AppTheme.red, + fontSize: 12.toAutoScaledFont); + return; + } + } + if (state.description.trim().isEmpty) { + Fluttertoast.showToast( + msg: "Please describe your Feedback!", + toastLength: Toast.LENGTH_SHORT, + gravity: ToastGravity.BOTTOM, + timeInSecForIosWeb: 1, + textColor: Colors.white, + backgroundColor: AppTheme.red, + fontSize: 12.toAutoScaledFont); + return; + } context.read().add( FeedbackPageSubmitEvent( mealId: mealId, @@ -143,6 +146,29 @@ class FeedbackScreen extends StatelessWidget { ], ); }, + listener: (BuildContext context, FeedbackPageState state) { + if (state.submitted) { + Fluttertoast.showToast( + msg: "Feedback submitted successfully!", + toastLength: Toast.LENGTH_SHORT, + gravity: ToastGravity.BOTTOM, + timeInSecForIosWeb: 1, + textColor: Colors.white, + backgroundColor: AppTheme.green, + fontSize: 12.toAutoScaledFont); + context.router.pop(); + } + if (state.error) { + Fluttertoast.showToast( + msg: "Unable to submit feedback!", + toastLength: Toast.LENGTH_SHORT, + gravity: ToastGravity.BOTTOM, + timeInSecForIosWeb: 1, + textColor: Colors.white, + backgroundColor: AppTheme.red, + fontSize: 16.0); + } + }, ), ), ); From 61895ebcec6c5d6804ca4fefe8af4998facd8bf0 Mon Sep 17 00:00:00 2001 From: Amey Date: Thu, 4 Apr 2024 01:33:57 +0530 Subject: [PATCH 5/6] rfac: revamps integration of feedback with backend --- lib/data/services/remote/api_service.dart | 2 +- .../models/feedback/appetizer_feedback.dart | 14 ++---- .../repositories/feedback_repository.dart | 7 ++- .../feedback/bloc/feedback_page_bloc.dart | 14 +----- .../feedback/bloc/feedback_page_event.dart | 2 +- .../feedback/bloc/feedback_page_state.dart | 4 +- .../FeedbackTile/feedback_tile.dart | 4 +- lib/presentation/feedback/feedback_view.dart | 50 ++++++++----------- 8 files changed, 34 insertions(+), 63 deletions(-) diff --git a/lib/data/services/remote/api_service.dart b/lib/data/services/remote/api_service.dart index 68cb6e50..e3e1f262 100644 --- a/lib/data/services/remote/api_service.dart +++ b/lib/data/services/remote/api_service.dart @@ -54,7 +54,7 @@ abstract class ApiService { Future> responseOfFeedbacks(); @POST(ApiEndpoints.newFeedback) - Future newFeedback( + Future newFeedback( @Body() Map map, ); diff --git a/lib/domain/models/feedback/appetizer_feedback.dart b/lib/domain/models/feedback/appetizer_feedback.dart index 873238a5..78ab41d1 100644 --- a/lib/domain/models/feedback/appetizer_feedback.dart +++ b/lib/domain/models/feedback/appetizer_feedback.dart @@ -4,25 +4,17 @@ part 'appetizer_feedback.g.dart'; @JsonSerializable(fieldRename: FieldRename.snake) class AppetizerFeedback { - int id; String title; String message; - int timestamp; dynamic mealId; - dynamic imageUrl; - int dateIssue; - dynamic response; - List> ratings; + // dynamic imageUrl; + int ratings; AppetizerFeedback({ - required this.id, required this.title, required this.message, - required this.timestamp, required this.mealId, - required this.imageUrl, - required this.dateIssue, - required this.response, + // required this.imageUrl, required this.ratings, }); diff --git a/lib/domain/repositories/feedback_repository.dart b/lib/domain/repositories/feedback_repository.dart index da23bfb0..a7e9f7bf 100644 --- a/lib/domain/repositories/feedback_repository.dart +++ b/lib/domain/repositories/feedback_repository.dart @@ -28,17 +28,16 @@ class FeedbackRepository { } } - Future newFeedback(AppetizerFeedback feedback) async { + Future newFeedback(AppetizerFeedback feedback) async { Map map = { 'title': feedback.title, 'message': feedback.message, - 'date_issue': feedback.dateIssue, 'meal_id': feedback.mealId, 'ratings': feedback.ratings, - 'image_url': feedback.imageUrl, + // 'image_url': feedback.imageUrl, }; try { - return await _apiService.newFeedback(map); + await _apiService.newFeedback(map); } catch (e) { debugPrint(e.toString()); throw Failure(AppConstants.GENERIC_FAILURE); diff --git a/lib/presentation/feedback/bloc/feedback_page_bloc.dart b/lib/presentation/feedback/bloc/feedback_page_bloc.dart index bb7d47b6..783c0ca7 100644 --- a/lib/presentation/feedback/bloc/feedback_page_bloc.dart +++ b/lib/presentation/feedback/bloc/feedback_page_bloc.dart @@ -20,22 +20,12 @@ class FeedbackPageBloc extends Bloc { void _onSubmit( FeedbackPageSubmitEvent event, Emitter emit) async { try { - List> ratings = [ - {"type": "am", "stars": event.rating[0]}, - {"type": "hc", "stars": event.rating[1]}, - {"type": "wm", "stars": event.rating[2]}, - {"type": "ws", "stars": event.rating[3]}, - {"type": "dn", "stars": event.rating[4]} - ]; + int ratings = event.rating; AppetizerFeedback feedback = AppetizerFeedback( - id: 0, title: 'Feedback', message: event.description, - timestamp: DateTime.now().millisecondsSinceEpoch, mealId: event.mealId, - imageUrl: null, - dateIssue: DateTime.now().millisecondsSinceEpoch, - response: null, + // imageUrl: null, ratings: ratings, ); await repo.newFeedback(feedback); diff --git a/lib/presentation/feedback/bloc/feedback_page_event.dart b/lib/presentation/feedback/bloc/feedback_page_event.dart index 062af816..455397f4 100644 --- a/lib/presentation/feedback/bloc/feedback_page_event.dart +++ b/lib/presentation/feedback/bloc/feedback_page_event.dart @@ -13,7 +13,7 @@ class FeedbackPageSubmitEvent extends FeedbackPageEvent { required this.description, required this.mealId, }); - final List rating; + final int rating; final String description; final int mealId; diff --git a/lib/presentation/feedback/bloc/feedback_page_state.dart b/lib/presentation/feedback/bloc/feedback_page_state.dart index e8a7a634..4f3e8e1a 100644 --- a/lib/presentation/feedback/bloc/feedback_page_state.dart +++ b/lib/presentation/feedback/bloc/feedback_page_state.dart @@ -11,13 +11,13 @@ class FeedbackPageState extends Equatable { }); FeedbackPageState.initial() - : rating = [0, 0, 0, 0, 0], + : rating = 0, description = '', mealId = 0, submitted = false, error = false; - List rating; + int rating; final String description; final int mealId; final bool submitted; diff --git a/lib/presentation/feedback/components/FeedbackTile/feedback_tile.dart b/lib/presentation/feedback/components/FeedbackTile/feedback_tile.dart index d441f677..bded1b28 100644 --- a/lib/presentation/feedback/components/FeedbackTile/feedback_tile.dart +++ b/lib/presentation/feedback/components/FeedbackTile/feedback_tile.dart @@ -9,13 +9,11 @@ class FeedbackTile extends StatelessWidget { const FeedbackTile({ required this.title, required this.parentState, - required this.index, super.key, }); final String title; final FeedbackPageState parentState; - final int index; @override Widget build(BuildContext context) { @@ -44,7 +42,7 @@ class FeedbackTile extends StatelessWidget { onPressed: () { context.read().add( FeedbackRatingChangedEvent(newRating: index + 1)); - parentState.rating[this.index] = index + 1; + parentState.rating = index + 1; }, icon: index < state.rating ? SvgPicture.asset('assets/images/filledStar.svg') diff --git a/lib/presentation/feedback/feedback_view.dart b/lib/presentation/feedback/feedback_view.dart index 5cea3e47..778cfd48 100644 --- a/lib/presentation/feedback/feedback_view.dart +++ b/lib/presentation/feedback/feedback_view.dart @@ -17,11 +17,7 @@ class FeedbackScreen extends StatelessWidget { final TextEditingController textController = TextEditingController(); final int mealId; static const List feedbackHeadings = [ - "Ambience", - "Hygiene and Cleanliness", - "Weekly Menu", - "Worker and Services", - "Diet and Nutrition", + "Your Feedback", ]; @override @@ -54,17 +50,14 @@ class FeedbackScreen extends StatelessWidget { ), ), 6.toVerticalSizedBox, - ...List.generate(feedbackHeadings.length, (ind) { - return Padding( - padding: EdgeInsets.symmetric( - vertical: 2.toAutoScaledHeight), - child: FeedbackTile( - parentState: state, - title: feedbackHeadings[ind], - index: ind, - ), - ); - }, growable: false), + Padding( + padding: EdgeInsets.symmetric( + vertical: 2.toAutoScaledHeight), + child: FeedbackTile( + parentState: state, + title: "Your Feedback", + ), + ), 2.toVerticalSizedBox, Text( 'If any other feeback, please describe below', @@ -103,19 +96,18 @@ class FeedbackScreen extends StatelessWidget { alignment: Alignment.bottomRight, child: BlackIconButton( onTap: () { - for (var rating in state.rating) { - if (rating == 0) { - Fluttertoast.showToast( - msg: "Please rate all the categories!", - toastLength: Toast.LENGTH_SHORT, - gravity: ToastGravity.BOTTOM, - timeInSecForIosWeb: 1, - textColor: Colors.white, - backgroundColor: AppTheme.red, - fontSize: 12.toAutoScaledFont); - return; - } + if (state.rating == 0) { + Fluttertoast.showToast( + msg: "Please rate before submitting!", + toastLength: Toast.LENGTH_SHORT, + gravity: ToastGravity.BOTTOM, + timeInSecForIosWeb: 1, + textColor: Colors.white, + backgroundColor: AppTheme.red, + fontSize: 12.toAutoScaledFont); + return; } + if (state.description.trim().isEmpty) { Fluttertoast.showToast( msg: "Please describe your Feedback!", @@ -160,7 +152,7 @@ class FeedbackScreen extends StatelessWidget { } if (state.error) { Fluttertoast.showToast( - msg: "Unable to submit feedback!", + msg: state.description, toastLength: Toast.LENGTH_SHORT, gravity: ToastGravity.BOTTOM, timeInSecForIosWeb: 1, From 7cf99af12ac8b2aeb8edf128816260f9a507c067 Mon Sep 17 00:00:00 2001 From: Aayushmaan Date: Sun, 14 Apr 2024 00:35:31 +0530 Subject: [PATCH 6/6] chor: removes dead code --- .../feedback/bloc/feedback_page_bloc.dart | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lib/presentation/feedback/bloc/feedback_page_bloc.dart b/lib/presentation/feedback/bloc/feedback_page_bloc.dart index 783c0ca7..e69e4400 100644 --- a/lib/presentation/feedback/bloc/feedback_page_bloc.dart +++ b/lib/presentation/feedback/bloc/feedback_page_bloc.dart @@ -49,19 +49,6 @@ class FeedbackPageBloc extends Bloc { ), ); } - - // bool submissionSuccessful = true; - // if (submissionSuccessful) {} - // else { - // emit( - // FeedbackPageState( - // rating: event.rating, - // description: event.description, - // submitted: false, - // error: true, - // ), - // ); - // } } void _onDescriptionChange(FeedbackPageDescriptionChangedEvent event,