{"id":24879,"date":"2026-06-04T03:55:15","date_gmt":"2026-06-04T03:55:15","guid":{"rendered":"https:\/\/umang.pk\/2026\/06\/04\/%d9%be%da%be%da%91%d9%be%da%be%da%91%d8%a7%d9%86%db%92-%d9%85%db%8c%da%ba-%d9%be%d8%b1%d9%88%da%88%da%a9%d8%b4%d9%86-%d8%b1%db%8c%da%88%db%8c-%da%a9%d8%a7-%d9%88%d8%a7%d9%82%d8%b9%db%8c-%da%a9%db%8c\/"},"modified":"2026-06-04T03:55:15","modified_gmt":"2026-06-04T03:55:15","slug":"%d9%be%da%be%da%91%d9%be%da%be%da%91%d8%a7%d9%86%db%92-%d9%85%db%8c%da%ba-%d9%be%d8%b1%d9%88%da%88%da%a9%d8%b4%d9%86-%d8%b1%db%8c%da%88%db%8c-%da%a9%d8%a7-%d9%88%d8%a7%d9%82%d8%b9%db%8c-%da%a9%db%8c","status":"publish","type":"post","link":"https:\/\/umang.pk\/ur\/2026\/06\/04\/%d9%be%da%be%da%91%d9%be%da%be%da%91%d8%a7%d9%86%db%92-%d9%85%db%8c%da%ba-%d9%be%d8%b1%d9%88%da%88%da%a9%d8%b4%d9%86-%d8%b1%db%8c%da%88%db%8c-%da%a9%d8%a7-%d9%88%d8%a7%d9%82%d8%b9%db%8c-%da%a9%db%8c\/","title":{"rendered":"\u067e\u06be\u0691\u067e\u06be\u0691\u0627\u0646\u06d2 \u0645\u06cc\u06ba &quot;\u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u0631\u06cc\u0688\u06cc&#8221; \u06a9\u0627 \u0648\u0627\u0642\u0639\u06cc \u06a9\u06cc\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2\u06d4"},"content":{"rendered":"\n<div id=\"\">\n<p>\u0645\u06cc\u06ba \u06a9\u0626\u06cc \u0633\u0627\u0644\u0648\u06ba \u0633\u06d2 \u0641\u0644\u0679\u0631 \u0627\u06cc\u067e\u0633 \u0628\u0646\u0627 \u0631\u06c1\u0627 \u06c1\u0648\u06ba\u060c \u0627\u0648\u0631 \u0645\u062c\u06be\u06d2 \u0627\u0628 \u0628\u06be\u06cc \u06cc\u0627\u062f \u06c1\u06d2 \u06a9\u06c1 \u0645\u06cc\u06ba \u0646\u06d2 \u067e\u06c1\u0644\u06cc \u0628\u0627\u0631 \u06a9\u0648\u0626\u06cc \u067e\u0631\u0648\u0688\u06a9\u0679 \u0631\u06cc\u0644\u06cc\u0632 \u06a9\u06cc\u0627 \u062a\u06be\u0627 \u062c\u0633 \u067e\u0631 \u0645\u062c\u06be\u06d2 \u0648\u0627\u0642\u0639\u06cc \u0641\u062e\u0631 \u062a\u06be\u0627\u06d4 \u06a9\u0644\u06cc\u0646 UI\u060c \u06c1\u0645\u0648\u0627\u0631 \u0627\u06cc\u0646\u06cc\u0645\u06cc\u0634\u0646\u0632\u060c \u0627\u0648\u0631 \u0633\u0628 \u06a9\u0686\u06be \u0628\u0627\u0644\u06a9\u0644 \u0627\u0633\u06cc \u0637\u0631\u062d \u0628\u06c1\u06c1 \u06af\u06cc\u0627 \u062c\u06cc\u0633\u0627 \u0645\u06cc\u06ba \u0646\u06d2 \u0627\u0631\u0627\u062f\u06c1 \u06a9\u06cc\u0627 \u062a\u06be\u0627\u06d4 \u0645\u06cc\u06ba \u0646\u06d2 \u0627\u0633\u06d2 \u062d\u0642\u06cc\u0642\u06cc \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u06d2 \u062d\u0648\u0627\u0644\u06d2 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f \u0628\u06c1\u062a\u0631 \u0645\u062d\u0633\u0648\u0633 \u06a9\u06cc\u0627\u06d4<\/p>\n<p>\u0627\u06cc\u06a9 \u06c1\u0641\u062a\u06d2 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u060c \u0628\u06af \u0631\u067e\u0648\u0631\u0679\u0633 \u0622\u0646\u0627 \u0634\u0631\u0648\u0639 \u06c1\u0648 \u06af\u0626\u06cc\u06ba\u06d4<\/p>\n<p>\u0627\u0633\u06a9\u0631\u06cc\u0646\u06cc\u06ba \u0645\u0646\u062c\u0645\u062f \u06c1\u0648 \u06af\u0626\u06cc\u06ba\u060c API \u06a9\u0627\u0644\u0632 \u062e\u0627\u0645\u0648\u0634\u06cc \u0633\u06d2 \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648 \u06af\u0626\u06cc\u06ba\u060c \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u0627 \u0641\u0627\u0631\u0645 \u0688\u06cc\u0679\u0627 \u0636\u0627\u0626\u0639 \u06c1\u0648 \u06af\u06cc\u0627 \u062c\u0648 \u0648\u06c1 10 \u0645\u0646\u0679 \u0633\u06d2 \u0628\u06be\u0631 \u0631\u06c1\u06d2 \u062a\u06be\u06d2\u060c \u0627\u0648\u0631 \u0627\u06cc\u06a9 \u0635\u0627\u0631\u0641 \u0646\u06d2 \u0627\u0637\u0644\u0627\u0639 \u062f\u06cc \u06a9\u06c1 \u0627\u06cc\u067e \u0646\u06d2 \u0633\u0628 \u0648\u06d2 \u0679\u0646\u0644 \u0633\u06d2 \u06af\u0632\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f \u062c\u0648\u0627\u0628 \u062f\u06cc\u0646\u0627 \u0628\u0646\u062f \u06a9\u0631 \u062f\u06cc\u0627\u06d4 \u0645\u06cc\u06ba \u0646\u06d2 \u06a9\u0628\u06be\u06cc \u0627\u0633 \u06a9\u0627 \u062a\u062c\u0631\u0628\u06c1 \u0646\u06c1\u06cc\u06ba \u06a9\u06cc\u0627\u06d4 \u0645\u06cc\u06ba \u0627\u06cc\u0633\u0627 \u06a9\u06cc\u0648\u06ba \u06a9\u0631\u0648\u06ba \u06af\u0627\u061f \u0627\u0633 \u0646\u06d2 \u0645\u06cc\u0631\u06d2 \u06a9\u0645\u067e\u06cc\u0648\u0679\u0631 \u067e\u0631 \u0679\u06be\u06cc\u06a9 \u06a9\u0627\u0645 \u06a9\u06cc\u0627\u06d4<\/p>\n<p>\u0627\u0633 \u062a\u062c\u0631\u0628\u06d2 \u0646\u06d2 \u0645\u062c\u06be\u06d2 \u06a9\u0686\u06be \u0633\u06a9\u06be\u0627\u06cc\u0627 \u06a9\u0627\u0634 \u06a9\u0633\u06cc \u0646\u06d2 \u0645\u062c\u06be\u06d2 \u067e\u06c1\u0644\u06d2 \u0628\u062a\u0627\u06cc\u0627 \u06c1\u0648\u062a\u0627\u06d4 \u0628\u0627\u062a \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u06a9\u0627\u0645 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06cc \u0627\u06cc\u067e \u0627\u0648\u0631 \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u06cc\u0627\u0631 \u0627\u06cc\u067e \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u062d\u0642\u06cc\u0642\u06cc \u0641\u0631\u0642 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u06cc\u06ba \u0646\u06d2 \u0627\u0628 \u06a9\u0626\u06cc \u0641\u0644\u0679\u0631 \u0627\u06cc\u067e\u0633 \u0644\u0627\u0646\u0686 \u06a9\u06cc \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633 \u0622\u0631\u0679\u06cc\u06a9\u0644 \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u062a\u0642\u0631\u06cc\u0628\u0627\u064b \u06c1\u0631 \u062f\u06cc\u0648\u0627\u0631 \u06a9\u0648 \u0679\u06a9\u0631\u0627\u06cc\u0627 \u06c1\u06d2\u06d4 \u0646\u06cc\u0679 \u0648\u0631\u06a9 \u06a9\u06cc \u062e\u0631\u0627\u0628\u06cc\u0627\u06ba\u060c \u0645\u06cc\u0645\u0648\u0631\u06cc \u0644\u06cc\u06a9\u060c \u0631\u06cc\u0627\u0633\u062a\u06cc \u0627\u0646\u062a\u0638\u0627\u0645 \u062c\u0648 \u067e\u06c1\u0644\u06d2 \u062a\u0648 \u0633\u0645\u062c\u06be \u0645\u06cc\u06ba \u0622\u062a\u0627 \u062a\u06be\u0627 \u0644\u06cc\u06a9\u0646 \u0627\u0633\u06a9\u06cc\u0644 \u06a9\u0631\u0646\u06d2 \u067e\u0631 \u0627\u06cc\u06a9 \u0688\u0631\u0627\u0624\u0646\u0627 \u062e\u0648\u0627\u0628 \u0628\u0646 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u06a9\u0627\u0631\u06a9\u0631\u062f\u06af\u06cc \u062c\u0648 \u062a\u0631\u0642\u06cc \u0645\u06cc\u06ba \u0679\u06be\u06cc\u06a9 \u0645\u062d\u0633\u0648\u0633 \u06c1\u0648\u062a\u06cc \u062a\u06be\u06cc \u0644\u06cc\u06a9\u0646 \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u06d2 \u067e\u0631\u0627\u0646\u06d2 \u0622\u0644\u0627\u062a \u067e\u0631 \u0628\u06c1\u062a \u0632\u06cc\u0627\u062f\u06c1 \u0628\u06d2 \u0686\u06cc\u0646 \u062a\u06be\u06cc\u06d4<\/p>\n<p>\u06cc\u06c1 \u0645\u0636\u0645\u0648\u0646 \u06c1\u0631 \u0627\u0633 \u0686\u06cc\u0632 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u06c1\u06d2 \u062c\u0648 \u0645\u06cc\u06ba \u0646\u06d2 \u0627\u0633 \u062a\u062c\u0631\u0628\u06d2 \u0633\u06d2 \u0633\u06cc\u06a9\u06be\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u062d\u0642\u06cc\u0642\u06cc \u0645\u0633\u0627\u0626\u0644 \u06a9\u06d2 \u062d\u0642\u06cc\u0642\u06cc \u0646\u0645\u0648\u0646\u06d2 \u06c1\u06cc\u06ba\u060c \u0646\u0638\u0631\u06cc\u0627\u062a \u0646\u06c1\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-table-of-contents\">\u0627\u0646\u0688\u06cc\u06a9\u0633<\/h2>\n<h2 id=\"heading-why-it-works-on-my-machine-is-dangerous-in-flutter\">\u06a9\u06cc\u0648\u06ba &quot;\u06cc\u06c1 \u0645\u06cc\u0631\u06cc \u0645\u0634\u06cc\u0646 \u067e\u0631 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2&#8221; \u067e\u06be\u0691\u067e\u06be\u0691\u0627\u0646\u06d2 \u0645\u06cc\u06ba \u062e\u0637\u0631\u0646\u0627\u06a9 \u06c1\u06d2\u06d4<\/h2>\n<p>\u062a\u0631\u0642\u06cc \u06a9\u0627 \u0645\u0627\u062d\u0648\u0644 \u062d\u0633\u0628 \u0630\u06cc\u0644 \u06c1\u06d2: \u062a\u06cc\u0632 \u0627\u0646\u0679\u0631\u0646\u06cc\u0679\u060c \u0627\u06cc\u06a9 \u0637\u0627\u0642\u062a\u0648\u0631 \u0645\u0634\u06cc\u0646 \u06cc\u0627 \u0627\u06cc\u0645\u0648\u0644\u06cc\u0679\u0631\u060c \u06c1\u0631 \u06af\u0631\u0645 \u0631\u06cc \u0644\u0648\u0688 \u067e\u0631 \u06a9\u0644\u06cc\u0646 \u0627\u06cc\u067e \u0633\u0679\u06cc\u0679\u060c \u0645\u0644\u06cc \u0633\u06cc\u06a9\u0646\u0688 \u0645\u06cc\u06ba \u062c\u0648\u0627\u0628 \u062f\u06cc\u0646\u06d2 \u0648\u0627\u0644\u06d2 APIs\u060c \u0627\u0648\u0631 \u0645\u062d\u062a\u0627\u0637 \u0688\u0648\u06cc\u0644\u067e\u0631\u0632 \u062c\u0648 \u062c\u0627\u0646 \u0628\u0648\u062c\u06be \u06a9\u0631 \u062e\u0648\u0634\u06af\u0648\u0627\u0631 \u0631\u0627\u0633\u062a\u06d2 \u067e\u0631 \u0686\u0644\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0635\u0627\u0631\u0641 \u06a9\u06cc\u0633\u0627 \u0644\u06af\u062a\u0627 \u06c1\u06d2 \u06cc\u06c1 \u06c1\u06d2: \u0627\u0633\u067e\u0627\u0679\u06cc \u0645\u0648\u0628\u0627\u0626\u0644 \u0688\u06cc\u0679\u0627\u060c \u067e\u0631\u0627\u0646\u0627 \u062f\u0631\u0645\u06cc\u0627\u0646\u06cc \u0631\u06cc\u0646\u062c \u06a9\u0627 \u0622\u0644\u06c1\u060c \u067e\u0633 \u0645\u0646\u0638\u0631 \u0645\u06cc\u06ba \u0686\u0644\u0646\u06d2 \u0648\u0627\u0644\u06cc \u0646\u0635\u0641 \u062f\u0631\u062c\u0646 \u062f\u06cc\u06af\u0631 \u0627\u06cc\u067e\u0633\u060c \u0627\u0646 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u0635\u0641\u0631 \u0635\u0628\u0631 \u062c\u0648 \u0628\u063a\u06cc\u0631 \u0648\u0636\u0627\u062d\u062a \u06a9\u06d2 \u0644\u0648\u0688 \u06c1\u0648\u0646\u0627 \u0628\u0646\u062f \u06a9\u0631 \u062f\u06cc\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u0648\u06c1 \u062e\u0644\u0627 \u06c1\u06d2 \u062c\u06c1\u0627\u06ba \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u0628\u06af \u0631\u06c1\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u0634\u06a9\u0644 \u062d\u0635\u06c1 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 Flutter \u062a\u0631\u0642\u06cc \u06a9\u0648 \u0627\u062a\u0646\u0627 \u06c1\u0645\u0648\u0627\u0631 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 &quot;\u0645\u06cc\u0631\u06d2 \u06a9\u0645\u067e\u06cc\u0648\u0679\u0631 \u067e\u0631 \u06a9\u0627\u0645 \u06a9\u0631\u0646\u06d2&#8221; \u06a9\u0648 &quot;\u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u06cc\u0627\u0631&#8221; \u0633\u0645\u062c\u06be\u0646\u0627 \u0622\u0633\u0627\u0646 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u06cc\u06ba \u0646\u06d2 \u0648\u06c1 \u063a\u0644\u0637\u06cc \u06a9\u06cc\u06d4 \u0645\u06cc\u06ba \u062c\u0627\u0646\u062a\u0627 \u06c1\u0648\u06ba \u06a9\u06c1 \u0632\u06cc\u0627\u062f\u06c1 \u062a\u0631 \u0641\u0644\u0679\u0631 \u0688\u0648\u06cc\u0644\u067e\u0631\u0632 \u0646\u06d2 \u0628\u06be\u06cc \u0627\u06cc\u0633\u0627 \u06a9\u06cc\u0627 \u06c1\u06d2\u06d4 \u0627\u06cc\u067e \u0633\u062c\u06cc\u0644\u0627 \u0644\u06af \u0631\u06c1\u06cc \u06c1\u06d2\u06d4 \u062d\u0631\u06a9\u062a \u067e\u0630\u06cc\u0631\u06cc \u0645\u06a9\u06be\u0646 \u06c1\u06d2\u06d4 \u062c\u0628 \u0645\u06cc\u06ba \u0627\u067e\u0646\u06d2 \u0633\u0627\u062a\u06be\u06cc\u0648\u06ba \u06a9\u06d2 \u0633\u0627\u0645\u0646\u06d2 \u0627\u0633 \u06a9\u0627 \u0645\u0638\u0627\u06c1\u0631\u06c1 \u06a9\u0631\u062a\u0627 \u06c1\u0648\u06ba \u062a\u0648 \u0633\u0628 \u06a9\u0686\u06be \u0679\u06be\u06cc\u06a9 \u06c1\u0648 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u067e\u06be\u0631 \u06a9\u0648\u0626\u06cc \u062f\u0627\u063a\u062f\u0627\u0631 \u0645\u0648\u0628\u0627\u0626\u0644 \u0688\u06cc\u0679\u0627 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06a9\u0627\u0645 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0633\u0641\u0631 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0627\u0633\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u06a9\u0648\u0634\u0634 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0633\u0628 \u06a9\u0686\u06be \u0627\u0644\u06af \u06c1\u0648 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u0646\u062c\u06cc\u0646\u0626\u0631\u0646\u06af \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u06cc\u0627\u0631 \u0641\u0644\u0679\u0631 \u0627\u0633 \u063a\u06cc\u0631 \u0622\u0631\u0627\u0645 \u062f\u06c1 \u0633\u0686\u0627\u0626\u06cc \u06a9\u0648 \u0642\u0628\u0648\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0634\u0631\u0648\u0639 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u0686\u06cc\u0632\u06cc\u06ba \u063a\u0644\u0637 \u06c1\u0648 \u062c\u0627\u0626\u06cc\u06ba \u06af\u06cc\u06d4 \u0646\u06cc\u0679 \u0648\u0631\u06a9 \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0622\u067e \u06a9\u06d2 \u0622\u0644\u06d2 \u06a9\u06cc \u0645\u06cc\u0645\u0648\u0631\u06cc \u062e\u062a\u0645 \u06c1\u0648 \u0633\u06a9\u062a\u06cc \u06c1\u06d2\u06d4 \u0635\u0627\u0631\u0641\u06cc\u0646 \u0628\u062f\u062a\u0631\u06cc\u0646 \u0645\u0645\u06a9\u0646\u06c1 \u0644\u0645\u062d\u0627\u062a \u0645\u06cc\u06ba \u067e\u0633 \u0645\u0646\u0638\u0631 \u0645\u06cc\u06ba \u0627\u06cc\u067e\u0633 \u0686\u0644\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0633\u0648\u0627\u0644 \u06cc\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 \u06a9\u06c1 \u0622\u06cc\u0627 \u06cc\u06c1 \u0686\u06cc\u0632\u06cc\u06ba \u06c1\u0648\u062a\u06cc \u06c1\u06cc\u06ba\u060c \u0628\u0644\u06a9\u06c1 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u06a9\u06cc\u0627 \u0622\u067e \u06a9\u06cc \u0627\u06cc\u067e \u0627\u0646 \u06a9\u06d2 \u06c1\u0648\u0646\u06d2 \u067e\u0631 \u0627\u0646\u06c1\u06cc\u06ba \u0627\u062d\u0633\u0646 \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-development-vs-production-what-actually-changes\">\u062a\u0631\u0642\u06cc \u0628\u0645\u0642\u0627\u0628\u0644\u06c1 \u067e\u06cc\u062f\u0627\u0648\u0627\u0631: \u0648\u0627\u0642\u0639\u06cc \u06a9\u06cc\u0627 \u0628\u062f\u0644 \u0631\u06c1\u0627 \u06c1\u06d2\u06d4<\/h2>\n<p>\u0645\u06cc\u06ba \u06cc\u06c1\u0627\u06ba \u0645\u062e\u0635\u0648\u0635 \u06c1\u0648\u0646\u0627 \u0686\u0627\u06c1\u062a\u0627 \u06c1\u0648\u06ba \u06a9\u06cc\u0648\u0646\u06a9\u06c1 &quot;\u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u0645\u062e\u062a\u0644\u0641 \u06c1\u06d2&#8221; \u06a9\u06c1\u0646\u0627 \u0622\u0633\u0627\u0646 \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u0627\u0633 \u0648\u0642\u062a \u062a\u06a9 \u0627\u0646\u062f\u0631\u0648\u0646\u06cc \u0628\u0646\u0627\u0646\u0627 \u0645\u0634\u06a9\u0644 \u06c1\u06d2 \u062c\u0628 \u062a\u06a9 \u06a9\u06c1 \u0622\u067e \u0627\u0633 \u0633\u06d2 \u0628\u06cc\u0645\u0627\u0631 \u0646\u06c1 \u06c1\u0648\u06ba\u06d4<\/p>\n<p>\u0688\u06cc\u0648\u0644\u067e\u0645\u0646\u0679 \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646\u060c \u0646\u0627\u06a9\u0627\u0645 API \u06a9\u0627\u0644\u0632 \u06a9\u0648 \u0679\u0631\u0645\u06cc\u0646\u0644 \u0645\u06cc\u06ba \u0641\u0648\u0631\u06cc \u0637\u0648\u0631 \u067e\u0631 \u062f\u06cc\u06a9\u06be\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u060c \u0645\u0646\u0679\u0648\u06ba \u0645\u06cc\u06ba \u0637\u06d2 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0622\u06af\u06d2 \u0628\u0691\u06be\u0627\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1\u0627\u06ba \u062a\u06a9 \u06a9\u06c1 \u067e\u06cc\u062f\u0627\u0648\u0627\u0631\u06cc \u0645\u0627\u062d\u0648\u0644 \u0645\u06cc\u06ba \u0628\u06be\u06cc\u060c \u0648\u06c1\u06cc API \u06a9\u0627\u0644 \u06a9\u06cc \u0646\u0627\u06a9\u0627\u0645\u06cc\u0627\u06ba \u06c1\u0648\u062a\u06cc \u06c1\u06cc\u06ba \u062c\u0628 \u0635\u0627\u0631\u0641\u06cc\u0646 \u062e\u0627\u0644\u06cc \u0627\u0633\u06a9\u0631\u06cc\u0646 \u062f\u06cc\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0646\u06c1 \u062c\u0627\u0646\u06d2 \u06a9\u06cc\u0648\u06ba\u060c \u0686\u0646\u062f \u0633\u06cc\u06a9\u0646\u0688 \u0627\u0646\u062a\u0638\u0627\u0631 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u067e\u06be\u0631 \u062f\u0648\u0628\u0627\u0631\u06c1 \u06a9\u0648\u0634\u0634 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u06cc\u0627 \u0635\u0627\u0641 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u062a\u06cc\u0646 \u062f\u0646 \u0628\u0639\u062f \u0645\u06cc\u06ba \u0646\u06d2 \u062f\u06cc\u06a9\u06be\u0627 \u06a9\u06c1 \u06a9\u0633\u06cc \u0646\u06d2 1 \u0633\u062a\u0627\u0631\u06c1 \u062c\u0627\u0626\u0632\u06c1 \u0686\u06be\u0648\u0691\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u062a\u0631\u0642\u06cc \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u063a\u06cc\u0631 \u0636\u0631\u0648\u0631\u06cc \u0637\u0648\u0631 \u067e\u0631 \u062f\u0648\u0628\u0627\u0631\u06c1 \u062a\u0639\u0645\u06cc\u0631 \u06a9\u06cc\u06d2 \u062c\u0627\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0648\u062c\u06cc\u0679\u0633 \u0645\u06cc\u06ba \u0686\u0646\u062f \u0645\u0644\u06cc \u0633\u06cc\u06a9\u0646\u0688 \u0644\u0627\u06af\u062a \u0622\u062a\u06cc \u06c1\u06d2 \u062c\u0633\u06d2 \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u0628\u06be\u06cc \u0646\u06c1\u06cc\u06ba \u062f\u06cc\u06a9\u06be\u06cc\u06ba \u06af\u06d2\u06d4 \u067e\u06cc\u062f\u0627\u0648\u0627\u0631\u06cc \u0645\u0627\u062d\u0648\u0644 \u0645\u06cc\u06ba\u060c \u067e\u0633 \u0645\u0646\u0638\u0631 \u0645\u06cc\u06ba \u0686\u0644\u0646\u06d2 \u0648\u0627\u0644\u06cc \u0645\u062a\u0639\u062f\u062f \u0627\u06cc\u067e\u0633 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u067e\u0631\u0627\u0646\u06d2 \u06cc\u0627 \u06a9\u0645 \u0637\u0627\u0642\u062a \u0648\u0627\u0644\u06d2 \u0622\u0644\u0627\u062a \u067e\u0631\u060c \u0648\u06c1\u06cc \u063a\u06cc\u0631 \u0636\u0631\u0648\u0631\u06cc \u062a\u0639\u0645\u06cc\u0631 \u0646\u0648 \u0641\u0631\u06cc\u0645\u0648\u06ba \u06a9\u0648 16ms \u0628\u062c\u0679 \u0633\u06d2 \u0622\u06af\u06d2 \u0628\u0691\u06be\u0627 \u062f\u06d2 \u06af\u06cc\u060c \u062c\u0633 \u06a9\u06cc \u0648\u062c\u06c1 \u0633\u06d2 \u06c1\u0646\u06af\u0627\u0645\u06c1 \u0622\u0631\u0627\u0626\u06cc \u06c1\u0648 \u06af\u06cc \u062c\u0633\u06d2 \u0635\u0627\u0631\u0641\u06cc\u0646 \u0645\u062d\u0633\u0648\u0633 \u06a9\u0631\u06cc\u06ba \u06af\u06d2\u06d4<\/p>\n<p>\u062a\u0631\u0642\u06cc \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646\u060c \u0627\u06cc\u06a9 \u0645\u06cc\u0645\u0648\u0631\u06cc \u0644\u06cc\u06a9 \u062c\u0648 10 \u0645\u0646\u0679 \u0645\u06cc\u06ba 5 MB \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0642\u0627\u0628\u0644 \u062a\u0648\u062c\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u06c1\u0645\u0627\u0631\u06d2 \u067e\u0627\u0633 \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u0686\u06cc\u0679 \u06a9\u06cc \u062e\u0635\u0648\u0635\u06cc\u062a \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0644\u06cc\u06a9 \u06c1\u0648\u0627 \u062a\u06be\u0627\u060c \u0627\u06cc\u06a9 \u063a\u06cc\u0631 \u067e\u0631\u0648\u0633\u06cc\u0633 \u0634\u062f\u06c1 \u0627\u0633\u0679\u0631\u06cc\u0645 \u0633\u0628\u0633\u06a9\u0631\u067e\u0634\u0646 \u062c\u0633 \u06a9\u0627 \u06c1\u0645 \u062c\u0627\u0646\u0686 \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u0628\u0627\u0644\u06a9\u0644 \u0628\u06be\u06cc \u067e\u062a\u06c1 \u0646\u06c1\u06cc\u06ba \u0644\u06af\u0627 \u0633\u06a9\u06d2\u06d4 \u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u0645\u06cc\u06ba\u060c \u06a9\u0645 \u0645\u06cc\u0645\u0648\u0631\u06cc \u0648\u0627\u0644\u06d2 \u0688\u06cc\u0648\u0627\u0626\u0633 \u067e\u0631 \u0627\u06cc\u06a9 \u06af\u06be\u0646\u0679\u06d2 \u06a9\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06d2 \u0628\u0639\u062f\u060c OS \u0646\u06d2 \u0627\u06cc\u067e \u06a9\u06d2 \u0648\u0633\u0637 \u0633\u06cc\u0634\u0646 \u06a9\u0648 \u062e\u062a\u0645 \u06a9\u0631\u0646\u0627 \u0634\u0631\u0648\u0639 \u06a9\u0631 \u062f\u06cc\u0627\u06d4 \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u0627 \u062e\u06cc\u0627\u0644 \u062a\u06be\u0627 \u06a9\u06c1 \u062d\u0627\u062f\u062b\u06d2 \u062a\u0635\u0627\u062f\u0641\u06cc \u0637\u0648\u0631 \u067e\u0631 \u06c1\u0648\u0626\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u0633 \u06a9\u0627 \u067e\u062a\u06c1 \u0644\u06af\u0627\u0646\u06d2 \u0645\u06cc\u06ba \u0634\u0631\u0645\u0646\u0627\u06a9 \u062d\u062f \u062a\u06a9 \u0644\u0645\u0628\u0627 \u0648\u0642\u062a \u0644\u06af\u0627\u06d4<\/p>\n<p>\u067e\u06cc\u0679\u0631\u0646 \u06c1\u0645\u06cc\u0634\u06c1 \u0627\u06cc\u06a9 \u062c\u06cc\u0633\u0627 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u062c\u0648 \u0645\u0633\u0627\u0626\u0644 \u062a\u0631\u0642\u06cc\u0627\u062a\u06cc \u067e\u06cc\u0645\u0627\u0646\u06d2 \u067e\u0631 \u0646\u0638\u0631 \u0646\u06c1\u06cc\u06ba \u0622\u062a\u06d2 \u06c1\u06cc\u06ba \u0648\u06c1 \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u067e\u06cc\u0645\u0627\u0646\u06d2 \u067e\u0631 \u0633\u0646\u06af\u06cc\u0646 \u06c1\u0648 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u062c\u0648 \u0645\u0633\u0627\u0626\u0644 \u0688\u0648\u06cc\u0644\u067e\u0645\u0646\u0679 \u06c1\u0627\u0631\u0688\u0648\u06cc\u0626\u0631 \u067e\u0631 \u0645\u0639\u0645\u0648\u0644\u06cc \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba \u0648\u06c1 \u0627\u0635\u0644 \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u06cc \u0645\u0644\u06a9\u06cc\u062a \u0648\u0627\u0644\u06d2 \u06c1\u0627\u0631\u0688 \u0648\u06cc\u0626\u0631 \u067e\u0631 \u0633\u0646\u06af\u06cc\u0646 \u06c1\u0648 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-network-reliability-and-defensive-request-handling\">\u0646\u06cc\u0679 \u0648\u0631\u06a9 \u06a9\u0627 \u0627\u0633\u062a\u062d\u06a9\u0627\u0645 \u0627\u0648\u0631 \u062f\u0641\u0627\u0639\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u0646\u0627<\/h2>\n<p>\u0627\u06af\u0631 \u0645\u062c\u06be\u06d2 \u06a9\u06cc\u0691\u06d2 \u06a9\u0627 \u0635\u0631\u0641 \u0627\u06cc\u06a9 \u0632\u0645\u0631\u06c1 \u0686\u0646\u0646\u0627 \u067e\u0691\u0627 \u062c\u0633 \u0646\u06d2 \u0645\u062c\u06be\u06d2 \u062a\u0645\u0627\u0645 \u0627\u06cc\u067e\u0633 \u0645\u06cc\u06ba \u0633\u0628 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u067e\u0631\u06cc\u0634\u0627\u0646 \u06a9\u06cc\u0627\u060c \u062a\u0648 \u06cc\u06c1 \u06cc\u06c1\u06cc \u06c1\u0648\u06af\u0627\u06d4 \u0645\u0648\u0628\u0627\u0626\u0644 \u0646\u06cc\u0679 \u0648\u0631\u06a9 \u0635\u062d\u06cc\u062d \u0645\u0639\u0646\u0648\u06ba \u0645\u06cc\u06ba \u0642\u0627\u0628\u0644 \u0627\u0639\u062a\u0645\u0627\u062f \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 Flutter \u0627\u06cc\u067e\u0633 \u06a9\u0648 \u0627\u06a9\u062b\u0631 \u0627\u06cc\u0633\u06d2 \u0644\u06a9\u06be\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u062c\u06cc\u0633\u06d2 \u0648\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0646\u06cc\u0679 \u0648\u0631\u06a9\u0646\u06af \u06a9\u06d2 \u0633\u0628 \u0633\u06d2 \u0639\u0627\u0645 \u0646\u0645\u0648\u0646\u06d2 \u062c\u0648 \u0645\u06cc\u06ba \u0646\u06d2 \u062f\u06cc\u06a9\u06be\u06d2 \u06c1\u06cc\u06ba (\u0627\u0648\u0631 \u0627\u067e\u0646\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0627\u0633 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0633\u0627\u0644\u0648\u06ba \u0633\u06d2 \u0644\u06a9\u06be\u0627 \u06c1\u06d2 \u062c\u0648 \u0645\u06cc\u06ba \u062a\u0633\u0644\u06cc\u0645 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u062a\u0627 \u06c1\u0648\u06ba) \u06cc\u06c1 \u06c1\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">final response = await dio.get('\/user');\n\nsetState(() {\n  user = response.data;\n});\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u062a\u0631\u0642\u06cc \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u0628\u0627\u0644\u06a9\u0644 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u062a\u0627\u06c1\u0645\u060c \u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u0645\u06cc\u06ba \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648\u0646\u06d2 \u06a9\u06d2 \u0686\u0627\u0631 \u0637\u0631\u06cc\u0642\u06d2 \u06c1\u06cc\u06ba:<\/p>\n<ol>\n<li>\n<p>\u0646\u06cc\u0679 \u0648\u0631\u06a9 \u06a9\u06cc \u062e\u0631\u0627\u0628\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u06d2 \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648\u0646\u06d2 \u06a9\u0627 \u0633\u0628\u0628 \u0628\u0646\u062a\u06cc \u06c1\u06d2 \u0627\u0648\u0631 \u063a\u06cc\u0631 \u06c1\u06cc\u0646\u0688\u0644 \u067e\u0631\u0648\u067e\u06cc\u06af\u06cc\u0634\u0646 \u06a9\u06cc \u0631\u0639\u0627\u06cc\u062a\u06d4<\/p>\n<\/li>\n<li>\n<p>\u062c\u0648\u0627\u0628 \u0622\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0635\u0627\u0631\u0641 \u06a9\u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0686\u0644\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 <code>setState<\/code> \u0645\u0646\u0633\u0648\u062e \u0634\u062f\u06c1 \u0648\u06cc\u062c\u06cc\u0679 \u067e\u0631 \u06a9\u0627\u0644 \u06a9\u06cc \u06af\u0626\u06cc\u06d4<\/p>\n<\/li>\n<li>\n<p>API \u063a\u06cc\u0631 \u0645\u062a\u0648\u0642\u0639 \u0688\u06cc\u0679\u0627 \u0648\u0627\u067e\u0633 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0631\u0646 \u0679\u0627\u0626\u0645 \u067e\u0631 \u06a9\u0627\u0633\u0679 \u06a9\u0627 \u0633\u0628\u0628 \u0628\u0646\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<li>\n<p>\u062f\u0631\u062e\u0648\u0627\u0633\u062a \u063a\u06cc\u0631 \u0645\u0639\u06cc\u0646\u06c1 \u0645\u062f\u062a \u062a\u06a9 \u0644\u0679\u06a9 \u062c\u0627\u062a\u06cc \u06c1\u06d2 \u0627\u0648\u0631 \u0635\u0627\u0631\u0641 \u06c1\u0645\u06cc\u0634\u06c1 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u067e\u0646\u0631 \u06a9\u0648 \u06af\u06be\u0648\u0631\u062a\u0627 \u0631\u06c1\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<\/ol>\n<p>\u0645\u06cc\u06ba \u0646\u06d2 \u0686\u0627\u0631\u0648\u06ba \u06a9\u0648 \u062f\u0631\u0633\u062a \u0633\u0645\u062c\u06be\u0627\u06d4 \u06cc\u06c1\u0627\u06ba \u0627\u06cc\u06a9 \u0648\u0631\u0698\u0646 \u06c1\u06d2 \u062c\u0648 \u0627\u0633\u06d2 \u0633\u0646\u0628\u06be\u0627\u0644\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-dart\">Future<void> loadUser(String userId) async {\n  setState(() {\n    isLoading = true;\n    error = null;\n  });\n\n  try {\n    final response = await dio.get('\/user\/$userId');\n\n    \/\/ mounted checks whether this widget is still in the widget tree.\n    \/\/ If the user navigated away while the request was running,\n    \/\/ mounted is false. Calling setState on a disposed widget throws\n    \/\/ an error \u2014 this one line prevents that entire class of crash.\n    if (!mounted) return;\n\n    setState(() {\n      user = User.fromJson(response.data as Map<string dynamic=\"\">);\n      isLoading = false;\n    });\n  } on DioException catch (e) {\n    if (!mounted) return;\n\n    setState(() {\n      \/\/ Give the user a message that is actually useful.\n      \/\/ \"Something went wrong\" is not helpful. Knowing whether\n      \/\/ they have no internet vs the server failed lets them\n      \/\/ decide whether to move or wait.\n      error = e.type == DioExceptionType.connectionError\n          ? 'No internet connection. Please try again.'\n          : 'Failed to load profile. Please try again.';\n      isLoading = false;\n    });\n  }\n}\n<\/string><\/void><\/code><\/pre>\n<h3 id=\"heading-the-three-states-every-screen-needs\">\u062a\u06cc\u0646 \u0631\u06cc\u0627\u0633\u062a\u0648\u06ba \u0645\u06cc\u06ba \u06c1\u0631 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/h3>\n<p>\u0645\u06cc\u06ba \u06a9\u0627\u0645\u06cc\u0627\u0628\u06cc \u06a9\u06cc \u06a9\u06c1\u0627\u0646\u06cc\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u06a9\u0631\u06cc\u0646\u06cc\u06ba \u0688\u06cc\u0632\u0627\u0626\u0646 \u06a9\u0631\u0648\u06ba \u06af\u0627 \u0627\u0648\u0631 \u0628\u0639\u062f \u0645\u06cc\u06ba \u0644\u0648\u0688\u0646\u06af \u0627\u0648\u0631 \u063a\u0644\u0637\u06cc\u0648\u06ba \u067e\u0631 \u063a\u0648\u0631 \u06a9\u0631\u0648\u06ba \u06af\u0627\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u063a\u0644\u0637\u06cc \u062a\u06be\u06cc\u06d4 \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u0627\u0633\u06a9\u0631\u06cc\u0646 \u062c\u0648 \u0631\u06cc\u0645\u0648\u0679 \u0688\u06cc\u0679\u0627 \u06a9\u0648 \u06a9\u06be\u06cc\u0646\u0686\u062a\u06cc \u06c1\u06d2 \u0627\u0646 \u062a\u06cc\u0646\u0648\u06ba \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2:<\/p>\n<pre><code class=\"language-dart\">@override\nWidget build(BuildContext context) {\n  \/\/ Loading: never leave users staring at a blank screen.\n  \/\/ A spinner tells them something is happening.\n  if (isLoading) {\n    return const Center(child: CircularProgressIndicator());\n  }\n\n  \/\/ Error: show what went wrong and how to recover.\n  \/\/ A dead end with no retry button is one of the most\n  \/\/ frustrating things a user can experience.\n  if (error != null) {\n    return Center(\n      child: Column(\n        mainAxisSize: MainAxisSize.min,\n        children: [\n          Text(error!, style: const TextStyle(color: Colors.red)),\n          const SizedBox(height: 16),\n          ElevatedButton(\n            onPressed: () => loadUser(widget.userId),\n            child: const Text('Try again'),\n          ),\n        ],\n      ),\n    );\n  }\n\n  \/\/ Success: show the data.\n  return UserProfileView(user: user!);\n}\n<\/code><\/pre>\n<p>\u062f\u0648\u0628\u0627\u0631\u06c1 \u06a9\u0648\u0634\u0634 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0628\u0679\u0646 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u063a\u0644\u0637\u06cc \u06a9\u06cc \u062d\u0627\u0644\u062a \u0627\u0686\u06be\u0627 \u062e\u06cc\u0627\u0644 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0646\u06cc\u0679 \u0648\u0631\u06a9 \u06a9\u06cc \u0628\u0646\u062f\u0634 \u0633\u06d2 \u0679\u06be\u06cc\u06a9 \u06c1\u0648\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0635\u0627\u0631\u0641 \u0627\u0648\u0631 \u06cc\u06c1 \u0633\u0648\u0686\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0635\u0627\u0631\u0641 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0641\u0631\u0642 \u06c1\u06d2 \u06a9\u06c1 \u0627\u0646 \u06a9\u06cc \u0627\u06cc\u067e \u0633\u06d2 \u0633\u0645\u062c\u06be\u0648\u062a\u06c1 \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-retry-logic-and-the-production-request-lifecycle\">\u062f\u0648\u0628\u0627\u0631\u06c1 \u06a9\u0648\u0634\u0634 \u06a9\u0631\u06cc\u06ba \u0645\u0646\u0637\u0642 \u0627\u0648\u0631 \u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644<\/h2>\n<p>\u0645\u0648\u0628\u0627\u0626\u0644 \u0646\u06cc\u0679 \u0648\u0631\u06a9 \u06c1\u0631 \u0648\u0642\u062a \u0639\u0627\u0631\u0636\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0646\u0627\u06a9\u0627\u0645 \u0631\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u062f\u0631\u062e\u0648\u0627\u0633\u062a\u0648\u06ba \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u0635\u0627\u0631\u0641 \u0627\u0646\u062f\u06be\u06d2 \u0645\u0642\u0627\u0645\u0627\u062a \u0633\u06d2 \u06af\u0632\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0644\u0641\u0679 \u0645\u06cc\u06ba \u062f\u0627\u062e\u0644 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u06cc\u0627 \u0648\u0627\u0626\u06cc \u0641\u0627\u0626\u06cc \u0633\u06d2 \u0645\u0648\u0628\u0627\u0626\u0644 \u0688\u06cc\u0679\u0627 \u067e\u0631 \u0633\u0648\u0626\u0686 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648 \u062c\u0627\u062a\u06cc \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 2 \u0633\u06cc\u06a9\u0646\u0688 \u06a9\u06d2 \u0628\u0639\u062f \u062f\u0648\u0628\u0627\u0631\u06c1 \u06a9\u0648\u0634\u0634 \u06a9\u0627\u0645\u06cc\u0627\u0628 \u06c1\u0648 \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u062f\u0648\u0628\u0627\u0631\u06c1 \u06a9\u0648\u0634\u0634 \u06a9\u06cc \u0645\u0646\u0637\u0642 \u06a9\u06d2 \u0628\u063a\u06cc\u0631\u060c \u0646\u06cc\u0679 \u0648\u0631\u06a9 \u06a9\u06cc \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u0639\u0627\u0631\u0636\u06cc \u063a\u0644\u0637\u06cc \u0635\u0627\u0631\u0641 \u06a9\u06d2 \u0646\u0642\u0637\u06c1 \u0646\u0638\u0631 \u0633\u06d2 \u0627\u06cc\u06a9 \u0645\u0633\u062a\u0642\u0644 \u063a\u0644\u0637\u06cc \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u0628\u0631\u06cc \u0688\u06cc\u0644 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">Future<t> withRetry<t>(\n  Future<t> Function() request, {\n  int maxAttempts = 3,\n  Duration delay = const Duration(seconds: 1),\n}) async {\n  for (int i = 0; i < maxAttempts; i++) {\n    try {\n      return await request();\n    } catch (e) {\n      \/\/ On the final attempt, stop retrying and let the\n      \/\/ error propagate to the caller.\n      if (i == maxAttempts - 1) rethrow;\n\n      \/\/ Wait before trying again. This gives temporary network\n      \/\/ issues time to resolve and avoids hammering a server\n      \/\/ that might already be struggling.\n      await Future.delayed(delay);\n    }\n  }\n\n  throw Exception('Retry failed');\n}\n<\/t><\/t><\/t><\/code><\/pre>\n<p>\u06cc\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u0627 \u0622\u0633\u0627\u0646 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">final user = await withRetry(\n  () => dio.get('\/user\/$userId'),\n  maxAttempts: 3,\n  delay: const Duration(seconds: 2),\n);\n<\/code><\/pre>\n<p>\u06c1\u0627\u0626\u06cc \u0679\u0631\u06cc\u0641\u06a9 \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u0627\u06cc\u067e\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u062f\u06cc\u06a9\u06be\u06cc\u06ba: <code>dio_smart_retry<\/code>. \u06cc\u06c1 \u0627\u06cc\u06a9\u0633\u067e\u0648\u0646\u06cc\u0646\u0634\u0644 \u0628\u06cc\u06a9 \u0622\u0641 \u06a9\u0648 \u0644\u0627\u06af\u0648 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u06c1\u0631 \u062f\u0648\u0628\u0627\u0631\u06c1 \u06a9\u0648\u0634\u0634 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u062a\u0627\u062e\u06cc\u0631 \u06a9\u0648 \u062f\u0648\u06af\u0646\u0627 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u062c\u0633 \u0633\u06d2 \u0627\u0635\u0644 \u0628\u0646\u062f\u0634 \u06a9\u06cc \u0635\u0648\u0631\u062a \u0645\u06cc\u06ba \u0633\u0631\u0648\u0631 \u06a9\u0627 \u0628\u0648\u062c\u06be \u0628\u06c1\u062a \u0632\u06cc\u0627\u062f\u06c1 \u0645\u062f\u0646\u0638\u0631 \u0631\u06a9\u06be\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-offline-support-and-local-persistence\">\u0622\u0641 \u0644\u0627\u0626\u0646 \u0633\u067e\u0648\u0631\u0679 \u0627\u0648\u0631 \u0645\u0642\u0627\u0645\u06cc \u0627\u0633\u062a\u0642\u0627\u0645\u062a<\/h2>\n<p>\u0634\u0631\u0645\u0646\u0627\u06a9 \u0633\u067e\u0648\u0631\u0679 \u0679\u06a9\u0679 \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f\u060c \u0645\u06cc\u06ba \u0646\u06d2 \u0622\u0641 \u0644\u0627\u0626\u0646 \u0633\u067e\u0648\u0631\u0679 \u06a9\u0648 \u0633\u0646\u062c\u06cc\u062f\u06af\u06cc \u0633\u06d2 \u0644\u06cc\u0646\u0627 \u0633\u06cc\u06a9\u06be\u0627\u06d4 \u0635\u0627\u0631\u0641 \u0646\u06d2 \u0627\u06cc\u06a9 \u0644\u0645\u0628\u0627 \u0622\u0646 \u0628\u0648\u0631\u0688\u0646\u06af \u0641\u0627\u0631\u0645 (15 \u0641\u06cc\u0644\u0688\u0632) \u067e\u064f\u0631 \u06a9\u06cc\u0627 \u062c\u0633 \u0645\u06cc\u06ba \u06a9\u0626\u06cc \u0645\u0646\u0679 \u0644\u06af\u06d2 \u0627\u0648\u0631 \u06a9\u0646\u06a9\u0634\u0646 \u063a\u06cc\u0631 \u0645\u0633\u062a\u062d\u06a9\u0645 \u06c1\u0648\u0646\u06d2 \u067e\u0631 \u062c\u0645\u0639 \u06a9\u0631\u0648\u0627\u06cc\u0627\u06d4 \u0622\u067e \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648\u06af\u0626\u06cc\u06d4 \u0641\u0627\u0631\u0645 \u0635\u0627\u0641 \u06c1\u0648 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4 \u062a\u0645\u0627\u0645 \u0688\u06cc\u0679\u0627 \u063a\u0627\u0626\u0628 \u06c1\u06d2\u06d4 \u0648\u06c1 \u0646\u0627\u0631\u0627\u0636 \u062a\u06be\u06d2\u060c \u0627\u0648\u0631 \u0648\u0627\u0636\u062d \u0637\u0648\u0631 \u067e\u0631\u060c \u0627\u0646\u06c1\u06cc\u06ba \u06c1\u0648\u0646\u06d2 \u06a9\u0627 \u067e\u0648\u0631\u0627 \u062d\u0642 \u062a\u06be\u0627.<\/p>\n<p>\u0622\u0641 \u0644\u0627\u0626\u0646 \u0633\u067e\u0648\u0631\u0679 \u06a9\u0627 \u0645\u0642\u0635\u062f \u0627\u0646\u0679\u0631\u0646\u06cc\u0679 \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u062a\u0645\u0627\u0645 \u0641\u0639\u0627\u0644\u06cc\u062a \u06a9\u0648 \u0646\u0642\u0644 \u06a9\u0631\u0646\u0627 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0627\u0633 \u0628\u0627\u062a \u06a9\u0648 \u06cc\u0642\u06cc\u0646\u06cc \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06c1\u06d2 \u06a9\u06c1 \u0635\u0627\u0631\u0641\u06cc\u0646 \u062a\u0631\u0642\u06cc \u0633\u06d2 \u0645\u062d\u0631\u0648\u0645 \u0646\u06c1 \u06c1\u0648\u06ba \u0627\u0648\u0631 \u0688\u06cc\u0688 \u0627\u06cc\u0646\u0688\u0632 \u06a9\u0648 \u0646\u06c1 \u0645\u0627\u0631\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-caching-remote-data\">\u0631\u06cc\u0645\u0648\u0679 \u0688\u06cc\u0679\u0627 \u06a9\u06cc\u0634\u0646\u06af<\/h3>\n<p>\u06cc\u06c1\u0627\u06ba \u06a9\u06cc \u062d\u06a9\u0645\u062a \u0639\u0645\u0644\u06cc \u0633\u0627\u062f\u06c1 \u06c1\u06d2\u06d4 \u062c\u0628 \u0628\u06be\u06cc \u0646\u06cc\u0679 \u0648\u0631\u06a9 \u06a9\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u06a9\u0627\u0645\u06cc\u0627\u0628 \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u060c \u06c1\u0645 \u0646\u062a\u0627\u0626\u062c \u06a9\u0648 \u0645\u0642\u0627\u0645\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0627\u0633\u0679\u0648\u0631 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u067e\u06be\u0631\u060c \u0627\u06af\u0631 \u0627\u06af\u0644\u06cc \u062f\u0631\u062e\u0648\u0627\u0633\u062a \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648 \u062c\u0627\u062a\u06cc \u06c1\u06d2\u060c \u062a\u0648 \u06cc\u06c1 \u0622\u067e \u06a9\u0648 \u0648\u06c1 \u0686\u06cc\u0632 \u062f\u06cc\u062a\u06cc \u06c1\u06d2 \u062c\u0648 \u0622\u067e \u0646\u06d2 \u067e\u0686\u06be\u0644\u06cc \u0628\u0627\u0631 \u0627\u06cc\u06a9 \u0627\u06cc\u0631\u0631 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u062f\u06a9\u06be\u0627\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0645\u062d\u0641\u0648\u0638 \u06a9\u06cc \u062a\u06be\u06cc\u06d4<\/p>\n<pre><code class=\"language-dart\">class UserRepository {\n  final Dio _dio;\n  final Box _cache; \/\/ Hive box\n\n  UserRepository(this._dio, this._cache);\n\n  Future<user> getUser(String userId) async {\n    try {\n      final response = await _dio.get('\/user\/$userId');\n      final user = User.fromJson(response.data as Map<string dynamic=\"\">);\n\n      \/\/ Save fresh data to the cache every time a request succeeds.\n      \/\/ This means the next request can fall back to this\n      \/\/ if the network is unavailable.\n      await _cache.put('user_$userId', user.toJson());\n\n      return user;\n    } catch (e) {\n      \/\/ Network failed. See if we have something cached.\n      final cached = _cache.get('user_$userId');\n\n      if (cached != null) {\n        \/\/ Stale data is better than an error screen.\n        \/\/ The user sees something useful even without internet.\n        return User.fromJson(Map<string dynamic=\"\">.from(cached));\n      }\n\n      \/\/ Nothing cached. We have no choice but to surface the error.\n      rethrow;\n    }\n  }\n}\n<\/string><\/string><\/user><\/code><\/pre>\n<h3 id=\"heading-preserving-user-input\">\u0635\u0627\u0631\u0641 \u06a9\u06d2 \u0627\u0646 \u067e\u0679 \u06a9\u0648 \u0645\u062d\u0641\u0648\u0638 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u0622\u0646 \u0628\u0648\u0631\u0688\u0646\u06af \u0679\u06a9\u0679 \u06a9\u06cc \u0627\u0635\u0644\u0627\u062d\u0627\u062a \u06cc\u06c1 \u06c1\u06cc\u06ba \u062c\u0646 \u06a9\u0627 \u0645\u06cc\u06ba \u0646\u06d2 \u0630\u06a9\u0631 \u06a9\u06cc\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-dart\">\/\/ Save whatever the user has typed whenever the field changes.\n_contentController.addListener(() async {\n  await _cache.put('draft_post', _contentController.text);\n});\n\n\/\/ When the screen opens, restore any saved draft.\n@override\nvoid initState() {\n  super.initState();\n  final draft = _cache.get('draft_post') as String?;\n  if (draft != null && draft.isNotEmpty) {\n    _contentController.text = draft;\n  }\n}\n\n\/\/ Clear the draft once the user successfully submits.\nFuture<void> _submit() async {\n  await _repository.createPost(_contentController.text);\n  await _cache.delete('draft_post');\n}\n<\/void><\/code><\/pre>\n<p>\u06a9\u0648\u0688 \u06a9\u06cc \u062a\u06cc\u0646 \u0644\u0627\u0626\u0646\u06cc\u06ba \u062c\u0648 \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u0648 \u0627\u067e\u0646\u0627 \u06a9\u0627\u0645 \u06a9\u06be\u0648\u0646\u06d2 \u0633\u06d2 \u0628\u0686\u0627\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u0641\u0627\u0631\u0645 \u062c\u0633\u06d2 \u067e\u064f\u0631 \u06a9\u0631\u0646\u06d2 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0645\u0646\u0679 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0648\u0642\u062a \u0644\u06af\u062a\u0627 \u06c1\u06d2 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0642\u0627\u0628\u0644 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u0642\u0627\u0645\u06cc \u0627\u0633\u062a\u0642\u0627\u0645\u062a \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06c1\u0648\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u067e\u06cc\u06a9\u06cc\u062c\u0632:<\/p>\n<ol>\n<li>\n<p><strong>\u0686\u06be\u062a\u06c1<\/strong> \u0633\u0627\u062f\u06c1 \u06a9\u0644\u06cc\u062f\u06cc \u0642\u062f\u0631 \u0627\u0633\u0679\u0648\u0631\u06cc\u062c \u06a9\u06d2 \u0644\u06cc\u06d2<\/p>\n<\/li>\n<li>\n<p><strong>\u0627\u06cc\u062b\u0627\u0631<\/strong> \u062c\u0628 \u0622\u067e \u06a9\u0648 \u0632\u06cc\u0627\u062f\u06c1 \u0637\u0627\u0642\u062a\u0648\u0631 \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u06d4<\/p>\n<\/li>\n<li>\n<p><strong>\u0645\u0631\u0628\u0639 \u0641\u0644\u0627\u0626\u0679<\/strong> \u0645\u062a\u0639\u0644\u0642\u06c1 \u0688\u06cc\u0679\u0627 \u06a9\u06d2 \u0644\u06cc\u06d2<\/p>\n<\/li>\n<li>\n<p><strong>\u0645\u0634\u062a\u0631\u06a9\u06c1_\u062a\u0631\u062c\u06cc\u062d\u0627\u062a<\/strong> \u06cc\u06c1 \u0635\u0631\u0641 \u0635\u0627\u0631\u0641 \u06a9\u06cc \u062a\u0631\u062a\u06cc\u0628\u0627\u062a \u067e\u0631 \u0644\u0627\u06af\u0648 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u060c \u0627\u06c1\u0645 \u0645\u0648\u0627\u062f \u067e\u0631 \u0646\u06c1\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"heading-state-management-at-scale\">\u0628\u0691\u06d2 \u067e\u06cc\u0645\u0627\u0646\u06d2 \u067e\u0631 \u0631\u06cc\u0627\u0633\u062a\u06cc \u0627\u0646\u062a\u0638\u0627\u0645<\/h2>\n<p><code>setState<\/code>    \u062a\u0645 \u0679\u06be\u06cc\u06a9 \u06c1\u0648\u061f \u0645\u06cc\u06ba \u06cc\u06c1 \u0648\u0627\u0636\u062d \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u062a\u0627 \u06c1\u0648\u06ba \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0641\u0644\u0679\u0631 \u06a9\u0645\u06cc\u0648\u0646\u0679\u06cc \u0645\u06cc\u06ba \u0627\u0633 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u06cc\u0633\u0627 \u0633\u0644\u0648\u06a9 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0631\u062c\u062d\u0627\u0646 \u06c1\u06d2 \u062c\u06cc\u0633\u06d2 \u06cc\u06c1 \u06c1\u0645\u06cc\u0634\u06c1 \u063a\u0644\u0637 \u06c1\u06d2\u06d4 \u0645\u0642\u0627\u0645\u06cc\u060c \u0633\u0627\u062f\u06c1 UI \u0631\u06cc\u0627\u0633\u062a\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 (\u0628\u0679\u0646 \u0679\u0648\u06af\u0644\u0632\u060c \u0641\u0627\u0631\u0645 \u0641\u06cc\u0644\u0688\u0632 \u062c\u0648 \u062a\u0648\u062b\u06cc\u0642 \u062f\u06a9\u06be\u0627 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba) <code>setState<\/code> \u06cc\u06c1 \u0628\u0627\u0644\u06a9\u0644 \u0635\u062d\u06cc\u062d \u0679\u0648\u0644 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u0633\u0626\u0644\u06c1 \u0627\u0633 \u0648\u0642\u062a \u0634\u0631\u0648\u0639 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u062c\u0628 \u0622\u067e \u0627\u0633\u06d2 \u0627\u0633 \u062d\u0627\u0644\u062a \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0645\u062a\u0639\u062f\u062f \u0648\u06cc\u062c\u0679\u0633 \u067e\u0631 \u0627\u0646\u062d\u0635\u0627\u0631 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u063a\u06cc\u0631 \u0645\u0637\u0627\u0628\u0642\u062a \u067e\u0630\u06cc\u0631 \u0622\u067e\u0631\u06cc\u0634\u0646\u0632\u060c \u06cc\u0627 \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0627\u06cc\u0633\u06cc \u0686\u06cc\u0632 \u06a9\u0648 \u062c\u0648 \u0646\u06cc\u0648\u06cc\u06af\u06cc\u0634\u0646 \u06a9\u0648 \u0632\u0646\u062f\u06c1 \u0631\u06c1\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4 \u0645\u06cc\u06ba \u0646\u06d2 \u06cc\u06c1 \u0633\u0628 \u06a9\u06cc\u0627 \u06c1\u06d2\u06d4 \u0645\u0633\u0626\u0644\u06c1 \u06cc\u06c1 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-dart\">\/\/ This setState call lives high in the widget tree.\n\/\/ Every widget below it rebuilds \u2014 including expensive ones\n\/\/ that have nothing to do with this state change.\nsetState(() {\n  currentUser = updatedUser;\n});\n<\/code><\/pre>\n<p>\u0627\u06cc\u067e \u06a9\u06d2 \u0628\u0691\u06be\u0646\u06d2 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06c1\u06cc \u0635\u0648\u0631\u062a\u062d\u0627\u0644 \u0645\u0632\u06cc\u062f \u062e\u0631\u0627\u0628 \u06c1\u0648\u062a\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4 \u067e\u06be\u06cc\u0644\u0627\u0624 \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0645\u0646\u0638\u0645 \u06a9\u0631\u06cc\u06ba\u06d4 \u0636\u0645\u0646\u06cc \u0627\u062b\u0631\u0627\u062a \u063a\u06cc\u0631 \u0645\u062a\u0648\u0642\u0639 \u062a\u0631\u062a\u06cc\u0628 \u0645\u06cc\u06ba \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0622\u067e \u0641\u0639\u0627\u0644\u06cc\u062a \u06a9\u0648 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0688\u06cc\u0628\u06af\u0646\u06af \u0645\u06cc\u06ba \u0632\u06cc\u0627\u062f\u06c1 \u0648\u0642\u062a \u06af\u0632\u0627\u0631\u0646\u0627 \u0634\u0631\u0648\u0639 \u06a9\u0631 \u062f\u06cc\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-moving-to-riverpod\">\u0631\u06cc\u0648\u0631 \u0641\u0648\u0631\u0688 \u067e\u0631 \u062c\u0627\u0626\u06cc\u06ba\u06d4<\/h3>\n<p>\u0627\u067e\u0646\u06cc \u062f\u0648\u0633\u0631\u06cc \u0627\u06cc\u067e \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u0633 \u062f\u06cc\u0648\u0627\u0631 \u06a9\u0648 \u0679\u06a9\u0631\u0627\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f\u060c \u0645\u06cc\u06ba \u0646\u06d2 \u0631\u06cc\u0648\u0631 \u067e\u0648\u0688 \u067e\u0631 \u0633\u0648\u0626\u0686 \u06a9\u06cc\u0627 \u0627\u0648\u0631 \u06a9\u0628\u06be\u06cc \u067e\u06cc\u0686\u06be\u06d2 \u0645\u0691 \u06a9\u0631 \u0646\u06c1\u06cc\u06ba \u062f\u06cc\u06a9\u06be\u0627\u06d4 \u0628\u0646\u06cc\u0627\u062f\u06cc \u062e\u06cc\u0627\u0644 \u0633\u0627\u062f\u06c1 \u06c1\u06d2\u06d4 \u0631\u06cc\u0627\u0633\u062a \u0648\u06cc\u062c\u06cc\u0679 \u06a9\u06d2 \u0628\u0627\u06c1\u0631 \u0645\u0648\u062c\u0648\u062f \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0648\u06cc\u062c\u06cc\u0679 \u0628\u0627\u0644\u06a9\u0644 \u0627\u0633\u06cc \u0631\u06cc\u0627\u0633\u062a \u06a9\u0648 \u0633\u0628\u0633\u06a9\u0631\u0627\u0626\u0628 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0633 \u06a9\u06cc \u0627\u0633\u06d2 \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">@riverpod\nclass UserNotifier extends _$UserNotifier {\n  @override\n  AsyncValue<user> build(String userId) {\n    _load();\n    return const AsyncValue.loading();\n  }\n\n  Future<void> _load() async {\n    state = const AsyncValue.loading();\n\n    \/\/ AsyncValue.guard runs the future and wraps the result\n    \/\/ in AsyncValue.data on success or AsyncValue.error on failure.\n    \/\/ It saves you from writing try\/catch every single time.\n    state = await AsyncValue.guard(\n      () => ref.read(userRepositoryProvider).getUser(userId),\n    );\n  }\n\n  Future<void> refresh() => _load();\n}\n<\/void><\/void><\/user><\/code><\/pre>\n<p>\u0648\u06cc\u062c\u06cc\u0679 \u0645\u06cc\u06ba:<\/p>\n<pre><code class=\"language-dart\">@override\nWidget build(BuildContext context) {\n  \/\/ ref.watch subscribes this widget to the notifier.\n  \/\/ It rebuilds only when userAsync changes \u2014 not when\n  \/\/ unrelated state elsewhere in the app changes.\n  final userAsync = ref.watch(userNotifierProvider(widget.userId));\n\n  return userAsync.when(\n    \/\/ when() forces you to handle loading, error, and data.\n    \/\/ Miss one and it's a compile error, not a runtime surprise.\n    loading: () => const CircularProgressIndicator(),\n    error: (e, _) => Text('Error: $e'),\n    data: (user) => UserProfileView(user: user),\n  );\n}\n<\/code><\/pre>\n<p>\u062c\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u06cc\u06ba \u0633\u0628 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0634\u06a9\u0631 \u06af\u0632\u0627\u0631 \u06c1\u0648\u06ba: <code>when()<\/code> \u0644\u0648\u0688 \u06cc\u0627 \u062e\u0631\u0627\u0628\u06cc \u06a9\u06cc \u0634\u0631\u0627\u0626\u0637 \u06a9\u0648 \u0628\u06be\u0648\u0644\u0646\u06d2 \u06a9\u06d2 \u0646\u062a\u06cc\u062c\u06d2 \u0645\u06cc\u06ba \u062a\u0627\u0644\u06cc\u0641 \u06a9\u06cc \u063a\u0644\u0637\u06cc\u0627\u06ba \u06c1\u0648\u06ba \u06af\u06cc\u06d4 \u06a9\u0645\u067e\u0627\u0626\u0644\u0631 \u06a9\u0633\u06cc \u0627\u06cc\u0633\u06cc \u0686\u06cc\u0632 \u06a9\u0648 \u0646\u0627\u0641\u0630 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0633\u06d2 \u0645\u06cc\u06ba \u0628\u06be\u0648\u0644 \u062c\u0627\u062a\u0627 \u062a\u06be\u0627\u06d4<\/p>\n<h3 id=\"heading-immutable-state\">\u0646\u0627\u0642\u0627\u0628\u0644 \u062a\u063a\u06cc\u0631 \u062d\u0627\u0644\u062a<\/h3>\n<p>\u0644\u0627\u0626\u06cc\u0648 \u0686\u06cc\u0679 \u06a9\u06cc \u062e\u0635\u0648\u0635\u06cc\u062a \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0645\u062c\u06be\u06d2 \u067e\u0631\u06cc\u0634\u0627\u0646 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06cc \u0686\u06cc\u0632\u0648\u06ba \u0645\u06cc\u06ba \u0633\u06d2 \u0627\u06cc\u06a9 \u0627\u06cc\u067e \u06a9\u06d2 \u0645\u062e\u062a\u0644\u0641 \u062d\u0635\u0648\u06ba \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0634\u06cc\u0626\u0631 \u06a9\u06cc \u062c\u0627\u0646\u06d2 \u0648\u0627\u0644\u06cc \u062a\u0628\u062f\u06cc\u0644\u06cc \u06a9\u06cc \u0641\u06c1\u0631\u0633\u062a \u062a\u06be\u06cc\u06d4<\/p>\n<pre><code class=\"language-dart\">List<message> messages = [];\n\n\/\/ Later, in different places:\nmessages.add(newMessage);       \/\/ socket handler\nmessages.removeAt(0);          \/\/ pagination\nmessages.insert(0, pinned);    \/\/ push notification handler\n<\/message><\/code><\/pre>\n<p>\u06cc\u06c1 \u0627\u06cc\u06a9 \u062d\u0642\u06cc\u0642\u06cc \u062a\u06a9\u0644\u06cc\u0641 \u062a\u06be\u06cc \u06a9\u06c1 \u0627\u0633 \u0628\u0627\u062a \u06a9\u0627 \u0633\u0631\u0627\u063a \u0644\u06af\u0627\u0646\u0627 \u06a9\u06c1 \u06a9\u0633 \u062a\u0628\u062f\u06cc\u0644\u06cc \u06a9\u06cc \u0648\u062c\u06c1 \u0633\u06d2 \u06cc\u06c1 \u067e\u06cc\u063a\u0627\u0645 \u0622\u06cc\u0627 \u062c\u0628 \u06cc\u06c1 \u062f\u0648 \u0628\u0627\u0631 \u0638\u0627\u06c1\u0631 \u06c1\u0648 \u06af\u0627 \u06cc\u0627 \u062a\u0635\u0627\u062f\u0641\u06cc \u0637\u0648\u0631 \u067e\u0631 \u063a\u0627\u0626\u0628 \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4 \u0627\u0633 \u06a9\u0627 \u062d\u0644 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u0627\u0633\u06d2 \u06a9\u0628\u06be\u06cc \u062a\u0628\u062f\u06cc\u0644 \u0646\u06c1 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u06c1\u0645\u06cc\u0634\u06c1 \u0627\u06cc\u06a9 \u0646\u0626\u06cc \u0641\u06c1\u0631\u0633\u062a \u0628\u0646\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ The old list is unchanged. The new state is a new list.\n\/\/ Every change is explicit and traceable.\nstate = [...state, newMessage];\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u0627\u06cc\u06a9 \u0686\u06be\u0648\u0679\u06d2 \u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u06cc \u0637\u0631\u062d \u0645\u062d\u0633\u0648\u0633 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u062c\u0628 \u062a\u06a9 \u06a9\u06c1 \u0622\u067e \u0645\u06cc\u0648\u0679\u06cc\u0634\u0646 \u0628\u06af \u06a9\u0648 \u0688\u06cc\u0628\u06af \u06a9\u0631\u0646\u06d2 \u0645\u06cc\u06ba \u062f\u0648 \u06af\u06be\u0646\u0679\u06d2 \u0646\u06c1 \u06af\u0632\u0627\u0631\u06cc\u06ba\u06d4 \u062a\u0628 \u06cc\u06c1 \u0628\u06c1\u062a \u0627\u06c1\u0645 \u0645\u062d\u0633\u0648\u0633 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u067e\u06be\u0691\u067e\u06be\u0691\u0627\u0646\u0627 \u062a\u06cc\u0632 \u06c1\u06d2\u06d4 \u0644\u06cc\u06a9\u0646 \u063a\u06cc\u0631 \u0636\u0631\u0648\u0631\u06cc \u062f\u0648\u0628\u0627\u0631\u06c1 \u062a\u0639\u0645\u06cc\u0631\u0627\u062a \u06a9\u0627 \u0688\u06be\u06cc\u0631 \u0644\u06af \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u06a9\u0645 \u062f\u0631\u062c\u06d2 \u06a9\u06d2 \u0622\u0644\u0627\u062a \u067e\u0631\u060c \u062a\u0639\u0645\u06cc\u0631 \u0646\u0645\u0627\u06cc\u0627\u06ba \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-const-widgets-skip-rebuilds-entirely\">Const \u0648\u06cc\u062c\u0679 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u062f\u0648\u0628\u0627\u0631\u06c1 \u062a\u0639\u0645\u06cc\u0631 \u06a9\u0648 \u0686\u06be\u0648\u0691 \u062f\u06cc\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/h3>\n<p>\u06a9\u06c1 <code>const<\/code> \u06a9\u0644\u06cc\u062f\u06cc \u0644\u0641\u0638 \u0688\u0627\u0631\u0679 \u06a9\u0648 \u0628\u062a\u0627\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u06cc\u06c1 \u0648\u06cc\u062c\u06cc\u0679 \u0645\u0631\u062a\u0628 \u0648\u0642\u062a \u067e\u0631 \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0633\u06d2 \u063a\u06cc\u0631 \u0645\u0639\u06cc\u0646\u06c1 \u0645\u062f\u062a \u062a\u06a9 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u0648\u06cc\u062c\u06cc\u0679 \u062c\u0633 \u06a9\u0627 \u0645\u0648\u0627\u062f \u06a9\u0628\u06be\u06cc \u062a\u0628\u062f\u06cc\u0644 \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u062a\u0627 \u0648\u06c1 \u0627\u0645\u06cc\u062f\u0648\u0627\u0631 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ Without const: a new Text instance is created on every\n\/\/ rebuild of the parent, even though the content never changes.\nText('Welcome to the app')\n\n\/\/ With const: Flutter reuses the same instance.\n\/\/ No rebuild work, no allocation.\nconst Text('Welcome to the app')\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u0627\u06cc\u06a9 \u0686\u06be\u0648\u0679\u06cc \u0633\u06cc \u0628\u0627\u062a \u0644\u06af\u062a\u06cc \u06c1\u06d2\u06d4 \u0628\u06c1\u062a \u0633\u06d2 \u062c\u0627\u0645\u062f \u0639\u0646\u0627\u0635\u0631 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0628\u0691\u06d2 \u0648\u06cc\u062c\u06cc\u0679 \u062f\u0631\u062e\u062a\u0648\u06ba \u0645\u06cc\u06ba\u060c \u0645\u062c\u0645\u0648\u0639\u06cc \u0627\u062b\u0631 \u0648\u0627\u0642\u0639\u06cc \u06a9\u0627\u0645 \u0645\u06cc\u06ba \u0622\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633\u06d2 \u0639\u0627\u062f\u062a \u0628\u0646\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-keep-the-rebuild-scope-small\">\u062a\u0639\u0645\u06cc\u0631 \u0646\u0648 \u06a9\u0627 \u062f\u0627\u0626\u0631\u06c1 \u0686\u06be\u0648\u0679\u0627 \u0631\u06a9\u06be\u06cc\u06ba<\/h3>\n<p>\u062c\u0628 <code>setState<\/code> \u06cc\u06c1 \u0648\u06cc\u062c\u06cc\u0679 \u06a9\u06d2 \u062f\u0631\u062e\u062a \u06a9\u06d2 \u0627\u0648\u067e\u0631\u06cc \u062d\u0635\u06d2 \u0645\u06cc\u06ba \u0628\u06cc\u0679\u06be\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0633 \u06a9\u06d2 \u0646\u06cc\u0686\u06d2 \u062a\u0645\u0627\u0645 \u0648\u06cc\u062c\u0679 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0628\u0646\u0627\u0626\u06d2 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0627\u0646 \u0648\u062c\u06cc\u0679\u0633 \u067e\u0631 \u0628\u06be\u06cc \u0644\u0627\u06af\u0648 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u062a\u0628\u062f\u06cc\u0644 \u0634\u062f\u06c1 \u062d\u0627\u0644\u062a \u0633\u06d2 \u0645\u062a\u0639\u0644\u0642 \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4 \u062d\u0644 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u0631\u06cc\u0627\u0633\u062a \u06a9\u0648 \u062c\u06c1\u0627\u06ba \u062a\u06a9 \u0645\u0645\u06a9\u0646 \u06c1\u0648 \u062f\u0631\u062e\u062a \u0633\u06d2 \u0646\u06cc\u0686\u06d2 \u062f\u06be\u06a9\u06cc\u0644 \u062f\u06cc\u0627 \u062c\u0627\u0626\u06d2\u060c \u0645\u062b\u0627\u0644\u06cc \u0637\u0648\u0631 \u067e\u0631 \u062e\u0648\u062f \u0633\u06d2 \u0646\u06a9\u0627\u0644\u06d2 \u06af\u0626\u06d2 \u0648\u06cc\u062c\u0679 \u0645\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ The problem: counter lives in the parent, so every\n\/\/ setState call rebuilds the entire subtree \u2014 including\n\/\/ ExpensiveListWidget, which has nothing to do with the counter.\nclass _BadExampleState extends State<badexample> {\n  int _counter = 0;\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n        Text('Count: $_counter'),\n        ElevatedButton(\n          onPressed: () => setState(() => _counter++),\n          child: const Text('Increment'),\n        ),\n        const ExpensiveListWidget(), \/\/ rebuilds for no reason\n      ],\n    );\n  }\n}\n<\/badexample><\/code><\/pre>\n<p>\u0627\u0628\u060c \u0627\u06af\u0631 \u06af\u0646\u062a\u06cc \u062a\u0628\u062f\u06cc\u0644 \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u060c \u062a\u0648 \u0635\u0631\u0641 \u0648\u06c1\u06cc \u0648\u06cc\u062c\u06cc\u0679 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0628\u0646\u0627\u06cc\u0627 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4 <code>ExpensiveListWidget<\/code> \u06cc\u06c1 \u0627\u0686\u06be\u0648\u062a\u0627 \u062a\u06be\u0627\u06d4<\/p>\n<h3 id=\"heading-listviewbuilder-for-anything-of-unknown-length\">\u0646\u0627\u0645\u0639\u0644\u0648\u0645 \u0644\u0645\u0628\u0627\u0626\u06cc \u06a9\u06cc \u0627\u0634\u06cc\u0627\u0621 \u06a9\u06d2 \u0644\u06cc\u06d2 ListView.builder<\/h3>\n<p>\u06a9\u0648\u0626\u06cc \u0631\u0627\u0633\u062a\u06c1 \u0646\u06c1\u06cc\u06ba <code>Column<\/code> \u0645\u06cc\u067e\u0688 \u0644\u0633\u0679 \u06a9\u06d2 \u0633\u0627\u062a\u06be\u060c \u0622\u067e \u062a\u0645\u0627\u0645 \u0622\u0626\u0679\u0645\u0632 \u06a9\u0648 \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0642\u0637\u0639 \u0646\u0638\u0631 \u0627\u0633 \u0633\u06d2 \u06a9\u06c1 \u0648\u06c1 \u0646\u0638\u0631 \u0622\u0631\u06c1\u06cc \u06c1\u06cc\u06ba \u06cc\u0627 \u0646\u06c1\u06cc\u06ba\u06d4 200 \u0622\u0626\u0679\u0645\u0632 \u06a9\u06cc \u0641\u06c1\u0631\u0633\u062a \u0645\u06cc\u06ba 200 \u0648\u06cc\u062c\u0679 \u06c1\u0648\u06ba \u06af\u06d2 \u0627\u0633 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u06a9\u06c1 \u0635\u0627\u0631\u0641 \u0627\u0633\u06a9\u0631\u0648\u0644 \u06a9\u0631\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ This builds every single item widget upfront.\n\/\/ With 200 items, 200 widgets are created on first render,\n\/\/ most of which are immediately off-screen.\nColumn(\n  children: items.map((item) => ItemCard(item: item)).toList(),\n)\n\n\/\/ This builds only what is visible, plus a small buffer.\n\/\/ Scrolling through 10,000 items uses the same memory as 10.\nListView.builder(\n  itemCount: items.length,\n  itemBuilder: (context, index) {\n    return ItemCard(items[index]);\n  },\n)\n<\/code><\/pre>\n<p><code>ListView.builder<\/code>    \u06cc\u06c1 \u0628\u0691\u06cc \u0641\u06c1\u0631\u0633\u062a\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u0648\u0632\u0648\u06ba \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0646\u0627\u0645\u0639\u0644\u0648\u0645 \u06cc\u0627 \u0645\u062a\u063a\u06cc\u0631 \u0633\u0627\u0626\u0632 \u06a9\u06cc \u0641\u06c1\u0631\u0633\u062a\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u062f\u0631\u0633\u062a \u0688\u06cc\u0641\u0627\u0644\u0679 \u06c1\u06d2\u06d4 \u0645\u06cc\u06ba \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u0648\u06ba <code>Column<\/code> \u0645\u06cc\u067e \u0634\u062f\u06c1 \u0641\u06c1\u0631\u0633\u062a\u06cc\u06ba \u0635\u0631\u0641 \u0627\u0633 \u0635\u0648\u0631\u062a \u0645\u06cc\u06ba \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba \u062c\u0628 \u0622\u067e \u06a9\u0648 \u06cc\u0642\u06cc\u0646 \u06c1\u0648 \u06a9\u06c1 \u0641\u06c1\u0631\u0633\u062a \u06c1\u0645\u06cc\u0634\u06c1 \u0686\u06be\u0648\u0679\u06cc \u0631\u06c1\u06d2 \u06af\u06cc\u06d4<\/p>\n<p>\u06cc\u06c1 \u0627\u0646 \u06a9\u06cc\u0691\u0648\u06ba \u0645\u06cc\u06ba \u0633\u06d2 \u0627\u06cc\u06a9 \u06c1\u06d2 \u062c\u0648 \u062a\u0631\u0642\u06cc \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u06a9\u0633\u06cc \u06a9\u0627 \u062f\u06be\u06cc\u0627\u0646 \u0646\u06c1\u06cc\u06ba \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u0645\u06cc\u06ba \u0638\u0627\u06c1\u0631 \u06c1\u0648\u062a\u0627 \u0631\u06c1\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u0646\u0638\u0631 \u0646\u0627\u0645\u06c1: \u0627\u06cc\u06a9 \u063a\u06cc\u0631 \u0645\u0637\u0627\u0628\u0642\u062a \u067e\u0630\u06cc\u0631 \u0622\u067e\u0631\u06cc\u0634\u0646 \u0634\u0631\u0648\u0639 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u060c \u0635\u0627\u0631\u0641 \u0627\u0633 \u06a9\u06d2 \u0645\u06a9\u0645\u0644 \u06c1\u0648\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u06c1\u06cc \u0686\u0644\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0622\u067e\u0631\u06cc\u0634\u0646 \u0645\u06a9\u0645\u0644 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u06a9\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u06a9\u0648\u0634\u0634 \u06a9\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4 <code>setState<\/code> \u0627\u06cc\u06a9 \u0648\u06cc\u062c\u06cc\u0679 \u0633\u06d2 \u062c\u0648 \u0627\u0628 \u0645\u0648\u062c\u0648\u062f \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">Future<void> _loadData() async {\n  final data = await repository.fetchData();\n\n  \/\/ If the user navigated away during the await above,\n  \/\/ this widget is gone. setState throws:\n  \/\/ \"setState() called after dispose()\"\n  setState(() => this.data = data );\n}\n<\/void><\/code><\/pre>\n<p>\u062d\u0644 \u0627\u06cc\u06a9 \u0644\u0627\u0626\u0646 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-dart\">Future<void> _loadData() async {\n  final data = await repository.fetchData();\n\n  \/\/ mounted is true while the widget is in the tree,\n  \/\/ false after dispose() has been called.\n  if (!mounted) return;\n\n  setState(() => this.data = data);\n}\n<\/void><\/code><\/pre>\n<p>\u0627\u0628 \u06c1\u0645 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u06cc\u06c1 \u0686\u06cc\u06a9 \u06c1\u0631 \u06af\u06be\u0646\u0679\u06d2 \u0644\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>await<\/code> \u06cc\u06c1 \u0645\u0646\u062f\u0631\u062c\u06c1 \u0630\u06cc\u0644 \u06a9\u06cc \u0637\u0631\u0641 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 <code>setState<\/code>. \u06cc\u06c1 \u062c\u0644\u062f \u06c1\u06cc \u067e\u0679\u06be\u0648\u06ba \u06a9\u06cc \u06cc\u0627\u062f\u062f\u0627\u0634\u062a \u0628\u0646 \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-never-create-futures-inside-build\">\u0627\u067e\u0646\u06cc \u062a\u0639\u0645\u06cc\u0631 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0641\u06cc\u0648\u0686\u0631 \u0646\u06c1 \u0628\u0646\u0627\u0626\u06cc\u06ba\u06d4<\/h3>\n<p>\u06cc\u06c1 \u0627\u06cc\u06a9 \u0627\u06cc\u0633\u0627 \u0645\u0633\u0626\u0644\u06c1 \u06c1\u06d2 \u062c\u0633\u06d2 \u0646\u0638\u0631 \u0627\u0646\u062f\u0627\u0632 \u06a9\u0631\u0646\u0627 \u0622\u0633\u0627\u0646 \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u0622\u067e \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0627\u0646\u062f\u0631 \u0633\u06d2 \u0645\u0633\u062a\u0642\u0628\u0644 \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>build<\/code> \u06c1\u0631 \u0628\u0627\u0631 \u062c\u0628 \u0622\u067e \u062f\u0648\u0628\u0627\u0631\u06c1 \u062a\u0639\u0645\u06cc\u0631 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u06cc\u06c1 \u0637\u0631\u06cc\u0642\u06c1 \u0627\u06cc\u06a9 \u0646\u06cc\u0627 \u0645\u0633\u062a\u0642\u0628\u0644 \u062a\u062e\u0644\u06cc\u0642 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u062f\u0648\u0633\u0631\u06d2 \u0627\u0644\u0641\u0627\u0638 \u0645\u06cc\u06ba <code>FutureBuilder<\/code> \u06c1\u0631 \u0628\u0627\u0631 \u0627\u0633\u06d2 \u0627\u06cc\u06a9 \u0646\u0626\u06d2 \u06a9\u0627\u0645 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0633\u0645\u062c\u06be\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u063a\u06cc\u0631 \u0636\u0631\u0648\u0631\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0644\u0648\u0688 \u0634\u062f\u06c1 \u062d\u0627\u0644\u062a \u067e\u0631 \u062f\u0648\u0628\u0627\u0631\u06c1 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ Bad: a new Future is created on every rebuild.\n\/\/ FutureBuilder sees a different Future each time\n\/\/ and resets to loading state unnecessarily.\n@override\nWidget build(BuildContext context) {\n  return FutureBuilder(\n    future: repository.fetchUser(userId), \/\/ new Future every build\n    builder: (context, snapshot) { ... },\n  );\n}\n<\/code><\/pre>\n<pre><code class=\"language-dart\">\/\/ Good: create the Future once in initState.\n\/\/ FutureBuilder holds the same reference across rebuilds.\nlate final Future<user> _userFuture;\n\n@override\nvoid initState() {\n  super.initState();\n  _userFuture = repository.fetchUser(widget.userId);\n}\n\n@override\nWidget build(BuildContext context) {\n  return FutureBuilder(\n    future: _userFuture,\n    builder: (context, snapshot) { ... },\n  );\n}\n<\/user><\/code><\/pre>\n<h3 id=\"heading-move-heavy-work-off-the-ui-thread\">\u0628\u06be\u0627\u0631\u06cc \u06a9\u0627\u0645 \u06a9\u0648 UI \u062a\u06be\u0631\u06cc\u0688 \u0633\u06d2 \u06c1\u0679\u0627 \u062f\u06cc\u06ba\u06d4<\/h3>\n<p>\u0688\u0627\u0631\u0679 UI \u06a9\u0648 \u0688\u06cc\u0641\u0627\u0644\u0679 \u062a\u0646\u06c1\u0627\u0626\u06cc \u0645\u06cc\u06ba \u067e\u06cc\u0634 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0633\u06cc \u067e\u06cc \u06cc\u0648 \u06a9\u06cc \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u0686\u06cc\u0632 \u062c\u0648 \u0627\u0633 \u06a9\u0648 \u0631\u0648\u06a9\u062a\u06cc \u06c1\u06d2 \u0648\u06c1 \u0641\u0631\u06cc\u0645\u0648\u06ba \u06a9\u0648 \u06af\u0631\u0627\u0626\u06d2 \u06af\u06cc\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ Parsing a large API response synchronously on the main isolate\n\/\/ can block rendering for 50-200ms on slower devices.\nfinal users = (response.data as List)\n    .map((json) => User.fromJson(json))\n    .toList();\n<\/code><\/pre>\n<pre><code class=\"language-dart\">\/\/ compute() runs the function in a separate isolate.\n\/\/ The main isolate stays free to render frames.\n\/\/ Note: the function must be top-level or static \u2014\n\/\/ closures that capture local state cannot be sent to another isolate.\nfinal users = await compute(parseUsers, response.data);\n\nList<user> parseUsers(dynamic data) {\n  return (data as List)\n      .map((json) => User.fromJson(json as Map<string dynamic=\"\">))\n      .toList();\n}\n<\/string><\/user><\/code><\/pre>\n<p>\u0645\u06cc\u06ba \u067e\u06c1\u0646\u0686\u062a\u0627 \u06c1\u0648\u06ba <code>compute<\/code> \u062c\u0628 \u0628\u06be\u06cc \u0622\u067e JSON \u06a9\u06d2 \u0628\u0691\u06d2 \u062c\u0648\u0627\u0628\u0627\u062a \u06a9\u0648 \u067e\u0627\u0631\u0633 \u06a9\u0631 \u0631\u06c1\u06d2 \u06c1\u0648\u06ba\u060c \u0627\u0645\u06cc\u062c \u067e\u0631\u0648\u0633\u06cc\u0633\u0646\u06af \u06a9\u0631 \u0631\u06c1\u06d2 \u06c1\u0648\u06ba\u060c \u06cc\u0627 \u06a9\u0648\u0626\u06cc \u0627\u0648\u0631 \u0686\u06cc\u0632 \u062c\u0648 \u062a\u06cc\u0632 \u067e\u0631\u0648\u0641\u0627\u0626\u0644 \u067e\u0631 \u0633\u0633\u062a \u0645\u062d\u0633\u0648\u0633 \u06c1\u0648\u06d4 \u0645\u06cc\u0631\u06d2 \u0633\u0631 \u0645\u06cc\u06ba \u062d\u062f \u062a\u0642\u0631\u06cc\u0628\u0627\u064b 16ms \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u06a9\u0633\u06cc \u06a9\u0627\u0645 \u0645\u06cc\u06ba \u0627\u0633 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0648\u0642\u062a \u0644\u06af \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0627\u0633\u06d2 \u0631\u06cc\u0627\u0633\u062a\u06cc \u0642\u0631\u0646\u0637\u06cc\u0646\u06c1 \u0645\u06cc\u06ba \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4<\/p>\n<h2 id=\"heading-memory-leaks-and-lifecycle-management\">\u0645\u06cc\u0645\u0648\u0631\u06cc \u0644\u06cc\u06a9 \u0627\u0648\u0631 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0645\u06cc\u0646\u062c\u0645\u0646\u0679<\/h2>\n<p>\u0627\u0646 \u062a\u0645\u0627\u0645 \u0627\u06cc\u067e\u0633 \u0645\u06cc\u06ba \u0633\u06d2 \u062c\u0648 \u0645\u06cc\u06ba \u0646\u06d2 \u062c\u0627\u0631\u06cc \u06a9\u06cc \u06c1\u06cc\u06ba\u060c \u0627\u0633 \u0645\u06cc\u06ba \u0633\u0628 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0688\u06cc\u0628\u06af\u0646\u06af \u06a9\u0627 \u0648\u0642\u062a \u0644\u06af\u0627\u06d4 \u067e\u06be\u0691\u067e\u06be\u0691\u0627\u0646\u06d2 \u0645\u06cc\u06ba \u0645\u06cc\u0645\u0648\u0631\u06cc \u06a9\u0627 \u0644\u06cc\u06a9 \u06c1\u0648\u0646\u0627 \u0641\u0648\u0631\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0628\u0646\u062f \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06cc\u067e \u0628\u06be\u0627\u0631\u06cc \u06c1\u0648\u0646\u0627 \u0634\u0631\u0648\u0639 \u06c1\u0648 \u062c\u0627\u062a\u06cc \u06c1\u06d2\u060c OS \u0627\u0633\u06d2 \u067e\u0633 \u0645\u0646\u0638\u0631 \u0645\u06cc\u06ba \u0645\u0627\u0631\u0646\u0627 \u0634\u0631\u0648\u0639 \u06a9\u0631 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u06cc\u06c1 \u0622\u06c1\u0633\u062a\u06c1 \u0622\u06c1\u0633\u062a\u06c1 \u0641\u06cc \u0633\u06cc\u0634\u0646 \u0686\u0646\u062f \u0645\u06cc\u06af\u0627 \u0628\u0627\u0626\u0679\u0633 \u06a9\u06d2 \u062d\u0633\u0627\u0628 \u0633\u06d2 \u0628\u0646\u062a\u0627 \u06c1\u06d2 \u062c\u0628 \u062a\u06a9 \u06a9\u06c1 \u0635\u0627\u0631\u0641 &quot;\u0628\u06d2 \u062a\u0631\u062a\u06cc\u0628 \u06a9\u0631\u06cc\u0634\u0632&#8221; \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0628\u06af \u0631\u067e\u0648\u0631\u0679 \u062f\u0631\u062c \u0646\u06c1\u06cc\u06ba \u06a9\u0631 \u062f\u06cc\u062a\u06d2\u06d4<\/p>\n<p>\u0628\u0646\u06cc\u0627\u062f\u06cc \u0648\u062c\u06c1 \u062a\u0642\u0631\u06cc\u0628\u0627\u064b \u06c1\u0645\u06cc\u0634\u06c1 \u0627\u06cc\u06a9 \u06c1\u06cc \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4 \u0648\u06cc\u062c\u06cc\u0679 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0628\u0646\u0627\u0626\u06d2 \u06af\u0626\u06d2 \u0622\u0626\u0679\u0645\u0632 \u0648\u06cc\u062c\u06cc\u0679 \u06a9\u06d2 \u063a\u0627\u0626\u0628 \u06c1\u0648\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f \u0628\u06be\u06cc \u0686\u0644\u062a\u06d2 \u0631\u06c1\u06cc\u06ba \u06af\u06d2\u06d4<\/p>\n<h3 id=\"heading-controllers-that-are-never-disposed\">\u0627\u06cc\u06a9 \u06a9\u0646\u0679\u0631\u0648\u0644\u0631 \u062c\u0633\u06d2 \u06a9\u0628\u06be\u06cc \u0636\u0627\u0626\u0639 \u0646\u06c1\u06cc\u06ba \u06a9\u06cc\u0627 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4<\/h3>\n<p>\u0645\u06cc\u0645\u0648\u0631\u06cc \u0644\u06cc\u06a9 \u06a9\u06cc \u0633\u0628 \u0633\u06d2 \u0639\u0627\u0645 \u0648\u062c\u06c1 \u062c\u0648 \u0645\u06cc\u06ba \u0646\u06d2 \u062f\u06cc\u06a9\u06be\u06cc \u06c1\u06d2\u060c \u0628\u0634\u0645\u0648\u0644 \u0645\u06cc\u0631\u06d2 \u0627\u067e\u0646\u06d2 \u06a9\u0648\u0688 \u0645\u06cc\u06ba\u060c \u0648\u06c1 \u06a9\u0646\u0679\u0631\u0648\u0644\u0631\u0632 \u06c1\u06cc\u06ba \u062c\u0646 \u0633\u06d2: <code>initState<\/code> \u0627\u0648\u0631 \u06a9\u0628\u06be\u06cc \u0631\u06c1\u0627 \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u0627\u06d4 \u067e\u06be\u0691\u067e\u06be\u0691\u0627\u0646\u0627 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0627\u0646 \u06a9\u0648 \u0635\u0627\u0641 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">class _ProfileScreenState extends State<profilescreen> {\n  late final TextEditingController _nameController;\n  late final AnimationController _fadeController;\n  late final ScrollController _scrollController;\n\n  @override\n  void initState() {\n    super.initState();\n    _nameController = TextEditingController();\n    _fadeController = AnimationController(\n      vsync: this,\n      duration: const Duration(milliseconds: 300),\n    );\n    _scrollController = ScrollController();\n  }\n\n  @override\n  void dispose() {\n    \/\/ Every controller created in initState needs to be\n    \/\/ disposed here. This is not optional \u2014 it releases\n    \/\/ native resources and removes listeners that would\n    \/\/ otherwise keep this widget's memory alive indefinitely.\n    _nameController.dispose();\n    _fadeController.dispose();\n    _scrollController.dispose();\n    super.dispose(); \/\/ always last\n  }\n}\n<\/profilescreen><\/code><\/pre>\n<p>\u06a9\u0627 \u062a\u0635\u0631\u0641 \u0646\u06c1\u06cc\u06ba <code>AnimationController<\/code> \u06cc\u06c1 \u062e\u0627\u0635 \u0637\u0648\u0631 \u067e\u0631 \u0628\u0631\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0679\u06a9\u0631 \u06c1\u06d2 \u062c\u0648 \u06c1\u0631 \u0641\u0631\u06cc\u0645 \u06a9\u0648 \u0686\u0644\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0633 \u0644\u06cc\u06d2 \u06cc\u06c1 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u063a\u0627\u0626\u0628 \u06c1\u0648\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f \u0628\u06be\u06cc CPU \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u0631\u06c1\u062a\u0627 \u06c1\u06d2\u06d4 \u0645\u06cc\u06ba \u0646\u06d2 \u062f\u06cc\u06a9\u06be\u0627 \u06c1\u06d2 \u06a9\u06c1 \u0627\u0633 \u06a9\u06cc \u0648\u062c\u06c1 \u06cc\u0627\u062f\u062f\u0627\u0634\u062a \u06a9\u06d2 \u0645\u0633\u0627\u0626\u0644 \u06a9\u06d2 \u0639\u0644\u0627\u0648\u06c1 \u0646\u0645\u0627\u06cc\u0627\u06ba \u0628\u06cc\u0679\u0631\u06cc \u0688\u0631\u06cc\u0646 \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-stream-subscriptions\">\u0633\u0644\u0633\u0644\u06c1 \u06a9\u0648 \u0633\u0628\u0633\u06a9\u0631\u0627\u0626\u0628 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<pre><code class=\"language-dart\">class _ChatScreenState extends State<chatscreen> {\n  StreamSubscription<message>? _messageSubscription;\n\n  @override\n  void initState() {\n    super.initState();\n    _messageSubscription = messageStream.listen((message) {\n      \/\/ Without cancellation, this callback keeps firing\n      \/\/ even after the screen is removed from the tree.\n      \/\/ It will call setState on a disposed widget and\n      \/\/ hold message objects in memory that should be freed.\n      if (mounted) setState(() => messages.add(message));\n    });\n  }\n\n  @override\n  void dispose() {\n    _messageSubscription?.cancel();\n    super.dispose();\n  }\n}\n<\/message><\/chatscreen><\/code><\/pre>\n<h3 id=\"heading-timers\">\u0679\u0627\u0626\u0645\u0631<\/h3>\n<pre><code class=\"language-dart\">@override\nvoid dispose() {\n  \/\/ A timer that fires after dispose will try to run\n  \/\/ a callback on a widget that no longer exists.\n  _dismissTimer?.cancel();\n  super.dispose();\n}\n<\/code><\/pre>\n<p>\u0642\u0648\u0627\u0639\u062f \u062c\u0648 \u0645\u06cc\u06ba \u0628\u063a\u06cc\u0631 \u06a9\u0633\u06cc \u0627\u0633\u062a\u062b\u0646\u0627\u0621 \u06a9\u06d2 \u067e\u06cc\u0631\u0648\u06cc \u06a9\u0631\u062a\u0627 \u06c1\u0648\u06ba: \u06c1\u0631 \u0686\u06cc\u0632 \u062c\u0633 \u0645\u06cc\u06ba \u0628\u0646\u0627\u0626\u06cc \u06af\u0626\u06cc \u06c1\u06d2\u06d4 <code>initState<\/code> \u06a9\u06c1 <code>dispose<\/code>, <code>cancel<\/code>\u06cc\u0627 <code>close<\/code> \u0637\u0631\u06cc\u0642\u06c1 \u0627\u0633 \u06a9\u06cc \u06a9\u0627\u0644 \u06c1\u0648 \u062c\u0627\u062a\u0627 \u06c1\u06d2. <code>dispose<\/code>. \u06a9\u0648\u0626\u06cc \u0627\u0633\u062a\u062b\u0646\u0627 \u0646\u06c1\u06cc\u06ba\u060c \u0628\u0633 &quot;\u0645\u06cc\u06ba \u0627\u0633\u06d2 \u0628\u0639\u062f \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06a9\u0631\u0648\u06ba \u06af\u0627\u06d4&#8221;<\/p>\n<h2 id=\"heading-observability-and-crash-reporting\">\u0645\u0634\u0627\u06c1\u062f\u06c1 \u0627\u0648\u0631 \u062a\u0646\u0627\u0632\u0639\u0627\u062a \u06a9\u06cc \u0631\u067e\u0648\u0631\u0679\u0646\u06af<\/h2>\n<p>\u0627\u0633 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u06a9\u06c1 \u06c1\u0645 \u0627\u067e\u0646\u06cc \u067e\u06c1\u0644\u06cc \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u0627\u06cc\u067e \u0645\u06cc\u06ba \u06a9\u0631\u06cc\u0634 \u0631\u067e\u0648\u0631\u0679\u0646\u06af \u06a9\u0648 \u0636\u0645 \u06a9\u0631 \u062f\u06cc\u06ba\u060c \u0688\u06cc\u0628\u06af\u0646\u06af \u0627\u06cc\u06a9 \u062d\u0642\u06cc\u0642\u06cc \u062a\u06a9\u0644\u06cc\u0641 \u062a\u06be\u06cc\u06d4 \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u0631\u06cc\u0634 \u06a9\u06cc \u0627\u0637\u0644\u0627\u0639 \u062f\u06d2 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0645\u06cc\u06ba \u0627\u0646 \u0633\u06d2 \u067e\u0648\u0686\u06be\u0648\u06ba \u06af\u0627 \u06a9\u06c1 \u0648\u06c1 \u06a9\u06cc\u0627 \u06a9\u0631 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba\u06d4 &quot;\u06c1\u0645 \u0646\u06d2 \u0627\u0628\u06be\u06cc \u0627\u0633\u06d2 \u06a9\u06be\u0648\u0644\u0627 \u06c1\u06d2\u060c&#8221; \u0648\u06c1 \u06a9\u06c1\u06cc\u06ba \u06af\u06d2\u06d4 \u0645\u06cc\u06ba \u0627\u0633 \u06a9\u0648\u0688 \u06a9\u0648 \u062f\u06cc\u06a9\u06be\u0648\u06ba \u06af\u0627 \u06a9\u06c1 \u0627\u0633 \u06a9\u06cc \u0648\u062c\u06c1 \u06a9\u06cc\u0627 \u06c1\u0648 \u0633\u06a9\u062a\u06cc \u06c1\u06d2\u06d4 \u0622\u062f\u06be\u0627 \u0648\u0642\u062a \u0645\u062c\u06be\u06d2 \u0633\u0645\u062c\u06be \u0646\u06c1\u06cc\u06ba \u0622\u06cc\u0627\u06d4<\/p>\n<p>\u06a9\u0631\u06cc\u0634 \u0631\u067e\u0648\u0631\u0679\u0646\u06af \u06a9\u06d2 \u0633\u0627\u062a\u06be\u060c \u0686\u06cc\u0632\u06cc\u06ba \u0628\u0627\u0644\u06a9\u0644 \u0645\u062e\u062a\u0644\u0641 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-set-it-up-before-launch\">\u067e\u0631\u06cc \u0644\u0627\u0646\u0686 \u06a9\u06cc \u062a\u0631\u062a\u06cc\u0628\u0627\u062a<\/h3>\n<pre><code class=\"language-dart\">void main() async {\n  WidgetsFlutterBinding.ensureInitialized();\n  await Firebase.initializeApp();\n\n  \/\/ Catch Flutter framework errors \u2014 widget build errors,\n  \/\/ rendering errors, etc.\n  FlutterError.onError =\n      FirebaseCrashlytics.instance.recordFlutterFatalError;\n\n  \/\/ Catch errors in async code that Flutter does not catch \u2014\n  \/\/ errors in event handlers, timers, isolates.\n  PlatformDispatcher.instance.onError = (error, stack) {\n    FirebaseCrashlytics.instance.recordError(error, stack, fatal: true);\n    return true;\n  };\n\n  runApp(const MyApp());\n}\n<\/code><\/pre>\n<h3 id=\"heading-never-let-failures-be-silent\">\u0646\u0627\u06a9\u0627\u0645\u06cc \u06a9\u0648 \u06a9\u0628\u06be\u06cc \u062e\u0627\u0645\u0648\u0634 \u0646\u06c1 \u06c1\u0648\u0646\u06d2 \u062f\u06cc\u06ba\u06d4<\/h3>\n<pre><code class=\"language-dart\">\/\/ This is how I used to write it. If submitOrder throws,\n\/\/ nothing happens. The user has no idea. I have no idea.\nawait api.submitOrder(order);\n<\/code><\/pre>\n<pre><code class=\"language-dart\">\/\/ This is how I write it now.\ntry {\n  await api.submitOrder(order);\n  setState(() => orderStatus = OrderStatus.confirmed);\n} catch (e, stackTrace) {\n  \/\/ recordError sends the full exception and stack trace\n  \/\/ to Crashlytics, with device info and the user's\n  \/\/ recent session activity attached automatically.\n  FirebaseCrashlytics.instance.recordError(e, stackTrace);\n  setState(() => orderStatus = OrderStatus.failed);\n}\n<\/code><\/pre>\n<h3 id=\"heading-breadcrumbs\">\u062a\u062d\u0631\u06cc\u06a9 \u06a9\u0627 \u0631\u0627\u0633\u062a\u06c1<\/h3>\n<p>\u062e\u0627\u0645 \u06a9\u0631\u06cc\u0634 \u0644\u0627\u06af\u0632 \u0622\u067e \u06a9\u0648 \u0628\u062a\u0627\u0626\u06cc\u06ba \u06af\u06d2 \u06a9\u06c1 \u0645\u0633\u0626\u0644\u06c1 \u06a9\u06cc\u0627 \u06c1\u06d2\u06d4 \u0628\u0631\u06cc\u0688 \u06a9\u0631\u0645\u0628\u0633 \u0622\u067e \u06a9\u0648 \u0628\u062a\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u062c\u0628 \u0645\u0633\u0626\u0644\u06c1 \u067e\u06cc\u0634 \u0622\u06cc\u0627 \u062a\u0648 \u0635\u0627\u0631\u0641 \u06a9\u06cc\u0627 \u06a9\u0631 \u0631\u06c1\u0627 \u062a\u06be\u0627\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u06c1\u06cc \u0686\u06cc\u0632 \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">FirebaseCrashlytics.instance.log('User opened checkout');\nFirebaseCrashlytics.instance.log('Payment sheet presented');\nFirebaseCrashlytics.instance.log('User submitted payment');\n\/\/ crash here \u2014 now I know the exact sequence\n<\/code><\/pre>\n<h2 id=\"heading-testing-production-flutter-apps\">\u0627\u067e\u0646\u06cc \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u0641\u0644\u0679\u0631 \u0627\u06cc\u067e \u06a9\u06cc \u062c\u0627\u0646\u0686 \u06a9\u0631\u06cc\u06ba\u06d4<\/h2>\n<p>\u0633\u0686 \u067e\u0648\u0686\u06be\u06cc\u06ba \u062a\u0648\u060c \u0645\u06cc\u06ba \u0646\u06d2 \u0627\u067e\u0646\u06cc \u067e\u06c1\u0644\u06cc \u0627\u06cc\u067e \u06a9\u0648 \u06a9\u0645 \u062c\u0627\u0646\u0686\u0627\u06d4 \u0645\u06cc\u06ba \u062a\u06cc\u0632\u06cc \u0633\u06d2 \u0622\u06af\u06d2 \u0628\u0691\u06be \u0631\u06c1\u0627 \u062a\u06be\u0627\u060c \u062e\u0635\u0648\u0635\u06cc\u0627\u062a \u06a9\u0627\u0645 \u06a9\u0631 \u0631\u06c1\u06cc \u062a\u06be\u06cc\u06ba\u060c \u0627\u0648\u0631 \u062a\u062d\u0631\u06cc\u0631\u06cc \u0679\u06cc\u0633\u0679 \u0633\u0633\u062a \u0645\u062d\u0633\u0648\u0633 \u06c1\u0648 \u0631\u06c1\u06d2 \u062a\u06be\u06d2\u06d4 \u0627\u0633 \u06a9\u06d2 \u0628\u0639\u062f \u06c1\u0645 \u0646\u06d2 \u0642\u06cc\u0645\u062a\u0648\u06ba \u06a9\u06d2 \u062d\u0633\u0627\u0628 \u06a9\u062a\u0627\u0628 \u06a9\u0648 \u0631\u06cc \u0641\u06cc\u06a9\u0679\u0631 \u06a9\u06cc\u0627 \u0627\u0648\u0631 \u0627\u06cc\u06a9 \u0627\u06cc\u0633\u0627 \u0628\u06af \u0645\u062a\u0639\u0627\u0631\u0641 \u06a9\u0631\u0627\u06cc\u0627 \u062c\u0648 \u0641\u0648\u0631\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0648\u0627\u0636\u062d \u0646\u06c1\u06cc\u06ba \u062a\u06be\u0627 \u0627\u0648\u0631 \u0627\u0633\u06d2 \u062c\u0627\u0631\u06cc \u06a9\u0631 \u062f\u06cc\u0627\u06d4 \u0627\u06cc\u06a9 \u0627\u0648\u0631 \u0635\u0627\u0631\u0641 \u0646\u06d2 \u06cc\u06c1 \u0645\u062c\u06be \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u067e\u0627\u06cc\u0627\u06d4<\/p>\n<p>\u0627\u0628 \u06c1\u0645 \u0632\u06cc\u0627\u062f\u06c1 \u0627\u062d\u062a\u06cc\u0627\u0637 \u0633\u06d2 \u062c\u0627\u0646\u0686\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0633\u0628 \u06a9\u0686\u06be \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u060c \u06cc\u06c1 \u0627\u06c1\u0645 \u0686\u06cc\u0632 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-unit-test-business-logic\">\u06cc\u0648\u0646\u0679 \u0679\u06cc\u0633\u0679 \u0628\u0632\u0646\u0633 \u0645\u0646\u0637\u0642<\/h3>\n<pre><code class=\"language-dart\">test('discount applies percentage correctly', () {\n  final result = calculateDiscountedPrice(\n    price: 100.0,\n    discountPercent: 10,\n  );\n\n  \/\/ 10% off 100.00 should be 90.00\n  expect(result, equals(90.0));\n});\n\ntest('discount throws for negative percentage', () {\n  expect(\n    () => calculateDiscountedPrice(price: 100, discountPercent: -5),\n    throwsA(isA<argumenterror>()),\n  );\n});\n<\/argumenterror><\/code><\/pre>\n<p>\u06a9\u0627\u0631\u0648\u0628\u0627\u0631\u06cc \u0645\u0646\u0637\u0642 (\u0642\u06cc\u0645\u062a\u0648\u06ba \u06a9\u0627 \u062a\u0639\u06cc\u0646\u060c \u062a\u0648\u062b\u06cc\u0642\u060c \u0645\u0646\u0638\u0648\u0631\u06cc) \u0628\u0627\u0642\u0627\u0639\u062f\u06c1 \u0688\u0627\u0631\u0679 \u0641\u0646\u06a9\u0634\u0646\u0632 \u0645\u06cc\u06ba \u06c1\u0648\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2 \u062c\u0633 \u0645\u06cc\u06ba \u06a9\u0648\u0626\u06cc \u0641\u0644\u0679\u0631 \u0627\u0646\u062d\u0635\u0627\u0631 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u060c \u0627\u0633 \u0644\u06cc\u06d2 \u0627\u0646 \u06a9\u06cc \u062c\u0627\u0646\u0686 \u0645\u0644\u06cc \u0633\u06cc\u06a9\u0646\u0688 \u0645\u06cc\u06ba \u0627\u0648\u0631 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0688\u06be\u0627\u0646\u0686\u06d2 \u06a9\u06cc \u062c\u0627\u0646\u0686 \u06a9\u06cc\u06d2 \u0628\u063a\u06cc\u0631 \u06a9\u06cc \u062c\u0627 \u0633\u06a9\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-widget-test-ui-states\">\u0648\u06cc\u062c\u06cc\u0679 \u0679\u06cc\u0633\u0679 UI \u0627\u0633\u0679\u06cc\u0679\u0633<\/h3>\n<p>\u0641\u0644\u0679\u0631 \u06a9\u06cc \u0648\u06cc\u062c\u06cc\u0679 \u0679\u06cc\u0633\u0679\u0646\u06af \u0627\u0633 \u06a9\u06cc \u0628\u06c1\u062a\u0631\u06cc\u0646 \u062e\u0635\u0648\u0635\u06cc\u0627\u062a \u0645\u06cc\u06ba \u0633\u06d2 \u0627\u06cc\u06a9 \u06c1\u06d2\u06d4 \u0622\u067e \u0688\u06cc\u0648\u0627\u0626\u0633 \u06cc\u0627 \u0627\u06cc\u0645\u0648\u0644\u06cc\u0679\u0631 \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u0644\u0648\u0688 \u06a9\u06cc \u062d\u06cc\u062b\u06cc\u062a\u060c \u062e\u0631\u0627\u0628\u06cc \u06a9\u06cc \u0635\u0648\u0631\u062a\u062d\u0627\u0644\u060c \u0627\u0648\u0631 \u0635\u0627\u0631\u0641 \u06a9\u06d2 \u062a\u0639\u0627\u0645\u0644 \u06a9\u06cc \u062c\u0627\u0646\u0686 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">testWidgets('shows error state with retry button on load failure',\n    (tester) async {\n  final mockRepo = MockUserRepository();\n  when(mockRepo.getUser(any)).thenThrow(Exception('Network error'));\n\n  await tester.pumpWidget(\n    ProviderScope(\n      overrides: [\n        userRepositoryProvider.overrideWithValue(mockRepo),\n      ],\n      child: const MaterialApp(home: ProfileScreen(userId: 'test')),\n    ),\n  );\n\n  \/\/ pumpAndSettle waits for all animations and async\n  \/\/ operations to complete before asserting.\n  await tester.pumpAndSettle();\n\n  expect(find.text('Failed to load profile. Please try again.'), findsOneWidget);\n  expect(find.text('Try again'), findsOneWidget);\n});\n<\/code><\/pre>\n<p>\u062c\u0627\u0646\u0686 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u0631\u062c\u06cc\u062d\u0627\u062a \u0628\u0646\u06cc\u0627\u062f\u06cc \u06a9\u0627\u0631\u0648\u0628\u0627\u0631\u06cc \u0645\u0646\u0637\u0642\u060c \u063a\u0644\u0637\u06cc\u0627\u06ba \u0627\u0648\u0631 \u0644\u0648\u0688\u0646\u06af \u06a9\u06cc \u062d\u0627\u0644\u062a\u06cc\u06ba\u060c \u0631\u0642\u0645 \u06cc\u0627 \u0688\u06cc\u0679\u0627 \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u06a9\u0648\u0626\u06cc \u0628\u06c1\u0627\u0624 \u062c\u0648 \u0635\u0627\u0631\u0641 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0628\u0627\u0632\u06cc\u0627\u0641\u062a \u0646\u06c1\u06cc\u06ba \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627\u060c \u0627\u0648\u0631 \u0627\u06cc\u067e \u0627\u0648\u0631 \u0628\u06cc\u06a9 \u0627\u06cc\u0646\u0688 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0627\u0646\u0636\u0645\u0627\u0645 \u067e\u0648\u0627\u0626\u0646\u0679\u0633 \u06c1\u06cc\u06ba\u06d4 \u062c\u0627\u0645\u062f UI \u0648\u06cc\u062c\u0679\u0633 \u062c\u0646 \u0645\u06cc\u06ba \u06a9\u0648\u0626\u06cc \u0645\u0646\u0637\u0642 \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u062a\u06cc \u0639\u0627\u0645 \u0637\u0648\u0631 \u067e\u0631 \u0628\u06d2 \u0646\u0642\u0627\u0628 \u0631\u06c1 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-architecture-and-long-term-maintainability\">\u0641\u0646 \u062a\u0639\u0645\u06cc\u0631 \u0627\u0648\u0631 \u0637\u0648\u06cc\u0644 \u0645\u062f\u062a\u06cc \u062f\u06cc\u06a9\u06be \u0628\u06be\u0627\u0644<\/h2>\n<p>\u0645\u06cc\u06ba \u0646\u06d2 \u062c\u0648 \u067e\u06c1\u0644\u06cc \u0627\u06cc\u067e \u062c\u0627\u0631\u06cc \u06a9\u06cc \u062a\u06be\u06cc \u0627\u0633 \u06a9\u0627 \u06a9\u0648\u0626\u06cc \u062d\u0642\u06cc\u0642\u06cc \u0641\u0646 \u062a\u0639\u0645\u06cc\u0631 \u0646\u06c1\u06cc\u06ba \u062a\u06be\u0627\u06d4 \u06cc\u06c1 \u0633\u0628 \u0648\u06cc\u062c\u0679 \u0645\u06cc\u06ba \u062a\u06be\u0627\u06d4 \u06a9\u0627\u0631\u0648\u0628\u0627\u0631\u06cc \u0645\u0646\u0637\u0642 UI \u06a9\u0648\u0688 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0628\u06cc\u0679\u06be\u06cc \u062a\u06be\u06cc\u06d4 \u0631\u06cc\u0627\u0633\u062a \u0628\u06a9\u06be\u0631 \u06af\u0626\u06cc\u06d4<\/p>\n<p>\u0627\u0633 \u0646\u06d2 6 \u0645\u0627\u06c1 \u062a\u06a9 \u0679\u06be\u06cc\u06a9 \u06a9\u0627\u0645 \u06a9\u06cc\u0627\u06d4 \u067e\u06be\u0631 \u06c1\u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0645\u0648\u062c\u0648\u062f\u06c1 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u0645\u06cc\u06ba \u0679\u0686 \u0641\u0646\u06a9\u0634\u0646\u0644\u0679\u06cc \u06a9\u0648 \u0634\u0627\u0645\u0644 \u06a9\u0631\u0646\u0627 \u067e\u0691\u0627\u060c \u0627\u0648\u0631 \u062c\u0648 \u0627\u06cc\u06a9 \u062f\u0646 \u0644\u06af\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2 \u062a\u06be\u0627 \u0627\u0633 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u06c1\u0641\u062a\u06c1 \u0644\u06af\u0627 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u06c1\u0645 \u06a9\u0633\u06cc \u0627\u0648\u0631 \u0686\u06cc\u0632 \u06a9\u0648 \u062a\u0648\u0691\u06d2 \u0628\u063a\u06cc\u0631 \u06a9\u0686\u06be \u062a\u0628\u062f\u06cc\u0644 \u0646\u06c1\u06cc\u06ba \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u062a\u06be\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1 \u062f\u0648\u0633\u0631\u06cc \u0627\u06cc\u067e \u06c1\u06d2 \u062c\u0633 \u067e\u0631 \u0645\u06cc\u06ba \u0646\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u063a\u0648\u0631 \u0633\u06d2 \u063a\u0648\u0631 \u06a9\u06cc\u0627\u06d4 \u06cc\u06c1 \u062e\u0635\u0648\u0635\u06cc\u062a \u0627\u0633 \u06a9\u06d2 \u0627\u067e\u0646\u06d2 \u0641\u0648\u0644\u0688\u0631 \u0645\u06cc\u06ba \u06c1\u06d2\u06d4 \u0648\u062c\u06cc\u0679\u0633 \u0633\u06d2 \u0627\u0644\u06af \u0627\u0633\u0679\u0648\u0631\u06cc\u062c\u06d4 \u0631\u06cc\u0627\u0633\u062a \u06a9\u0627 \u0627\u0646\u062a\u0638\u0627\u0645 UI \u067e\u0631\u062a \u0633\u06d2 \u0628\u0627\u06c1\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u062c\u06cc\u0633\u0627 \u06a9\u06c1 \u062a\u0642\u0627\u0636\u06d2 \u0628\u062f\u0644 \u06af\u0626\u06d2 (\u0648\u06c1 \u06c1\u0645\u06cc\u0634\u06c1 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba)\u060c \u062a\u0628\u062f\u06cc\u0644\u06cc\u0627\u06ba \u0634\u0627\u0645\u0644 \u06a9\u06cc \u06af\u0626\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-separate-concerns-at-the-layer-boundary\">\u067e\u0631\u062a \u06a9\u06cc \u062d\u062f\u0648\u062f \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0627\u0644\u06af \u0627\u0644\u06af \u062e\u062f\u0634\u0627\u062a<\/h3>\n<pre><code class=\"language-plaintext\">lib\/\n  features\/\n    profile\/\n      data\/\n        profile_repository.dart     # network + cache logic\n      domain\/\n        user.dart                   # clean domain model\n      presentation\/\n        profile_screen.dart         # widget\n        profile_notifier.dart       # state\n<\/code><\/pre>\n<p>\u0648\u062c\u06cc\u0679\u0633 \u06a9\u0648 \u0646\u06cc\u0679 \u0648\u0631\u06a9 \u06a9\u0627\u0644 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u0646\u06cc \u0686\u0627\u06c1\u06cc\u06d2\u06d4 \u0631\u06cc\u067e\u0648\u0632\u0679\u0631\u06cc \u06a9\u0648 \u0641\u0644\u0679\u0631 \u062f\u0631\u0622\u0645\u062f \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u0626\u06d2\u06d4 \u0622\u067e \u0645\u06cc\u06ba \u0633\u06d2 \u06a9\u0633\u06cc \u06a9\u0648 \u0628\u06be\u06cc \u062f\u0648\u0633\u0631\u06d2 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u06a9\u0686\u06be \u0646\u06c1\u06cc\u06ba \u062c\u0627\u0646\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4<\/p>\n<p>\u0627\u06af\u0631 \u0622\u067e \u06a9\u0648 \u0688\u06cc\u0679\u0627 \u0645\u0627\u062e\u0630 \u06a9\u0648 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u060c \u0627\u06cc\u06a9 \u0645\u064f\u06a9 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u06cc\u06a9 \u0627\u0637\u0644\u0627\u0639 \u062f\u06c1\u0646\u062f\u06c1 \u06a9\u06cc \u062c\u0627\u0646\u0686 \u06a9\u0631\u0646\u0627 \u06c1\u06d2\u060c \u06cc\u0627 \u06a9\u0627\u0631\u0648\u0628\u0627\u0631\u06cc \u0645\u0646\u0637\u0642 \u06a9\u0648 \u0686\u06be\u0648\u0626\u06d2 \u0628\u063a\u06cc\u0631 UI \u06a9\u0648 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u060c \u062a\u0648 \u06cc\u06c1 \u0639\u0644\u06cc\u062d\u062f\u06af\u06cc \u0627\u0633\u06d2 \u0645\u0645\u06a9\u0646 \u0628\u0646\u0627\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-technical-debt-accumulates-faster-than-you-expect\">\u062a\u06a9\u0646\u06cc\u06a9\u06cc \u0642\u0631\u0636 \u062a\u0648\u0642\u0639 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u062a\u06cc\u0632\u06cc \u0633\u06d2 \u062c\u0645\u0639 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/h3>\n<p>\u0634\u0627\u0631\u0679 \u06a9\u0679 \u062c\u0648 \u0622\u062c 30 \u0645\u0646\u0679 \u0628\u0686\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0628 \u0633\u06d2 \u0645\u06c1\u06cc\u0646\u06d2 \u0645\u06cc\u06ba \u06a9\u0626\u06cc \u06af\u06be\u0646\u0679\u06d2 \u0644\u06af\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0641\u0644\u0679\u0631 \u0645\u06cc\u06ba \u0633\u0628 \u0633\u06d2 \u062a\u06cc\u0632 \u06a9\u0645\u067e\u0648\u0632\u0646\u06af \u0634\u0627\u0631\u0679 \u06a9\u0679\u0633:<\/p>\n<ul>\n<li>\n<p>\u0648\u06cc\u062c\u06cc\u0679 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u06a9\u0627\u0631\u0648\u0628\u0627\u0631\u06cc \u0645\u0646\u0637\u0642 (\u0622\u0632\u0645\u0627\u0626\u0634\u06cc \u0646\u06c1\u06cc\u06ba\u060c \u062f\u0648\u0628\u0627\u0631\u06c1 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0646\u06c1\u06cc\u06ba)<\/p>\n<\/li>\n<li>\n<p><code>dynamic<\/code>    \u0679\u0627\u0626\u067e \u0634\u062f\u06c1 \u0645\u0627\u0688\u0644 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 (\u0645\u0631\u062a\u0628 \u0648\u0642\u062a \u06a9\u06cc \u063a\u0644\u0637\u06cc \u06a9\u06cc \u0628\u062c\u0627\u0626\u06d2 \u0631\u0646 \u0679\u0627\u0626\u0645 \u063a\u0644\u0637\u06cc)<\/p>\n<\/li>\n<li>\n<p>\u062a\u0648\u062b\u06cc\u0642 \u06a9\u06cc \u0645\u0646\u0637\u0642 \u06a9\u0648 \u06a9\u0627\u067e\u06cc \u0627\u0648\u0631 \u067e\u06cc\u0633\u0679 \u06a9\u0631\u06cc\u06ba (\u0627\u0633\u06d2 \u0627\u06cc\u06a9 \u062c\u06af\u06c1 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633\u06d2 \u06a9\u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0628\u06be\u0648\u0644 \u062c\u0627\u0626\u06cc\u06ba)<\/p>\n<\/li>\n<li>\n<p>\u0648\u0627\u0636\u062d \u0645\u0644\u06a9\u06cc\u062a \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u062a\u063a\u06cc\u0631 \u067e\u0630\u06cc\u0631 \u0639\u0627\u0644\u0645\u06cc \u0631\u06cc\u0627\u0633\u062a<\/p>\n<\/li>\n<\/ul>\n<p>\u0627\u0646 \u0645\u06cc\u06ba \u0633\u06d2 \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u0631\u0648\u0632 \u0627\u0648\u0644 \u06a9\u06cc \u0622\u0641\u0627\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0648\u06c1 \u0633\u0628 \u0627\u06af\u0644\u06cc \u062a\u0628\u062f\u06cc\u0644\u06cc \u06a9\u0648 \u0627\u0633 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0645\u0634\u06a9\u0644 \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0627\u0633 \u06a9\u06d2 \u0628\u0639\u062f \u06a9\u06cc \u062a\u0628\u062f\u06cc\u0644\u06cc\u0627\u06ba \u0627\u0633 \u0633\u06d2 \u0628\u06be\u06cc \u0632\u06cc\u0627\u062f\u06c1 \u0645\u0634\u06a9\u0644\u06d4<\/p>\n<h2 id=\"heading-end-to-end-example-a-production-grade-profile-feature\">\u0627\u06cc\u0646\u0688 \u0679\u0648 \u0627\u06cc\u0646\u0688 \u0645\u062b\u0627\u0644: \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u06af\u0631\u06cc\u0688 \u067e\u0631\u0648\u0641\u0627\u0626\u0644 \u06a9\u06cc \u0641\u0639\u0627\u0644\u06cc\u062a<\/h2>\n<p>\u0627\u0633 \u0645\u0636\u0645\u0648\u0646 \u0645\u06cc\u06ba \u06c1\u0631 \u0686\u06cc\u0632 \u06a9\u0648 \u0627\u06cc\u06a9 \u062e\u0635\u0648\u0635\u06cc\u062a \u0645\u06cc\u06ba \u0645\u0644\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4 \u06a9\u06cc\u0634\u0646\u06af \u0627\u0648\u0631 \u062f\u0648\u0628\u0627\u0631\u06c1 \u06a9\u0648\u0634\u0634\u0648\u06ba \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0631\u06cc\u067e\u0648\u0632\u0679\u0631\u06cc\u0632\u060c \u067e\u0631\u0627\u0645\u06cc\u062f \u0627\u067e \u0688\u06cc\u0679\u0633 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0631\u06cc\u0648\u0631 \u067e\u0648\u0688 \u0627\u0637\u0644\u0627\u0639\u0627\u062a\u060c \u062a\u06cc\u0646\u0648\u06ba \u0631\u06cc\u0627\u0633\u062a\u0648\u06ba \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0648\u06cc\u062c\u0679\u060c \u0627\u0648\u0631 \u0645\u062c\u0645\u0648\u0639\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u06a9\u0627 \u0645\u0646\u0627\u0633\u0628 \u0627\u0646\u062a\u0638\u0627\u0645\u06d4<\/p>\n<h3 id=\"heading-the-repository\">\u0630\u062e\u06cc\u0631\u06c1<\/h3>\n<pre><code class=\"language-dart\">class ProfileRepository {\n  final Dio _dio;\n  final Box _cache;\n\n  ProfileRepository(this._dio, this._cache);\n\n  Future<user> getUser(String userId) async {\n    try {\n      final response = await withRetry(\n        () => _dio.get('\/users\/$userId'),\n      );\n\n      final user = User.fromJson(\n        response.data as Map<string dynamic=\"\">,\n      );\n\n      \/\/ Cache successful responses for offline fallback.\n      await _cache.put('user_$userId', user.toJson());\n\n      return user;\n    } on DioException catch (e) {\n      final cached = _cache.get('user_$userId');\n\n      if (cached != null) {\n        return User.fromJson(Map<string dynamic=\"\">.from(cached));\n      }\n\n      if (e.type == DioExceptionType.connectionError) {\n        throw NoInternetException();\n      }\n\n      throw ServerException(e.response?.statusCode ?? 0);\n    }\n  }\n\n  Future<void> updateDisplayName(String userId, String name) async {\n    await withRetry(\n      () => _dio.patch('\/users\/$userId', data: {'displayName': name}),\n    );\n\n    \/\/ Invalidate cache so the next read fetches fresh data.\n    await _cache.delete('user_$userId');\n  }\n}\n<\/void><\/string><\/string><\/user><\/code><\/pre>\n<h3 id=\"heading-the-notifier\">\u06cc\u0627\u062f \u062f\u06c1\u0627\u0646\u06cc<\/h3>\n<pre><code class=\"language-dart\">@riverpod\nclass ProfileNotifier extends _$ProfileNotifier {\n  @override\n  AsyncValue<user> build(String userId) {\n    _load();\n    return const AsyncValue.loading();\n  }\n\n  Future<void> _load() async {\n    state = const AsyncValue.loading();\n    state = await AsyncValue.guard(\n      () => ref.read(profileRepositoryProvider).getUser(userId),\n    );\n  }\n\n  Future<void> refresh() => _load();\n\n  Future<void> updateName(String newName) async {\n    final current = state.valueOrNull;\n    if (current == null) return;\n\n    try {\n      await ref\n          .read(profileRepositoryProvider)\n          .updateDisplayName(userId, newName);\n\n      \/\/ Update the UI immediately without waiting for a reload.\n      state = AsyncValue.data(current.copyWith(displayName: newName));\n    } catch (e, st) {\n      FirebaseCrashlytics.instance.recordError(e, st);\n      \/\/ Restore the previous state if the update fails.\n      state = AsyncValue.data(current);\n      rethrow;\n    }\n  }\n}\n<\/void><\/void><\/void><\/user><\/code><\/pre>\n<h3 id=\"heading-the-widget\">\u0648\u06cc\u062c\u06cc\u0679<\/h3>\n<pre><code class=\"language-dart\">class ProfileScreen extends ConsumerWidget {\n  final String userId;\n  const ProfileScreen({required this.userId, super.key});\n\n  @override\n  Widget build(BuildContext context, WidgetRef ref) {\n    final profileAsync = ref.watch(profileNotifierProvider(userId));\n\n    return Scaffold(\n      appBar: AppBar(title: const Text('Profile')),\n      body: profileAsync.when(\n        loading: () => const Center(child: CircularProgressIndicator()),\n        error: (e, _) => _ErrorView(\n          message: e is NoInternetException\n              ? 'No internet connection.'\n              : 'Failed to load profile.',\n          onRetry: () => ref\n              .read(profileNotifierProvider(userId).notifier)\n              .refresh(),\n        ),\n        data: (user) => _ProfileView(user: user, userId: userId),\n      ),\n    );\n  }\n}\n\nclass _ProfileView extends ConsumerStatefulWidget {\n  final User user;\n  final String userId;\n  const _ProfileView({required this.user, required this.userId});\n\n  @override\n  ConsumerState<_ProfileView> createState() => _ProfileViewState();\n}\n\nclass _ProfileViewState extends ConsumerState<_ProfileView> {\n  late final TextEditingController _nameController;\n\n  @override\n  void initState() {\n    super.initState();\n    _nameController = TextEditingController(text: widget.user.displayName);\n  }\n\n  @override\n  void dispose() {\n    _nameController.dispose();\n    super.dispose();\n  }\n\n  Future<void> _saveName() async {\n    try {\n      await ref\n          .read(profileNotifierProvider(widget.userId).notifier)\n          .updateName(_nameController.text);\n\n      if (!mounted) return;\n\n      ScaffoldMessenger.of(context).showSnackBar(\n        const SnackBar(content: Text('Name updated.')),\n      );\n    } catch (_) {\n      if (!mounted) return;\n\n      ScaffoldMessenger.of(context).showSnackBar(\n        const SnackBar(content: Text('Failed to update name.')),\n      );\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return ListView(\n      padding: const EdgeInsets.all(16),\n      children: [\n        TextField(\n          controller: _nameController,\n          decoration: const InputDecoration(labelText: 'Display name'),\n        ),\n        const SizedBox(height: 16),\n        ElevatedButton(\n          onPressed: _saveName,\n          child: const Text('Save'),\n        ),\n      ],\n    );\n  }\n}\n<\/void><\/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 \u062e\u0627\u0635 \u0637\u0648\u0631 \u067e\u0631 \u062a\u0631\u0642\u06cc \u06cc\u0627\u0641\u062a\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0632\u06cc\u0627\u062f\u06c1 \u062a\u0631 \u0639\u0627\u062f\u062a \u06c1\u06d2\u06d4 <code>checking mounted<\/code>, <code>disposing controllers<\/code>, <code>handling the error state<\/code>, <code>caching for offline<\/code>. \u06c1\u0631 \u0639\u0627\u062f\u062a \u0622\u067e \u06a9\u0648 \u067e\u06cc\u062f\u0627\u0648\u0627\u0631 \u06a9\u06cc \u0646\u0627\u06a9\u0627\u0645\u06cc \u06a9\u06d2 \u0627\u06cc\u06a9 \u0645\u062e\u0635\u0648\u0635 \u0632\u0645\u0631\u06d2 \u0633\u06d2 \u0628\u0686\u0646\u06d2 \u0645\u06cc\u06ba \u0645\u062f\u062f \u062f\u06cc\u062a\u06cc \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u06cc\u06a9 \u0627\u06cc\u0633\u06cc \u0627\u06cc\u067e \u0628\u0646\u0627\u062a\u06cc \u06c1\u06d2 \u062c\u0633 \u067e\u0631 \u0635\u0627\u0631\u0641\u06cc\u0646 \u0628\u06be\u0631\u0648\u0633\u06c1 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u06a9\u0627\u0634 \u0645\u06cc\u06ba \u0646\u06d2 \u0627\u067e\u0646\u06cc \u067e\u06c1\u0644\u06cc \u0627\u06cc\u067e \u0627\u0633 \u0637\u0631\u062d \u0644\u06a9\u06be\u06cc \u06c1\u0648\u062a\u06cc\u06d4 \u0645\u06cc\u06ba \u0646\u06c1\u06cc\u06ba \u062c\u0627\u0646\u062a\u0627 \u062a\u06be\u0627\u06d4 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0645\u06cc\u06ba \u0648\u06c1 \u0646\u06c1\u06cc\u06ba \u062c\u0627\u0646\u062a\u0627 \u062a\u06be\u0627 \u062c\u0648 \u0645\u06cc\u06ba \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u0646\u06c1\u06cc\u06ba \u062c\u0627\u0646\u062a\u0627 \u062a\u06be\u0627\u06d4 \u06cc\u06c1 \u0639\u0627\u0645 \u0628\u0627\u062a \u06c1\u06d2\u06d4<\/p>\n<p>\u0644\u06cc\u06a9\u0646 \u0627\u06af\u0631 \u0622\u067e \u0627\u067e\u0646\u06cc \u067e\u06c1\u0644\u06cc \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u0627\u06cc\u067e \u06a9\u0648 \u0631\u06cc\u0644\u06cc\u0632 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0627\u0633\u06d2 \u067e\u0691\u06be \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0627\u0628 \u0622\u067e \u06a9\u0648 \u0645\u062a\u0639\u062f\u062f \u0631\u06cc\u0644\u06cc\u0632 \u06a9\u0631\u062f\u06c1 \u0627\u06cc\u067e\u0633 \u0627\u0648\u0631 \u0628\u06c1\u062a \u0633\u06d2 \u0645\u0627\u06cc\u0648\u0633 \u06a9\u0646 \u0635\u0627\u0631\u0641 \u06a9\u06d2 \u062a\u0627\u062b\u0631\u0627\u062a \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0641\u0627\u0626\u062f\u06c1 \u062d\u0627\u0635\u0644 \u06c1\u0648\u06af\u0627\u06d4<\/p>\n<p>\u0627\u0646 \u067e\u06cc\u0679\u0631\u0646\u0632 \u06a9\u0648 \u0634\u0627\u0645\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0628\u06c1\u062a\u0631\u06cc\u0646 \u0648\u0642\u062a \u0648\u06c1 \u06c1\u06d2 \u062c\u0628 \u0641\u06cc\u0686\u0631 \u0644\u0627\u0646\u0686 \u06a9\u06cc\u0627 \u062c\u0627\u0626\u06d2\u06d4 \u062f\u0648\u0633\u0631\u0627 \u0628\u06c1\u062a\u0631\u06cc\u0646 \u0648\u0642\u062a \u0627\u0628 \u06c1\u06d2\u06d4<\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u0645\u06cc\u06ba \u06a9\u0626\u06cc \u0633\u0627\u0644\u0648\u06ba \u0633\u06d2 \u0641\u0644\u0679\u0631 \u0627\u06cc\u067e\u0633 \u0628\u0646\u0627 \u0631\u06c1\u0627 \u06c1\u0648\u06ba\u060c \u0627\u0648\u0631 \u0645\u062c\u06be\u06d2 \u0627\u0628 \u0628\u06be\u06cc \u06cc\u0627\u062f \u06c1\u06d2 \u06a9\u06c1 \u0645\u06cc\u06ba \u0646\u06d2 \u067e\u06c1\u0644\u06cc \u0628\u0627\u0631 \u06a9\u0648\u0626\u06cc \u067e\u0631\u0648\u0688\u06a9\u0679 \u0631\u06cc\u0644\u06cc\u0632 \u06a9\u06cc\u0627 \u062a\u06be\u0627 \u062c\u0633 \u067e\u0631 \u0645\u062c\u06be\u06d2 \u0648\u0627\u0642\u0639\u06cc \u0641\u062e\u0631 \u062a\u06be\u0627\u06d4 \u06a9\u0644\u06cc\u0646 UI\u060c \u06c1\u0645\u0648\u0627\u0631 \u0627\u06cc\u0646\u06cc\u0645\u06cc\u0634\u0646\u0632\u060c \u0627\u0648\u0631 \u0633\u0628 \u06a9\u0686\u06be \u0628\u0627\u0644\u06a9\u0644 \u0627\u0633\u06cc \u0637\u0631\u062d \u0628\u06c1\u06c1 \u06af\u06cc\u0627 \u062c\u06cc\u0633\u0627 \u0645\u06cc\u06ba \u0646\u06d2 \u0627\u0631\u0627\u062f\u06c1 \u06a9\u06cc\u0627 \u062a\u06be\u0627\u06d4 \u0645\u06cc\u06ba \u0646\u06d2 \u0627\u0633\u06d2 \u062d\u0642\u06cc\u0642\u06cc \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u06d2 [&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-24879","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/posts\/24879","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/comments?post=24879"}],"version-history":[{"count":0,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/posts\/24879\/revisions"}],"wp:attachment":[{"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/media?parent=24879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/categories?post=24879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/umang.pk\/ur\/wp-json\/wp\/v2\/tags?post=24879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}