{"id":25636,"date":"2026-06-21T00:10:17","date_gmt":"2026-06-21T00:10:17","guid":{"rendered":"https:\/\/umang.pk\/2026\/06\/21\/%d9%81%d9%84%d9%b9%d8%b1-%d9%85%db%8c%da%ba-%d8%ba%d9%84%d8%b7%db%8c%d9%88%da%ba-%da%a9%d9%88-%d8%b5%d8%ad%db%8c%d8%ad-%d8%b7%d8%b1%db%8c%d9%82%db%92-%d8%b3%db%92-%db%81%db%8c%d9%86%da%88%d9%84-%da%a9\/"},"modified":"2026-06-21T00:10:17","modified_gmt":"2026-06-21T00:10:17","slug":"%d9%81%d9%84%d9%b9%d8%b1-%d9%85%db%8c%da%ba-%d8%ba%d9%84%d8%b7%db%8c%d9%88%da%ba-%da%a9%d9%88-%d8%b5%d8%ad%db%8c%d8%ad-%d8%b7%d8%b1%db%8c%d9%82%db%92-%d8%b3%db%92-%db%81%db%8c%d9%86%da%88%d9%84-%da%a9","status":"publish","type":"post","link":"https:\/\/umang.pk\/en_us\/2026\/06\/21\/%d9%81%d9%84%d9%b9%d8%b1-%d9%85%db%8c%da%ba-%d8%ba%d9%84%d8%b7%db%8c%d9%88%da%ba-%da%a9%d9%88-%d8%b5%d8%ad%db%8c%d8%ad-%d8%b7%d8%b1%db%8c%d9%82%db%92-%d8%b3%db%92-%db%81%db%8c%d9%86%da%88%d9%84-%da%a9\/","title":{"rendered":"\u0641\u0644\u0679\u0631 \u0645\u06cc\u06ba \u063a\u0644\u0637\u06cc\u0648\u06ba \u06a9\u0648 \u0635\u062d\u06cc\u062d \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0637\u0631\u06cc\u0642\u06c1: \u0633\u06cc\u0644 \u0634\u062f\u06c1 \u06a9\u0644\u0627\u0633\u0632\u060c \u0631\u06cc\u06a9\u0627\u0631\u0688\u0632 \u0627\u0648\u0631 \u0646\u062a\u0627\u0626\u062c \u06a9\u06cc \u0627\u0642\u0633\u0627\u0645 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9 \u0639\u0645\u0644\u06cc \u06af\u0627\u0626\u06cc\u0688\u06d4"},"content":{"rendered":"\n<div id=\"\">\n<p>\u0645\u06cc\u06ba \u0633\u0648\u0686\u062a\u0627 \u062a\u06be\u0627 \u06a9\u06c1 \u0645\u06cc\u06ba \u0627\u067e\u0646\u06cc \u0641\u0644\u0679\u0631 \u0627\u06cc\u067e\u0633 \u0645\u06cc\u06ba \u063a\u0644\u0637\u06cc\u0648\u06ba \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u0646\u06d2 \u06a9\u0627 \u0627\u0686\u06be\u0627 \u06a9\u0627\u0645 \u06a9\u0631 \u0631\u06c1\u0627 \u06c1\u0648\u06ba\u06d4 \u0645\u06cc\u0631\u06d2 \u067e\u0627\u0633 \u06c1\u0631 \u062c\u06af\u06c1 \u06a9\u0648\u0634\u0634\/\u06a9\u06cc\u0686 \u0628\u0644\u0627\u06a9\u0633 \u062a\u06be\u06d2\u06d4 \u0645\u06cc\u06ba \u0646\u06d2 \u0627\u0633\u062a\u062b\u0646\u0627\u0621 \u06a9\u0648 \u067e\u06a9\u0691\u0627\u060c \u0627\u0633\u06d2 \u0644\u0627\u06af \u0627\u0646 \u06a9\u06cc\u0627 \u0627\u0648\u0631 \u0635\u0627\u0631\u0641 \u06a9\u0648 \u063a\u0644\u0637\u06cc \u06a9\u0627 \u067e\u06cc\u063a\u0627\u0645 \u062f\u06a9\u06be\u0627\u06cc\u0627\u06d4 \u06cc\u06c1 \u0679\u06be\u0648\u0633 \u0645\u062d\u0633\u0648\u0633 \u06c1\u0648\u0627\u06d4<\/p>\n<p>\u067e\u06be\u0631 \u0645\u06cc\u06ba \u0646\u06d2 \u0645\u0632\u06cc\u062f \u063a\u0648\u0631 \u0633\u06d2 \u062f\u06cc\u06a9\u06be\u0646\u0627 \u0634\u0631\u0648\u0639 \u06a9\u06cc\u0627 \u06a9\u06c1 \u0627\u0635\u0644 \u0645\u06cc\u06ba \u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u0645\u06cc\u06ba \u06a9\u06cc\u0627 \u06c1\u0648 \u0631\u06c1\u0627 \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u062e\u0627\u0645\u0648\u0634 \u0646\u0627\u06a9\u0627\u0645\u06cc \u062a\u06be\u06cc \u062c\u0633 \u0633\u06d2 \u0645\u06cc\u06ba \u0628\u0627\u0644\u06a9\u0644 \u0628\u06d2 \u062e\u0628\u0631 \u062a\u06be\u0627\u06d4 \u0627\u06cc\u0633\u06d2 \u0641\u0646\u06a9\u0634\u0646\u0632 \u06c1\u06cc\u06ba \u062c\u0648 \u067e\u06be\u06cc\u0646\u06a9 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u0644\u06cc\u06a9\u0646 \u0679\u0627\u0626\u067e \u0633\u0633\u0679\u0645 \u0645\u06cc\u06ba \u06a9\u0686\u06be \u0628\u06be\u06cc \u0627\u0646\u062a\u0628\u0627\u06c1 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u062e\u0631\u0627\u0628\u06cc \u0633\u06d2 \u0646\u0645\u0679\u0646\u06d2 \u06a9\u0648 \u067e\u0648\u0631\u06d2 \u06a9\u0648\u0688 \u0628\u06cc\u0633 \u0645\u06cc\u06ba \u0645\u062a\u0636\u0627\u062f \u0637\u0648\u0631 \u067e\u0631 \u062a\u0642\u0633\u06cc\u0645 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u062e\u0631\u0627\u0628\u06cc \u06a9\u0686\u06be \u062c\u06af\u06c1\u0648\u06ba \u067e\u0631 \u06c1\u0648\u062a\u06cc \u06c1\u06d2 \u0627\u0648\u0631 \u06a9\u0686\u06be \u0645\u06cc\u06ba \u0646\u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0679\u06cc\u0645 \u06a9\u06d2 \u0627\u06cc\u06a9 \u062c\u0648\u0646\u06cc\u0626\u0631 \u0688\u0648\u06cc\u0644\u067e\u0631 \u0646\u06d2 \u0627\u06cc\u06a9 \u0646\u0626\u06cc API \u06a9\u0627\u0644 \u0634\u0627\u0645\u0644 \u06a9\u06cc \u0627\u0648\u0631 \u06a9\u0648\u0634\u0634\/\u06a9\u06cc\u0686 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0628\u06be\u0648\u0644 \u06af\u06cc\u0627\u060c \u0627\u0648\u0631 \u06a9\u0633\u06cc \u0646\u06d2 \u0628\u06be\u06cc \u0627\u0633 \u06a9\u0627 \u062c\u0627\u0626\u0632\u06c1 \u0646\u06c1\u06cc\u06ba \u0644\u06cc\u0627 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u06a9\u0648\u0688 \u0645\u06cc\u06ba \u06cc\u06c1 \u0646\u06c1\u06cc\u06ba \u06a9\u06c1\u0627 \u06af\u06cc\u0627 \u062a\u06be\u0627 \u06a9\u06c1 &quot;\u06cc\u06c1 \u0641\u0646\u06a9\u0634\u0646 \u0641\u06cc\u0644 \u06c1\u0648 \u0633\u06a9\u062a\u0627 \u06c1\u06d2&#8221;\u06d4<\/p>\n<p>\u062a\u0628 \u0633\u06d2\u060c \u0645\u06cc\u06ba \u0646\u06d2 \u063a\u0644\u0637\u06cc \u0633\u06d2 \u0646\u0645\u0679\u0646\u06d2 \u06a9\u0648 \u0645\u062d\u0636 \u0627\u06cc\u06a9 \u062f\u0641\u0627\u0639\u06cc \u0639\u0627\u062f\u062a \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0627\u06cc\u06a9 \u062a\u0639\u0645\u06cc\u0631\u0627\u062a\u06cc \u0641\u06cc\u0635\u0644\u06d2 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0633\u0646\u062c\u06cc\u062f\u06af\u06cc \u0633\u06d2 \u0644\u06cc\u0646\u0627 \u0634\u0631\u0648\u0639 \u06a9\u06cc\u0627\u06d4<\/p>\n<p>\u0627\u0633 \u0645\u0636\u0645\u0648\u0646 \u0645\u06cc\u06ba \u0641\u06cc \u0627\u0644\u062d\u0627\u0644 \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u0641\u0644\u0679\u0631 \u0627\u06cc\u067e\u0633 \u0645\u06cc\u06ba \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06c1\u0648\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0646\u0645\u0648\u0646\u0648\u06ba \u06a9\u0627 \u0627\u062d\u0627\u0637\u06c1 \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2 (\u0646\u062a\u0627\u0626\u062c \u06a9\u06cc \u0627\u0642\u0633\u0627\u0645\u060c \u0633\u06cc\u0644 \u0634\u062f\u06c1 \u06a9\u0644\u0627\u0633\u0632\u060c \u0688\u0627\u0631\u0679 3 \u0631\u06cc\u06a9\u0627\u0631\u0688\u0632\u060c \u067e\u06cc\u0679\u0631\u0646 \u0645\u06cc\u0686\u0646\u06af) \u0627\u0648\u0631 \u06cc\u06c1 \u06a9\u06c1 \u0648\u06c1 \u063a\u0644\u0637\u06cc\u0648\u06ba \u06a9\u0648 \u0642\u0627\u0628\u0644 \u062a\u0648\u062c\u06c1\u060c \u0648\u0627\u0636\u062d \u0627\u0648\u0631 \u0646\u0638\u0631 \u0627\u0646\u062f\u0627\u0632 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0646\u0627\u0645\u0645\u06a9\u0646 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0633 \u0637\u0631\u062d \u0645\u0644 \u06a9\u0631 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-table-of-contents\">\u0627\u0646\u0688\u06cc\u06a9\u0633<\/h2>\n<h2 id=\"heading-why-trycatch-alone-isnt-enough\">\u06a9\u06cc\u0648\u06ba \u06a9\u0648\u0634\u0634 \u06a9\u0631\u0646\u0627 \/ \u0627\u0633\u06d2 \u0627\u06a9\u06cc\u0644\u06d2 \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u0627 \u06a9\u0627\u0641\u06cc \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/h2>\n<p>\u06a9\u0648\u0634\u0634\/\u06a9\u06cc\u0686 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0645\u06cc\u06ba \u06cc\u06c1 \u0646\u06c1\u06cc\u06ba \u06a9\u06c1\u06c1 \u0631\u06c1\u0627 \u06c1\u0648\u06ba \u06a9\u06c1 \u0627\u06cc\u0633\u0627 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0633\u0627\u062f\u06c1 \u0645\u0639\u0627\u0645\u0644\u0627\u062a \u0645\u06cc\u06ba \u06cc\u06c1 \u0628\u0627\u0644\u06a9\u0644 \u0679\u06be\u06cc\u06a9 \u06c1\u06d2\u06d4 \u062a\u0627\u06c1\u0645\u060c \u062c\u06cc\u0633\u06d2 \u062c\u06cc\u0633\u06d2 \u0622\u067e \u06a9\u06cc \u0627\u06cc\u067e \u0628\u0691\u06be\u062a\u06cc \u06c1\u06d2\u060c \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u0637\u06d2 \u0634\u062f\u06c1 \u063a\u0644\u0637\u06cc \u0633\u06d2 \u0646\u0645\u0679\u0646\u06d2 \u06a9\u06cc \u062d\u06a9\u0645\u062a \u0639\u0645\u0644\u06cc \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0679\u0631\u0627\u0626\u06cc\/\u06a9\u06cc\u0686 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0645\u0633\u0627\u0626\u0644 \u06a9\u0627 \u0627\u06cc\u06a9 \u0645\u062e\u0635\u0648\u0635 \u0633\u06cc\u0679 \u0645\u062a\u0639\u0627\u0631\u0641 \u06a9\u0631\u0627\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0628\u0691\u06d2 \u067e\u06cc\u0645\u0627\u0646\u06d2 \u067e\u0631 \u0638\u0627\u06c1\u0631 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0645\u0633\u0626\u0644\u06c1 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u0622\u067e \u0627\u0633\u06d2 \u0646\u06c1\u06cc\u06ba \u062f\u06cc\u06a9\u06be \u0633\u06a9\u062a\u06d2\u06d4<\/p>\n<p>\u062c\u0628 \u0627\u06cc\u06a9 \u0641\u0646\u06a9\u0634\u0646 \u0627\u06cc\u06a9 \u0627\u0633\u062a\u062b\u0646\u0627\u0621 \u067e\u06be\u06cc\u0646\u06a9 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0627\u0633 \u06a9\u06d2 \u062f\u0633\u062a\u062e\u0637 \u0645\u06cc\u06ba \u0627\u0633 \u06a9\u06cc \u0646\u0634\u0627\u0646\u062f\u06c1\u06cc \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u0626\u06d2 \u06a9\u0686\u06be \u0628\u06be\u06cc \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u06cc\u06c1 \u062f\u06cc\u06a9\u06be\u0648:<\/p>\n<pre><code class=\"language-dart\">Future<user> getUser(String userId) async {\n  final response = await dio.get('\/users\/$userId');\n  return User.fromJson(response.data);\n}\n<\/user><\/code><\/pre>\n<p>\u0627\u06cc\u0633\u0627 \u0644\u06af\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u06cc\u06c1 \u0641\u0646\u06a9\u0634\u0646 \u06c1\u0645\u06cc\u0634\u06c1 \u0635\u0627\u0631\u0641 \u06a9\u0648 \u0648\u0627\u067e\u0633 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u062f\u0633\u062a\u062e\u0637 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u06a9\u0686\u06be \u0628\u06be\u06cc \u0646\u06c1\u06cc\u06ba \u0628\u062a\u0627\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u06cc\u06c1 \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648\u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0648 \u06a9\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0688\u0648\u06cc\u0644\u067e\u0631\u0632 \u06a9\u0648 \u0645\u0639\u0644\u0648\u0645 \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u06af\u0627 \u06a9\u06c1 \u0622\u06cc\u0627 \u0627\u0633\u06d2 \u0679\u0631\u0627\u0626\u06cc\/\u06a9\u06cc\u0686 \u0645\u06cc\u06ba \u0644\u067e\u06cc\u0679\u0646\u0627 \u06c1\u06d2 \u062c\u0628 \u062a\u06a9 \u06a9\u06c1 \u0648\u06c1 \u0646\u0641\u0627\u0630 \u06a9\u0648 \u0646\u06c1 \u067e\u0691\u06be \u0644\u06cc\u06ba \u06cc\u0627 \u0627\u0633 \u0641\u0646\u06a9\u0634\u0646 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u062c\u0644 \u06af\u0626\u06d2 \u06c1\u0648\u06ba\u06d4<\/p>\n<p>\u0627\u0628 \u062a\u0635\u0648\u0631 \u06a9\u0631\u06cc\u06ba \u06a9\u06c1 \u0627\u0633 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0648 \u067e\u0648\u0631\u06cc \u0627\u06cc\u067e \u0645\u06cc\u06ba 10 \u0645\u062e\u062a\u0644\u0641 \u062c\u06af\u06c1\u0648\u06ba \u067e\u0631 \u0628\u0644\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4 \u06a9\u0686\u06be \u0688\u0648\u06cc\u0644\u067e\u0631\u0632 \u063a\u0644\u0637\u06cc \u0633\u06d2 \u0646\u0645\u0679\u0646\u06d2 \u06a9\u0648 \u06cc\u0627\u062f \u0631\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u062f\u0648\u0633\u0631\u06d2 \u0627\u06cc\u0633\u0627 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u06d2\u06d4 \u06a9\u0648\u0626\u06cc \u06a9\u0645\u067e\u0627\u0626\u0644\u0631 \u0627\u0646\u062a\u0628\u0627\u06c1\u0627\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba\u060c \u06a9\u0648\u0626\u06cc \u0644\u0646\u0679 \u0642\u0648\u0627\u0639\u062f \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u062a\u0636\u0627\u062f\u0627\u062a \u06a9\u0648 \u067e\u06a9\u0691\u0646\u06d2 \u06a9\u06d2 \u0644\u0626\u06d2 \u06a9\u0686\u06be \u0628\u06be\u06cc \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u063a\u0644\u0637\u06cc \u062a\u0628 \u062a\u06a9 \u0646\u0638\u0631 \u0646\u06c1\u06cc\u06ba \u0622\u0626\u06d2 \u06af\u06cc \u062c\u0628 \u062a\u06a9 \u0635\u0627\u0631\u0641 \u06a9\u0631\u06cc\u0634 \u06a9\u06cc \u0627\u0637\u0644\u0627\u0639 \u0646\u06c1\u06cc\u06ba \u062f\u06cc\u062a\u0627\u06d4<\/p>\n<p>\u062f\u0648\u0633\u0631\u0627 \u0645\u0633\u0626\u0644\u06c1 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u0645\u0633\u062a\u062b\u0646\u06cc\u0627\u062a \u0645\u062a\u0639\u062f\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u062c\u0628 \u06a9\u0648\u0626\u06cc \u0641\u0646\u06a9\u0634\u0646 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0645\u0627\u0645 \u06a9\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u0648\u06ba \u06a9\u0648 \u0627\u0633\u06d2 \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4 \u0627\u0648\u0631 \u0627\u0633 \u0628\u06be\u06cc\u062c\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0633\u06d2 \u062a\u0645\u0627\u0645 \u0628\u06be\u06cc\u062c\u0646\u06d2 \u0648\u0627\u0644\u06d2\u06d4 \u0630\u0645\u06c1 \u062f\u0627\u0631\u06cc \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u0646\u06d2 \u0645\u06cc\u06ba \u063a\u0644\u0637\u06cc \u0627\u06a9\u062b\u0631 \u06a9\u0648\u0688 \u0628\u06cc\u0633 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u063a\u06cc\u0631 \u0645\u0633\u062a\u0642\u0644 \u0637\u0648\u0631 \u067e\u0631 \u067e\u06be\u06cc\u0644 \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4 \u06a9\u0686\u06be \u067e\u0631\u062a\u06cc\u06ba \u062e\u0627\u0645\u0648\u0634\u06cc \u0633\u06d2 \u0645\u0633\u062a\u062b\u0646\u06cc\u0627\u062a \u06a9\u0648 \u0646\u06af\u0644 \u062c\u0627\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u062f\u0648\u0633\u0631\u06d2 \u062f\u0648\u0628\u0627\u0631\u06c1 \u067e\u06be\u06cc\u0646\u06a9 \u062f\u06cc\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u06cc\u067e \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u063a\u0644\u0637\u06cc \u06a9\u06d2 \u0628\u06c1\u0627\u0624 \u06a9\u0627 \u0627\u0646\u062f\u0627\u0632\u06c1 \u0644\u06af\u0627\u0646\u0627 \u0645\u0634\u06a9\u0644 \u06c1\u0648 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u062a\u06cc\u0633\u0631\u0627 \u0645\u0633\u0626\u0644\u06c1 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u062a\u0645\u0627\u0645 \u063a\u0644\u0637\u06cc\u0627\u06ba \u063a\u06cc\u0631 \u0645\u0639\u0645\u0648\u0644\u06cc \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u062a\u06cc\u06ba\u06d4<\/p>\n<p>\u0646\u06cc\u0679 \u0648\u0631\u06a9 \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u06cc \u0646\u0627\u06a9\u0627\u0645\u06cc \u0645\u0648\u0628\u0627\u0626\u0644 \u0627\u06cc\u067e\u0633 \u0645\u06cc\u06ba \u06a9\u0648\u0626\u06cc \u063a\u06cc\u0631 \u0645\u0639\u0645\u0648\u0644\u06cc \u0648\u0627\u0642\u0639\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0645\u062a\u0648\u0642\u0639 \u06c1\u06d2\u06d4 \u0627\u0633\u06d2 \u0627\u06cc\u06a9 \u0627\u0633\u062a\u062b\u0646\u0627\u0621 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0645\u0627\u0646\u0646\u0627 \u0627\u06cc\u06a9 \u0646\u0627\u0642\u0635 \u0630\u06c1\u0646\u06cc \u0646\u0645\u0648\u0646\u06c1 \u06c1\u06d2\u060c \u0627\u06cc\u06a9 \u0627\u0633\u0627\u0645\u0627\u0646\u06cc\u062a\u0627 \u062c\u0648 \u0645\u0639\u0645\u0648\u0644 \u06a9\u06d2 \u0628\u06c1\u0627\u0624 \u0645\u06cc\u06ba \u062e\u0644\u0644 \u0688\u0627\u0644\u062a\u06cc \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u0639\u0627\u0645 \u062a\u0644\u0627\u0634 \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0633\u06d2 \u06a9\u0633\u06cc \u0628\u06be\u06cc \u062f\u0648\u0633\u0631\u06cc \u062a\u0644\u0627\u0634 \u06a9\u06cc \u0637\u0631\u062d \u0628\u0631\u062a\u0627 \u062c\u0627\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1 \u0646\u062a\u0627\u0626\u062c \u06a9\u06cc \u0627\u0642\u0633\u0627\u0645 \u06a9\u06cc \u06a9\u0644\u06cc\u062f\u06cc \u0628\u0635\u06cc\u0631\u062a \u06c1\u06d2\u06d4 \u063a\u0644\u0637\u06cc \u06a9\u0648\u0626\u06cc \u0631\u06a9\u0627\u0648\u0679 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u060c \u06cc\u06c1 \u0627\u06cc\u06a9 \u0642\u062f\u0631 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-errors-as-values-the-core-idea\">\u0627\u0642\u062f\u0627\u0631 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u063a\u0644\u0637\u06cc\u0627\u06ba: \u06a9\u0644\u06cc\u062f\u06cc \u062e\u06cc\u0627\u0644\u0627\u062a<\/h2>\n<p>\u062e\u06cc\u0627\u0644 \u0633\u0627\u062f\u06c1 \u06c1\u06d2\u06d4 \u06a9\u0633\u06cc \u0641\u0646\u06a9\u0634\u0646 \u06a9\u06cc \u0628\u062c\u0627\u0626\u06d2 \u06a9\u0633\u06cc \u0642\u062f\u0631 \u0648\u0627\u067e\u0633 \u06a9\u0631\u0646\u06d2 \u06cc\u0627 \u0627\u0633\u062a\u062b\u0646\u0627\u0621 \u06a9\u0648 \u0628\u0691\u06be\u0627\u0646\u06d2 \u06a9\u06d2\u060c \u06cc\u06c1 \u06c1\u0645\u06cc\u0634\u06c1 \u0627\u06cc\u06a9 \u0642\u062f\u0631 \u0644\u0648\u0679\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u0648\u06c1 \u0642\u062f\u0631 \u06a9\u0627\u0645\u06cc\u0627\u0628\u06cc \u06cc\u0627 \u0646\u0627\u06a9\u0627\u0645\u06cc \u06a9\u06cc \u0646\u0634\u0627\u0646\u062f\u06c1\u06cc \u06a9\u0631 \u0633\u06a9\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ Instead of this \u2014 may or may not throw\nFuture<user> getUser(String userId);\n\n\/\/ We write this \u2014 always returns a result\nFuture<result>> getUser(String userId);\n<\/result><\/user><\/code><\/pre>\n<p>\u0627\u0628 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0627 \u062f\u0633\u062a\u062e\u0637 \u0627\u06cc\u0645\u0627\u0646\u062f\u0627\u0631 \u06c1\u06d2\u06d4 &quot;\u06cc\u06c1 \u06a9\u0627\u0645\u06cc\u0627\u0628 \u06c1\u0648\u0633\u06a9\u062a\u0627 \u06c1\u06d2 \u06cc\u0627 \u06cc\u06c1 \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648\u0633\u06a9\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0622\u067e \u06a9\u0648 \u062f\u0648\u0646\u0648\u06ba \u0633\u06d2 \u0646\u0645\u0679\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u060c&#8221; \u06cc\u06c1 \u0622\u067e \u06a9\u0648 \u0628\u062a\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0645\u0631\u062a\u0628 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u0627 \u0635\u0627\u0631\u0641 \u06a9\u0648 \u062f\u0648\u0646\u0648\u06ba \u0635\u0648\u0631\u062a\u0648\u06ba \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u0646\u06d2 \u067e\u0631 \u0645\u062c\u0628\u0648\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u063a\u0644\u0637\u06cc \u0633\u06d2 \u0646\u0627\u06a9\u0627\u0645\u06cc \u06a9\u06d2 \u0631\u0627\u0633\u062a\u06d2 \u06a9\u0648 \u0627\u0648\u0648\u0631 \u0631\u0627\u0626\u0688 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u06a9\u0648\u0626\u06cc \u0637\u0631\u06cc\u0642\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1 \u0646\u0645\u0648\u0646\u06c1 Rust \u0627\u0648\u0631 Kotlin \u062c\u06cc\u0633\u06cc \u0632\u0628\u0627\u0646\u0648\u06ba \u0633\u06d2 \u0622\u062a\u0627 \u06c1\u06d2\u060c \u062c\u0648 \u0627\u0646 \u06a9\u06cc \u0645\u0639\u06cc\u0627\u0631\u06cc \u0644\u0627\u0626\u0628\u0631\u06cc\u0631\u06cc\u0648\u06ba \u0645\u06cc\u06ba \u0628\u0646\u06cc \u06c1\u06cc\u06ba\u06d4 \u0688\u0627\u0631\u0679 \u0645\u06cc\u06ba\u060c \u06c1\u0645 \u0627\u0633\u06d2 \u062e\u0648\u062f \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0688\u0627\u0631\u0679 3 \u0645\u06c1\u0631 \u0628\u0646\u062f \u06a9\u0644\u0627\u0633\u0632 \u0627\u0648\u0631 \u067e\u06cc\u0679\u0631\u0646 \u0645\u06cc\u0686\u0646\u06af \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0686\u06cc\u0632\u0648\u06ba \u06a9\u0648 \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u06a9\u06c1\u06cc\u06ba \u0632\u06cc\u0627\u062f\u06c1 \u0635\u0627\u0641 \u0633\u062a\u06be\u0631\u0627 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-building-a-result-type-with-sealed-classes\">\u0633\u06cc\u0644 \u0634\u062f\u06c1 \u06a9\u0644\u0627\u0633\u0648\u06ba \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0646\u062a\u0627\u0626\u062c \u06a9\u06cc \u0627\u0642\u0633\u0627\u0645 \u0628\u0646\u0627\u0646\u0627<\/h2>\n<p>\u0646\u062a\u0627\u0626\u062c \u06a9\u06cc \u0627\u0642\u0633\u0627\u0645 \u062c\u0648 \u06c1\u0645 \u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u0645\u06cc\u06ba \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0648\u06c1 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">\/\/ result.dart\n\n\/\/ Sealed means every possible subtype is defined\n\/\/ right here in this file. The compiler knows\n\/\/ there are exactly two possible outcomes \u2014\n\/\/ Success and Failure \u2014 and nothing else.\nsealed class Result<t> {}\n\n\/\/ Success carries the value we wanted.\n\/\/ T is the type parameter \u2014 Result<user> means\n\/\/ Success carries a User, Result<list>> carries a list.\nclass Success<t> extends Result<t> {\n  final T data;\n  const Success(this.data);\n}\n\n\/\/ Failure carries an AppError describing what went wrong.\n\/\/ We use a typed error class rather than a raw exception\n\/\/ so the UI can make decisions based on the error type.\nclass Failure<t> extends Result<t> {\n  final AppError error;\n  const Failure(this.error);\n}\n<\/t><\/t><\/t><\/t><\/list><\/user><\/t><\/code><\/pre>\n<p>\u0627\u0628 \u06c1\u0645\u06cc\u06ba \u0627\u06cc\u0631\u0631 \u06a9\u0644\u0627\u0633 \u062f\u0631\u062c \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4 \u062e\u0627\u0645 \u0627\u0633\u062a\u062b\u0646\u0627\u0626\u06cc \u067e\u06cc\u063a\u0627\u0645 \u06a9\u0648 \u0645\u0646\u062a\u0642\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c \u0622\u067e \u0645\u062e\u0635\u0648\u0635 \u062e\u0627\u0645\u06cc\u0648\u06ba \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u0622\u067e \u06a9\u06cc \u0627\u06cc\u067e \u067e\u06cc\u062f\u0627 \u06a9\u0631 \u0633\u06a9\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ app_error.dart\n\n\/\/ AppError is also sealed \u2014 every error type our app\n\/\/ can produce is defined here. This makes it impossible\n\/\/ to have an unhandled error type slip through.\nsealed class AppError {}\n\n\/\/ No internet connection\nclass NoInternetError extends AppError {}\n\n\/\/ The server returned an error response\nclass ServerError extends AppError {\n  final int statusCode;\n  final String message;\n  const ServerError({required this.statusCode, required this.message});\n}\n\n\/\/ The data came back in an unexpected format\nclass ParseError extends AppError {\n  final String message;\n  const ParseError(this.message);\n}\n\n\/\/ Something unexpected happened that we didn't anticipate\nclass UnknownError extends AppError {\n  final String message;\n  const UnknownError(this.message);\n}\n<\/code><\/pre>\n<p>\u0627\u0628 \u0622\u0626\u06cc\u06d2 \u0627\u0633\u06d2 \u0627\u067e\u0646\u06d2 \u0630\u062e\u06cc\u0631\u06d2 \u0645\u06cc\u06ba \u0622\u0632\u0645\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ post_repository.dart\n\nimport 'dart:convert';\nimport 'package:http\/http.dart' as http;\nimport 'package:dio\/dio.dart';\nimport 'result.dart';\nimport 'app_error.dart';\nimport 'post.dart';\n\nclass PostRepository {\n  final Dio _dio;\n  PostRepository(this._dio);\n\n  Future<result>>> getPosts() async {\n    try {\n      final response = await _dio.get(\n        'https:\/\/jsonplaceholder.typicode.com\/posts',\n      );\n\n      \/\/ Parse the response into a list of Post objects.\n      \/\/ We wrap this in its own try\/catch because parsing\n      \/\/ can fail independently of the network call \u2014\n      \/\/ the API might return valid JSON but in an unexpected shape.\n      try {\n        final List<dynamic> data = response.data as List<dynamic>;\n        final posts = data\n            .map((json) => Post.fromJson(json as Map<string dynamic=\"\">))\n            .toList();\n\n        \/\/ Wrap the success value in Success<list>>\n        \/\/ and return it. The caller receives a Result,\n        \/\/ not a raw list, so they know they have to\n        \/\/ check whether it succeeded or failed.\n        return Success(posts);\n      } catch (e) {\n        return Failure(ParseError('Failed to parse posts: $e'));\n      }\n    } on DioException catch (e) {\n      \/\/ Map Dio's exception types to our own AppError types.\n      \/\/ This keeps Dio-specific types out of the rest of the app.\n      \/\/ If we ever swap Dio for a different HTTP client,\n      \/\/ only this file needs to change.\n      if (e.type == DioExceptionType.connectionError) {\n        return Failure(NoInternetError());\n      }\n\n      return Failure(\n        ServerError(\n          statusCode: e.response?.statusCode ?? 0,\n          message: e.message ?? 'Server error',\n        ),\n      );\n    } catch (e) {\n      \/\/ Catch-all for anything unexpected\n      return Failure(UnknownError(e.toString()));\n    }\n  }\n}\n<\/list><\/string><\/dynamic><\/dynamic><\/result><\/code><\/pre>\n<p>\u063a\u0648\u0631 \u06a9\u0631\u06cc\u06ba \u06a9\u06c1 \u06a9\u06cc\u0627 \u0628\u062f\u0644\u0627 \u06c1\u06d2\u06d4 \u0641\u0646\u06a9\u0634\u0646 \u062f\u0633\u062a\u062e\u0637 <code>Future<result>>><\/result><\/code> \u0645\u06cc\u06ba \u0627\u0628 \u0627\u06cc\u0645\u0627\u0646\u062f\u0627\u0631 \u06c1\u0648\u06ba\u06d4 \u062c\u0648 \u0628\u06be\u06cc \u0628\u0644\u0627\u062a\u0627 \u06c1\u06d2\u06d4 <code>getPosts()<\/code> \u0648\u06c1 \u062c\u0627\u0646\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0627\u0646\u06c1\u06cc\u06ba \u0646\u062a\u0627\u0626\u062c \u0645\u0644 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0622\u067e \u06c1\u0631 \u0648\u0642\u062a \u06a9\u0627\u0645\u06cc\u0627\u0628 \u06c1\u0648\u0646\u06d2 \u06a9\u0627 \u062f\u06a9\u06be\u0627\u0648\u0627 \u0646\u06c1\u06cc\u06ba \u06a9\u0631 \u0633\u06a9\u062a\u06d2\u06d4 \u0627\u0648\u0631 \u06a9\u0648\u0634\u0634\/\u06a9\u06cc\u0686 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0630\u062e\u06cc\u0631\u06c1 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0645\u0648\u062c\u0648\u062f \u06c1\u06d2\u06d4 \u0628\u06be\u06cc\u062c\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u06a9\u0648 \u06a9\u0686\u06be \u0628\u06be\u06cc \u0646\u06c1\u06cc\u06ba \u062f\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-dart-3-records-and-what-they-add\">\u0688\u0627\u0631\u0679 3 \u06a9\u06cc \u062a\u0627\u0631\u06cc\u062e \u0627\u0648\u0631 \u0627\u0636\u0627\u0641\u06cc \u0686\u06cc\u0632\u06cc\u06ba<\/h2>\n<p>\u0627\u0633 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u06a9\u06c1 \u06c1\u0645 \u067e\u06cc\u0679\u0631\u0646 \u06a9\u06cc \u0645\u0645\u0627\u062b\u0644\u062a \u0645\u06cc\u06ba \u0622\u062c\u0627\u0626\u06cc\u06ba\u060c \u06cc\u06c1 Dart 3 \u0631\u06cc\u06a9\u0627\u0631\u0688\u0632 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0628\u0627\u062a \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0642\u0627\u0628\u0644 \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0648\u06c1 \u0642\u062f\u0631\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0646\u062a\u0627\u0626\u062c \u06a9\u06cc \u0627\u0642\u0633\u0627\u0645 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062c\u0648\u0691\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0631\u06cc\u06a9\u0627\u0631\u0688 \u06c1\u0644\u06a9\u06d2 \u0648\u0632\u0646 \u0648\u0627\u0644\u06d2\u060c \u06af\u0645\u0646\u0627\u0645 \u0622\u0628\u062c\u06cc\u06a9\u0679 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u067e\u0648\u0631\u06cc \u06a9\u0644\u0627\u0633 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u06cc\u06d2 \u0628\u063a\u06cc\u0631 \u0645\u062a\u0639\u062f\u062f \u0627\u0642\u062f\u0627\u0631 \u06a9\u0648 \u0627\u06cc\u06a9 \u0633\u0627\u062a\u06be \u06af\u0631\u0648\u067e \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u0633\u06d2 \u0641\u0646\u06a9\u0634\u0646 \u0633\u06d2 \u0645\u062a\u0639\u062f\u062f \u0627\u0642\u062f\u0627\u0631 \u0648\u0627\u067e\u0633 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0627\u06cc\u06a9 \u062a\u06cc\u0632 \u0637\u0631\u06cc\u0642\u06c1 \u0633\u0645\u062c\u06be\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ Before records \u2014 you needed a class or a Map\n\/\/ to return multiple values\nMap<string dynamic=\"\"> getUserInfo() {\n  return {'name': 'Nicholas', 'age': 28};\n  \/\/ No type safety \u2014 'age' could be anything\n}\n\n\/\/ With records \u2014 type safe, no class needed\n(String name, int age) getUserInfo() {\n  return ('Nicholas', 28);\n  \/\/ The compiler knows name is a String and age is an int\n}\n<\/string><\/code><\/pre>\n<p>\u062c\u0628 \u0622\u067e \u06a9\u0648 \u0642\u062f\u0631 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06a9\u0686\u06be \u0645\u06cc\u0679\u0627 \u0688\u06cc\u0679\u0627 \u0648\u0627\u067e\u0633 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648 \u062a\u0648 \u0631\u06cc\u06a9\u0627\u0631\u0688\u0632 \u063a\u0644\u0637\u06cc \u0633\u06d2 \u0646\u0645\u0679\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u0641\u06cc\u062f \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ A function that returns a post and its fetch timestamp\nFuture<result datetime=\"\">> getPostWithTimestamp(\n  String postId,\n) async {\n  try {\n    final response = await _dio.get('\/posts\/$postId');\n    final post = Post.fromJson(response.data);\n\n    \/\/ The record (post, DateTime.now()) groups both values\n    \/\/ without needing a wrapper class\n    return Success((post, DateTime.now()));\n  } catch (e) {\n    return Failure(UnknownError(e.toString()));\n  }\n}\n<\/result><\/code><\/pre>\n<p>\u0627\u0648\u0631 \u0627\u0633\u06d2 \u06a9\u06be\u0627\u0626\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">final result = await repository.getPostWithTimestamp('1');\n\nswitch (result) {\n  case Success(:final data):\n    \/\/ Destructure the record directly in the pattern\n    final (post, fetchedAt) = data;\n    print('Got \\({post.title} at \\)fetchedAt');\n  case Failure(:final error):\n    print('Failed: $error');\n}\n<\/code><\/pre>\n<p>\u0646\u062a\u0627\u0626\u062c \u06a9\u06cc \u0642\u0633\u0645 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0631\u06cc\u06a9\u0627\u0631\u0688\u0632 \u0636\u0631\u0648\u0631\u06cc \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba\u060c \u0644\u06cc\u06a9\u0646 \u0622\u067e \u06a9\u0648 \u0627\u06cc\u06a9 \u0686\u06be\u0648\u0679\u06cc \u0645\u062f\u062f\u06af\u0627\u0631 \u0637\u0628\u0642\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 \u062c\u0648 \u062f\u0648 \u06cc\u0627 \u062a\u06cc\u0646 \u0627\u0642\u062f\u0627\u0631 \u06a9\u0648 \u0627\u06cc\u06a9 \u0633\u0627\u062a\u06be \u067e\u0627\u0633 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062e\u0627\u0644\u0635\u062a\u0627\u064b \u0645\u0648\u062c\u0648\u062f \u06c1\u0648\u06d4 \u0645\u06cc\u06ba \u0627\u0633\u06d2 \u0628\u0627\u0642\u0627\u0639\u062f\u06af\u06cc \u0633\u06d2 \u0635\u0641\u062d\u06c1 \u0628\u0646\u062f\u06cc \u06a9\u0631\u0633\u0631 \u06cc\u0627 \u0631\u06cc\u067e\u0648\u0632\u0679\u0631\u06cc \u0637\u0631\u06cc\u0642\u0648\u06ba \u0645\u06cc\u06ba \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u0648\u06ba \u062c\u0646 \u06a9\u0648 \u06a9\u06cc\u0634 \u0645\u06cc\u0679\u0627 \u0688\u06cc\u0679\u0627 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0688\u06cc\u0679\u0627 \u0648\u0627\u067e\u0633 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-pattern-matching-on-errors\">\u063a\u0644\u0637\u06cc\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u067e\u06cc\u0679\u0631\u0646 \u06a9\u0627 \u0645\u0644\u0627\u067e<\/h2>\n<p>\u06cc\u06c1 \u0648\u06c1 \u062c\u06af\u06c1 \u06c1\u06d2 \u062c\u06c1\u0627\u06ba \u0633\u0628 \u06a9\u0686\u06be \u0627\u06a9\u0679\u06be\u0627 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u0633\u06cc\u0644 \u0634\u062f\u06c1 \u06a9\u0644\u0627\u0633\u0632 \u0627\u0648\u0631 \u067e\u06cc\u0679\u0631\u0646 \u0645\u06cc\u0686\u0646\u06af \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u0622\u067e \u06a9\u0645\u067e\u0627\u0626\u0644\u0631 \u06a9\u0648 \u062a\u0645\u0627\u0645 \u0645\u0645\u06a9\u0646\u06c1 \u0646\u062a\u0627\u0626\u062c \u067e\u0631 \u06a9\u0627\u0631\u0631\u0648\u0627\u0626\u06cc \u06a9\u0631\u0646\u06d2 \u067e\u0631 \u0645\u062c\u0628\u0648\u0631 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06c1\u0645 \u063a\u0644\u0637\u06cc \u0633\u06d2 \u0646\u0627\u06a9\u0627\u0645\u06cc \u06a9\u06cc \u0645\u062b\u0627\u0644\u0648\u06ba \u06a9\u0648 \u0646\u0638\u0631 \u0627\u0646\u062f\u0627\u0632 \u0646\u06c1\u06cc\u06ba \u06a9\u0631 \u0633\u06a9\u062a\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">final result = await repository.getPosts();\n\nswitch (result) {\n  \/\/ Named field pattern \u2014 extracts 'data' directly\n  \/\/ from Success without a manual cast\n  case Success(:final data):\n    print('Got ${data.length} posts');\n\n  case Failure(:final error):\n    \/\/ Now pattern match on the error type\n    \/\/ to give the user the right message\n    switch (error) {\n      case NoInternetError():\n        print('No internet connection. Please check your connection.');\n      case ServerError(:final statusCode, :final message):\n        print('Server error \\(statusCode: \\)message');\n      case ParseError(:final message):\n        print('Something went wrong parsing the data: $message');\n      case UnknownError(:final message):\n        print('Unexpected error: $message');\n    }\n}\n<\/code><\/pre>\n<p>\u062f\u0648\u0646\u0648\u06ba \u0633\u0648\u0626\u0686 \u06a9\u06d2 \u062f\u0631\u0648\u0627\u0632\u06d2 \u0645\u06a9\u0645\u0644 \u06c1\u06cc\u06ba\u06d4 \u0627\u06af\u0631 \u0622\u067e \u0627\u06cc\u06a9 \u0646\u06cc\u0627 \u0646\u062a\u06cc\u062c\u06c1 \u0630\u06cc\u0644\u06cc \u0642\u0633\u0645 \u0634\u0627\u0645\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633\u06d2 \u06cc\u06c1\u0627\u06ba \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u0631\u0646\u0627 \u0628\u06be\u0648\u0644 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0622\u067e \u06a9\u0648 \u062a\u0627\u0644\u06cc\u0641 \u06a9\u06cc \u063a\u0644\u0637\u06cc \u0645\u0644\u06d2 \u06af\u06cc\u06d4 \u0627\u06af\u0631 \u0622\u067e \u0627\u06cc\u06a9 \u0646\u06cc\u0627 AppError \u0630\u06cc\u0644\u06cc \u0642\u0633\u0645 \u0634\u0627\u0645\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633\u06d2 \u06cc\u06c1\u0627\u06ba \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u0631\u0646\u0627 \u0628\u06be\u0648\u0644 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0622\u067e \u06a9\u0648 \u062a\u0627\u0644\u06cc\u0641 \u06a9\u06cc \u062e\u0631\u0627\u0628\u06cc \u0645\u0644\u06d2 \u06af\u06cc\u06d4 \u06a9\u0645\u067e\u0627\u0626\u0644\u0631 \u06a9\u0648\u0627\u0644\u0679\u06cc \u06a9\u0646\u0679\u0631\u0648\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0622\u067e \u0628\u06be\u06cc \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba: <code>when<\/code> \u0645\u0632\u06cc\u062f \u062c\u0627\u0645\u0639 \u067e\u0631\u0648\u0633\u06cc\u0633\u0646\u06af \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u0648\u0633\u06cc\u0639 \u06a9\u06d2 \u0646\u0645\u0648\u0646\u06d2:<\/p>\n<pre><code class=\"language-dart\">\/\/ A helper extension that makes Result easier to consume\nextension ResultExtension<t> on Result<t> {\n  \/\/ Runs onSuccess if this is a Success,\n  \/\/ runs onFailure if this is a Failure\n  R when<r>({\n    required R Function(T data) onSuccess,\n    required R Function(AppError error) onFailure,\n  }) {\n    return switch (this) {\n      Success(:final data) => onSuccess(data),\n      Failure(:final error) => onFailure(error),\n    };\n  }\n\n  \/\/ Returns the data if Success, null if Failure\n  T? getOrNull() => switch (this) {\n    Success(:final data) => data,\n    Failure() => null,\n  };\n\n  \/\/ Returns true if this is a Success\n  bool get isSuccess => this is Success<t>;\n\n  \/\/ Returns true if this is a Failure\n  bool get isFailure => this is Failure<t>;\n}\n<\/t><\/t><\/r><\/t><\/t><\/code><\/pre>\n<p>\u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0628\u06c1\u062a \u0648\u0627\u0636\u062d \u06c1\u0648 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">final result = await repository.getPosts();\n\nfinal posts = result.when(\n  onSuccess: (data) => data,\n  onFailure: (error) => <post>[],\n);\n<\/post><\/code><\/pre>\n<h2 id=\"heading-applying-this-to-a-real-bloc-feature\">\u0627\u0633\u06d2 \u0627\u0635\u0644 \u0628\u0644\u0627\u06a9 \u0641\u0646\u06a9\u0634\u0646 \u067e\u0631 \u0644\u06af\u0627\u0626\u06cc\u06ba\u06d4<\/h2>\n<p>\u0622\u0626\u06cc\u06d2 \u06c1\u0631 \u0686\u06cc\u0632 \u06a9\u0648 \u0627\u06cc\u06a9 \u0645\u06a9\u0645\u0644 \u0628\u0644\u0627\u06a9 \u0645\u06cc\u06ba \u062c\u0648\u0691\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0622\u0626\u06cc\u06d2 \u067e\u0648\u0633\u0679\u0633 \u06a9\u06cc \u0641\u0639\u0627\u0644\u06cc\u062a \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba \u062c\u0648 \u06c1\u0645 \u0646\u06d2 \u067e\u0686\u06be\u0644\u06d2 \u0633\u06cc\u0634\u0646 \u0645\u06cc\u06ba \u0628\u0646\u0627\u06cc\u0627 \u062a\u06be\u0627 \u0627\u0648\u0631 \u0646\u062a\u0627\u0626\u062c \u06a9\u06cc \u0627\u0642\u0633\u0627\u0645 \u06a9\u0648 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u06d2 \u0627\u067e \u06af\u0631\u06cc\u0688 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p>\u0631\u06cc\u0627\u0633\u062a\u06cc\u06ba \u0627\u0628 \u0633\u06cc\u0644 \u0634\u062f\u06c1 \u06a9\u0644\u0627\u0633\u06cc\u06ba \u062d\u0627\u0635\u0644 \u06a9\u0631 \u0631\u06c1\u06cc \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">\/\/ post_state.dart\n\nsealed class PostState {}\n\nclass PostInitial extends PostState {}\n\nclass PostLoading extends PostState {}\n\n\/\/ Success state carries the posts directly\nclass PostLoaded extends PostState {\n  final List<post> posts;\n  const PostLoaded(this.posts);\n}\n\n\/\/ Error state carries a typed AppError, not just a string.\n\/\/ This means the UI can make decisions based on the\n\/\/ error type \u2014 show a \"no internet\" message vs a\n\/\/ \"server error\" message vs a \"try again\" message.\nclass PostError extends PostState {\n  final AppError error;\n  const PostError(this.error);\n}\n<\/post><\/code><\/pre>\n<p>\u0628\u0644\u0627\u06a9:<\/p>\n<pre><code class=\"language-dart\">\/\/ post_bloc.dart\n\nclass PostBloc extends Bloc<postevent poststate=\"\"> {\n  final PostRepository _repository;\n\n  PostBloc(this._repository) : super(PostInitial()) {\n    on<loadposts>(_onLoadPosts);\n  }\n\n  Future<void> _onLoadPosts(\n    LoadPosts event,\n    Emitter<poststate> emit,\n  ) async {\n    emit(PostLoading());\n\n    \/\/ getPosts() now returns Result<list>>\n    \/\/ We pattern match on the result directly \u2014\n    \/\/ no try\/catch needed here because the repository\n    \/\/ already handles all error cases and wraps them\n    \/\/ in a Failure. The Bloc just reads the result.\n    final result = await _repository.getPosts();\n\n    switch (result) {\n      case Success(:final data):\n        emit(PostLoaded(data));\n      case Failure(:final error):\n        emit(PostError(error));\n    }\n  }\n}\n<\/list><\/poststate><\/void><\/loadposts><\/postevent><\/code><\/pre>\n<p>\u0628\u0644\u0627\u06a9 \u06a9\u06d2 \u067e\u0627\u0633 \u06a9\u0648\u0626\u06cc \u06a9\u0648\u0634\u0634\/\u06a9\u06cc\u0686 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0631\u06cc\u067e\u0648\u0632\u0679\u0631\u06cc \u063a\u0644\u0637\u06cc \u0633\u06d2 \u0646\u0645\u0679\u0646\u06d2 \u06a9\u0627 \u0645\u0627\u0644\u06a9 \u06c1\u06d2\u06d4 \u0628\u0644\u0627\u06a9 \u0646\u062a\u0627\u0626\u062c \u06a9\u0648 \u067e\u0691\u06be\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0635\u062d\u06cc\u062d \u062d\u06cc\u062b\u06cc\u062a \u06a9\u0627 \u0627\u062e\u0631\u0627\u062c \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0635\u0627\u0641 \u0627\u0648\u0631 \u0633\u0627\u062f\u06c1 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u06c1\u0631 \u067e\u0631\u062a \u0628\u0627\u0644\u06a9\u0644 \u0627\u06cc\u06a9 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>UI:<\/p>\n<pre><code class=\"language-dart\">\/\/ post_screen.dart\n\nBlocBuilder<postbloc poststate=\"\">(\n  builder: (context, state) {\n    return switch (state) {\n      PostInitial() => const Center(\n          child: Text('Press the button to load posts'),\n        ),\n\n      PostLoading() => const Center(\n          child: CircularProgressIndicator(),\n        ),\n\n      PostLoaded(:final posts) => ListView.builder(\n          itemCount: posts.length,\n          itemBuilder: (context, index) {\n            final post = posts[index];\n            return ListTile(\n              leading: Text('${post.id}'),\n              title: Text(post.title),\n              subtitle: Text(post.body),\n            );\n          },\n        ),\n\n      \/\/ Pattern match on the error type to show\n      \/\/ the right message for each specific error.\n      \/\/ This is something try\/catch cannot give you \u2014\n      \/\/ typed, structured errors that the UI can act on.\n      PostError(:final error) => Center(\n          child: Column(\n            mainAxisSize: MainAxisSize.min,\n            children: [\n              Text(\n                switch (error) {\n                  NoInternetError() =>\n                    'No internet connection. Please check your connection.',\n                  ServerError(:final statusCode) =>\n                    'Server error ($statusCode). Please try again.',\n                  ParseError() =>\n                    'Something went wrong. Please try again.',\n                  UnknownError() =>\n                    'An unexpected error occurred.',\n                },\n              ),\n              const SizedBox(height: 16),\n              ElevatedButton(\n                onPressed: () {\n                  context.read<postbloc>().add(LoadPosts());\n                },\n                child: const Text('Try again'),\n              ),\n            ],\n          ),\n        ),\n    };\n  },\n)\n<\/postbloc><\/postbloc><\/code><\/pre>\n<p>UI \u0627\u0628 \u06c1\u0631 \u063a\u0644\u0637\u06cc \u06a9\u06cc \u0642\u0633\u0645 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u062e\u062a\u0644\u0641 \u067e\u06cc\u063a\u0627\u0645\u0627\u062a \u062f\u06a9\u06be\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0646\u0679\u0631\u0646\u06cc\u0679 \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u0648 \u0633\u0631\u0648\u0631 \u06a9\u06cc \u062e\u0631\u0627\u0628\u06cc \u06a9\u0627 \u0633\u0627\u0645\u0646\u0627 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0635\u0627\u0631\u0641\u06cc\u0646 \u0633\u06d2 \u0645\u062e\u062a\u0644\u0641 \u067e\u06cc\u063a\u0627\u0645 \u0645\u0648\u0635\u0648\u0644 \u06c1\u0648\u06af\u0627\u06d4 \u06cc\u06c1 \u0639\u0627\u0645 &quot;\u06a9\u0686\u06be \u063a\u0644\u0637 \u06c1\u06d2&#8221; \u067e\u06cc\u063a\u0627\u0645 \u0633\u06d2 \u06a9\u06c1\u06cc\u06ba \u0632\u06cc\u0627\u062f\u06c1 \u0628\u06c1\u062a\u0631 \u0635\u0627\u0631\u0641 \u06a9\u0627 \u062a\u062c\u0631\u0628\u06c1 \u06c1\u06d2\u06d4 \u0627\u0648\u0631 \u06cc\u06c1 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u062f\u0627\u062e\u0644 \u06a9\u0631\u062f\u06c1 \u063a\u0644\u0637\u06cc \u0633\u06d2 \u0622\u062a\u0627 \u06c1\u06d2\u060c \u062e\u0627\u0645 \u0627\u0633\u062a\u062b\u0646\u0627\u0626\u06cc \u067e\u06cc\u063a\u0627\u0645 \u0633\u06d2 \u0646\u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-when-this-approach-is-worth-it-and-when-it-isnt\">\u06cc\u06c1 \u0646\u0642\u0637\u06c1 \u0646\u0638\u0631 \u06a9\u0628 \u0641\u0627\u0626\u062f\u06c1 \u0645\u0646\u062f \u06c1\u06d2 \u0627\u0648\u0631 \u06a9\u0628 \u0646\u06c1\u06cc\u06ba\u061f<\/h3>\n<p>\u0645\u06cc\u06ba \u06cc\u06c1\u0627\u06ba \u0627\u06cc\u0645\u0627\u0646\u062f\u0627\u0631 \u06c1\u0648\u0646\u0627 \u0686\u0627\u06c1\u062a\u0627 \u06c1\u0648\u06ba\u06d4 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u06c1\u0645 \u0646\u06d2 \u062f\u06cc\u06a9\u06be\u0627 \u06c1\u06d2 \u06a9\u06c1 \u0688\u0648\u06cc\u0644\u067e\u0631\u0632 \u06a9\u0648 \u0627\u0686\u06be\u06d2 \u0641\u0646 \u062a\u0639\u0645\u06cc\u0631 \u06a9\u06d2 \u0646\u0627\u0645 \u067e\u0631 \u0633\u0627\u062f\u06c1 \u0686\u06cc\u0632\u0648\u06ba \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0627\u0646\u062c\u06cc\u0646\u0626\u0631 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p><strong>\u0646\u062a\u0627\u0626\u062c \u06a9\u06cc \u0627\u0642\u0633\u0627\u0645 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba \u062c\u0628:<\/strong><\/p>\n<ul>\n<li>\n<p>\u0627\u06cc\u06a9 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0626\u06cc \u0645\u0646\u0641\u0631\u062f \u0637\u0631\u06cc\u0642\u0648\u06ba \u0633\u06d2 \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648 \u0633\u06a9\u062a\u0627 \u06c1\u06d2 \u062c\u0633\u06d2 \u06a9\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u06a9\u0648 \u0645\u062e\u062a\u0644\u0641 \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4<\/p>\n<\/li>\n<li>\n<p>\u0622\u067e \u0627\u06cc\u06a9 \u0633\u0679\u0648\u0631\u06cc\u062c \u06cc\u0627 \u0633\u0631\u0648\u0633 \u0644\u06cc\u0626\u0631 \u0628\u0646\u0627 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba \u062c\u0633 \u067e\u0631 \u0645\u062a\u0639\u062f\u062f \u0641\u0646\u06a9\u0634\u0646\u0632 \u0627\u0646\u062d\u0635\u0627\u0631 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<li>\n<p>\u0622\u067e \u0627\u06cc\u06a9 \u0627\u06cc\u0633\u06cc \u0679\u06cc\u0645 \u067e\u0631 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u06c1\u0627\u06ba \u063a\u0644\u0637\u06cc\u0648\u06ba \u0633\u06d2 \u0646\u0645\u0679\u0646\u0627 \u0627\u06cc\u06a9 \u0633\u0646\u06af\u06cc\u0646 \u0645\u0633\u0626\u0644\u06c1 \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<li>\n<p>\u0627\u0633 \u0645\u06cc\u06ba \u06a9\u0686\u06be \u0628\u06be\u06cc \u0634\u0627\u0645\u0644 \u06c1\u06d2 \u062c\u0648 \u062e\u0637\u0631\u06d2 \u0645\u06cc\u06ba \u06c1\u06d2: \u0631\u0642\u0645\u060c \u0635\u0627\u0631\u0641 \u06a9\u0627 \u0688\u06cc\u0679\u0627\u060c \u06cc\u0627 \u062e\u0627\u0645\u0648\u0634 \u063a\u0644\u0637\u06cc\u0627\u06ba\u06d4<\/p>\n<\/li>\n<\/ul>\n<p><strong>\u062f\u0631\u062c \u0630\u06cc\u0644 \u0635\u0648\u0631\u062a\u0648\u06ba \u0645\u06cc\u06ba \u0679\u0631\u0627\u0626\u06cc\/\u06a9\u06cc\u0686 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba:<\/strong><\/p>\n<ul>\n<li>\n<p>\u06cc\u06c1 \u0627\u06cc\u06a9 \u0686\u06be\u0648\u0679\u06cc \u0633\u06cc \u062e\u0635\u0648\u0635\u06cc\u062a \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u06cc\u06a9 \u0633\u0627\u062f\u06c1\u060c \u0627\u06cc\u06a9 \u0648\u0642\u062a\u06cc \u06a9\u0627\u0645 \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<li>\n<p>\u063a\u0644\u0637\u06cc \u0633\u06d2 \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u0631\u0646\u0627 \u06cc\u06a9\u0633\u0627\u06ba \u06c1\u06d2 \u0642\u0637\u0639 \u0646\u0638\u0631 \u0627\u0633 \u06a9\u06d2 \u06a9\u06c1 \u06a9\u06cc\u0627 \u063a\u0644\u0637 \u06c1\u0648\u0627 \u06c1\u06d2\u06d4 \u067e\u06cc\u063a\u0627\u0645\u0627\u062a \u062f\u06a9\u06be\u0627\u0626\u06cc\u06ba\u060c \u0644\u0627\u06af \u06a9\u0631\u06cc\u06ba\u060c \u0645\u06a9\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<li>\n<p>\u0622\u067e \u067e\u0631\u0648\u0679\u0648 \u0679\u0627\u0626\u067e\u0646\u06af \u06a9\u0631 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba \u06cc\u0627 \u0627\u0628\u062a\u062f\u0627\u0626\u06cc \u062a\u0631\u0642\u06cc \u0645\u06cc\u06ba \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0641\u0646 \u062a\u0639\u0645\u06cc\u0631 \u0645\u0633\u0644\u0633\u0644 \u0628\u062f\u0644 \u0631\u06c1\u0627 \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<li>\n<p>\u0627\u0636\u0627\u0641\u06cc \u067e\u06cc\u0686\u06cc\u062f\u06af\u06cc \u06a9\u0648\u0688 \u0628\u06cc\u0633 \u06a9\u06d2 \u0633\u0627\u0626\u0632 \u06a9\u06cc \u0637\u0631\u0641 \u0633\u06d2 \u062c\u0627\u0626\u0632 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2.<\/p>\n<\/li>\n<\/ul>\n<p>\u0646\u062a\u06cc\u062c\u06c1 \u06a9\u06cc \u0642\u0633\u0645 \u06a9\u0627 \u0646\u0645\u0648\u0646\u06c1 \u0634\u0639\u0648\u0631 \u0645\u06cc\u06ba \u0627\u0636\u0627\u0641\u06c1 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u0633\u06d2 \u0627\u0646\u06a9\u0627\u0631 \u06a9\u06cc \u06a9\u0648\u0626\u06cc \u0648\u062c\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u0633\u0627\u062f\u06c1 \u06a9\u0648\u0634\u0634\/\u06a9\u06cc\u0686 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0645 \u06a9\u0648\u0688 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4 \u0645\u0646\u0641\u06cc \u067e\u06c1\u0644\u0648 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u06a9\u0648\u0634\u0634\/\u06a9\u06cc\u0686 \u067e\u0648\u0634\u06cc\u062f\u06c1 \u06c1\u06d2\u06d4 \u06a9\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u06a9\u0648 \u063a\u0644\u0637\u06cc \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u0646\u06d2 \u067e\u0631 \u0645\u062c\u0628\u0648\u0631 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06cc \u06a9\u0648\u0626\u06cc \u0686\u06cc\u0632 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0646\u062a\u06cc\u062c\u06c1 \u06a9\u06cc \u0642\u0633\u0645 \u0648\u0627\u0636\u062d \u06c1\u06d2\u06d4 \u0642\u0633\u0645 \u06a9\u0627 \u0646\u0638\u0627\u0645 \u0627\u0633 \u06a9\u0648 \u0646\u0627\u0641\u0630 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u0627\u06cc\u067e\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0648 \u062d\u0642\u06cc\u0642\u06cc \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u06cc \u062e\u062f\u0645\u062a \u06a9\u0631\u062a\u06cc \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0646 \u067e\u0631 \u0627\u06cc\u06a9 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0688\u0648\u06cc\u0644\u067e\u0631 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u06cc\u06c1 \u0648\u0627\u0636\u062d \u0627\u0636\u0627\u0641\u06cc \u06a9\u0648\u0688 \u06a9\u06d2 \u0642\u0627\u0628\u0644 \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u0636\u0645\u0646\u06cc \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0648 \u0622\u067e \u062e\u0648\u062f \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u06cc\u06c1 \u062d\u062f \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u06c1\u0648 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-end-to-end-example\">\u0622\u062e\u0631 \u0633\u06d2 \u0622\u062e\u0631 \u062a\u06a9 \u0645\u062b\u0627\u0644<\/h2>\n<p>\u0633\u0628 \u06a9\u0686\u06be \u0627\u06cc\u06a9 \u0645\u06a9\u0645\u0644 \u062e\u0635\u0648\u0635\u06cc\u062a \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06c1\u06d2\u06d4 \u0627\u0633\u06d2 \u0627\u06cc\u06a9 \u0646\u0626\u06d2 \u0641\u0644\u0679\u0631 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0645\u06cc\u06ba \u06a9\u0627\u067e\u06cc \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633\u06d2 \u0686\u0644\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<p><strong>\u0641\u0648\u0644\u0688\u0631 \u06a9\u06cc \u0633\u0627\u062e\u062a:<\/strong><\/p>\n<pre><code class=\"language-plaintext\">lib\/\n  core\/\n    result.dart\n    app_error.dart\n  models\/\n    post.dart\n  data\/\n    post_repository.dart\n  bloc\/\n    post_bloc.dart\n    post_event.dart\n    post_state.dart\n  ui\/\n    post_screen.dart\n  main.dart\n<\/code><\/pre>\n<p><strong>\u0646\u062a\u06cc\u062c\u06c1 \u0688\u0627\u0631\u0679:<\/strong><\/p>\n<pre><code class=\"language-dart\">sealed class Result<t> {}\n\nclass Success<t> extends Result<t> {\n  final T data;\n  const Success(this.data);\n}\n\nclass Failure<t> extends Result<t> {\n  final AppError error;\n  const Failure(this.error);\n}\n\nextension ResultExtension<t> on Result<t> {\n  R when<r>({\n    required R Function(T data) onSuccess,\n    required R Function(AppError error) onFailure,\n  }) {\n    return switch (this) {\n      Success(:final data) => onSuccess(data),\n      Failure(:final error) => onFailure(error),\n    };\n  }\n}\n<\/r><\/t><\/t><\/t><\/t><\/t><\/t><\/t><\/code><\/pre>\n<p><strong>app_error.dart:<\/strong><\/p>\n<pre><code class=\"language-dart\">sealed class AppError {}\n\nclass NoInternetError extends AppError {}\n\nclass ServerError extends AppError {\n  final int statusCode;\n  final String message;\n  const ServerError({required this.statusCode, required this.message});\n}\n\nclass ParseError extends AppError {\n  final String message;\n  const ParseError(this.message);\n}\n\nclass UnknownError extends AppError {\n  final String message;\n  const UnknownError(this.message);\n}\n<\/code><\/pre>\n<p><strong>post.dart:<\/strong><\/p>\n<pre><code class=\"language-dart\">class Post {\n  final int id;\n  final String title;\n  final String body;\n  final int userId;\n\n  const Post({\n    required this.id,\n    required this.title,\n    required this.body,\n    required this.userId,\n  });\n\n  factory Post.fromJson(Map<string dynamic=\"\"> json) {\n    return Post(\n      id: json['id'] as int,\n      title: json['title'] as String,\n      body: json['body'] as String,\n      userId: json['userId'] as int,\n    );\n  }\n}\n<\/string><\/code><\/pre>\n<p><strong>post_repository.dart:<\/strong><\/p>\n<pre><code class=\"language-dart\">import 'package:dio\/dio.dart';\nimport '..\/core\/result.dart';\nimport '..\/core\/app_error.dart';\nimport '..\/models\/post.dart';\n\nclass PostRepository {\n  final Dio _dio;\n  PostRepository(this._dio);\n\n  Future<result>>> getPosts() async {\n    try {\n      final response = await _dio.get(\n        'https:\/\/jsonplaceholder.typicode.com\/posts',\n      );\n\n      try {\n        final List<dynamic> data = response.data as List<dynamic>;\n        final posts = data\n            .map((json) => Post.fromJson(json as Map<string dynamic=\"\">))\n            .toList();\n        return Success(posts);\n      } catch (e) {\n        return Failure(ParseError('Failed to parse posts: $e'));\n      }\n    } on DioException catch (e) {\n      if (e.type == DioExceptionType.connectionError) {\n        return Failure(NoInternetError());\n      }\n      return Failure(\n        ServerError(\n          statusCode: e.response?.statusCode ?? 0,\n          message: e.message ?? 'Server error',\n        ),\n      );\n    } catch (e) {\n      return Failure(UnknownError(e.toString()));\n    }\n  }\n}\n<\/string><\/dynamic><\/dynamic><\/result><\/code><\/pre>\n<p><strong>post_event.dart:<\/strong><\/p>\n<pre><code class=\"language-dart\">sealed class PostEvent {}\n\nclass LoadPosts extends PostEvent {}\n<\/code><\/pre>\n<p><strong>post_state.dart:<\/strong><\/p>\n<pre><code class=\"language-dart\">import '..\/core\/app_error.dart';\nimport '..\/models\/post.dart';\n\nsealed class PostState {}\n\nclass PostInitial extends PostState {}\nclass PostLoading extends PostState {}\n\nclass PostLoaded extends PostState {\n  final List<post> posts;\n  const PostLoaded(this.posts);\n}\n\nclass PostError extends PostState {\n  final AppError error;\n  const PostError(this.error);\n}\n<\/post><\/code><\/pre>\n<p><strong>post_bloc.dart:<\/strong><\/p>\n<pre><code class=\"language-dart\">import 'package:flutter_bloc\/flutter_bloc.dart';\nimport '..\/core\/result.dart';\nimport '..\/data\/post_repository.dart';\nimport 'post_event.dart';\nimport 'post_state.dart';\n\nclass PostBloc extends Bloc<postevent poststate=\"\"> {\n  final PostRepository _repository;\n\n  PostBloc(this._repository) : super(PostInitial()) {\n    on<loadposts>(_onLoadPosts);\n  }\n\n  Future<void> _onLoadPosts(\n    LoadPosts event,\n    Emitter<poststate> emit,\n  ) async {\n    emit(PostLoading());\n\n    final result = await _repository.getPosts();\n\n    switch (result) {\n      case Success(:final data):\n        emit(PostLoaded(data));\n      case Failure(:final error):\n        emit(PostError(error));\n    }\n  }\n}\n<\/poststate><\/void><\/loadposts><\/postevent><\/code><\/pre>\n<p><strong>post_screen.dart:<\/strong><\/p>\n<pre><code class=\"language-dart\">import 'package:flutter\/material.dart';\nimport 'package:flutter_bloc\/flutter_bloc.dart';\nimport '..\/bloc\/post_bloc.dart';\nimport '..\/bloc\/post_event.dart';\nimport '..\/bloc\/post_state.dart';\nimport '..\/core\/app_error.dart';\n\nclass PostScreen extends StatelessWidget {\n  const PostScreen({super.key});\n\n  String _errorMessage(AppError error) {\n    return switch (error) {\n      NoInternetError() =>\n        'No internet connection. Please check your connection.',\n      ServerError(:final statusCode) =>\n        'Server error ($statusCode). Please try again.',\n      ParseError() => 'Something went wrong. Please try again.',\n      UnknownError() => 'An unexpected error occurred.',\n    };\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      appBar: AppBar(title: const Text('Posts')),\n      body: BlocBuilder<postbloc poststate=\"\">(\n        builder: (context, state) {\n          return switch (state) {\n            PostInitial() => const Center(\n                child: Text('Press the button to load posts'),\n              ),\n            PostLoading() => const Center(\n                child: CircularProgressIndicator(),\n              ),\n            PostLoaded(:final posts) => ListView.builder(\n                itemCount: posts.length,\n                itemBuilder: (context, index) {\n                  final post = posts[index];\n                  return ListTile(\n                    leading: Text('${post.id}'),\n                    title: Text(post.title),\n                    subtitle: Text(post.body),\n                  );\n                },\n              ),\n            PostError(:final error) => Center(\n                child: Column(\n                  mainAxisSize: MainAxisSize.min,\n                  children: [\n                    Text(_errorMessage(error)),\n                    const SizedBox(height: 16),\n                    ElevatedButton(\n                      onPressed: () {\n                        context.read<postbloc>().add(LoadPosts());\n                      },\n                      child: const Text('Try again'),\n                    ),\n                  ],\n                ),\n              ),\n          };\n        },\n      ),\n      floatingActionButton: FloatingActionButton(\n        onPressed: () => context.read<postbloc>().add(LoadPosts()),\n        child: const Icon(Icons.download),\n      ),\n    );\n  }\n}\n<\/postbloc><\/postbloc><\/postbloc><\/code><\/pre>\n<p><strong>main.dart:<\/strong><\/p>\n<pre><code class=\"language-dart\">import 'package:dio\/dio.dart';\nimport 'package:flutter\/material.dart';\nimport 'package:flutter_bloc\/flutter_bloc.dart';\nimport 'bloc\/post_bloc.dart';\nimport 'data\/post_repository.dart';\nimport 'ui\/post_screen.dart';\n\nvoid main() {\n  runApp(const MyApp());\n}\n\nclass MyApp extends StatelessWidget {\n  const MyApp({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      title: 'Result Type Demo',\n      home: BlocProvider(\n        create: (_) => PostBloc(PostRepository(Dio())),\n        child: const PostScreen(),\n      ),\n    );\n  }\n}\n<\/code><\/pre>\n<h2 id=\"heading-final-thoughts\">\u062d\u062a\u0645\u06cc \u062e\u06cc\u0627\u0644\u0627\u062a<\/h2>\n<p>\u0627\u0633 \u0645\u06cc\u06ba \u0633\u06d2 \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u06c1\u0648\u0634\u06cc\u0627\u0631 \u06c1\u0648\u0646\u06d2 \u06cc\u0627 \u0641\u06cc \u0627\u06cc\u06a9 \u067e\u06cc\u0679\u0631\u0646 \u06a9\u06cc \u067e\u06cc\u0631\u0648\u06cc \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u06cc\u06c1 \u063a\u0644\u0637\u06cc\u0648\u06ba \u06a9\u0648 \u0642\u0627\u0628\u0644 \u062a\u0648\u062c\u06c1 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<p>\u063a\u0644\u0637\u06cc \u0633\u06d2 \u0646\u0645\u0679\u0646\u06d2 \u06a9\u06d2 \u0648\u0627\u062d\u062f \u0679\u0648\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 try\/catch \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0628\u0646\u06cc\u0627\u062f\u06cc \u0645\u0633\u0626\u0644\u06c1 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u06cc\u06c1 \u0639\u0627\u0645 \u0646\u0638\u0631 \u0622\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u06d2 \u062f\u0633\u062a\u062e\u0637 \u06a9\u06d2 \u067e\u06cc\u0686\u06be\u06d2 \u0646\u0627\u06a9\u0627\u0645\u06cc \u06a9\u06d2 \u0627\u0645\u06a9\u0627\u0646 \u06a9\u0648 \u0686\u06be\u067e\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0646\u062a\u06cc\u062c\u06d2 \u0645\u06cc\u06ba \u0622\u0646\u06d2 \u0648\u0627\u0644\u06cc \u0642\u0633\u0645 \u0642\u0633\u0645 \u06a9\u06d2 \u0646\u0638\u0627\u0645 \u0645\u06cc\u06ba \u0627\u067e\u0646\u06d2 \u0627\u0645\u06a9\u0627\u0646\u0627\u062a \u06a9\u0648 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u060c \u062c\u06c1\u0627\u06ba \u0645\u0631\u062a\u0628 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u0627 \u0627\u0633\u06d2 \u0645\u0633\u062a\u0642\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0633\u0646\u0628\u06be\u0627\u0644\u0646\u06d2 \u0645\u06cc\u06ba \u0645\u062f\u062f \u06a9\u0631 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u06c1\u0631 \u0628\u0646\u062f \u06a9\u0644\u0627\u0633\u0632\u060c \u0679\u0627\u0626\u067e \u0634\u062f\u06c1 \u063a\u0644\u0637\u06cc\u0627\u06ba\u060c \u067e\u06cc\u0679\u0631\u0646 \u0645\u06cc\u0686\u0646\u06af\u060c \u0627\u0648\u0631 \u0688\u0627\u0631\u0679 3 \u0631\u06cc\u06a9\u0627\u0631\u0688\u0632 \u06a9\u0627 \u0645\u062c\u0645\u0648\u0639\u06c1 \u06c1\u0645\u06cc\u06ba \u062f\u0631\u062c \u0630\u06cc\u0644 \u0633\u0633\u0679\u0645 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2:<\/p>\n<ul>\n<li>\n<p>\u0627\u0641\u0639\u0627\u0644 \u0627\u0633 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0627\u06cc\u0645\u0627\u0646\u062f\u0627\u0631 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0648\u06c1 \u06a9\u06cc\u0627 \u0648\u0627\u067e\u0633 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<li>\n<p>\u063a\u0644\u0637\u06cc \u06a9\u06cc \u062a\u0645\u0627\u0645 \u0627\u0642\u0633\u0627\u0645 \u06a9\u0648 \u0648\u0627\u0636\u062d \u0637\u0648\u0631 \u067e\u0631 \u0633\u0646\u0628\u06be\u0627\u0644\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<li>\n<p>\u063a\u0644\u0637\u06cc \u06a9\u06cc \u0646\u0626\u06cc \u0642\u0633\u0645 \u06a9\u0648 \u0634\u0627\u0645\u0644 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u0633\u0648\u0626\u0686 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0679\u0648\u0679 \u062c\u0627\u0626\u06d2 \u06af\u0627 \u062c\u0648 \u0627\u0633\u06d2 \u06c1\u06cc\u0646\u0688\u0644 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<li>\n<p>UI \u062f\u0631\u0633\u062a \u063a\u0644\u0637\u06cc \u06a9\u06d2 \u0644\u06cc\u06d2 \u0635\u062d\u06cc\u062d \u067e\u06cc\u063a\u0627\u0645 \u062f\u06a9\u06be\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<\/ul>\n<p>\u06a9\u0627\u0634 \u0645\u06cc\u06ba \u0646\u06d2 \u0627\u067e\u0646\u06cc \u067e\u06c1\u0644\u06cc \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u0627\u06cc\u067e \u0627\u0633 \u0637\u0631\u062d \u0628\u0646\u0627\u0626\u06cc \u06c1\u0648\u062a\u06cc\u06d4 \u0627\u0633 \u0633\u06d2 \u062e\u0627\u0645\u0648\u0634 \u0646\u0627\u06a9\u0627\u0645\u06cc\u0648\u06ba \u0627\u0648\u0631 \u063a\u0644\u0637\u06cc \u06a9\u06d2 \u0645\u062a\u0636\u0627\u062f \u062d\u0627\u0644\u0627\u062a \u06a9\u0627 \u0633\u0631\u0627\u063a \u0644\u06af\u0627\u0646\u06d2 \u0645\u06cc\u06ba \u06a9\u0627\u0641\u06cc \u0648\u0642\u062a \u0628\u0686 \u062c\u0627\u062a\u0627\u06d4<\/p>\n<p>\u0627\u06af\u0631 \u0622\u067e \u0679\u0631\u0627\u0626\u06cc\/\u06a9\u06cc\u0686 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u06c1\u06cc \u0648\u0627\u0642\u0641 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0627\u06cc\u06a9 \u0642\u062f\u0645 \u0622\u06af\u06d2 \u0628\u0691\u06be \u06a9\u0631 \u063a\u0644\u0637\u06cc \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u0686\u06be\u0648\u0679\u06cc \u0634\u0631\u0648\u0639\u0627\u062a \u06a9\u0631\u06cc\u06ba\u06d4 \u0646\u062a\u0627\u0626\u062c \u06a9\u06cc \u0627\u0642\u0633\u0627\u0645 \u06a9\u0648 \u0627\u06cc\u06a9 \u0630\u062e\u06cc\u0631\u06c1 \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 \u062f\u06cc\u06a9\u06be\u06cc\u06ba \u06a9\u06cc\u0633\u0627 \u0645\u062d\u0633\u0648\u0633 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u062c\u0628 \u0622\u067e \u0627\u0633 \u0648\u0636\u0627\u062d\u062a \u06a9\u0627 \u062a\u062c\u0631\u0628\u06c1 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u067e\u06cc\u0679\u0631\u0646 \u0644\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0648\u06c1 \u0642\u062f\u0631\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u067e\u06be\u06cc\u0644 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u0645\u06cc\u06ba \u0633\u0648\u0686\u062a\u0627 \u062a\u06be\u0627 \u06a9\u06c1 \u0645\u06cc\u06ba \u0627\u067e\u0646\u06cc \u0641\u0644\u0679\u0631 \u0627\u06cc\u067e\u0633 \u0645\u06cc\u06ba \u063a\u0644\u0637\u06cc\u0648\u06ba \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u0646\u06d2 \u06a9\u0627 \u0627\u0686\u06be\u0627 \u06a9\u0627\u0645 \u06a9\u0631 \u0631\u06c1\u0627 \u06c1\u0648\u06ba\u06d4 \u0645\u06cc\u0631\u06d2 \u067e\u0627\u0633 \u06c1\u0631 \u062c\u06af\u06c1 \u06a9\u0648\u0634\u0634\/\u06a9\u06cc\u0686 \u0628\u0644\u0627\u06a9\u0633 \u062a\u06be\u06d2\u06d4 \u0645\u06cc\u06ba \u0646\u06d2 \u0627\u0633\u062a\u062b\u0646\u0627\u0621 \u06a9\u0648 \u067e\u06a9\u0691\u0627\u060c \u0627\u0633\u06d2 \u0644\u0627\u06af \u0627\u0646 \u06a9\u06cc\u0627 \u0627\u0648\u0631 \u0635\u0627\u0631\u0641 \u06a9\u0648 \u063a\u0644\u0637\u06cc \u06a9\u0627 \u067e\u06cc\u063a\u0627\u0645 \u062f\u06a9\u06be\u0627\u06cc\u0627\u06d4 \u06cc\u06c1 \u0679\u06be\u0648\u0633 \u0645\u062d\u0633\u0648\u0633 \u06c1\u0648\u0627\u06d4 \u067e\u06be\u0631 \u0645\u06cc\u06ba \u0646\u06d2 \u0645\u0632\u06cc\u062f \u063a\u0648\u0631 \u0633\u06d2 \u062f\u06cc\u06a9\u06be\u0646\u0627 \u0634\u0631\u0648\u0639 \u06a9\u06cc\u0627 \u06a9\u06c1 [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-25636","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts\/25636","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/comments?post=25636"}],"version-history":[{"count":0,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts\/25636\/revisions"}],"wp:attachment":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/media?parent=25636"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/categories?post=25636"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/tags?post=25636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}