{"id":22464,"date":"2026-04-14T11:54:52","date_gmt":"2026-04-14T11:54:52","guid":{"rendered":"https:\/\/umang.pk\/2026\/04\/14\/%d9%81%d9%84%d9%b9%d8%b1-%d9%85%db%8c%da%ba-%d9%85%da%a9%d8%b3%d9%86%d8%b3-%da%a9%d8%a7-%d8%a7%d8%b3%d8%aa%d8%b9%d9%85%d8%a7%d9%84-%da%a9%db%8c%d8%b3%db%92-%da%a9%d8%b1%db%8c%da%ba%db%94-full-handboo\/"},"modified":"2026-04-14T11:54:54","modified_gmt":"2026-04-14T11:54:54","slug":"%d9%81%d9%84%d9%b9%d8%b1-%d9%85%db%8c%da%ba-%d9%85%da%a9%d8%b3%d9%86%d8%b3-%da%a9%d8%a7-%d8%a7%d8%b3%d8%aa%d8%b9%d9%85%d8%a7%d9%84-%da%a9%db%8c%d8%b3%db%92-%da%a9%d8%b1%db%8c%da%ba%db%94-full-handboo","status":"publish","type":"post","link":"https:\/\/umang.pk\/en_us\/2026\/04\/14\/%d9%81%d9%84%d9%b9%d8%b1-%d9%85%db%8c%da%ba-%d9%85%da%a9%d8%b3%d9%86%d8%b3-%da%a9%d8%a7-%d8%a7%d8%b3%d8%aa%d8%b9%d9%85%d8%a7%d9%84-%da%a9%db%8c%d8%b3%db%92-%da%a9%d8%b1%db%8c%da%ba%db%94-full-handboo\/","title":{"rendered":"\u0641\u0644\u0679\u0631 \u0645\u06cc\u06ba \u0645\u06a9\u0633\u0646\u0633 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u0633\u06d2 \u06a9\u0631\u06cc\u06ba\u06d4 [Full Handbook]"},"content":{"rendered":"\n<div id=\"\">\n<p>\u06c1\u0631 \u0641\u0644\u0679\u0631 \u0688\u0648\u06cc\u0644\u067e\u0631 \u06a9\u06d2 \u0633\u0641\u0631 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0646\u0642\u0637\u06c1 \u0627\u06cc\u0633\u0627 \u0622\u062a\u0627 \u06c1\u06d2 \u062c\u0628 \u0648\u0631\u0627\u062b\u062a \u06a9\u0627 \u0645\u0627\u0688\u0644 \u0679\u0648\u0679\u0646\u0627 \u0634\u0631\u0648\u0639 \u06c1\u0648 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u062a\u0645 \u06c1\u0648 <code>StatefulWidget<\/code> \u0627\u0646 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0648 \u0645\u062a\u062d\u0631\u06a9 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0686\u0644\u0627\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u0627\u0633 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0627\u067e\u0646\u06cc \u0627\u06cc\u0646\u06cc\u0645\u06cc\u0634\u0646 \u0645\u0646\u0637\u0642 \u06a9\u0648 \u0627\u062d\u062a\u06cc\u0627\u0637 \u0633\u06d2 \u0644\u06a9\u06be\u06cc\u06ba: <code>SingleTickerProviderStateMixin<\/code>.<\/p>\n<p>\u0686\u0646\u062f \u06c1\u0641\u062a\u0648\u06ba \u0645\u06cc\u06ba \u06c1\u0645 \u0627\u06cc\u06a9 \u0628\u0627\u0644\u06a9\u0644 \u0645\u062e\u062a\u0644\u0641 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u0628\u0646\u0627\u0626\u06cc\u06ba \u06af\u06d2 \u062c\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u0646\u06cc\u0645\u06cc\u0634\u0646 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4 \u0645\u06cc\u06ba \u067e\u06c1\u0644\u06d2 \u0648\u06cc\u062c\u06cc\u0679 \u06a9\u0648 \u0628\u0691\u06be\u0627\u0646\u06d2 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0633\u0648\u0686 \u0631\u06c1\u0627 \u06c1\u0648\u06ba\u060c \u0644\u06cc\u06a9\u0646 \u0627\u0633 \u06a9\u0627 \u06a9\u0648\u0626\u06cc \u0645\u0637\u0644\u0628 \u0646\u06c1\u06cc\u06ba \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u062f\u0648\u0646\u0648\u06ba \u0627\u0633\u06a9\u0631\u06cc\u0646\u06cc\u06ba \u0628\u0627\u0644\u06a9\u0644 \u0645\u062e\u062a\u0644\u0641 \u06c1\u06cc\u06ba\u06d4 \u062a\u0648 \u0648\u06c1\u06cc \u06a9\u0631\u06cc\u06ba \u062c\u0648 \u0642\u062f\u0631\u062a\u06cc \u0645\u062d\u0633\u0648\u0633 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u0628\u0633 \u06a9\u0648\u0688 \u06a9\u0627\u067e\u06cc \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p>\u067e\u06be\u0631 \u0627\u06cc\u06a9 \u062a\u06cc\u0633\u0631\u06cc \u0633\u06a9\u0631\u06cc\u0646 \u0638\u0627\u06c1\u0631 \u06c1\u0648\u06af\u06cc\u06d4 \u0628\u0633 \u0627\u0633\u06d2 \u062f\u0648\u0628\u0627\u0631\u06c1 \u06a9\u0627\u067e\u06cc \u06a9\u0631\u06cc\u06ba\u06d4 \u0627\u0628 \u06c1\u0645\u0627\u0631\u06d2 \u067e\u0627\u0633 \u0627\u0633\u06cc \u0627\u06cc\u0646\u06cc\u0645\u06cc\u0634\u0646 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0645\u0646\u0637\u0642 \u06a9\u06cc \u062a\u06cc\u0646 \u06a9\u0627\u067e\u06cc\u0627\u06ba \u06c1\u06cc\u06ba \u062c\u0648 \u06c1\u0645\u0627\u0631\u06d2 \u06a9\u0648\u0688 \u0628\u06cc\u0633 \u0645\u06cc\u06ba \u067e\u06be\u06cc\u0644\u06cc \u06c1\u0648\u0626\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u062c\u0633 \u062f\u0646 \u0622\u067e \u06a9\u0648 \u0627\u0633 \u0645\u0646\u0637\u0642 \u0645\u06cc\u06ba \u06a9\u0633\u06cc \u0645\u0633\u0626\u0644\u06d2 \u06a9\u0648 \u0679\u06be\u06cc\u06a9 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u060c \u0622\u067e \u0627\u0633\u06d2 \u0627\u06cc\u06a9 \u062c\u06af\u06c1 \u067e\u0631 \u0679\u06be\u06cc\u06a9 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0628\u0627\u0642\u06cc \u062f\u0648 \u06a9\u0648 \u0628\u06be\u0648\u0644 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u067e\u06be\u0631 \u0622\u067e \u0627\u06cc\u06a9 \u0627\u067e \u0688\u06cc\u0679 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0635\u0627\u0631\u0641 \u0627\u0633 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0631\u06cc\u0634 \u0631\u067e\u0648\u0631\u0679 \u0641\u0627\u0626\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0633 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0622\u067e \u0628\u06be\u0648\u0644 \u06af\u0626\u06d2 \u062a\u06be\u06d2\u06d4 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u06af\u06be\u0646\u0679\u06c1 \u0627\u0633 \u06a9\u06cc \u0648\u062c\u06c1 \u062c\u0627\u0646\u0646\u06d2 \u06a9\u06cc \u06a9\u0648\u0634\u0634 \u0645\u06cc\u06ba \u0635\u0631\u0641 \u06a9\u0631\u062a\u0627 \u06c1\u0648\u06ba\u06d4 <code>vsync<\/code> \u06cc\u06c1 \u062f\u0648\u0633\u0631\u06cc \u0627\u0633\u06a9\u0631\u06cc\u0646 \u067e\u0631 \u0645\u062e\u062a\u0644\u0641 \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u0628\u0631\u062a\u0627\u0624 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0633 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u06a9\u06c1 \u0622\u067e \u06a9\u0648 \u06cc\u06c1 \u0627\u062d\u0633\u0627\u0633 \u06c1\u0648\u062c\u0627\u0626\u06d2 \u06a9\u06c1 \u0622\u067e \u0646\u06d2 \u0627\u0633 \u06a9\u0627\u067e\u06cc \u06a9\u0648 \u0627\u067e \u0688\u06cc\u0679 \u0646\u06c1\u06cc\u06ba \u06a9\u06cc\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1 \u0627\u06cc\u06a9 \u06a9\u0627\u067e\u06cc \u067e\u06cc\u0633\u0679 \u0679\u0631\u06cc\u067e \u06c1\u06d2 \u0627\u0648\u0631 Flutter \u0627\u06cc\u067e\u0644\u06cc \u06a9\u06cc\u0634\u0646\u0632 \u0645\u06cc\u06ba \u0679\u06be\u06cc\u06a9 \u0679\u06be\u06cc\u06a9 \u06a9\u06cc\u0691\u06d2 \u06a9\u06d2 \u0633\u0628 \u0633\u06d2 \u0639\u0627\u0645 \u0630\u0631\u0627\u0626\u0639 \u0645\u06cc\u06ba \u0633\u06d2 \u0627\u06cc\u06a9 \u06c1\u06d2\u06d4 \u0627\u06cc\u0633\u0627 \u0627\u0633 \u0644\u06cc\u06d2 \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u062a\u0627 \u06a9\u06c1 \u0688\u0648\u06cc\u0644\u067e\u0631\u0632 \u0644\u0627\u067e\u0631\u0648\u0627\u06c1 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0628\u0644\u06a9\u06c1 \u0627\u0633 \u0644\u06cc\u06d2 \u06a9\u06c1 \u0632\u0628\u0627\u0646 \u06a9\u0627 \u0648\u0631\u0627\u062b\u062a \u06a9\u0627 \u0645\u0627\u0688\u0644 \u0627\u0646\u06be\u06cc\u06ba \u0635\u0627\u0641 \u0645\u062a\u0628\u0627\u062f\u0644 \u0641\u0631\u0627\u06c1\u0645 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u0627\u06d4<\/p>\n<p>\u06a9\u0648\u0626\u06cc \u0631\u0627\u0633\u062a\u06c1 \u0646\u06c1\u06cc\u06ba <code>StatefulWidget<\/code> \u067e\u06c1\u0644\u06d2 \u06c1\u06cc \u062a\u0648\u0633\u06cc\u0639 <code>Widget<\/code>. \u06a9\u0648\u0626\u06cc \u062a\u0648\u0633\u06cc\u0639 \u0628\u06be\u06cc \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 <code>AnimationController<\/code> \u06cc\u0627 \u06a9\u0648\u0626\u06cc \u0627\u0648\u0631 \u06a9\u0644\u0627\u0633\u06d4 \u0632\u06cc\u0627\u062f\u06c1 \u062a\u0631 \u062c\u062f\u06cc\u062f \u0632\u0628\u0627\u0646\u0648\u06ba \u06a9\u06cc \u0637\u0631\u062d\u060c \u0688\u0627\u0631\u0679 \u0645\u062a\u0639\u062f\u062f \u0648\u0631\u0627\u062b\u062a \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u0646\u06c1\u06cc\u06ba \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4 \u0622\u067e \u06a9\u0648 \u0648\u0627\u0644\u062f\u06cc\u0646 \u06a9\u06cc \u0627\u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u0645\u0644\u062a\u06cc \u06c1\u06d2 \u0627\u0648\u0631 \u0628\u0633\u06d4<\/p>\n<p>\u0644\u06cc\u06a9\u0646 \u06a9\u06cc\u0627 \u06c1\u0648\u06af\u0627 \u0627\u06af\u0631 \u0622\u067e \u0637\u0631\u06cc\u0642\u0648\u06ba\u060c \u0641\u06cc\u0644\u0688\u0632 \u0627\u0648\u0631 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u06c1\u06a9\u0633 \u06a9\u06d2 \u0627\u06cc\u06a9 \u0628\u0646\u0688\u0644 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u0622\u067e \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06a9\u06d2 \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0637\u0628\u0642\u06d2 \u0645\u06cc\u06ba \u062c\u0627 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0686\u0627\u06c1\u06d2 \u0648\u06c1 \u0627\u0633 \u06a9\u0644\u0627\u0633 \u06a9\u06cc \u067e\u06cc\u0631\u0646\u0679 \u06a9\u0644\u0627\u0633 \u06c1\u06cc \u06a9\u06cc\u0648\u06ba \u0646\u06c1 \u06c1\u0648\u061f \u06a9\u06cc\u0627 \u06c1\u0648\u06af\u0627 \u0627\u06af\u0631 \u062d\u0631\u06a9\u062a \u067e\u0630\u06cc\u0631\u06cc \u06a9\u06cc \u0645\u0646\u0637\u0642\u060c \u0644\u0627\u06af\u0646\u06af \u06a9\u0627 \u0631\u0648\u06cc\u06c1\u060c \u0641\u0627\u0631\u0645 \u06a9\u06cc \u062a\u0648\u062b\u06cc\u0642 \u06a9\u06d2 \u0646\u0645\u0648\u0646\u06d2\u060c \u0627\u0648\u0631 \u063a\u0644\u0637\u06cc \u06a9\u06cc \u0631\u067e\u0648\u0631\u0679\u0646\u06af \u06c1\u0631 \u0627\u06cc\u06a9 \u062e\u0648\u062f \u0633\u0627\u062e\u062a\u06c1 \u0627\u06a9\u0627\u0626\u06cc\u0648\u06ba \u0645\u06cc\u06ba \u0645\u0648\u062c\u0648\u062f \u06c1\u0648\u0633\u06a9\u062a\u06cc \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0627\u06cc\u06a9 \u0637\u0628\u0642\u06c1 \u0627\u0646 \u0645\u06cc\u06ba \u0633\u06d2 \u06a9\u0633\u06cc \u06a9\u0648 \u0648\u0631\u0627\u062b\u062a \u0645\u06cc\u06ba \u0644\u0627\u0626\u06d2 \u0628\u063a\u06cc\u0631 \u0627\u0646 \u0645\u06cc\u06ba \u0633\u06d2 \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0645\u062c\u0645\u0648\u0639\u06c1 \u06a9\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0631\u0633\u06a9\u062a\u0627 \u06c1\u06d2\u061f<\/p>\n<p>\u06cc\u06c1 \u0648\u06c1\u06cc \u06c1\u06d2 \u062c\u0648 \u0645\u06a9\u0633\u0646\u0633 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba.<\/p>\n<p>\u0645\u06a9\u0633\u06cc\u0646 \u0688\u0627\u0631\u0679 \u06a9\u06cc \u0633\u0628 \u0633\u06d2 \u0637\u0627\u0642\u062a\u0648\u0631 \u0644\u06cc\u06a9\u0646 \u06a9\u0645 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0634\u062f\u06c1 \u062e\u0635\u0648\u0635\u06cc\u0627\u062a \u0645\u06cc\u06ba \u0633\u06d2 \u0627\u06cc\u06a9 \u06c1\u06cc\u06ba\u06d4 \u067e\u06be\u0691\u067e\u06be\u0691 \u062e\u0648\u062f \u0627\u0633\u06d2 \u0627\u067e\u0646\u06d2 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0645\u06cc\u06ba \u0628\u0691\u06d2 \u067e\u06cc\u0645\u0627\u0646\u06d2 \u067e\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4 <code>TickerProviderStateMixin<\/code>, <code>AutomaticKeepAliveClientMixin<\/code>, <code>WidgetsBindingObserver<\/code>\u0627\u0648\u0631 \u0628\u06c1\u062a \u0633\u0627\u0631\u06d2 \u0645\u06a9\u0633\u0646\u0633 \u06c1\u06cc\u06ba\u06d4 \u06c1\u0631 \u0628\u0627\u0631 \u062c\u0628 \u0622\u067e \u0644\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba <code>with SingleTickerProviderStateMixin<\/code> \u0648\u06cc\u062c\u06cc\u0679 \u0645\u06cc\u06ba \u06c1\u0645 \u0646\u06d2 \u0627\u0635\u0644 \u0645\u06cc\u06ba \u0645\u06a9\u0633\u0646\u0633 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u0627\u06d4<\/p>\n<p>\u062a\u0627\u06c1\u0645\u060c \u0632\u06cc\u0627\u062f\u06c1 \u062a\u0631 \u0688\u0648\u06cc\u0644\u067e\u0631\u0632 \u0627\u0633\u06d2 \u0627\u06cc\u06a9 \u062c\u0627\u062f\u0648\u0626\u06cc \u0645\u0646\u062a\u0631 \u0633\u0645\u062c\u06be\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0633\u06d2 \u0648\u06c1 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0633\u0645\u062c\u06be\u06d2 \u0628\u063a\u06cc\u0631 \u0679\u0627\u0626\u067e \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u0633 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u0648\u06c1 \u0627\u067e\u0646\u0627 \u06a9\u0648\u0688 \u0644\u06a9\u06be\u062a\u06d2 \u0648\u0642\u062a \u06a9\u0628\u06be\u06cc \u0628\u06be\u06cc \u0645\u06a9\u0633\u0646\u0633 \u062a\u06a9 \u0631\u0633\u0627\u0626\u06cc \u062d\u0627\u0635\u0644 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u06cc\u06c1 \u06c1\u06cc\u0646\u0688 \u0628\u06a9 \u0627\u0633 \u06a9\u0648 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4 \u067e\u06c1\u0644\u06d2 \u0627\u0635\u0648\u0644\u0648\u06ba \u0633\u06d2 \u0645\u06a9\u0633\u0632 \u06a9\u0648 \u0633\u0645\u062c\u06be\u0646\u06d2 \u0627\u0648\u0631 \u0622\u067e \u06a9\u06cc \u0641\u0644\u0679\u0631 \u0627\u06cc\u067e\u0644\u06cc \u06a9\u06cc\u0634\u0646\u0632 \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u0627\u0639\u062a\u0645\u0627\u062f \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0627\u0646 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9 \u0645\u06a9\u0645\u0644\u060c \u0627\u0646\u062c\u06cc\u0646\u0626\u0631\u0646\u06af \u0645\u06cc\u06ba \u06af\u06c1\u0631\u0627\u0626\u06cc \u0648\u0627\u0644\u0627 \u06af\u0627\u0626\u06cc\u0688\u06d4 \u0622\u067e \u0627\u0633 \u0645\u0633\u0626\u0644\u06d2 \u06a9\u0648 \u0633\u0645\u062c\u06be\u06cc\u06ba \u06af\u06d2 \u06a9\u06c1 \u0627\u0633\u06d2 \u062d\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0688\u06cc\u0632\u0627\u0626\u0646 \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u060c \u06cc\u06c1 \u0688\u0627\u0631\u0679 \u0644\u06cc\u0646\u06af\u0648\u06cc\u062c \u06a9\u06cc \u0633\u0637\u062d \u067e\u0631 \u06a9\u06cc\u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0641\u0644\u0679\u0631 \u06a9\u0627 \u0627\u067e\u0646\u0627 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0627\u0633 \u0637\u0631\u062d \u06a9\u06cc\u0648\u06ba \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0622\u067e \u06a9\u06d2 \u0627\u067e\u0646\u06d2 \u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u06a9\u0648\u0688 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0635\u0627\u0641\u060c \u062f\u0648\u0628\u0627\u0631\u06c1 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0645\u06a9\u0633\u06cc\u0646 \u067e\u0631 \u0645\u0628\u0646\u06cc \u062a\u062c\u0631\u06cc\u062f \u06a9\u0648 \u06a9\u06cc\u0633\u06d2 \u0688\u06cc\u0632\u0627\u0626\u0646 \u06a9\u06cc\u0627 \u062c\u0627\u0626\u06d2\u06d4<\/p>\n<p>\u0622\u062e\u0631 \u0645\u06cc\u06ba\u060c \u0622\u067e \u06a9\u0648 \u06cc\u06c1 \u0645\u0639\u0644\u0648\u0645 \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u06af\u0627 \u06a9\u06c1 \u0641\u0644\u0679\u0631 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062f\u06c1 \u0645\u06a9\u0633\u0646\u0633 \u06a9\u0648 \u06a9\u06cc\u0633\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 \u0622\u067e \u06cc\u06c1 \u0633\u06cc\u06a9\u06be\u06cc\u06ba \u06af\u06d2 \u06a9\u06c1 \u062e\u0648\u062f \u06a9\u0648 \u06a9\u06cc\u0633\u06d2 \u0644\u06a9\u06be\u0646\u0627 \u06c1\u06d2\u060c \u0627\u0646\u06c1\u06cc\u06ba \u06a9\u0628 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u0627 \u06c1\u06d2\u060c \u0627\u0633 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u06a9\u0628 \u06a9\u0648\u0626\u06cc \u0627\u0648\u0631 \u0686\u06cc\u0632 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06cc \u06c1\u06d2\u060c \u0627\u0648\u0631 \u06a9\u0633 \u0637\u0631\u062d \u0645\u06a9\u0633\u0632 \u0627\u06cc\u06a9 \u06a9\u0648\u0688\u0628\u06cc\u0633 \u06a9\u06cc \u062a\u0634\u06a9\u06cc\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0627\u0644\u062c\u06be\u0646 \u06a9\u06cc \u0628\u062c\u0627\u0626\u06d2 \u0648\u0636\u0627\u062d\u062a \u0645\u06cc\u06ba \u062d\u0635\u06c1 \u0688\u0627\u0644\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-table-of-contents\">\u0627\u0646\u0688\u06cc\u06a9\u0633<\/h2>\n<h2 id=\"heading-prerequisites\">\u0634\u0631\u0637\u06cc\u06ba<\/h2>\n<p>\u0645\u06a9\u0633\u06cc\u0646 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0634\u0631\u0648\u0639 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u0622\u067e \u06a9\u0648 \u0686\u0646\u062f \u0628\u0646\u06cc\u0627\u062f\u06cc \u0634\u0639\u0628\u0648\u06ba \u0633\u06d2 \u0648\u0627\u0642\u0641 \u06c1\u0648\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4 \u06cc\u06c1 \u06af\u0627\u0626\u06cc\u0688 \u06cc\u06c1 \u0646\u06c1\u06cc\u06ba \u0633\u0645\u062c\u06be\u062a\u0627 \u06a9\u06c1 \u0622\u067e \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0686\u06cc\u0632 \u06a9\u06d2 \u0645\u0627\u06c1\u0631 \u06c1\u06cc\u06ba\u060c \u0644\u06cc\u06a9\u0646 \u06cc\u06c1 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0627\u0646 \u062a\u0635\u0648\u0631\u0627\u062a \u06a9\u06d2 \u06af\u0631\u062f \u0628\u0646\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4<\/p>\n<ol>\n<li>\n<p><strong>\u0688\u0627\u0631\u0679\u0633 \u06a9\u06cc \u0628\u0646\u06cc\u0627\u062f\u06cc \u0628\u0627\u062a\u06cc\u06ba:<\/strong> \u0622\u067e \u06a9\u0648 \u06a9\u0644\u0627\u0633\u0632\u060c \u06a9\u0646\u0633\u0679\u0631\u06a9\u0679\u0631\u0632\u060c \u0637\u0631\u06cc\u0642\u0648\u06ba\u060c \u0641\u06cc\u0644\u0688\u0632 \u0627\u0648\u0631 \u0648\u0631\u0627\u062b\u062a \u06a9\u06d2 \u062a\u0635\u0648\u0631\u0627\u062a \u06a9\u0648 \u0633\u0645\u062c\u06be\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4 \u062a\u0645 \u06a9\u06cc\u0627 \u062c\u0627\u0646\u062a\u06d2 \u06c1\u0648 <code>extends<\/code> \u06cc\u06c1 \u0636\u0631\u0648\u0631\u06cc \u06c1\u06d2 \u06a9\u06c1 \u0688\u0627\u0631\u0679 \u0679\u0627\u0626\u067e \u0633\u0633\u0679\u0645 \u06a9\u06cc\u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06a9\u06cc\u0627 \u0622\u067e \u0646\u06d2 \u067e\u06c1\u0644\u06d2 \u0627\u067e\u0646\u06cc \u0688\u0627\u0631\u0679 \u06a9\u0644\u0627\u0633 \u06a9\u06cc \u062a\u0639\u0631\u06cc\u0641 \u06a9\u06cc \u06c1\u06d2 \u0627\u0648\u0631 \u0633\u0645\u062c\u06be \u0644\u06cc\u0627 \u06c1\u06d2 \u06a9\u06c1 \u06cc\u06c1 \u06a9\u06cc\u0627 \u06c1\u06d2\u061f <code>super<\/code> \u0627\u0633 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u0622\u067e \u062a\u06cc\u0627\u0631 \u06c1\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<li>\n<p><strong>\u0641\u0644\u0679\u0631 \u0648\u06cc\u062c\u06cc\u0679 \u06a9\u06cc \u0628\u0646\u06cc\u0627\u062f\u06cc \u0628\u0627\u062a\u06cc\u06ba:<\/strong> \u0622\u067e \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0641\u0631\u0642 \u062c\u0627\u0646\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4 <code>StatelessWidget<\/code> \u0627\u0648\u0631 <code>StatefulWidget<\/code>\u0627\u0648\u0631 \u0645\u06cc\u06ba \u06cc\u06c1 \u0633\u0645\u062c\u06be\u062a\u0627 \u06c1\u0648\u06ba\u06d4 <code>State<\/code> \u06cc\u06c1 \u0627\u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u06c1\u06d2 \u062c\u0633 \u06a9\u0627 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u06c1\u06d2\u06d4 <code>initState<\/code>, <code>build<\/code>, <code>dispose<\/code>\u0648\u063a\u06cc\u0631\u06c1\u06d4 \u0627\u0633 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u06a9\u0627\u0645 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u0627 \u0639\u0644\u0645 \u0636\u0631\u0648\u0631\u06cc \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0641\u0644\u0679\u0631 \u06a9\u06d2 \u0628\u06c1\u062a \u0633\u06d2 \u0627\u06c1\u0645 \u0645\u06a9\u0633\u0646\u0633 \u0627\u0633 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0633\u06d2 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u062c\u0691\u06d2 \u06c1\u0648\u0626\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<li>\n<p><strong>\u0622\u0628\u062c\u06cc\u06a9\u0679 \u067e\u0631 \u0645\u0628\u0646\u06cc \u067e\u0631\u0648\u06af\u0631\u0627\u0645\u0646\u06af \u06a9\u06d2 \u062a\u0635\u0648\u0631\u0627\u062a:<\/strong> \u0648\u0631\u0627\u062b\u062a\u060c \u0627\u0646\u0679\u0631\u0641\u06cc\u0633\u060c \u0627\u0648\u0631 \u067e\u0648\u0644\u06cc\u0645\u0648\u0631\u0641\u0632\u0645 \u06a9\u06d2 \u062a\u0635\u0648\u0631\u0627\u062a \u0633\u06d2 \u0648\u0627\u0642\u0641 \u06c1\u0648\u0646\u06d2 \u0633\u06d2 \u0622\u067e \u06a9\u0648 \u06cc\u06c1 \u0633\u0645\u062c\u06be\u0646\u06d2 \u0645\u06cc\u06ba \u0645\u062f\u062f \u0645\u0644\u06d2 \u06af\u06cc \u06a9\u06c1 \u0627\u0646 \u0679\u0648\u0644\u0632 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0688\u06cc\u0632\u0627\u0626\u0646 \u06a9\u06cc \u062c\u06af\u06c1 \u0645\u06cc\u06ba \u0645\u06a9\u0633\u0646\u0633 \u0627\u06cc\u06a9 \u0645\u0646\u0641\u0631\u062f \u0627\u0648\u0631 \u0627\u06c1\u0645 \u0645\u0642\u0627\u0645 \u06a9\u06cc\u0648\u06ba \u0631\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0622\u067e \u06a9\u0648 OOP \u062a\u06be\u06cc\u0648\u0631\u06cc\u0633\u0679 \u0628\u0646\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u060c <code>extends<\/code> \u0627\u0648\u0631 <code>implements<\/code> \u0688\u0627\u0631\u0679 \u0645\u06cc\u06ba \u0645\u0648\u0627\u0632\u0646\u06c1 \u06a9\u0631\u06cc\u06ba: <code>with<\/code> \u06cc\u06c1 \u0627\u0628 \u0628\u06c1\u062a \u0648\u0627\u0636\u062d \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<\/ol>\n<p>\u0622\u067e \u06a9\u0648 \u06cc\u06c1 \u0628\u06be\u06cc \u06cc\u0642\u06cc\u0646\u06cc \u0628\u0646\u0627\u0646\u0627 \u0686\u0627\u06c1\u0626\u06d2 \u06a9\u06c1 \u0622\u067e \u06a9\u06d2 \u062a\u0631\u0642\u06cc\u0627\u062a\u06cc \u0645\u0627\u062d\u0648\u0644 \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06c1\u06cc\u06ba:<\/p>\n<ul>\n<li>\n<p>\u0641\u0644\u0679\u0631 SDK 3.x \u06cc\u0627 \u0627\u0633 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1<\/p>\n<\/li>\n<li>\n<p>Dart SDK 3.x \u06cc\u0627 \u0627\u0633 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 (\u0641\u0644\u0679\u0631 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0634\u0627\u0645\u0644)<\/p>\n<\/li>\n<li>\n<p>Flutter \u067e\u0644\u06af \u0627\u0646 \u06a9\u06d2 \u0633\u0627\u062a\u06be VS Code \u06cc\u0627 Android Studio \u062c\u06cc\u0633\u0627 \u06a9\u0648\u0688 \u0627\u06cc\u0688\u06cc\u0679\u0631\u06d4<\/p>\n<\/li>\n<li>\n<p>\u06a9\u06c1 <code>flutter<\/code> \u0627\u0648\u0631 <code>dart<\/code> CLI \u0679\u0631\u0645\u06cc\u0646\u0644 \u0633\u06d2 \u0642\u0627\u0628\u0644 \u0631\u0633\u0627\u0626\u06cc<\/p>\n<\/li>\n<li>\n<p>\u0688\u0627\u0631\u0679 \u067e\u06cc\u0688 (https:\/\/dartpad.dev) \u0645\u06a9\u0645\u0644 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0628\u0646\u0627\u0626\u06d2 \u0628\u063a\u06cc\u0631 \u062e\u0627\u0644\u0635 \u0688\u0627\u0631\u0679 \u0645\u06a9\u0633 \u06a9\u06cc \u0645\u062b\u0627\u0644\u0648\u06ba \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062a\u062c\u0631\u0628\u06c1 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062e\u0627\u0635 \u0637\u0648\u0631 \u067e\u0631 \u0645\u0641\u06cc\u062f \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<\/ul>\n<p>\u0645\u06a9\u0633\u0646\u0633 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0633\u06cc \u0627\u0636\u0627\u0641\u06cc \u067e\u06cc\u06a9\u062c \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u0628\u0644\u0679 \u0627\u0646 \u0688\u0627\u0631\u0679 \u0644\u06cc\u0646\u06af\u0648\u06cc\u062c \u0641\u06cc\u0686\u0631 \u06c1\u06d2\u06d4 \u0628\u0639\u062f \u0645\u06cc\u06ba \u0627\u0633 \u06af\u0627\u0626\u06cc\u0688 \u0645\u06cc\u06ba \u06a9\u0686\u06be \u0645\u062b\u0627\u0644\u06cc\u06ba \u0645\u0639\u06cc\u0627\u0631\u06cc \u0641\u0644\u0679\u0631 \u067e\u06cc\u06a9\u062c\u0648\u06ba \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06cc \u06c1\u06cc\u06ba\u060c \u062c\u06cc\u0633\u06d2: <code>flutter_test<\/code> \u0627\u0633 \u06a9\u0627 \u0645\u0642\u0635\u062f \u0679\u06cc\u0633\u0679\u06cc\u0628\u0644\u0679\u06cc \u06a9\u0627 \u0645\u0638\u0627\u06c1\u0631\u06c1 \u06a9\u0631\u0646\u0627 \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0641\u0639\u0627\u0644\u06cc\u062a \u06a9\u06d2 \u0644\u06cc\u06d2 SDK \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u06a9\u0686\u06be \u0646\u06c1\u06cc\u06ba \u0686\u0627\u06c1\u06cc\u06d2\u06d4<\/p>\n<h2 id=\"heading-what-is-a-mixin\">\u0645\u06a9\u0633 \u06a9\u06cc\u0627 \u06c1\u06d2\u061f<\/h2>\n<p>\u067e\u06cc\u0634\u06c1 \u0648\u0631\u0627\u0646\u06c1 \u0633\u0631\u0679\u06cc\u0641\u06cc\u06a9\u06cc\u0634\u0646 \u06a9\u06cc \u0627\u06cc\u06a9 \u0633\u06cc\u0631\u06cc\u0632 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0633\u0648\u0686\u0648. \u0646\u0631\u0633\u06cc\u06ba \u06c1\u0646\u06af\u0627\u0645\u06cc \u0631\u062f\u0639\u0645\u0644\u060c \u0627\u062f\u0648\u06cc\u0627\u062a \u06a9\u06cc \u0627\u0646\u062a\u0638\u0627\u0645\u06cc\u06c1\u060c \u0627\u0648\u0631 \u0632\u062e\u0645 \u06a9\u06cc \u062f\u06cc\u06a9\u06be \u0628\u06be\u0627\u0644 \u0645\u06cc\u06ba \u062a\u0635\u062f\u06cc\u0642 \u0634\u062f\u06c1 \u0628\u0646 \u0633\u06a9\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u0637\u0628\u06cc\u0628 \u0628\u06be\u06cc \u0627\u06cc\u0645\u0631\u062c\u0646\u0633\u06cc \u0631\u0633\u067e\u0627\u0646\u0633 \u0627\u0648\u0631 \u0688\u0631\u06af \u0627\u06cc\u0688\u0645\u0646\u0633\u0679\u0631\u06cc\u0634\u0646 \u0645\u06cc\u06ba \u062a\u0635\u062f\u06cc\u0642 \u0634\u062f\u06c1 \u0628\u0646 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u067e\u06cc\u0631\u0627\u0645\u06cc\u0688\u06cc\u06a9\u0633 \u06c1\u0646\u06af\u0627\u0645\u06cc \u0631\u062f\u0639\u0645\u0644 \u0627\u0648\u0631 \u0645\u0631\u06cc\u0636\u0648\u06ba \u06a9\u06cc \u0646\u0642\u0644 \u0648 \u062d\u0645\u0644 \u0645\u06cc\u06ba \u062a\u0635\u062f\u06cc\u0642 \u0634\u062f\u06c1 \u0628\u0646 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0627\u0646 \u0645\u0627\u06c1\u0631\u06cc\u0646 \u0645\u06cc\u06ba \u0633\u06d2 \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u0634\u062e\u0635 \u0627\u06cc\u06a9 \u06c1\u06cc \u0642\u0633\u0645 \u06a9\u0627 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0627\u06af\u0631\u0686\u06c1 \u0627\u0646 \u06a9\u06d2 \u0628\u0646\u06cc\u0627\u062f\u06cc \u06a9\u0631\u062f\u0627\u0631 \u0628\u0627\u0644\u06a9\u0644 \u0645\u062e\u062a\u0644\u0641 \u06c1\u06cc\u06ba\u060c \u0644\u06cc\u06a9\u0646 \u0648\u06c1 \u0645\u062e\u0635\u0648\u0635\u060c \u0627\u0686\u06be\u06cc \u0637\u0631\u062d \u0633\u06d2 \u0645\u062a\u0639\u06cc\u0646 \u0635\u0644\u0627\u062d\u06cc\u062a\u0648\u06ba \u06a9\u0627 \u0627\u0634\u062a\u0631\u0627\u06a9 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0633\u0631\u0679\u06cc\u0641\u06a9\u06cc\u0679 \u062e\u0648\u062f \u06a9\u0648\u0626\u06cc \u0634\u062e\u0635 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0633\u0631\u0679\u06cc\u0641\u06cc\u06a9\u06cc\u0634\u0646 \u06a9\u06cc \u062e\u062f\u0645\u0627\u062a \u062d\u0627\u0635\u0644 \u0646\u06c1\u06cc\u06ba \u06a9\u06cc \u062c\u0627 \u0633\u06a9\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u0644\u06cc\u06a9\u0646 \u0622\u067e \u06a9\u0633\u06cc \u06a9\u0648 \u0633\u0631\u0679\u06cc\u0641\u06a9\u06cc\u0679 \u062f\u06d2 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0627\u0633 \u0648\u0642\u062a \u0633\u06d2\u060c \u0627\u0633 \u0634\u062e\u0635 \u06a9\u06d2 \u067e\u0627\u0633 \u0648\u06c1 \u062a\u0645\u0627\u0645 \u0635\u0644\u0627\u062d\u06cc\u062a\u06cc\u06ba \u06c1\u0648\u06ba \u06af\u06cc \u062c\u0646 \u06a9\u06cc \u0633\u0631\u0679\u06cc\u0641\u06a9\u06cc\u0679 \u0646\u0645\u0627\u0626\u0646\u062f\u06af\u06cc \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0633\u0631\u0679\u06cc\u0641\u06cc\u06a9\u06cc\u0634\u0646 \u0622\u0632\u0627\u062f \u06c1\u06d2\u06d4 \u06cc\u06c1 \u062f\u0631\u0633\u062a \u0645\u06c1\u0627\u0631\u062a \u06a9\u06d2 \u0633\u06cc\u0679 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u06c1\u0631 \u0627\u0633 \u0634\u062e\u0635 \u067e\u0631 \u0644\u0627\u06af\u0648 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0627\u0633 \u06a9\u0631\u062f\u0627\u0631 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0645\u0637\u0627\u0628\u0642\u062a \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1 \u0627\u06cc\u06a9 \u0645\u06a9\u0633 \u06c1\u06d2\u06d4 \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u0644\u0627\u0633\u0632 \u06a9\u0648 \u0641\u0648\u0631\u06cc \u0646\u06c1\u06cc\u06ba \u06a9\u0631 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0641\u0646\u06a9\u0634\u0646\u0632\u060c \u0641\u06cc\u0644\u0688\u0632 \u0627\u0648\u0631 \u0637\u0631\u06cc\u0642\u0648\u06ba \u06a9\u0627 \u0627\u06cc\u06a9 \u0628\u0646\u0688\u0644 \u062c\u0648 \u06a9\u0644\u0627\u0633 \u067e\u0631 \u0644\u0627\u06af\u0648 \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u0644\u0627\u06af\u0648 \u06c1\u0648\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f\u060c \u0627\u0633 \u06a9\u0644\u0627\u0633 \u06a9\u0648 \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u06cc \u062a\u0645\u0627\u0645 \u0641\u0639\u0627\u0644\u06cc\u062a \u0627\u0633 \u0637\u0631\u062d \u0645\u0644 \u062c\u0627\u062a\u06cc \u06c1\u06d2 \u062c\u06cc\u0633\u06d2 \u0627\u0633\u06d2 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0627\u0633 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0644\u06a9\u06be\u0627 \u06af\u06cc\u0627 \u06c1\u0648\u06d4 \u0645\u062e\u062a\u0644\u0641 \u06a9\u0644\u0627\u0633\u06cc\u06ba \u0627\u06cc\u06a9 \u06c1\u06cc \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u0648 \u0622\u0632\u0627\u062f\u0627\u0646\u06c1 \u0637\u0648\u0631 \u067e\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06cc \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0627\u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u0627\u06cc\u06a9 \u062f\u0648\u0633\u0631\u06d2 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0648\u0627\u0644\u062f\u06cc\u0646 \u0627\u0648\u0631 \u0628\u0686\u0648\u06ba \u06a9\u06d2 \u062a\u0639\u0644\u0642\u0627\u062a \u06c1\u0648\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u0627\u06cc\u06a9 \u0633\u0627\u062a\u06be \u0645\u062a\u0639\u062f\u062f \u0645\u06a9\u0633\u06cc\u0646 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u0688\u0627\u0631\u0679 \u0645\u06cc\u06ba\u060c \u0645\u06a9\u0633\u0646\u0633 \u06a9\u0648 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0628\u06cc\u0627\u0646 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2: <code>mixin<\/code> \u06a9\u0644\u06cc\u062f\u06cc \u0644\u0641\u0638 \u06cc\u06c1 \u0641\u06cc\u0644\u0688\u0632 \u0627\u0648\u0631 \u0637\u0631\u06cc\u0642\u0648\u06ba \u06a9\u06d2 \u0627\u06cc\u06a9 \u0633\u06cc\u0679 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0633\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u06a9\u0644\u0627\u0633 \u0645\u06cc\u06ba \u0645\u0644\u0627\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2: <code>with<\/code> \u06a9\u0644\u06cc\u062f\u06cc \u0644\u0641\u0638 \u0627\u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u062c\u0648 \u0645\u06a9\u0633\u0646 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06cc \u06c1\u06d2 \u0627\u0633\u06d2 &quot;\u0645\u06a9\u0633\u0646&#8221; \u06a9\u06c1\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0627\u0648\u0631 \u0627\u0633 \u0648\u0642\u062a \u0633\u06d2\u060c \u06a9\u0644\u0627\u0633 \u06a9\u0648 \u06c1\u0631 \u0627\u0633 \u0686\u06cc\u0632 \u062a\u06a9 \u0631\u0633\u0627\u0626\u06cc \u062d\u0627\u0635\u0644 \u06c1\u0648\u062a\u06cc \u06c1\u06d2 \u062c\u0633 \u06a9\u06cc \u0645\u06a9\u0633\u0646 \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0633\u0628 \u0633\u06d2 \u0622\u0633\u0627\u0646 \u0645\u0631\u06a9\u0628 \u06cc\u06c1 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-dart\">mixin Greetable {\n  String get name;\n\n  String greet() {\n    return 'Hello, my name is $name.';\n  }\n}\n\nclass Person with Greetable {\n  @override\n  final String name;\n\n  Person(this.name);\n}\n\nvoid main() {\n  final person = Person('Ade');\n  print(person.greet()); \/\/ Hello, my name is Ade.\n}\n<\/code><\/pre>\n<p>\u0627\u0633 \u06a9\u0627 \u062a\u062c\u0632\u06cc\u06c1 \u06a9\u06cc\u0627 \u062c\u0627\u0626\u06d2 \u062a\u0648 \u06cc\u06c1 \u06c1\u06d2: <code>mixin Greetable<\/code> \u0627\u06cc\u06a9 \u0646\u0627\u0645\u0632\u062f \u0645\u06a9\u0633\u0646 \u06a9\u0627 \u0627\u0639\u0644\u0627\u0646 \u06a9\u0631\u06cc\u06ba\u06d4 <code>Greetable<\/code>. \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u0648\u06ba \u067e\u0631 \u0645\u0634\u062a\u0645\u0644 \u06c1\u06d2\u06d4 <code>name<\/code> \u0627\u0648\u0631 \u06a9\u06cc\u0633\u06d2 <code>greet<\/code>. \u062a\u0648\u062c\u06c1 \u0641\u0631\u0645\u0627\u0626\u06cc\u06ba <code>name<\/code> \u0645\u06a9\u0633\u0646 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0627\u0639\u0644\u0627\u0646 \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u0644\u06cc\u06a9\u0646 \u0627\u0633 \u067e\u0631 \u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u0627\u06d4<\/p>\n<p>\u0645\u06a9\u0633\u06cc\u0646 \u0627\u0633 \u0637\u0628\u0642\u06d2 \u067e\u0631 \u0645\u0646\u062d\u0635\u0631 \u06c1\u06d2 \u062c\u0648 \u0627\u0646\u06c1\u06cc\u06ba \u0627\u067e\u0646\u06cc \u0627\u0642\u062f\u0627\u0631 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <code>class Person with Greetable<\/code> \u0645\u06a9\u0633\u0686\u0631 \u0644\u06af\u0627\u0626\u06cc\u06ba\u06d4 <code>Person<\/code>. <code>Person<\/code> \u0646\u0627\u0641\u0630 \u06a9\u0631\u0646\u0627 <code>name<\/code> \u0645\u062e\u0635\u0648\u0635 \u0641\u06cc\u0644\u0688\u0632 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u06a9\u06d2\u06d4 \u06a9\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a <code>person.greet()<\/code>\u0688\u0627\u0631\u0679 \u062a\u0644\u0627\u0634 \u06a9\u0631\u062a\u0627 \u06c1\u06d2: <code>greet<\/code> \u0627\u0648\u062a\u0627\u0631 <code>Greetable<\/code> \u0645\u06a9\u0633 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0686\u0644\u0627\u0626\u06cc\u06ba: <code>Person<\/code>\u0627\u06cc\u0633 <code>name<\/code> \u0627\u06cc\u06a9 \u0641\u06cc\u0644\u0688 \u062c\u0648 \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u06a9\u06d2 \u0627\u0646\u062d\u0635\u0627\u0631 \u06a9\u0648 \u067e\u0648\u0631\u0627 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u06cc\u06c1 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0648\u0631\u0627\u062b\u062a \u0633\u06d2 \u0645\u062e\u062a\u0644\u0641 \u06c1\u06d2\u06d4 <code>Person<\/code> \u062a\u0648\u0633\u06cc\u0639 \u0646\u06c1\u06cc\u06ba \u06a9\u06cc <code>Greetable<\/code>. \u0648\u06c1 \u0628\u0686\u06c1 \u0646\u06c1\u06cc\u06ba\u06d4 <code>Greetable<\/code>. \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u06d2 \u0627\u0641\u0639\u0627\u0644 \u062f\u0631\u062c \u0630\u06cc\u0644 \u06c1\u06cc\u06ba: <code>Person<\/code>\u06cc\u06c1 \u06a9\u0645\u067e\u0627\u0626\u0644 \u06a9\u06d2 \u0648\u0642\u062a \u0622\u067e \u06a9\u06cc \u062a\u0639\u0631\u06cc\u0641 \u06c1\u06d2\u06d4 <code>Person<\/code> \u0627\u0628 \u0628\u06be\u06cc \u0628\u0627\u0644\u06a9\u0644 \u0627\u06cc\u06a9 \u0633\u067e\u0631 \u06a9\u0644\u0627\u0633 \u06c1\u06d2\u06d4 <code>Object<\/code> \u0628\u0646\u06cc\u0627\u062f\u06cc \u0637\u0648\u0631 \u067e\u0631\u06d4<\/p>\n<h3 id=\"heading-why-dart-has-mixins\">\u0688\u0627\u0631\u0679 \u0645\u06cc\u06ba \u0645\u06a9\u0633\u0646\u0633 \u06a9\u06cc\u0648\u06ba \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/h3>\n<p>\u0688\u0627\u0631\u0679 \u06a9\u0648 \u0633\u0646\u06af\u0644 \u0648\u0631\u0627\u062b\u062a \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0688\u06cc\u0632\u0627\u0626\u0646 \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u060c \u06cc\u06c1\u06cc \u0627\u0646\u062a\u062e\u0627\u0628 Java\u060c C#\u060c Swift \u0627\u0648\u0631 Kotlin \u0645\u06cc\u06ba \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0688\u06cc\u0632\u0627\u0626\u0646 \u0645\u0639\u0631\u0648\u0641 \u0645\u062a\u0639\u062f\u062f \u0648\u0631\u0627\u062b\u062a \u06a9\u06d2 \u0645\u0633\u0627\u0626\u0644 \u0633\u06d2 \u0628\u0686\u062a\u0627 \u06c1\u06d2\u060c \u062e\u0627\u0635 \u0637\u0648\u0631 \u067e\u0631 &quot;\u06c1\u06cc\u0631\u06d2 \u06a9\u0627 \u0645\u0633\u0626\u0644\u06c1&#8221;\u060c \u062c\u06c1\u0627\u06ba \u062f\u0648 \u0648\u0627\u0644\u062f\u06cc\u0646 \u0637\u0628\u0642\u06d2 \u0627\u06cc\u06a9 \u06c1\u06cc \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0686\u0627\u0626\u0644\u0688 \u06a9\u0644\u0627\u0633 \u06a9\u06d2 \u067e\u0627\u0633 \u062a\u0646\u0627\u0632\u0639\u06c1 \u06a9\u0648 \u062d\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u06a9\u0648\u0626\u06cc \u0648\u0627\u0636\u062d \u0637\u0631\u06cc\u0642\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<p>\u0644\u06cc\u06a9\u0646 \u0627\u06a9\u06cc\u0644\u06cc \u0648\u0631\u0627\u062b\u062a \u0627\u06cc\u06a9 \u0645\u062e\u062a\u0644\u0641 \u0642\u0633\u0645 \u06a9\u06cc \u067e\u0631\u06cc\u0634\u0627\u0646\u06cc \u06a9\u0627 \u0628\u0627\u0639\u062b \u0628\u0646\u062a\u06cc \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u0622\u067e \u063a\u06cc\u0631 \u0645\u062a\u0639\u0644\u0642\u06c1 \u06a9\u0644\u0627\u0633\u0648\u06ba \u06a9\u0648 \u0632\u0628\u0631\u062f\u0633\u062a\u06cc \u0648\u0627\u0644\u062f\u06cc\u0646 \u0627\u0648\u0631 \u0628\u0686\u0648\u06ba \u06a9\u06d2 \u0645\u0635\u0646\u0648\u0639\u06cc \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc \u0645\u06cc\u06ba \u0645\u062c\u0628\u0648\u0631 \u06a9\u06cc\u06d2 \u0628\u063a\u06cc\u0631 \u06a9\u0648\u0688 \u06a9\u0627 \u0627\u0634\u062a\u0631\u0627\u06a9 \u0646\u06c1\u06cc\u06ba \u06a9\u0631 \u0633\u06a9\u062a\u06d2\u06d4<\/p>\n<p>\u0688\u0627\u0631\u0679 \u06a9\u06d2 \u0645\u06a9\u0633\u0646\u0633 \u0627\u0633 \u0645\u0633\u0626\u0644\u06d2 \u06a9\u0627 \u062d\u0644 \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0627\u0628\u06c1\u0627\u0645 \u06a9\u06d2 \u0645\u0633\u0627\u0626\u0644 \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u0645\u062a\u0639\u062f\u062f \u0648\u0631\u0627\u062b\u062a \u06a9\u06d2 \u06a9\u0648\u0688 \u0634\u06cc\u0626\u0631\u0646\u06af \u0641\u0648\u0627\u0626\u062f \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u06cc \u0648\u062c\u06c1 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u0688\u0627\u0631\u0679 \u06a9\u06d2 \u0633\u062e\u062a \u0642\u0648\u0627\u0646\u06cc\u0646 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0645\u06a9\u0633\u0646 \u062a\u0646\u0627\u0632\u0639\u0627\u062a \u06a9\u0648 \u06a9\u06cc\u0633\u06d2 \u062d\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 (\u0627\u0633 \u067e\u0631 \u0645\u0632\u06cc\u062f \u0628\u0639\u062f \u0645\u06cc\u06ba)\u06d4<\/p>\n<h2 id=\"heading-the-problem-mixins-solve-understanding-inheritances-limitations\">\u0627\u062e\u062a\u0644\u0627\u0637 \u0633\u06d2 \u062d\u0644 \u06c1\u0648\u0646\u06d2 \u0648\u0627\u0644\u0627 \u0645\u0633\u0626\u0644\u06c1: \u0648\u0631\u0627\u062b\u062a \u06a9\u06cc \u062d\u062f\u0648\u062f \u06a9\u0648 \u0633\u0645\u062c\u06be\u0646\u0627<\/h2>\n<h3 id=\"heading-how-inheritance-works\">\u0648\u0631\u0627\u062b\u062a \u06a9\u06cc\u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4<\/h3>\n<p>\u0648\u0631\u0627\u062b\u062a \u0622\u0628\u062c\u06cc\u06a9\u0679 \u067e\u0631 \u0645\u0628\u0646\u06cc \u067e\u0631\u0648\u06af\u0631\u0627\u0645\u0646\u06af \u0645\u06cc\u06ba \u06a9\u0648\u0688 \u06a9\u06d2 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0627 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u0627\u0631 \u06c1\u06d2\u06d4 \u06a9\u0644\u0627\u0633 \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 <code>B<\/code> \u06a9\u0644\u0627\u0633 \u0645\u06cc\u06ba \u062a\u0648\u0633\u06cc\u0639 <code>A<\/code>\u0622\u067e \u06a9\u0648 \u0633\u0628 \u06a9\u0686\u06be \u0648\u0631\u0627\u062b\u062a \u0645\u06cc\u06ba \u0645\u0644\u062a\u0627 \u06c1\u06d2\u06d4 <code>A<\/code> \u062a\u0639\u0631\u06cc\u0641\u06cc\u06ba: \u0645\u062a\u0639\u0644\u0642\u06c1 \u0641\u06cc\u0644\u0688\u0632\u060c \u0637\u0631\u06cc\u0642\u06d2\u060c \u0627\u0648\u0631 \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2\u06d4 <code>B<\/code> \u0627\u0633 \u06a9\u06d2 \u0628\u0639\u062f \u0622\u067e \u0646\u0626\u06cc \u062e\u0635\u0648\u0635\u06cc\u0627\u062a \u0634\u0627\u0645\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u06cc\u0627 \u0645\u0648\u062c\u0648\u062f\u06c1 \u0631\u0648\u06cc\u06d2 \u06a9\u0648 \u0627\u0648\u0648\u0631 \u0631\u0627\u0626\u06cc\u0688 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u067e\u06be\u0691\u067e\u06be\u0691\u0627\u06c1\u0679 \u0645\u06cc\u06ba\u060c \u06cc\u06c1 \u0648\u0627\u0642\u0641 \u0646\u0638\u0631 \u0622\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-dart\">class Animal {\n  final String name;\n  Animal(this.name);\n\n  void breathe() {\n    print('$name is breathing.');\n  }\n}\n\nclass Dog extends Animal {\n  Dog(super.name);\n\n  void bark() {\n    print('$name says: Woof!');\n  }\n}\n<\/code><\/pre>\n<p><code>Dog<\/code>    \u0648\u0631\u0627\u062b\u062a <code>breathe<\/code> \u0633\u06d2 <code>Animal<\/code> \u0627\u0648\u0631 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 <code>bark<\/code> \u0627\u0648\u067e\u0631 \u06cc\u06c1 \u0635\u0627\u0641 \u0627\u0648\u0631 \u0628\u062f\u06cc\u06c1\u06cc \u06c1\u06d2\u060c \u0627\u0648\u0631 \u062c\u0628 \u0642\u0633\u0645\u06cc\u06ba \u0642\u062f\u0631\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0627\u06cc\u06a9 \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc \u0628\u0646\u0627\u062a\u06cc \u06c1\u06cc\u06ba \u062a\u0648 \u0627\u0686\u06be\u06cc \u0637\u0631\u062d \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06cc \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 \u0627\u0642\u0633\u0627\u0645 \u0642\u062f\u0631\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc \u0646\u06c1\u06cc\u06ba \u0628\u0646\u0627\u062a\u06d2 \u0644\u06cc\u06a9\u0646 \u067e\u06be\u0631 \u0628\u06be\u06cc \u0631\u0648\u06cc\u06d2 \u06a9\u0627 \u0627\u0634\u062a\u0631\u0627\u06a9 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-the-rigid-hierarchy-problem\">\u0633\u062e\u062a \u0637\u0628\u0642\u0627\u062a\u06cc \u0645\u0633\u0626\u0644\u06c1<\/h3>\n<p>\u0627\u06cc\u06a9 \u0641\u0644\u0679\u0631 \u0627\u06cc\u067e \u067e\u0631 \u063a\u0648\u0631 \u06a9\u0631\u06cc\u06ba \u062c\u0633 \u0645\u06cc\u06ba \u062f\u0631\u062c \u0630\u06cc\u0644 \u06a9\u0644\u0627\u0633\u0632 \u06c1\u0648\u06ba: <code>LoginScreen<\/code>, <code>DashboardScreen<\/code>, <code>ProfileScreen<\/code>\u0627\u0648\u0631 <code>SettingsScreen<\/code>. \u0648\u06c1 \u0633\u0628 \u0645\u062e\u062a\u0644\u0641 \u0627\u0633\u06a9\u0631\u06cc\u0646\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4 \u0627\u0646 \u0645\u06cc\u06ba \u0633\u06d2 \u06a9\u0633\u06cc \u06a9\u0648 \u0628\u06be\u06cc \u062f\u0648\u0633\u0631\u06d2 \u06a9\u06cc \u062a\u0648\u0633\u06cc\u0639 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u0646\u06cc \u0686\u0627\u06c1\u06cc\u06d2\u06d4 \u062a\u0627\u06c1\u0645\u060c \u0622\u067e \u06a9\u0648 \u062a\u062c\u0632\u06cc\u06c1 \u06a9\u06d2 \u0648\u0627\u0642\u0639\u0627\u062a \u06a9\u0648 \u0644\u0627\u06af \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0648\u06c1 \u0633\u0628 \u0638\u0627\u06c1\u0631 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u063a\u0627\u0626\u0628 \u06c1\u0648 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06c1\u0631 \u0627\u06cc\u06a9 \u06a9\u0648 \u0646\u06cc\u0679 \u0648\u0631\u06a9 \u06a9\u0646\u06a9\u0634\u0646 \u06a9\u06cc \u062a\u0628\u062f\u06cc\u0644\u06cc\u0648\u06ba \u0633\u06d2 \u0646\u0645\u0679\u0646\u0627 \u067e\u0691\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0648\u0631 \u0627\u0646 \u0645\u06cc\u06ba \u0633\u06d2 \u06a9\u0686\u06be \u06a9\u0648 \u062d\u0631\u06a9\u062a \u067e\u0630\u06cc\u0631\u06cc \u06a9\u0646\u0679\u0631\u0648\u0644\u0631 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u062e\u0627\u0644\u0635 \u0648\u0631\u0627\u062b\u062a \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0622\u067e \u06a9\u06d2 \u067e\u0627\u0633 \u0686\u0646\u062f \u0627\u062e\u062a\u06cc\u0627\u0631\u0627\u062a \u06c1\u06cc\u06ba\u060c \u0644\u06cc\u06a9\u0646 \u0648\u06c1 \u0633\u0628 \u062a\u06a9\u0644\u06cc\u0641 \u062f\u06c1 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h4 id=\"heading-option-one-put-everything-in-a-base-class\">\u0622\u067e\u0634\u0646 1: \u06c1\u0631 \u0686\u06cc\u0632 \u06a9\u0648 \u0628\u06cc\u0633 \u06a9\u0644\u0627\u0633 \u0645\u06cc\u06ba \u0631\u06a9\u06be\u06cc\u06ba\u06d4<\/h4>\n<p>\u062a\u0645 \u06c1\u0648 <code>BaseScreen<\/code> \u062a\u0648\u0633\u06cc\u0639 <code>State<\/code> \u0648\u06c1\u0627\u06ba \u062a\u0645\u0627\u0645 \u0645\u0634\u062a\u0631\u06a9\u06c1 \u0637\u0631\u0632 \u0639\u0645\u0644 \u06a9\u0648 \u0646\u0627\u0641\u0630 \u06a9\u0631\u06cc\u06ba\u06d4 \u062a\u0645\u0627\u0645 \u0627\u0633\u06a9\u0631\u06cc\u0646\u06cc\u06ba \u067e\u06be\u06cc\u0644\u06cc \u06c1\u0648\u0626\u06cc \u06c1\u06cc\u06ba\u06d4 <code>BaseScreen<\/code>.<\/p>\n<p>\u06cc\u06c1 \u0627\u0633 \u0648\u0642\u062a \u062a\u06a9 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2: <code>BaseScreen<\/code> \u06cc\u06c1 \u0627\u06cc\u06a9 600 \u0644\u0627\u0626\u0646 \u06af\u0627\u0688 \u06a9\u0644\u0627\u0633 \u06c1\u0648\u06af\u06cc \u062c\u0648 \u0628\u06cc\u06a9 \u0648\u0642\u062a \u062a\u062c\u0632\u06cc\u06c1\u060c \u06a9\u0646\u06a9\u0634\u0646 \u0645\u0627\u0646\u06cc\u0679\u0631\u0646\u06af\u060c \u0627\u06cc\u0646\u06cc\u0645\u06cc\u0634\u0646 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644\u060c \u0627\u06cc\u0631\u0631 \u0631\u067e\u0648\u0631\u0679\u0646\u06af\u060c \u0627\u0648\u0631 \u0641\u0627\u0631\u0645 \u06a9\u06cc \u062a\u0648\u062b\u06cc\u0642 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0630\u0645\u06c1 \u062f\u0627\u0631 \u06c1\u06d2\u06d4 \u06c1\u0631 \u0628\u0627\u0631 \u062c\u0628 \u0622\u067e \u0627\u0633\u06d2 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u0622\u067e \u0627\u067e\u0646\u06cc \u062a\u0645\u0627\u0645 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u06a9\u06d2 \u0679\u0648\u0679\u0646\u06d2 \u06a9\u0627 \u062e\u0637\u0631\u06c1 \u0686\u0644\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u06af\u0631 \u0622\u067e \u0627\u0633 \u0637\u0631\u0632 \u0639\u0645\u0644 \u06a9\u0648 \u0634\u0627\u0645\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0633 \u06a9\u06cc \u0635\u0631\u0641 \u062a\u06cc\u0646 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u06a9\u0648 \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u060c \u062a\u0648 \u0622\u067e \u06a9\u0648 \u0627\u0633 \u0637\u0631\u0632 \u0639\u0645\u0644 \u06a9\u0648 \u062a\u0645\u0627\u0645 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u06a9\u06d2 \u0627\u0634\u062a\u0631\u0627\u06a9 \u06a9\u0631\u062f\u06c1 \u06a9\u0644\u0627\u0633 \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u06af\u06cc\u06d4<\/p>\n<h4 id=\"heading-option-two-use-utility-classes-with-static-methods\">\u0622\u067e\u0634\u0646 2: \u062c\u0627\u0645\u062f \u0637\u0631\u06cc\u0642\u0648\u06ba \u06a9\u06d2 \u0633\u0627\u062a\u06be \u06cc\u0648\u0679\u06cc\u0644\u06cc\u0679\u06cc \u06a9\u0644\u0627\u0633\u0632 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/h4>\n<p>\u0622\u067e \u062a\u062e\u0644\u06cc\u0642 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba <code>AnalyticsUtil.trackScreen()<\/code> \u0627\u0633\u06d2 \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0627\u0633\u06a9\u0631\u06cc\u0646 \u0633\u06d2 \u062f\u0633\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u06a9\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 <code>initState<\/code> \u0627\u0648\u0631 <code>dispose<\/code>. \u06cc\u06c1 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u0646\u0638\u0645 \u0648 \u0636\u0628\u0637 \u0627\u0648\u0631 \u062a\u06a9\u0631\u0627\u0631 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2. \u06c1\u0631 \u0646\u0626\u06cc \u0627\u0633\u06a9\u0631\u06cc\u0646 \u06a9\u0648 \u062a\u0645\u0627\u0645 \u0627\u0641\u0627\u062f\u06cc\u062a \u06a9\u06d2 \u0637\u0631\u06cc\u0642\u0648\u06ba \u06a9\u0648 \u0635\u062d\u06cc\u062d \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u06a9\u0627\u0644 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4 \u062c\u0628 \u062a\u062c\u0632\u06cc\u0627\u062a \u0633\u06d2 \u0628\u0627\u062e\u0628\u0631 \u0631\u06c1\u0646\u06d2 \u06a9\u06d2 \u062f\u0633\u062a\u062e\u0637 \u062a\u0628\u062f\u06cc\u0644 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u06c1\u0645 \u0627\u0633\u06d2 30 \u0645\u0642\u0627\u0645\u0627\u062a \u067e\u0631 \u0627\u067e \u0688\u06cc\u0679 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h4 id=\"heading-option-three-copy-paste-the-code\">\u0622\u067e\u0634\u0646 3: \u06a9\u0648\u0688 \u06a9\u0627\u067e\u06cc \u0627\u0648\u0631 \u067e\u06cc\u0633\u0679 \u06a9\u0631\u06cc\u06ba\u06d4<\/h4>\n<p>\u062c\u06cc\u0633\u0627 \u06a9\u06c1 \u062a\u0639\u0627\u0631\u0641 \u0645\u06cc\u06ba \u0628\u06cc\u0627\u0646 \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u060c \u06cc\u06c1 \u0627\u06cc\u06a9 \u06c1\u06cc \u0645\u0646\u0637\u0642 \u06a9\u06cc \u0627\u06cc\u06a9 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u06a9\u0627\u067e\u06cc\u0627\u06ba \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0648\u0642\u062a \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0633\u0627\u062a\u06be \u0645\u062a\u0636\u0627\u062f\u06cc\u0627\u06ba \u0627\u0648\u0631 \u06a9\u06cc\u0691\u06d2 \u062c\u0645\u0639 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0627\u0646 \u0645\u06cc\u06ba \u0633\u06d2 \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u0622\u067e\u0634\u0646 \u062a\u0633\u0644\u06cc \u0628\u062e\u0634 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0622\u067e \u0648\u0627\u0642\u0639\u06cc \u06a9\u06cc\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u06cc\u06c1 \u06a9\u06c1\u0646\u06d2 \u06a9\u0627 \u0627\u06cc\u06a9 \u0637\u0631\u06cc\u0642\u06c1 \u06c1\u06d2: &quot;\u0627\u0633 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u0645\u06cc\u06ba \u062a\u062c\u0632\u06cc\u0627\u062a\u06cc \u0679\u0631\u06cc\u06a9\u0646\u06af \u06c1\u06d2\u060c \u0627\u0633 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u0645\u06cc\u06ba \u06a9\u0646\u06a9\u0634\u0646 \u06a9\u06cc \u0646\u06af\u0631\u0627\u0646\u06cc \u06c1\u06d2\u060c \u0627\u0633 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u0645\u06cc\u06ba \u062f\u0648\u0646\u0648\u06ba \u06c1\u06cc\u06ba\u060c \u0644\u06cc\u06a9\u0646 \u0627\u0646 \u0645\u06cc\u06ba \u0633\u06d2 \u06a9\u0633\u06cc \u0645\u06cc\u06ba \u0628\u06be\u06cc \u0645\u0634\u062a\u0631\u06a9\u06c1 \u067e\u06cc\u0631\u0646\u0679 \u06a9\u0644\u0627\u0633 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 \u062c\u0648 \u0627\u0633 \u0688\u06be\u0627\u0646\u0686\u06d2 \u06a9\u0648 \u0645\u062c\u0628\u0648\u0631 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4&#8221;<\/p>\n<h3 id=\"heading-the-diamond-problem-that-mixins-avoid\">\u06c1\u06cc\u0631\u06d2 \u06a9\u0627 \u0645\u0633\u0626\u0644\u06c1 \u062c\u0633 \u0633\u06d2 \u0645\u06a9\u0633\u0646\u0633 \u0628\u0686\u062a\u0627 \u06c1\u06d2\u06d4<\/h3>\n<p>\u0627\u06cc\u06a9 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0648\u0631\u0627\u062b\u062a\u060c \u0627\u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062f\u0648\u0646\u0648\u06ba \u0648\u0627\u0644\u062f\u06cc\u0646 \u06a9\u0648 \u0628\u06cc\u06a9 \u0648\u0642\u062a \u0628\u0691\u06be\u0627\u0646\u06d2 \u06a9\u06cc \u0635\u0644\u0627\u062d\u06cc\u062a\u060c \u0627\u06cc\u06a9 \u0648\u0627\u0636\u062d \u062d\u0644 \u06a9\u06cc \u0637\u0631\u062d \u0644\u06af\u062a\u0627 \u06c1\u06d2\u06d4 \u0644\u06cc\u06a9\u0646 \u0627\u0633 \u0633\u06d2 \u06c1\u06cc\u0631\u0648\u06ba \u06a9\u0627 \u0645\u0633\u0626\u0644\u06c1 \u067e\u06cc\u062f\u0627 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/04\/1776167691_781_\u0641\u0644\u0679\u0631-\u0645\u06cc\u06ba-\u0645\u06a9\u0633\u0646\u0633-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4-Full-Handbook.png\" alt=\"\u06c1\u06cc\u0631\u06d2 \u06a9\u0627 \u0645\u0633\u0626\u0644\u06c1 \u062c\u0633 \u0633\u06d2 \u0645\u06a9\u0633\u0646\u0633 \u0628\u0686\u062a\u0627 \u06c1\u06d2\u06d4\" style=\"display:block;margin:0 auto\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u0645\u062e\u062a\u0644\u0641 \u0632\u0628\u0627\u0646\u0648\u06ba \u0645\u06cc\u06ba \u0627\u0644\u062c\u06be\u0646 \u06a9\u06d2 \u0645\u062e\u062a\u0644\u0641 \u062f\u0631\u062c\u06d2 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633 \u0644\u06cc\u06d2 \u0627\u0633 \u0645\u0633\u0626\u0644\u06d2 \u06a9\u0648 \u0645\u062e\u062a\u0644\u0641 \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u062d\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0688\u0627\u0631\u0679 \u0627\u06cc\u06a9 \u0648\u0627\u0636\u062d \u0627\u0648\u0631 \u0627\u0686\u06be\u06cc \u0637\u0631\u062d \u0633\u06d2 \u0645\u062a\u0639\u06cc\u0646 \u0645\u062a\u0628\u0627\u062f\u0644 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0645\u06a9\u0633\u06cc\u0646 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0645\u062a\u0639\u062f\u062f \u0648\u0631\u0627\u062b\u062a \u06a9\u06cc \u062d\u0645\u0627\u06cc\u062a \u0646\u06c1 \u06a9\u0631\u06a9\u06d2 \u0645\u0633\u0626\u0644\u06c1 \u06a9\u0648 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u0679\u0627\u0644\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-the-interface-gap\">\u0627\u0646\u0679\u0631\u0641\u06cc\u0633 \u0641\u0631\u0642<\/h3>\n<p>\u0688\u0627\u0631\u0679 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0645\u062a\u0639\u062f\u062f \u0627\u0646\u0679\u0631\u0641\u06cc\u0633 \u06a9\u0648 \u0644\u0627\u06af\u0648 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u062d\u0645\u0627\u06cc\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2: <code>implements<\/code>. \u062a\u0627\u06c1\u0645\u060c \u0627\u06cc\u06a9 \u0627\u0646\u0679\u0631\u0641\u06cc\u0633 \u0635\u0631\u0641 \u0627\u06cc\u06a9 \u0645\u0639\u0627\u06c1\u062f\u06d2 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f \u0646\u06c1\u06cc\u06ba. \u0627\u06af\u0631 \u0622\u067e \u0627\u0646\u0679\u0631\u0641\u06cc\u0633 \u06a9\u0648 \u0644\u0627\u06af\u0648 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0622\u067e \u06a9\u0648 \u06c1\u0631 \u0627\u06cc\u06a9 \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u0627 \u0628\u0627\u0688\u06cc \u062e\u0648\u062f \u0644\u06a9\u06be\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u060c \u0686\u0627\u06c1\u06d2 \u0627\u0646\u0679\u0631\u0641\u06cc\u0633 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06cc \u062a\u0645\u0627\u0645 \u06a9\u0644\u0627\u0633\u0648\u06ba \u0645\u06cc\u06ba \u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f \u0627\u06cc\u06a9 \u062c\u06cc\u0633\u0627 \u06c1\u0648\u06d4 \u0642\u0633\u0645 \u06a9\u06cc \u062d\u0641\u0627\u0638\u062a \u06a9\u06cc \u0636\u0645\u0627\u0646\u062a \u062f\u06cc \u06af\u0626\u06cc \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u06a9\u0648\u0688 \u06a9\u0627 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<p>\u0645\u06a9\u0633\u0646\u0633 \u0627\u0646\u0679\u0631\u0641\u06cc\u0633 \u0627\u0648\u0631 \u0648\u0631\u0627\u062b\u062a \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0641\u0631\u0642 \u06a9\u0648 \u062e\u062a\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0645\u0639\u0627\u06c1\u062f\u06c1 (\u06a9\u0648\u0646 \u0633\u06d2 \u0637\u0631\u06cc\u0642\u06d2 \u0627\u0648\u0631 \u0641\u06cc\u0644\u0688\u0632 \u0645\u0648\u062c\u0648\u062f \u06c1\u06cc\u06ba) \u0627\u0648\u0631 \u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f (\u0648\u06c1 \u0637\u0631\u06cc\u0642\u06d2 \u0627\u0635\u0644 \u0645\u06cc\u06ba \u06a9\u06cc\u0627 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba) \u062f\u0648\u0646\u0648\u06ba \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0645\u06a9\u0633\u0646\u0633 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06cc \u06a9\u0644\u0627\u0633\u0648\u06ba \u06a9\u0648 \u0646\u06c1 \u0635\u0631\u0641 \u0638\u0627\u06c1\u0631\u06cc \u0634\u06a9\u0644 \u0645\u0644\u062a\u06cc \u06c1\u06d2 \u0628\u0644\u06a9\u06c1 \u0627\u0633 \u06a9\u0627 \u0646\u0641\u0627\u0630 \u0628\u06be\u06cc \u0645\u0641\u062a \u0645\u06cc\u06ba \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-core-mixin-concepts-a-deep-dive\">\u06a9\u0648\u0631 \u0645\u06a9\u0633\u06cc\u0646 \u062a\u0635\u0648\u0631\u0627\u062a: \u0627\u06cc\u06a9 \u06af\u06c1\u0631\u06cc \u063a\u0648\u0637\u06c1<\/h2>\n<h3 id=\"heading-defining-a-basic-mixin\">\u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u0637\u06d2 \u0634\u062f\u06c1 \u0645\u06a9\u0633\u0646 \u062a\u0639\u0631\u06cc\u0641<\/h3>\n<p>\u06a9\u06c1 <code>mixin<\/code> \u06a9\u0644\u06cc\u062f\u06cc \u0644\u0641\u0638 \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u0627 \u0627\u0639\u0644\u0627\u0646 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u06d2 \u0627\u0646\u062f\u0631\u060c \u0622\u067e \u0641\u06cc\u0644\u0688\u0632\u060c \u0637\u0631\u06cc\u0642\u06d2 \u0627\u0648\u0631 \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0644\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u06cc\u0633\u06d2 \u0622\u067e \u06a9\u0644\u0627\u0633 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0644\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">mixin Logger {\n  \/\/ A field defined by the mixin.\n  \/\/ Every class that uses this mixin gets its own _tag field.\n  String get tag => runtimeType.toString();\n\n  void log(String message) {\n    print('[(tag] )message');\n  }\n\n  void logError(String message, [Object? error]) {\n    print('[(tag] ERROR: )message');\n    if (error != null) print('[(tag] Caused by: )error');\n  }\n}\n<\/code><\/pre>\n<p>\u06cc\u06c1 <code>mixin<\/code> \u0628\u0644\u0627\u06cc\u0627 <code>Logger<\/code> \u06a9\u0648\u0688 \u06a9\u0627 \u0627\u06cc\u06a9 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0679\u06a9\u0691\u0627 \u062c\u0633\u06d2 \u0644\u0627\u06af\u0646\u06af \u06a9\u06cc \u0641\u0639\u0627\u0644\u06cc\u062a \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0633\u06cc \u0628\u06be\u06cc \u06a9\u0644\u0627\u0633 \u0645\u06cc\u06ba \u0634\u0627\u0645\u0644 \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u06a9\u0644\u0627\u0633 \u06a9\u0627 \u0646\u0627\u0645 \u0628\u0637\u0648\u0631 \u0679\u06cc\u06af \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u062f\u0648 \u0637\u0631\u06cc\u0642\u06d2 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2: <code>log<\/code> \u0639\u0627\u0645 \u067e\u06cc\u063a\u0627\u0645\u0627\u062a \u067e\u0631\u0646\u0679 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 <code>logError<\/code> \u063a\u0644\u0637\u06cc \u06a9\u0627 \u067e\u06cc\u063a\u0627\u0645 \u067e\u0631\u0646\u0679 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 (\u0627\u0648\u0631 \u0627\u062e\u062a\u06cc\u0627\u0631\u06cc \u0637\u0648\u0631 \u067e\u0631 \u062e\u0648\u062f \u063a\u0644\u0637\u06cc)\u06d4<\/p>\n<p>\u0627\u0628 \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u06a9\u0644\u0627\u0633 \u0627\u0633 \u0644\u0627\u06af\u0646\u06af \u0641\u06cc\u0686\u0631 \u06a9\u0648 \u0645\u0646\u062a\u062e\u0628 \u06a9\u0631 \u0633\u06a9\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">class UserRepository with Logger {\n  Future<user> findUser(String id) async {\n    log('Looking up user: $id');\n    \/\/ ...fetch from database...\n    return null;\n  }\n}\n\nclass AuthService with Logger {\n  Future<bool> login(String email, String password) async {\n    log('Login attempt for: $email');\n    \/\/ ...authenticate...\n    return true;\n  }\n}\n<\/bool><\/user><\/code><\/pre>\n<p>\u062f\u0648\u0646\u0648\u06ba <code>UserRepository<\/code> \u0627\u0648\u0631 <code>AuthService<\/code> \u062d\u0627\u0635\u0644 \u06a9\u0631\u06cc\u06ba <code>log<\/code> \u0627\u0648\u0631 <code>logError<\/code> \u067e\u06cc\u0631\u0646\u0679 \u06a9\u0644\u0627\u0633 \u06a9\u0627 \u0627\u0634\u062a\u0631\u0627\u06a9 \u06a9\u06cc\u06d2 \u0628\u063a\u06cc\u0631 \u0637\u0631\u06cc\u0642\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 \u06a9\u06c1 <code>tag<\/code> \u06af\u06cc\u0679\u0631\u0632 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 <code>runtimeType.toString()<\/code>\u062a\u0648 <code>UserRepository<\/code> \u0679\u06cc\u06af\u0632 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0644\u0627\u06af \u0627\u0646 \u06a9\u0631\u06cc\u06ba\u06d4 <code>[UserRepository]<\/code> \u0627\u0648\u0631 <code>AuthService<\/code> \u0644\u0627\u06af <code>[AuthService]<\/code>\u0648\u06c1 \u0633\u0628 \u0627\u06cc\u06a9 \u06c1\u06cc \u0645\u06a9\u0633\u0646 \u06a9\u06d2 \u0646\u0641\u0627\u0630 \u0645\u06cc\u06ba \u067e\u0627\u0626\u06d2 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-the-on-keyword-restricting-where-a-mixin-can-be-used\">\u06a9\u06c1 <code>on<\/code> \u0645\u0637\u0644\u0648\u0628\u06c1 \u0627\u0644\u0641\u0627\u0638: \u0645\u062d\u062f\u0648\u062f \u06a9\u0631\u06cc\u06ba \u062c\u06c1\u0627\u06ba \u0645\u06a9\u0633\u0646\u0633 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u06d2 \u062c\u0627\u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/h3>\n<p>\u0628\u0639\u0636 \u0627\u0648\u0642\u0627\u062a \u0645\u06a9\u0633\u06cc\u0646 \u0635\u0631\u0641 \u0645\u062e\u0635\u0648\u0635 \u0642\u0633\u0645 \u06a9\u06cc \u06a9\u0644\u0627\u0633\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u0639\u0646\u06cc \u062e\u06cc\u0632 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06a9\u06c1 <code>on<\/code> \u0645\u0637\u0644\u0648\u0628\u06c1 \u0627\u0644\u0641\u0627\u0638 \u0622\u067e \u06a9\u0648 \u06cc\u06c1 \u0627\u0639\u0644\u0627\u0646 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u062f\u06cc\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0645\u06a9\u0633\u06cc\u0646 \u0635\u0631\u0641 \u0627\u0646 \u06a9\u0644\u0627\u0633\u0648\u06ba \u067e\u0631 \u0644\u0627\u06af\u0648 \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u06a9\u0633\u06cc \u0645\u062e\u0635\u0648\u0635 \u0642\u0633\u0645 \u06a9\u0648 \u0628\u0691\u06be\u0627\u062a\u06d2 \u06cc\u0627 \u0646\u0627\u0641\u0630 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0627\u0639\u0644\u0627\u0646 \u06a9\u06cc\u06d2 \u0628\u063a\u06cc\u0631 \u0627\u067e\u0646\u06cc \u0645\u0637\u0644\u0648\u0628\u06c1 \u0642\u0633\u0645 \u06a9\u06d2 \u0627\u0631\u0627\u06a9\u06cc\u0646 \u062a\u06a9 \u0631\u0633\u0627\u0626\u06cc \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ This mixin only makes sense on State objects, because it\n\/\/ uses setState, initState, and dispose which only exist on State.\nmixin ConnectivityMixin<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  bool _isConnected = true;\n\n  \/\/ Because of `on State<t>`, the mixin can freely call setState()\n  \/\/ and override initState()\/dispose() without any errors.\n  \/\/ These methods are guaranteed to exist on the class using this mixin.\n\n  @override\n  void initState() {\n    super.initState(); \/\/ Must call super when overriding lifecycle methods\n    _startConnectivityListener();\n  }\n\n  @override\n  void dispose() {\n    _stopConnectivityListener();\n    super.dispose();\n  }\n\n  void _startConnectivityListener() {\n    \/\/ In a real app, subscribe to a connectivity stream here.\n    log('Started connectivity monitoring');\n    _isConnected = true;\n  }\n\n  void _stopConnectivityListener() {\n    log('Stopped connectivity monitoring');\n  }\n\n  void onConnectivityChanged(bool isConnected) {\n    setState(() {\n      _isConnected = isConnected;\n    });\n  }\n\n  bool get isConnected => _isConnected;\n}\n<\/t><\/t><\/t><\/code><\/pre>\n<p>\u06a9\u06c1 <code>on State<t\/><\/code> \u0631\u06a9\u0648\u0639 \u062f\u0648 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0633\u0628 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u062d\u062f. <code>ConnectivityMixin<\/code> \u0644\u06c1\u0630\u0627\u060c \u0627\u0646 \u06a9\u0648 \u0635\u0631\u0641 \u062a\u0648\u0633\u06cc\u0639\u06cc \u06a9\u0644\u0627\u0633\u0648\u06ba \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0645\u0644\u0627\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 <code>State<t\/><\/code>\u0645\u0631\u062a\u0628 \u0648\u0642\u062a \u067e\u0631 \u0644\u0627\u06af\u0648 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u062f\u0648\u0633\u0631\u0627\u060c \u0622\u067e \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u0648 \u06c1\u0631 \u0686\u06cc\u0632 \u062a\u06a9 \u0645\u06a9\u0645\u0644 \u0631\u0633\u0627\u0626\u06cc \u062f\u06cc\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>State<t\/><\/code> \u06c1\u0645 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba: <code>setState<\/code>, <code>widget<\/code>, <code>context<\/code>, <code>mounted<\/code>\u0627\u0648\u0631 \u0632\u0646\u062f\u06af\u06cc \u06a9\u06d2 \u0686\u06a9\u0631 \u06a9\u06d2 \u0637\u0631\u06cc\u0642\u06d2 \u062c\u06cc\u0633\u06d2: <code>initState<\/code> \u0627\u0648\u0631 <code>dispose<\/code>.<\/p>\n<p>\u06cc\u06c1\u0627\u06ba \u06c1\u06d2 \u06a9\u06c1 \u0641\u0644\u0679\u0631 \u06cc\u06c1 \u06a9\u06cc\u0633\u06d2 \u06a9\u0631\u062a\u0627 \u06c1\u06d2: <code>SingleTickerProviderStateMixin<\/code> \u0641\u06cc\u06a9\u0679\u0631\u06cc \u06cc\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 <code>on State<\/code> \u0627\u0633 \u0628\u0627\u062a \u06a9\u0648 \u06cc\u0642\u06cc\u0646\u06cc \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u06c1 \u06cc\u06c1 \u0635\u0631\u0641 \u0627\u0633 \u067e\u0631 \u0644\u0627\u06af\u0648 \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2: <code>State<\/code> \u0630\u06cc\u0644\u06cc \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc \u0627\u0648\u0631 \u0627\u0648\u0648\u0631 \u0631\u0627\u0626\u0688\u06d4 <code>initState<\/code> \u0627\u0648\u0631 <code>dispose<\/code> \u0627\u0646\u062a\u0638\u0627\u0645 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u0626\u06d2 <code>Ticker<\/code>\u0632\u0646\u062f\u06af\u06cc \u06a9\u0627 \u0686\u06a9\u0631 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0627\u0646\u062c\u0627\u0645 \u067e\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-mixins-with-abstract-members\">\u062e\u0644\u0627\u0635\u06c1 \u0645\u0645\u0628\u0631\u0648\u06ba \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0645\u06a9\u0633\u0646\u0633<\/h3>\n<p>\u0645\u06a9\u0633\u06cc\u0646 \u0627\u06cc\u0633\u06d2 \u0645\u0645\u0628\u0631\u0648\u06ba \u06a9\u0627 \u0627\u0639\u0644\u0627\u0646 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0646 \u06a9\u0648 \u0644\u0627\u06af\u0648 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06cc \u06a9\u0644\u0627\u0633 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u0645\u0636\u0628\u0648\u0637 \u0645\u0639\u0627\u06c1\u062f\u06c1 \u067e\u06cc\u062f\u0627 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0645\u06a9\u0633\u06cc\u0646 \u0645\u062e\u0635\u0648\u0635 \u0631\u0648\u06cc\u06c1 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0644\u06cc\u06a9\u0646 \u06cc\u06c1 \u0633\u0644\u0648\u06a9 \u0627\u0646 \u0627\u0642\u062f\u0627\u0631 \u06cc\u0627 \u0645\u0646\u0637\u0642 \u067e\u0631 \u0645\u0646\u062d\u0635\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u06a9\u0644\u0627\u0633 \u06a9\u0648 \u062e\u0648\u062f \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">mixin Validatable {\n  \/\/ The mixin declares this but does not implement it.\n  \/\/ Any class using this mixin MUST provide an implementation.\n  Map<string string=\"\" function=\"\"> get validators;\n\n  \/\/ The mixin provides this using the abstract getter above.\n  bool validate(Map<string string=\"\"> formData) {\n    for (final entry in validators.entries) {\n      final fieldName = entry.key;\n      final validatorFn = entry.value;\n      final fieldValue = formData[fieldName];\n      final error = validatorFn(fieldValue);\n\n      if (error != null) {\n        onValidationError(fieldName, error);\n        return false;\n      }\n    }\n    return true;\n  }\n\n  \/\/ Another abstract member -- the class decides how to handle errors.\n  void onValidationError(String fieldName, String error);\n}\n<\/string><\/string><\/code><\/pre>\n<p>\u06cc\u06c1 <code>Validatable<\/code> \u0627\u06cc\u06a9 \u0645\u06a9\u0633\u06cc\u0646 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u062a\u0648\u062b\u06cc\u0642 \u06a9\u06d2 \u0646\u0638\u0627\u0645 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0633\u06d2 \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u0637\u0628\u0642\u06c1 \u0627\u067e\u0646\u0627 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631 \u06a9\u06d2 \u0627\u067e\u0646\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 <code>validators<\/code> \u0646\u0642\u0634\u06c1 \u0627\u0648\u0631 <code>onValidationError<\/code> \u0637\u0631\u06cc\u0642\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2\u060c \u0645\u06a9\u0633\u06cc\u0646 \u062e\u0648\u062f \u06c1\u0631 \u0641\u06cc\u0644\u0688 \u06a9\u06d2 \u0639\u0645\u0644 \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u062a\u0627 \u06c1\u06d2\u06d4 <code>formData<\/code>\u062a\u0648\u062b\u06cc\u0642 \u06a9\u0627\u0631 \u06a9\u0648 \u0644\u0627\u06af\u0648 \u06a9\u0631\u06cc\u06ba\u060c \u067e\u06c1\u0644\u06cc \u063a\u0644\u0637\u06cc \u067e\u0631 \u0631\u0648\u06a9\u06cc\u06ba \u0627\u0648\u0631 \u06a9\u0627\u0644 \u06a9\u0631\u06cc\u06ba. <code>onValidationError<\/code> \u0627\u0648\u0631 \u0648\u0627\u067e\u0633\u06cc \u067e\u0631 <code>false<\/code> \u062a\u0648\u062b\u06cc\u0642 \u0646\u0627\u06a9\u0627\u0645 \u06c1\u0648 \u062c\u0627\u062a\u06cc \u06c1\u06d2 \u06cc\u0627 <code>true<\/code> \u0627\u06af\u0631 \u0633\u0628 \u06a9\u0686\u06be \u06af\u0632\u0631 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u0628 \u0622\u067e \u0627\u0633 \u0645\u06a9\u0633 \u06a9\u0648 \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0634\u06a9\u0644 \u06a9\u06cc \u0633\u06a9\u0631\u06cc\u0646 \u067e\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">class _LoginScreenState extends State<loginscreen> with Validatable {\n  \/\/ Fulfills the mixin's requirement.\n  @override\n  Map<string string=\"\" function=\"\"> get validators => {\n    'email': (value) {\n      if (value == null || value.isEmpty) return 'Email is required';\n      if (!value.contains('@')) return 'Enter a valid email';\n      return null;\n    },\n    'password': (value) {\n      if (value == null || value.isEmpty) return 'Password is required';\n      if (value.length < 8) return 'Password must be at least 8 characters';\n      return null;\n    },\n  };\n\n  \/\/ Fulfills the other mixin requirement.\n  @override\n  void onValidationError(String fieldName, String error) {\n    ScaffoldMessenger.of(context).showSnackBar(\n      SnackBar(content: Text('(fieldName: )error')),\n    );\n  }\n\n  void _onSubmit() {\n    final isValid = validate({\n      'email': _emailController.text,\n      'password': _passwordController.text,\n    });\n\n    if (isValid) {\n      \/\/ Proceed with login\n    }\n  }\n}\n<\/string><\/loginscreen><\/code><\/pre>\n<p>\u06cc\u06c1 \u0648\u0627\u0642\u0639\u06cc \u0627\u06cc\u06a9 \u0637\u0627\u0642\u062a\u0648\u0631 \u0646\u0645\u0648\u0646\u06c1 \u06c1\u06d2\u06d4 \u06a9\u06c1 <code>Validatable<\/code> \u0627\u06cc\u06a9 \u0645\u06a9\u0633\u06cc\u0646 \u062a\u0645\u0627\u0645 \u062a\u0648\u062b\u06cc\u0642 \u0622\u0631\u06a9\u06cc\u0633\u0679\u0631\u06cc\u0634\u0646 \u0645\u0646\u0637\u0642 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0644\u06cc\u06a9\u0646 \u0627\u0633\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0637\u0628\u0642\u06d2 \u06a9\u0648 \u0645\u062e\u0635\u0648\u0635 \u0642\u0648\u0627\u0639\u062f \u0627\u0648\u0631 \u063a\u0644\u0637\u06cc \u06a9\u06cc \u0627\u0637\u0644\u0627\u0639 \u062f\u06cc\u0646\u06d2 \u06a9\u06d2 \u0631\u0648\u06cc\u06d2 \u06a9\u0648 \u062a\u0641\u0648\u06cc\u0636 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u0648 \u062a\u0645\u0627\u0645 \u0641\u0627\u0631\u0645 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u067e\u0631 \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\u0644\u0627\u0633 \u0627\u067e\u0646\u06d2 \u0631\u0648\u06cc\u06d2 \u06a9\u0648 \u062a\u062c\u0631\u06cc\u062f\u06cc \u0627\u0631\u0627\u06a9\u06cc\u0646 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0627\u067e\u0646\u06cc \u0645\u0631\u0636\u06cc \u06a9\u06d2 \u0645\u0637\u0627\u0628\u0642 \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0646\u06c1\u06cc\u06ba \u0648\u06c1 \u0646\u0627\u0641\u0630 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-mixing-multiple-mixins\">\u0627\u06cc\u06a9 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0645\u06a9\u0633\u0646\u0633 \u06a9\u0648 \u0645\u0644\u0627\u0646\u0627<\/h3>\n<p>\u0627\u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u0627\u06cc\u06a9 \u0633\u0627\u062a\u06be \u0627\u06cc\u06a9 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0645\u06a9\u0633\u0646\u0633 \u06a9\u0648 \u0627\u06af\u0644\u06cc \u0641\u06c1\u0631\u0633\u062a \u0645\u06cc\u06ba \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06cc \u06c1\u06d2: <code>with<\/code>\u06a9\u0648\u0645\u0627 \u0633\u06d2 \u0627\u0644\u06af:<\/p>\n<pre><code class=\"language-dart\">mixin Analytics {\n  void trackEvent(String name, [Map<string dynamic=\"\">? properties]) {\n    print('Analytics: (name ){properties ?? {}}');\n  }\n\n  void trackScreenView(String screenName) {\n    trackEvent('screen_view', {'screen': screenName});\n  }\n}\n\nmixin ErrorReporter {\n  void reportError(Object error, StackTrace stackTrace) {\n    print('Error reported: $error');\n    print(stackTrace);\n  }\n}\n\nmixin Logger {\n  String get tag => runtimeType.toString();\n\n  void log(String message) => print('[(tag] )message');\n}\n\n\/\/ This class uses all three mixins.\nclass _HomeScreenState extends State<homescreen>\n    with Logger, Analytics, ErrorReporter {\n\n  @override\n  void initState() {\n    super.initState();\n    log('HomeScreen initialized');\n    trackScreenView('HomeScreen');\n  }\n\n  Future<void> _loadData() async {\n    try {\n      log('Loading data...');\n      \/\/ ...load data...\n    } catch (error, stackTrace) {\n      reportError(error, stackTrace);\n    }\n  }\n}\n<\/void><\/homescreen><\/string><\/code><\/pre>\n<p><code>_HomeScreenState<\/code>    \u062d\u0627\u0635\u0644 <code>log<\/code> \u0633\u06d2 <code>Logger<\/code>, <code>trackEvent<\/code> \u0627\u0648\u0631 <code>trackScreenView<\/code> \u0633\u06d2 <code>Analytics<\/code>\u0627\u0648\u0631 <code>reportError<\/code> \u0633\u06d2 <code>ErrorReporter<\/code>\u0633\u0628 \u0627\u06cc\u06a9 \u0635\u0627\u0641 \u0627\u0639\u0644\u0627\u0646 \u0645\u06cc\u06ba\u06d4 \u0627\u0646 \u062e\u0635\u0648\u0635\u06cc\u0627\u062a \u0645\u06cc\u06ba \u0633\u06d2 \u06a9\u0633\u06cc \u06a9\u0648 \u0688\u067e\u0644\u06cc\u06a9\u06cc\u0679 \u06a9\u0648\u0688 \u06cc\u0627 \u0645\u0635\u0646\u0648\u0639\u06cc \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc \u06a9\u0648 \u0645\u062c\u0628\u0648\u0631 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-the-mixin-linearization-order\">\u0645\u06a9\u0633 \u0644\u0627\u0626\u0646 \u0644\u0627\u0626\u0646\u0631\u0627\u0626\u0632\u06cc\u0634\u0646 \u0622\u0631\u0688\u0631<\/h3>\n<p>\u062c\u0628 \u0627\u06cc\u06a9 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0645\u06a9\u0633\u0632 \u0644\u0627\u06af\u0648 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 Dart \u0645\u0646\u062f\u0631\u062c\u06c1 \u0630\u06cc\u0644 \u0639\u0645\u0644 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u0627\u0631 \u06a9\u06d2 \u062a\u0646\u0627\u0632\u0639\u0627\u062a \u0627\u0648\u0631 \u0633\u067e\u0631 \u06a9\u0627\u0644\u0632 \u06a9\u0648 \u062d\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <strong>\u0644\u06a9\u06cc\u0631\u06cc\u0627\u0626\u0632\u06cc\u0634\u0646<\/strong>. \u06cc\u06c1 \u0648\u06c1 \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u0627\u0631 \u06c1\u06d2 \u062c\u0648 \u06c1\u06cc\u0631\u06d2 \u06a9\u06d2 \u0645\u0633\u0627\u0626\u0644 \u06a9\u0648 \u0631\u0648\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u06a9\u0648 \u0633\u0645\u062c\u06be\u0646\u06d2 \u0633\u06d2 \u0622\u067e \u06a9\u0648 \u0628\u0627\u0631\u06cc\u06a9 \u06a9\u06cc\u0691\u0648\u06ba \u0633\u06d2 \u0628\u0686\u0646\u06d2 \u0645\u06cc\u06ba \u0645\u062f\u062f \u0645\u0644 \u0633\u06a9\u062a\u06cc \u06c1\u06d2\u060c \u062e\u0627\u0635 \u0637\u0648\u0631 \u067e\u0631 \u062c\u0628 \u0622\u067e \u06a9\u06d2 \u0645\u06a9\u0633\u0646\u0633 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0637\u0631\u06cc\u0642\u0648\u06ba \u06a9\u0648 \u0627\u0648\u0648\u0631 \u0631\u0627\u0626\u06cc\u0688 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u06cc\u0633\u06d2: <code>initState<\/code> \u06cc\u0627 <code>dispose<\/code>.<\/p>\n<p>\u0688\u0627\u0631\u0679 \u0645\u06a9\u0633\u0646 \u0644\u0633\u0679 \u0645\u06cc\u06ba \u062f\u0627\u0626\u06cc\u06ba \u0633\u06d2 \u0628\u0627\u0626\u06cc\u06ba \u0627\u06cc\u06a9 \u0644\u06a9\u06cc\u0631\u06cc \u0632\u0646\u062c\u06cc\u0631 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u0622\u067e \u06a9\u0627 \u06a9\u0644\u0627\u0633 \u0688\u06cc\u06a9\u0644\u0631\u06cc\u0634\u0646 \u0627\u0633 \u0637\u0631\u062d \u0644\u06af\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-dart\">class MyState extends State<mywidget>\n    with MixinA, MixinB, MixinC { ... }\n<\/mywidget><\/code><\/pre>\n<p>\u0688\u0627\u0631\u0679 \u0633\u0644\u0633\u0644\u06c1 \u06a9\u0648 \u0627\u0633 \u0637\u0631\u062d \u062d\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-plaintext\">State<mywidget> -> MixinA -> MixinB -> MixinC -> MyState\n\nResolution order (most specific wins):\nMyState overrides -> MixinC overrides -> MixinB overrides -> MixinA overrides -> State\n<\/mywidget><\/code><\/pre>\n<p>\u062c\u0628 <code>MyState<\/code> \u0641\u0648\u0646 \u06a9\u0627\u0644 <code>super.initState()<\/code>\u06cc\u06c1 \u06a9\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 <code>MixinC<\/code>\u0627\u06cc\u0633 <code>initState<\/code>. \u062c\u0628 <code>MixinC<\/code> \u0641\u0648\u0646 \u06a9\u0627\u0644 <code>super.initState()<\/code>\u06cc\u06c1 \u06a9\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 <code>MixinB<\/code>\u0627\u06cc\u0633\u06d4 \u0627\u0648\u0631 \u0627\u06af\u0631 \u0622\u067e \u0632\u0646\u062c\u06cc\u0631 \u0633\u06d2 \u0646\u06cc\u0686\u06d2 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>State<\/code>.<\/p>\n<p>\u06cc\u06c1\u06cc \u0648\u062c\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u0645\u06a9\u0633 \u062c\u0648 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u0648 \u0627\u0648\u0648\u0631 \u0631\u0627\u0626\u06cc\u0688 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0633\u06d2 \u06a9\u0627\u0644 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2: <code>super<\/code> \u0646\u0641\u0627\u0630 \u06a9\u06d2 \u0635\u062d\u06cc\u062d \u0645\u0642\u0627\u0645 \u067e\u0631: \u06cc\u06c1 \u0646\u06c1 \u0635\u0631\u0641 \u067e\u06cc\u0631\u0646\u0679 \u06a9\u0644\u0627\u0633 \u06a9\u0648 \u06a9\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0628\u0644\u06a9\u06c1 \u0627\u0633 \u06a9\u06d2 \u067e\u06cc\u0686\u06be\u06d2 \u0645\u0648\u062c\u0648\u062f \u062f\u06cc\u06af\u0631 \u062a\u0645\u0627\u0645 \u0645\u06a9\u0633\u0646\u0633 \u06a9\u0627 \u0633\u0644\u0633\u0644\u06c1 \u062c\u0627\u0631\u06cc \u0631\u06c1\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ Both mixins override initState. They must both call super.\nmixin MixinA on State {\n  @override\n  void initState() {\n    super.initState(); \/\/ Calls State's initState\n    print('MixinA initialized');\n  }\n}\n\nmixin MixinB on State {\n  @override\n  void initState() {\n    super.initState(); \/\/ Calls MixinA's initState (due to linearization)\n    print('MixinB initialized');\n  }\n}\n\nclass MyState extends State<mywidget> with MixinA, MixinB {\n  @override\n  void initState() {\n    super.initState(); \/\/ Calls MixinB's initState\n    print('MyState initialized');\n  }\n}\n\n\/\/ Output order when MyState is initialized:\n\/\/ MixinA initialized   (deepest in the chain, runs first)\n\/\/ MixinB initialized\n\/\/ MyState initialized  (most specific, runs last)\n<\/mywidget><\/code><\/pre>\n<p>\u06cc\u06c1 \u0645\u062b\u0627\u0644 \u062f\u06a9\u06be\u0627\u062a\u06cc \u06c1\u06d2 \u06a9\u06c1 \u0688\u0627\u0631\u0679 \u0645\u06a9\u0633 \u06a9\u0648 \u06a9\u0633 \u0637\u0631\u062d \u0632\u0646\u062c\u06cc\u0631 \u067e\u0631 \u0644\u06af\u0627\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 <code>initState<\/code> \u0641\u0648\u0646 \u06a9\u0627\u0644 <code>super<\/code>\u0627\u0633 \u0644\u06cc\u06d2 \u06a9\u0627\u0644\u0632 \u0644\u06a9\u06cc\u0631\u06cc \u062a\u0631\u062a\u06cc\u0628 \u0645\u06cc\u06ba \u06a9\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06cc\u06ba\u060c \u0633\u0628 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 &quot;\u0628\u06cc\u0633&#8221; \u0645\u06a9\u0633\u06cc\u0646 \u0633\u06d2 \u0634\u0631\u0648\u0639 \u06c1\u0648\u062a\u06cc \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0635\u0644 \u06a9\u0644\u0627\u0633 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062e\u062a\u0645 \u06c1\u0648\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u0627\u0633 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2: <code>MixinA<\/code> \u0627\u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0627\u0648\u0631 \u067e\u06be\u0631 \u0686\u0644\u0627\u0626\u06cc\u06ba\u06d4 <code>MixinB<\/code>\u0627\u0648\u0631 \u0622\u062e\u0631 \u0645\u06cc\u06ba <code>MyState<\/code>\u06c1\u0631 \u067e\u0631\u062a \u0627\u0633 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0627\u06af\u0644\u06cc \u067e\u0631\u062a \u06a9\u0648 \u06a9\u0646\u0679\u0631\u0648\u0644 \u0645\u0646\u062a\u0642\u0644 \u06a9\u0631\u062a\u06cc \u06c1\u06d2: <code>super.initState()<\/code>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/04\/1776167691_425_\u0641\u0644\u0679\u0631-\u0645\u06cc\u06ba-\u0645\u06a9\u0633\u0646\u0633-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4-Full-Handbook.png\" alt=\"\u0644\u0627\u0626\u0646\u0631\u0627\u0626\u0632\u06cc\u0634\u0646 \u0686\u06cc\u0646 \u0648\u06cc\u0698\u0648\u0644\u0627\u0626\u0632\u06cc\u0634\u0646\" style=\"display:block;margin:0 auto\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u06cc\u06c1 \u062a\u0639\u06cc\u06cc\u0646\u0627\u062a\u06cc \u0644\u06a9\u06cc\u0631\u06cc \u0632\u0646\u062c\u06cc\u0631 \u0688\u0627\u0631\u0679 \u06a9\u06d2 \u0645\u06a9\u0633\u0646 \u0633\u0633\u0679\u0645 \u06a9\u0648 \u0645\u062d\u0641\u0648\u0638 \u0628\u0646\u0627\u062a\u06cc \u06c1\u06d2\u06d4 \u0627\u0633 \u0645\u06cc\u06ba \u0642\u0637\u0639\u06cc \u0637\u0648\u0631 \u067e\u0631 \u06a9\u0648\u0626\u06cc \u0627\u0628\u06c1\u0627\u0645 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 \u06a9\u06c1 \u06a9\u0633 \u0637\u0631\u06cc\u0642\u06c1 \u067e\u0631 \u0639\u0645\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u0626\u06d2 \u0627\u0648\u0631 \u06a9\u0628 \u06a9\u06cc\u0627 \u062c\u0627\u0626\u06d2\u06d4 \u062a\u0631\u062a\u06cc\u0628 \u06a9\u0627 \u062a\u0639\u06cc\u0646 \u06c1\u0645\u06cc\u0634\u06c1 \u0645\u06a9\u0633\u06cc\u0646 \u0644\u0633\u0679 \u0633\u06d2 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u060c \u062c\u0633\u06d2 \u0645\u062e\u0635\u0648\u0635\u06cc\u062a \u06a9\u06d2 \u0644\u062d\u0627\u0638 \u0633\u06d2 \u062f\u0627\u0626\u06cc\u06ba \u0633\u06d2 \u0628\u0627\u0626\u06cc\u06ba \u067e\u0691\u06be\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-the-mixin-class-declaration\">\u06a9\u06c1 <code>mixin class<\/code> \u0627\u0639\u0644\u0627\u0646<\/h3>\n<p>\u0688\u0627\u0631\u0679 3 \u0645\u062a\u0639\u0627\u0631\u0641 \u06a9\u0631\u0627\u06cc\u0627 <code>mixin class<\/code>\u06c1\u0627\u0626\u0628\u0631\u0688 (\u0641\u0648\u0631\u06cc \u0637\u0648\u0631 \u067e\u0631) \u062c\u0648 \u0633\u0628 \u06a9\u0648 \u0628\u0627\u0642\u0627\u0639\u062f\u06c1 \u06a9\u0644\u0627\u0633\u0648\u06ba \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 <code>new<\/code> \u06cc\u0627 \u062a\u0648\u0633\u06cc\u0639 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0628\u0646\u06cc\u0627\u062f \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631) \u0627\u0648\u0631 \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 (\u0627\u0633 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0644\u0627\u06af\u0648 \u06c1\u0648\u062a\u0627 \u06c1\u06d2: <code>with<\/code>)\u06d4 \u06cc\u06c1 \u0645\u0641\u06cc\u062f \u06c1\u06d2 \u0627\u06af\u0631 \u0622\u067e \u0627\u06cc\u0633\u06cc \u0642\u0633\u0645 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u062f\u0648\u0646\u0648\u06ba \u06a9\u0631\u062f\u0627\u0631\u0648\u06ba \u06a9\u0648 \u0628\u06be\u0631 \u0633\u06a9\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ Can be used as `class MyClass extends Serializable` OR\n\/\/ as `class MyClass with Serializable`\nmixin class Serializable {\n  Map<string dynamic=\"\"> toJson() {\n    \/\/ Default implementation -- subclasses or mixers can override\n    return {};\n  }\n\n  String toJsonString() {\n    return toJson().toString();\n  }\n}\n\n\/\/ Used as a mixin\nclass User with Serializable {\n  final String id;\n  final String name;\n\n  User({required this.id, required this.name});\n\n  @override\n  Map<string dynamic=\"\"> toJson() => {'id': id, 'name': name};\n}\n\n\/\/ Used as a base class\nclass Document extends Serializable {\n  final String title;\n\n  Document({required this.title});\n\n  @override\n  Map<string dynamic=\"\"> toJson() => {'title': title};\n}\n<\/string><\/string><\/string><\/code><\/pre>\n<p>\u06a9\u06c1 <code>mixin class<\/code> \u0641\u0627\u0631\u0645 \u0639\u0627\u0645 \u0633\u06d2 \u06a9\u0645 \u0639\u0627\u0645 \u06c1\u06d2\u06d4 <code>mixin<\/code>\u062a\u0627\u06c1\u0645\u060c \u0644\u0627\u0626\u0628\u0631\u06cc\u0631\u06cc API \u06a9\u0648 \u0688\u06cc\u0632\u0627\u0626\u0646 \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a \u06cc\u06c1 \u0645\u0641\u06cc\u062f \u06c1\u06d2 \u0627\u0648\u0631 \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0644\u0686\u06a9 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-abstract-mixins\">\u062e\u0644\u0627\u0635\u06c1 \u0645\u06a9\u0633<\/h3>\n<p>\u0622\u067e \u06cc\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u062a\u062c\u0631\u06cc\u062f\u06cc \u0637\u0631\u06cc\u0642\u0648\u06ba \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u0628\u06be\u06cc \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba: <code>abstract<\/code> \u0622\u067e \u06a9\u0644\u06cc\u062f\u06cc \u0627\u0644\u0641\u0627\u0638 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06a9\u06d2 \u06cc\u0627 \u0646\u0641\u0627\u0630 \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u0637\u0631\u06cc\u0642\u0648\u06ba \u06a9\u0627 \u0627\u0639\u0644\u0627\u0646 \u06a9\u0631\u06a9\u06d2 \u0627\u06cc\u0633\u0627 \u06a9\u0631\u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0637\u0628\u0642\u06d2 \u06a9\u0648 \u067e\u06be\u0631 \u0627\u0646 \u0627\u0631\u06a9\u0627\u0646 \u06a9\u0648 \u0644\u0627\u06af\u0648 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">mixin Cacheable {\n  \/\/ The mixin demands a key from the consuming class.\n  String get cacheKey;\n\n  \/\/ The mixin demands a TTL (time-to-live) value.\n  Duration get cacheTTL;\n\n  \/\/ Concrete behavior built on top of the abstract requirements.\n  bool isCacheExpired(DateTime cachedAt) {\n    return DateTime.now().difference(cachedAt) > cacheTTL;\n  }\n\n  String buildVersionedKey(int version) {\n    return '({cacheKey}_v)version';\n  }\n}\n\nclass UserProfileCache with Cacheable {\n  @override\n  String get cacheKey => 'user_profile';\n\n  @override\n  Duration get cacheTTL => const Duration(minutes: 5);\n}\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u067e\u06cc\u0679\u0631\u0646 \u0622\u067e \u06a9\u06cc \u0627\u067e\u0646\u06cc \u0627\u06cc\u067e\u0633 \u0645\u06cc\u06ba \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0637\u0631\u0632 \u06a9\u0627 \u06a9\u0648\u0688 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0628\u06c1\u062a \u0645\u0641\u06cc\u062f \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u06cc\u06ba \u062c\u0648 \u0645\u0639\u0627\u06c1\u062f\u06c1 \u06a9\u0648 \u0646\u0627\u0641\u0630 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 (\u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f <code>cacheKey<\/code> \u0627\u0648\u0631 <code>cacheTTL<\/code>) \u062f\u0648\u0628\u0627\u0631\u06c1 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0645\u0646\u0637\u0642 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 (\u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f <code>isCacheExpired<\/code> \u0627\u0648\u0631 <code>buildVersionedKey<\/code>) \u06cc\u06c1 \u0645\u0641\u062a \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-mixins-in-flutters-own-framework\">\u0641\u0644\u0679\u0631 \u06a9\u06d2 \u0627\u067e\u0646\u06d2 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0633\u06d2 \u0645\u06a9\u0633\u0646\u0633<\/h2>\n<p>\u0627\u067e\u0646\u06d2 \u0645\u06a9\u0633\u0646\u0633 \u0644\u06a9\u06be\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2\u060c \u06cc\u06c1 \u0636\u0631\u0648\u0631\u06cc \u06c1\u06d2 \u06a9\u06c1 \u0627\u0646 \u0645\u06a9\u0633\u0646\u0632 \u06a9\u0648 \u0633\u0645\u062c\u06be\u06cc\u06ba \u062c\u0648 Flutter \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0622\u067e \u0646\u06d2 \u062a\u0642\u0631\u06cc\u0628\u0627\u064b \u06cc\u0642\u06cc\u0646\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0627\u0633 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u0627 \u06c1\u06d2 \u0644\u06cc\u06a9\u0646 \u0633\u0645\u062c\u06be \u06af\u0626\u06d2 \u06c1\u0648\u06ba \u06af\u06d2 \u06a9\u06c1 \u0627\u0633\u06d2 \u0645\u06a9\u0633 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u06a9\u06cc\u0648\u06ba \u0688\u06cc\u0632\u0627\u0626\u0646 \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u062a\u06be\u0627 \u0627\u0648\u0631 \u06cc\u06c1 \u062f\u0631\u0627\u0635\u0644 \u0622\u067e \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u06a9\u06cc\u0627 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <code>State<\/code>\u0627\u067e\u0646\u06d2 \u062c\u0627\u062f\u0648 \u0645\u0646\u062a\u0631\u0648\u06ba \u06a9\u0648 \u0633\u0645\u062c\u06be\u0646\u06d2 \u0645\u06cc\u06ba \u0622\u0633\u0627\u0646 \u0679\u0648\u0644\u0632 \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-tickerproviderstatemixin-and-singletickerproviderstatemixin\"><code>TickerProviderStateMixin<\/code>    \u0627\u0648\u0631 <code>SingleTickerProviderStateMixin<\/code><\/h3>\n<p>\u0641\u0644\u0679\u0631 \u0645\u06cc\u06ba \u0633\u0628 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06c1\u0648\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0645\u06a9\u0633\u0646\u0633 \u06c1\u06cc\u06ba: <code>SingleTickerProviderStateMixin<\/code>. \u0641\u0644\u0679\u0631 \u0645\u06cc\u06ba \u062a\u0645\u0627\u0645 \u0645\u062a\u062d\u0631\u06a9 \u062a\u0635\u0627\u0648\u06cc\u0631 \u06c1\u06cc\u06ba\u06d4 <code>Ticker<\/code>\u0627\u06cc\u06a9 \u0627\u06cc\u0633\u06cc \u0686\u06cc\u0632 \u06c1\u06d2 \u062c\u0648 \u0641\u06cc \u0641\u0631\u06cc\u0645 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u06a9\u0627\u0644 \u0628\u06cc\u06a9 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4 <code>AnimationController<\/code> \u0636\u0631\u0648\u0631\u062a <code>TickerProvider<\/code> (\u06a9\u0648\u0626\u06cc \u0631\u0627\u0633\u062a\u06c1 \u0646\u06c1\u06cc\u06ba\u06d4 <code>vsync<\/code> arguments) \u062a\u0648 \u0622\u067e \u062c\u0627\u0646\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0679\u06a9 \u06a9\u06c1\u0627\u06ba \u0633\u06d2 \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u0627 \u06c1\u06d2\u06d4<\/p>\n<p><code>SingleTickerProviderStateMixin<\/code>    \u0622\u067e \u06a9\u0627 <code>State<\/code> \u06a9\u0644\u0627\u0633 \u06c1\u06cc <code>TickerProvider<\/code>. \u0627\u0633 \u06a9\u0627 \u0627\u0646\u062a\u0638\u0627\u0645 \u0627\u0646\u0641\u0631\u0627\u062f\u06cc \u0637\u0648\u0631 \u067e\u0631 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 <code>Ticker<\/code> \u06cc\u06c1 \u0648\u06cc\u062c\u06cc\u0679 \u06a9\u06d2 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0633\u06d2 \u062c\u0691\u0627 \u06c1\u0648\u0627 \u06c1\u06d2\u06d4 \u0679\u06a9\u0631\u0632 \u0627\u0633 \u0648\u0642\u062a \u0628\u0646\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0628 \u0631\u06cc\u0627\u0633\u062a \u06a9\u06cc \u0627\u0628\u062a\u062f\u0627 \u06a9\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2 \u0627\u0648\u0631 \u0631\u06cc\u0627\u0633\u062a \u06a9\u0648 \u062a\u0628\u0627\u06c1 \u06c1\u0648\u0646\u06d2 \u067e\u0631 \u062d\u0630\u0641 \u06a9\u0631 \u062f\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0645\u06cc\u06ba \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u0648\u06ba\u06d4 <code>on State<\/code>\u0622\u067e \u06cc\u06c1 \u06a9\u0648\u0688 \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u06a9\u0686\u06be \u06a9\u0648\u0688 \u0634\u0627\u0645\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0639\u0644\u0627\u0648\u06c1\u06d4 <code>with<\/code> \u0645\u06cc\u06ba<\/p>\n<pre><code class=\"language-dart\">class _AnimatedCardState extends State<animatedcard>\n    with SingleTickerProviderStateMixin {\n\n  late AnimationController _controller;\n  late Animation<double> _scaleAnimation;\n\n  @override\n  void initState() {\n    super.initState();\n\n    \/\/ `this` is passed as vsync because the mixin makes this State\n    \/\/ object implement the TickerProvider interface.\n    _controller = AnimationController(\n      vsync: this,           \/\/ <-- the mixin makes this valid\n      duration: const Duration(milliseconds: 300),\n    );\n\n    _scaleAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(\n      CurvedAnimation(parent: _controller, curve: Curves.elasticOut),\n    );\n\n    _controller.forward();\n  }\n\n  @override\n  void dispose() {\n    _controller.dispose(); \/\/ You dispose the controller, the mixin handles the ticker\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return ScaleTransition(\n      scale: _scaleAnimation,\n      child: widget.child,\n    );\n  }\n}\n<\/double><\/double><\/animatedcard><\/code><\/pre>\n<p>\u0627\u06af\u0631 \u0622\u067e \u06a9\u0648 \u0627\u06cc\u06a9 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4 <code>AnimationController<\/code> \u0627\u06cc\u06a9 \u062f\u0645 <code>State<\/code>\u0622\u067e \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba <code>TickerProviderStateMixin<\/code> (&quot;\u0633\u0646\u06af\u0644&#8221; \u06a9\u0648 \u0686\u06be\u0648\u0691 \u06a9\u0631)\u060c \u0622\u067e \u0644\u0627\u0645\u062d\u062f\u0648\u062f \u062a\u0639\u062f\u0627\u062f \u0645\u06cc\u06ba \u0679\u06a9\u0631 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">class _MultiAnimationState extends State<multianimationwidget>\n    with TickerProviderStateMixin {\n\n  late AnimationController _entranceController;\n  late AnimationController _pulseController;\n\n  @override\n  void initState() {\n    super.initState();\n    _entranceController = AnimationController(\n      vsync: this,\n      duration: const Duration(milliseconds: 400),\n    );\n    _pulseController = AnimationController(\n      vsync: this,\n      duration: const Duration(seconds: 1),\n    )..repeat(reverse: true);\n  }\n\n  @override\n  void dispose() {\n    _entranceController.dispose();\n    _pulseController.dispose();\n    super.dispose();\n  }\n}\n<\/multianimationwidget><\/code><\/pre>\n<p>\u0627\u0645\u062a\u06cc\u0627\u0632 \u0627\u06c1\u0645 \u06c1\u06d2\u06d4 <code>SingleTickerProviderStateMixin<\/code> \u06cc\u06c1 \u0642\u062f\u0631\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0645\u0648\u062b\u0631 \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0627\u0646\u062f\u0631\u0648\u0646\u06cc \u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f \u0622\u0633\u0627\u0646 \u06c1\u06d2\u06d4 \u0627\u0633 \u0648\u0642\u062a \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba \u062c\u0628 \u0622\u067e \u06a9\u06d2 \u067e\u0627\u0633 \u0628\u0627\u0644\u06a9\u0644 \u0627\u06cc\u06a9 \u06a9\u0646\u0679\u0631\u0648\u0644\u0631 \u06c1\u0648\u06d4 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba <code>TickerProviderStateMixin<\/code> \u062c\u0628 \u0627\u06cc\u06a9 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u06c1\u0648\u06ba\u06d4<\/p>\n<h3 id=\"heading-automatickeepaliveclientmixin\"><code>AutomaticKeepAliveClientMixin<\/code><\/h3>\n<p>\u0633\u06a9\u0631\u0648\u0644 \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a <code>ListView<\/code> \u06cc\u0627 <code>PageView<\/code>\u0641\u0644\u0679\u0631 \u0645\u06cc\u0645\u0648\u0631\u06cc \u06a9\u0648 \u0628\u0686\u0627\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u067e\u0631 \u0633\u06a9\u0631\u0648\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0648\u06cc\u062c\u0679 \u06a9\u0648 \u06c1\u06cc\u0646\u0688\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u0637\u06d2 \u0634\u062f\u06c1 \u0633\u0644\u0648\u06a9 \u06c1\u06d2 \u0627\u0648\u0631 \u0639\u0627\u0645 \u0637\u0648\u0631 \u067e\u0631 \u0648\u06c1\u06cc \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0622\u067e \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u062a\u0627\u06c1\u0645\u060c \u0628\u0639\u0636 \u0627\u0648\u0642\u0627\u062a \u0622\u067e \u06a9\u06d2 \u067e\u0627\u0633 \u0627\u06cc\u06a9 \u0679\u06cc\u0628 \u06cc\u0627 \u0635\u0641\u062d\u06c1 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u062c\u0633\u06d2 \u0622\u067e \u0646\u06cc\u0648\u06cc\u06af\u06cc\u0634\u0646 \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u062d\u0627\u0644\u062a \u06a9\u0648 \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062c\u06cc\u0633\u06d2 \u06a9\u06c1 \u0635\u0627\u0631\u0641 \u062c\u0633 \u0641\u0627\u0631\u0645 \u06a9\u0648 \u067e\u064f\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u06cc\u0627 \u0627\u0633\u06a9\u0631\u0648\u0644 \u067e\u0648\u0632\u06cc\u0634\u0646 \u062a\u06a9 \u067e\u06c1\u0646\u0686 \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p><code>AutomaticKeepAliveClientMixin<\/code>    \u0641\u0644\u0679\u0631 \u06a9\u06d2 \u0632\u0646\u062f\u06c1 \u0631\u06c1\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0646\u0638\u0627\u0645 \u06a9\u0648 \u0645\u0637\u0644\u0639 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u0648\u06cc\u062c\u06cc\u0679 \u06a9\u06cc \u062d\u0627\u0644\u062a \u06a9\u0648 \u062d\u0630\u0641 \u0646\u06c1\u06cc\u06ba \u06a9\u06cc\u0627 \u062c\u0627\u0646\u0627 \u0686\u0627\u06c1\u0626\u06d2 \u06cc\u06c1\u0627\u06ba \u062a\u06a9 \u06a9\u06c1 \u062c\u0628 \u0648\u06cc\u062c\u06cc\u0679 \u06a9\u0648 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u0633\u06d2 \u0627\u0633\u06a9\u0631\u0648\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u0626\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">class _UserFormState extends State<userform>\n    with AutomaticKeepAliveClientMixin {\n\n  \/\/ This getter is the contract of the mixin. Return true to keep alive.\n  \/\/ You can make this dynamic if you want conditional keep-alive.\n  @override\n  bool get wantKeepAlive => true;\n\n  final _nameController = TextEditingController();\n  final _emailController = TextEditingController();\n\n  @override\n  Widget build(BuildContext context) {\n    \/\/ CRITICAL: You must call super.build(context) when using this mixin.\n    \/\/ The mixin's super.build implementation registers this widget with\n    \/\/ Flutter's keep-alive system. Without this call, the mixin does nothing.\n    super.build(context);\n\n    return Column(\n      children: [\n        TextField(controller: _nameController, decoration: const InputDecoration(labelText: 'Name')),\n        TextField(controller: _emailController, decoration: const InputDecoration(labelText: 'Email')),\n      ],\n    );\n  }\n\n  @override\n  void dispose() {\n    _nameController.dispose();\n    _emailController.dispose();\n    super.dispose();\n  }\n}\n<\/userform><\/code><\/pre>\n<p>\u0627\u0633 \u0645\u06a9\u0633\u0646\u06af \u06a9\u06d2 \u0644\u06cc\u06d2 \u062f\u0648 \u062a\u0642\u0627\u0636\u06d2 \u06c1\u06cc\u06ba \u062c\u0646\u06c1\u06cc\u06ba \u0622\u067e \u06c1\u0645\u06cc\u0634\u06c1 \u0644\u0627\u06af\u0648 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba: <code>wantKeepAlive<\/code> \u0627\u0648\u0631 \u06c1\u0645\u06cc\u0634\u06c1 \u06a9\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 <code>super.build(context)<\/code>. \u062f\u0648\u0646\u0648\u06ba \u0645\u06cc\u06ba \u0633\u06d2 \u06a9\u0633\u06cc \u0627\u06cc\u06a9 \u06a9\u0648 \u0628\u06be\u0648\u0644 \u062c\u0627\u0646\u06d2 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u0632\u0646\u062f\u06c1 \u0631\u06c1\u0646\u06d2 \u0648\u0627\u0644\u0627 \u0631\u0648\u06cc\u06c1 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u06a9\u0627\u0645 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u0627\u060c \u062c\u0633 \u06a9\u06cc \u062a\u0634\u062e\u06cc\u0635 \u06a9\u0631\u0646\u0627 \u0627\u06cc\u06a9 \u0645\u0634\u06a9\u0644 \u0645\u0633\u0626\u0644\u06c1 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-widgetsbindingobserver\"><code>WidgetsBindingObserver<\/code><\/h3>\n<p><code>WidgetsBindingObserver<\/code>    \u0627\u06af\u0631\u0686\u06c1 \u062a\u06a9\u0646\u06cc\u06a9\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0627\u06cc\u06a9 \u062a\u062c\u0631\u06cc\u062f\u06cc \u0637\u0628\u0642\u06d2 \u06a9\u0648 \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 (\u067e\u0631\u0627\u0646\u06d2 \u0637\u0631\u0632 \u06a9\u06d2 \u0645\u06a9\u0633\u0646 \u0627\u067e\u0631\u0648\u0686 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0644\u0627\u06af\u0648 \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2)\u060c \u0644\u06cc\u06a9\u0646 \u0627\u0633 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0645\u06a9\u0633\u06cc\u0646 \u0633\u06d2 \u0645\u0645\u0627\u062b\u0644 \u0645\u062d\u0633\u0648\u0633 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u062a\u0645\u06c1\u0627\u0631\u0627 \u06c1\u06d2 <code>State<\/code> \u0627\u06cc\u067e \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0627\u06cc\u0648\u0646\u0679\u0633 \u062a\u06a9 \u0631\u0633\u0627\u0626\u06cc: \u062c\u0628 \u0627\u06cc\u067e \u0628\u06cc\u06a9 \u06af\u0631\u0627\u0624\u0646\u0688 \u0645\u06cc\u06ba \u0686\u0644\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2 \u06cc\u0627 \u067e\u06cc\u0634 \u0645\u0646\u0638\u0631 \u0645\u06cc\u06ba \u0648\u0627\u067e\u0633 \u0622\u062a\u06cc \u06c1\u06d2\u060c \u062c\u0628 \u0688\u06cc\u0648\u0627\u0626\u0633 \u06a9\u0627 \u0679\u06cc\u06a9\u0633\u0679 \u067e\u06cc\u0645\u0627\u0646\u06c1 \u062a\u0628\u062f\u06cc\u0644 \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u060c \u06cc\u0627 \u062c\u0628 \u06a9\u0633\u06cc \u0631\u0627\u0633\u062a\u06d2 \u06a9\u0648 \u062f\u06be\u06a9\u06cc\u0644 \u062f\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u06cc\u0627 \u067e\u0627\u067e \u06a9\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">class _HomeScreenState extends State<homescreen>\n    with WidgetsBindingObserver {\n\n  @override\n  void initState() {\n    super.initState();\n    \/\/ Register this observer with the global WidgetsBinding.\n    \/\/ This connects our State to the Flutter framework's event system.\n    WidgetsBinding.instance.addObserver(this);\n  }\n\n  @override\n  void dispose() {\n    \/\/ Always deregister before the State is destroyed to prevent\n    \/\/ callbacks arriving on a disposed State, which causes errors.\n    WidgetsBinding.instance.removeObserver(this);\n    super.dispose();\n  }\n\n  \/\/ Called when the app lifecycle state changes.\n  @override\n  void didChangeAppLifecycleState(AppLifecycleState state) {\n    switch (state) {\n      case AppLifecycleState.resumed:\n        \/\/ App has returned from background. Refresh data if needed.\n        _refreshData();\n        break;\n      case AppLifecycleState.paused:\n        \/\/ App is going to background. Save draft state, pause timers.\n        _saveDraft();\n        break;\n      case AppLifecycleState.detached:\n        \/\/ App is being terminated. Final cleanup.\n        break;\n      default:\n        break;\n    }\n  }\n\n  \/\/ Called when the user changes their font size in system settings.\n  @override\n  void didChangeTextScaleFactor() {\n    \/\/ Respond to accessibility text size changes if needed.\n    setState(() {});\n  }\n\n  void _refreshData() {}\n  void _saveDraft() {}\n}\n<\/homescreen><\/code><\/pre>\n<h3 id=\"heading-restorationmixin\"><code>RestorationMixin<\/code><\/h3>\n<p><code>RestorationMixin<\/code>    \u06cc\u06c1 \u0627\u06cc\u06a9 \u0632\u06cc\u0627\u062f\u06c1 \u062c\u062f\u06cc\u062f \u0641\u0644\u0679\u0631 \u0645\u06a9\u0633\u06cc\u0646 \u06c1\u06d2\u06d4 <strong>\u0631\u06cc\u0627\u0633\u062a \u06a9\u06cc \u0628\u062d\u0627\u0644\u06cc<\/strong>: \u0627\u06cc\u06a9 \u062e\u0635\u0648\u0635\u06cc\u062a \u062c\u0648 \u0622\u067e\u0631\u06cc\u0679\u0646\u06af \u0633\u0633\u0679\u0645 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06c1 \u0627\u06cc\u067e \u06a9\u0648 \u062e\u062a\u0645 \u0627\u0648\u0631 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0634\u0631\u0648\u0639 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u0639\u062f UI \u062d\u0627\u0644\u062a \u06a9\u0648 \u0628\u062d\u0627\u0644 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4 \u0622\u0626\u06cc \u0627\u0648 \u0627\u06cc\u0633 \u0627\u0648\u0631 \u0627\u06cc\u0646\u0688\u0631\u0627\u0626\u06cc\u0688 \u062f\u0648\u0646\u0648\u06ba \u06c1\u06cc \u0645\u06cc\u0645\u0648\u0631\u06cc \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u067e\u0633 \u0645\u0646\u0638\u0631 \u0645\u06cc\u06ba \u0627\u06cc\u067e\u0633 \u06a9\u0648 \u062e\u062a\u0645 \u06a9\u0631 \u062f\u06cc\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0631\u06cc\u0627\u0633\u062a\u06cc \u0628\u062d\u0627\u0644\u06cc \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u0648 \u0648\u06c1\u0627\u06ba \u0648\u0627\u067e\u0633 \u062c\u0627\u0646\u06d2 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u062f\u06cc\u062a\u06cc \u06c1\u06d2 \u062c\u06c1\u0627\u06ba \u0633\u06d2 \u0627\u0646\u06c1\u0648\u06ba \u0646\u06d2 \u0686\u06be\u0648\u0691\u0627 \u062a\u06be\u0627\u06d4<\/p>\n<pre><code class=\"language-dart\">class _CounterScreenState extends State<counterscreen>\n    with RestorationMixin {\n\n  \/\/ RestorableInt is a special wrapper that knows how to serialize\n  \/\/ its value into the restoration bundle.\n  final RestorableInt _counter = RestorableInt(0);\n\n  \/\/ Required by RestorationMixin: a unique identifier for this state\n  \/\/ within the restoration hierarchy.\n  @override\n  String get restorationId => 'counter_screen';\n\n  \/\/ Required by RestorationMixin: register all restorable properties here.\n  @override\n  void restoreState(RestorationBucket? oldBucket, bool initialRestore) {\n    registerForRestoration(_counter, 'counter_value');\n  }\n\n  @override\n  void dispose() {\n    _counter.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      body: Center(\n        child: Text('Counter: ${_counter.value}'),\n      ),\n      floatingActionButton: FloatingActionButton(\n        onPressed: () => setState(() => _counter.value++),\n        child: const Icon(Icons.add),\n      ),\n    );\n  }\n}\n<\/counterscreen><\/code><\/pre>\n<h3 id=\"heading-the-pattern-behind-flutters-mixins\">\u0641\u0644\u0679\u0631 \u0645\u06a9\u0633\u06cc\u0646 \u067e\u06cc\u0679\u0631\u0646<\/h3>\n<p>\u0641\u0644\u0679\u0631 \u06a9\u06d2 \u062a\u0645\u0627\u0645 \u0628\u0644\u0679 \u0627\u0646 \u0645\u06a9\u0633\u06cc\u0646 \u0627\u0633\u06cc \u0622\u0631\u06a9\u06cc\u0679\u06cc\u06a9\u0686\u0631\u0644 \u067e\u06cc\u0679\u0631\u0646 \u06a9\u06cc \u067e\u06cc\u0631\u0648\u06cc \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0633\u06d2 \u0622\u067e \u0627\u067e\u0646\u06d2 \u0645\u06a9\u0633\u0632 \u06a9\u0648 \u0688\u06cc\u0632\u0627\u0626\u0646 \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a \u0646\u0642\u0644 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4<\/p>\n<p>\u0648\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba <code>on State<\/code> (\u06cc\u0627 \u0627\u0633\u06cc \u0637\u0631\u062d \u06a9\u06cc \u0631\u06a9\u0627\u0648\u0679\u06cc\u06ba) \u0627\u067e\u0646\u06d2 \u0622\u067e \u06a9\u0648 \u0627\u0646 \u06a9\u0644\u0627\u0633\u0648\u06ba \u062a\u06a9 \u0645\u062d\u062f\u0648\u062f \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0648 \u0645\u0639\u0646\u06cc \u062e\u06cc\u0632 \u06c1\u06cc\u06ba\u06d4 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u0648 \u0627\u0648\u0648\u0631 \u0631\u0627\u0626\u06cc\u0688 \u06a9\u0631\u06cc\u06ba (<code>initState<\/code>, <code>dispose<\/code>, <code>build<\/code>) \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0648\u0633\u0627\u0626\u0644 \u06a9\u0648 \u0633\u06cc\u0679 \u0627\u0648\u0631 \u0631\u06cc\u0644\u06cc\u0632 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u0644\u06c1\u0630\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06cc \u06a9\u0644\u0627\u0633\u0648\u06ba \u06a9\u0648 \u06cc\u0648\u0679\u06cc\u0644\u06cc\u0679\u06cc \u0641\u0646\u06a9\u0634\u0646 \u06a9\u0648 \u062f\u0633\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u06a9\u0627\u0644 \u06a9\u0631\u0646\u0627 \u06cc\u0627\u062f \u0646\u06c1\u06cc\u06ba \u0631\u06a9\u06be\u0646\u0627 \u067e\u0691\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u0635\u0627\u0641 \u0627\u0648\u0631 \u06a9\u0645 \u0633\u06d2 \u06a9\u0645 API \u06a9\u0648 \u0628\u06d2 \u0646\u0642\u0627\u0628 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0639\u0627\u0645 \u0637\u0648\u0631 \u067e\u0631 \u0627\u06cc\u06a9 \u06cc\u0627 \u062f\u0648 \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u06cc\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0637\u0628\u0642\u06d2 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0628\u0627\u062a \u0686\u06cc\u062a \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0637\u0631\u06cc\u0642\u06d2\u06d4 \u0627\u0648\u0631 \u0622\u067e \u06a9\u0648 \u062a\u062c\u0631\u06cc\u062f\u06cc \u0645\u0645\u0628\u0631\u0627\u0646 \u06a9\u0648 \u0644\u0627\u06af\u0648 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0637\u0628\u0642\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u06af\u06cc \u062c\u0648 \u0627\u06cc\u06a9 \u0645\u062e\u0635\u0648\u0635 \u0633\u06cc\u0627\u0642 \u0648 \u0633\u0628\u0627\u0642 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u06a9\u0633\u0646 \u06a9\u06d2 \u0631\u0648\u06cc\u06d2 \u06a9\u0648 \u0627\u067e\u0646\u06cc \u0645\u0631\u0636\u06cc \u06a9\u06d2 \u0645\u0637\u0627\u0628\u0642 \u0628\u0646\u0627\u0626\u06cc\u06ba\u06d4<\/p>\n<p>\u06cc\u06c1 \u0627\u0686\u06be\u06cc \u0637\u0631\u062d \u0633\u06d2 \u0688\u06cc\u0632\u0627\u0626\u0646 \u06a9\u0631\u062f\u06c1 \u0645\u06a9\u0633\u0646\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9 \u067e\u0644\u06d2 \u0628\u06a9 \u06c1\u06d2\u06d4 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u06a9\u0648 \u062e\u0648\u062f\u06a9\u0627\u0631 \u0628\u0646\u0627\u0626\u06cc\u06ba\u060c \u062a\u062c\u0631\u06cc\u062f\u06cc \u0627\u0631\u06a9\u0627\u0646 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0627\u0633\u06d2 \u0627\u067e\u0646\u06cc \u0645\u0631\u0636\u06cc \u06a9\u06d2 \u0645\u0637\u0627\u0628\u0642 \u0628\u0646\u0627\u0626\u06cc\u06ba\u060c \u0627\u0648\u0631 \u06a9\u0645 \u0633\u06d2 \u06a9\u0645 \u0633\u0637\u062d \u06a9\u0648 \u0628\u06d2 \u0646\u0642\u0627\u0628 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<h2 id=\"heading-architecture-how-mixins-fit-into-a-flutter-app\">\u0622\u0631\u06a9\u06cc\u0679\u06cc\u06a9\u0686\u0631: \u0627\u067e\u0646\u06cc \u0641\u0644\u0679\u0631 \u0627\u06cc\u067e \u067e\u0631 \u0645\u06a9\u0633 \u06a9\u06cc\u0633\u06d2 \u0644\u06af\u0627\u0626\u06cc\u06ba\u06d4<\/h2>\n<h3 id=\"heading-mixins-as-behavioral-layers\">\u0627\u06cc\u06a9\u0634\u0646 \u0644\u06cc\u0626\u0631\u0632 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0645\u06a9\u0633\u0646\u0633<\/h3>\n<p>\u0622\u067e \u06a9\u06d2 \u0627\u06cc\u067e\u0644\u06cc\u06a9\u06cc\u0634\u0646 \u0641\u0646 \u062a\u0639\u0645\u06cc\u0631 \u0645\u06cc\u06ba \u0645\u06a9\u0633\u0646\u0633 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0633\u0648\u0686\u0646\u06d2 \u06a9\u0627 \u0628\u06c1\u062a\u0631\u06cc\u0646 \u0637\u0631\u06cc\u0642\u06c1 \u06cc\u06c1 \u06c1\u06d2: <strong>\u0637\u0631\u0632 \u0639\u0645\u0644 \u06a9\u0627 \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc<\/strong> \u06cc\u06c1 \u0628\u06cc\u0633 \u06a9\u0644\u0627\u0633 \u0627\u0648\u0631 \u0627\u0633 \u06a9\u06d2 \u0645\u062e\u0635\u0648\u0635 \u0646\u0641\u0627\u0630 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0628\u06cc\u0679\u06be\u062a\u0627 \u06c1\u06d2\u06d4 \u06c1\u0631 \u0645\u06a9\u0633 \u067e\u0631\u062a \u0628\u0627\u0644\u06a9\u0644 \u0627\u06cc\u06a9 \u062a\u0634\u0648\u06cc\u0634 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0630\u0645\u06c1 \u062f\u0627\u0631 \u06c1\u06d2\u06d4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/umang.pk\/wp-content\/uploads\/2026\/04\/1776167692_92_\u0641\u0644\u0679\u0631-\u0645\u06cc\u06ba-\u0645\u06a9\u0633\u0646\u0633-\u06a9\u0627-\u0627\u0633\u062a\u0639\u0645\u0627\u0644-\u06a9\u06cc\u0633\u06d2-\u06a9\u0631\u06cc\u06ba\u06d4-Full-Handbook.png\" alt=\"\u0641\u0644\u0679\u0631 \u0645\u06a9\u0633\u06cc\u0646 \u0622\u0631\u06a9\u06cc\u0679\u06cc\u06a9\u0686\u0631 \u067e\u0631\u062a\" style=\"display:block;margin:0 auto\" width=\"600\" height=\"400\" loading=\"lazy\" title=\"\"><\/p>\n<p>\u06c1\u0631 \u0645\u06a9\u0633\u06cc\u0646 \u0627\u06cc\u06a9 \u0648\u0627\u062d\u062f\u060c \u0627\u0686\u06be\u06cc \u0637\u0631\u062d \u0633\u06d2 \u0645\u062a\u0639\u06cc\u0646 \u062a\u0634\u0648\u06cc\u0634 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0630\u0645\u06c1 \u062f\u0627\u0631 \u06c1\u06d2\u06d4 \u06a9\u06c1 <code>State<\/code> \u062d\u0642\u06cc\u0642\u06cc \u06a9\u0644\u0627\u0633 <code>build<\/code> \u0637\u0631\u06cc\u0642\u06d2\u060c \u06a9\u0627\u0631\u0648\u0628\u0627\u0631\u06cc \u0645\u0646\u0637\u0642\u06cc \u06a9\u0627\u0644\u0632\u060c \u0627\u0648\u0631 \u0648\u06cc\u062c\u06cc\u0679 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u062e\u0635\u0648\u0635 \u0627\u0639\u0645\u0627\u0644 \u0644\u0627\u06af\u0646\u06af \u0633\u06cc\u0679\u0646\u06af\u0632 \u06cc\u0627 \u0627\u06cc\u0646\u0627\u0644\u06cc\u0679\u06a9\u0633 \u0628\u0648\u0627\u0626\u0644\u0631 \u067e\u0644\u06cc\u0679 \u0633\u06d2 \u0622\u0644\u0648\u062f\u06c1 \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0645\u0633\u0627\u0626\u0644 \u0645\u06a9\u0633\u06cc\u0646 \u067e\u0631\u062a \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u067e\u0648\u0634\u06cc\u062f\u06c1 \u0637\u0648\u0631 \u067e\u0631 \u0646\u0645\u0679\u0627\u0626\u06d2 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-composing-mixins-with-state-management\">\u0631\u06cc\u0627\u0633\u062a\u06cc \u0627\u0646\u062a\u0638\u0627\u0645 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0645\u06a9\u0633 \u06a9\u0648 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u0646\u0627<\/h3>\n<p>\u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u0627\u06cc\u067e\u0633 \u0645\u06cc\u06ba\u060c \u0622\u067e \u0639\u0627\u0645 \u0637\u0648\u0631 \u067e\u0631 \u0627\u067e\u0646\u06cc \u062a\u0645\u0627\u0645 \u06a9\u0627\u0631\u0648\u0628\u0627\u0631\u06cc \u0645\u0646\u0637\u0642 \u0645\u06a9\u0633\u0646\u0633 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0646\u06c1\u06cc\u06ba \u0688\u0627\u0644\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>State<\/code> \u06a9\u0644\u0627\u0633 \u0627\u0633 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c \u0645\u06a9\u0633\u0646\u0633 \u0633\u0628 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0637\u0627\u0642\u062a\u0648\u0631 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0628 \u0627\u0646 \u067e\u0631 \u06a9\u0627\u0631\u0631\u0648\u0627\u0626\u06cc \u06a9\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4 <strong>\u0627\u06cc\u06a9 \u062f\u0648\u0633\u0631\u06d2 \u0633\u06d2 \u0645\u062a\u0639\u0644\u0642 \u062e\u062f\u0634\u0627\u062a<\/strong> (\u0644\u0627\u06af\u0646\u06af\u060c \u062a\u062c\u0632\u06cc\u06c1\u060c \u06a9\u0646\u06a9\u0634\u0646\u060c \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0627\u06cc\u0648\u0646\u0679\u0633) \u0627\u0633\u0679\u06cc\u0679 \u0645\u06cc\u0646\u062c\u0645\u0646\u0679 \u0644\u06cc\u0626\u0631 (\u0628\u0644\u0627\u06a9\u060c \u0631\u06cc\u0648\u0631 \u067e\u0648\u0688\u060c \u067e\u0631\u0648\u0648\u0627\u0626\u06cc\u0688\u0631) \u06a9\u0627\u0631\u0648\u0628\u0627\u0631\u06cc \u0645\u0646\u0637\u0642 \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ The mixin handles analytics -- a cross-cutting concern.\n\/\/ It knows nothing about business logic.\nmixin ScreenAnalytics<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  String get screenName;\n\n  @override\n  void initState() {\n    super.initState();\n    _trackScreenOpened();\n  }\n\n  @override\n  void dispose() {\n    _trackScreenClosed();\n    super.dispose();\n  }\n\n  void _trackScreenOpened() {\n    AnalyticsService.instance.track('screen_opened', {\n      'screen': screenName,\n      'timestamp': DateTime.now().toIso8601String(),\n    });\n  }\n\n  void _trackScreenClosed() {\n    AnalyticsService.instance.track('screen_closed', {\n      'screen': screenName,\n    });\n  }\n\n  void trackUserAction(String action, [Map<string dynamic=\"\">? data]) {\n    AnalyticsService.instance.track(action, {\n      'screen': screenName,\n      ...?data,\n    });\n  }\n}\n\n\/\/ The Bloc handles business logic.\n\/\/ The mixin handles analytics.\n\/\/ The State class stitches them together cleanly.\nclass _ProductScreenState extends State<productscreen>\n    with ScreenAnalytics {\n\n  @override\n  String get screenName => 'ProductScreen';\n\n  late final ProductBloc _bloc;\n\n  @override\n  void initState() {\n    super.initState();\n    \/\/ The mixin's initState runs first (due to linearization),\n    \/\/ tracking the screen open, then this code runs.\n    _bloc = ProductBloc()..add(LoadProduct(widget.productId));\n  }\n\n  void _onAddToCart(Product product) {\n    _bloc.add(AddToCart(product));\n    \/\/ Use the mixin's method to track this action.\n    trackUserAction('add_to_cart', {'product_id': product.id});\n  }\n}\n<\/productscreen><\/string><\/t><\/t><\/code><\/pre>\n<p>\u06cc\u06c1 \u0639\u0644\u06cc\u062d\u062f\u06af\u06cc \u0635\u0627\u0641 \u0627\u0648\u0631 \u0642\u0627\u0628\u0644 \u0622\u0632\u0645\u0627\u0626\u0634 \u06c1\u06d2\u06d4 \u0622\u067e \u0679\u06cc\u0633\u0679 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba <code>ProductBloc<\/code> \u062a\u062c\u0632\u06cc\u06c1 \u06cc\u0627 \u0645\u06a9\u0633 \u06a9\u0648\u0688 \u06a9\u06d2 \u0639\u0644\u0627\u0648\u06c1\u06d4 \u0622\u067e \u0679\u06cc\u0633\u0679 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba <code>ScreenAnalytics<\/code> \u0627\u06cc\u06a9 \u06a9\u0645 \u0633\u06d2 \u06a9\u0645 \u0679\u06cc\u0633\u0679 \u06a9\u0644\u0627\u0633 \u0628\u0646\u0627\u0626\u06cc\u06ba \u062c\u0648 \u0627\u0633\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06d2 \u0627\u0648\u0631 \u0627\u0633\u06d2 \u0622\u0632\u0627\u062f\u0627\u0646\u06c1 \u0637\u0648\u0631 \u067e\u0631 \u0645\u06a9\u0633 \u06a9\u0631\u06d2\u06d4 \u06a9\u0633\u06cc \u0628\u06be\u06cc \u0641\u0631\u06cc\u0642 \u06a9\u06d2 \u062a\u062d\u0641\u0638\u0627\u062a \u062f\u0648\u0633\u0631\u06d2 \u067e\u0631 \u0646\u06c1\u06cc\u06ba \u0688\u0627\u0644\u06d2 \u062c\u0627\u062a\u06d2\u06d4<\/p>\n<h2 id=\"heading-writing-your-own-mixins-practical-patterns\">\u0627\u067e\u0646\u06d2 \u0645\u06a9\u0633\u0646\u0633 \u0644\u06a9\u06be\u0646\u0627: \u0639\u0645\u0644\u06cc \u0646\u0645\u0648\u0646\u06d2\u06d4<\/h2>\n<h3 id=\"heading-the-lifecycle-mixin-pattern\">\u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0645\u06a9\u0633\u06cc\u0646 \u067e\u06cc\u0679\u0631\u0646<\/h3>\n<p>\u0641\u0644\u0679\u0631 \u0645\u06cc\u06ba \u0633\u0628 \u0633\u06d2 \u0642\u06cc\u0645\u062a\u06cc \u0645\u06a9\u0633\u0646\u0633 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0645\u06a9\u0633\u0646\u0633 \u06c1\u06cc\u06ba\u06d4 <code>initState<\/code> \u0627\u0648\u0631 <code>dispose<\/code> \u062e\u0648\u062f\u06a9\u0627\u0631 \u0637\u0648\u0631 \u067e\u0631 \u0648\u0633\u0627\u0626\u0644 \u06a9\u0648 \u0633\u06cc\u0679 \u0627\u0648\u0631 \u0631\u06cc\u0644\u06cc\u0632 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0641\u0644\u0679\u0631 \u0645\u06cc\u06ba \u06a9\u06cc\u0691\u06d2 \u06a9\u06cc \u0633\u0628 \u0633\u06d2 \u0639\u0627\u0645 \u0648\u062c\u06c1 \u06a9\u0648 \u062e\u062a\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2: \u06a9\u0646\u0679\u0631\u0648\u0644\u0631\u0632\u060c \u0627\u0633\u0679\u0631\u06cc\u0645 \u0633\u0628\u0633\u06a9\u0631\u067e\u0634\u0646\u0632\u060c \u06cc\u0627 \u0679\u0627\u0626\u0645\u0631\u0632 \u06a9\u0648 \u062d\u0630\u0641 \u06a9\u0631\u0646\u0627 \u0628\u06be\u0648\u0644 \u062c\u0627\u0646\u0627\u06d4<\/p>\n<p>\u06cc\u06c1\u0627\u06ba \u0627\u06cc\u06a9 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0645\u06a9\u0633 \u06c1\u06d2: <code>TextEditingController<\/code>:<\/p>\n<pre><code class=\"language-dart\">mixin TextControllerMixin<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  \/\/ The consuming class provides the number of controllers needed.\n  \/\/ This makes the mixin flexible without hardcoding behavior.\n  List<texteditingcontroller> get textControllers;\n\n  @override\n  void dispose() {\n    \/\/ Automatically disposes every controller the class declared.\n    \/\/ The class never needs to remember to call dispose() on each one.\n    for (final controller in textControllers) {\n      controller.dispose();\n    }\n    super.dispose();\n  }\n}\n\n\/\/ Usage: the State class simply declares its controllers and mixes in the mixin.\n\/\/ Disposal is handled automatically -- no manual dispose calls needed.\nclass _RegistrationFormState extends State<registrationform>\n    with TextControllerMixin {\n\n  final _nameController = TextEditingController();\n  final _emailController = TextEditingController();\n  final _passwordController = TextEditingController();\n\n  @override\n  List<texteditingcontroller> get textControllers => [\n    _nameController,\n    _emailController,\n    _passwordController,\n  ];\n\n  @override\n  Widget build(BuildContext context) {\n    return Column(\n      children: [\n        TextField(controller: _nameController),\n        TextField(controller: _emailController),\n        TextField(controller: _passwordController),\n      ],\n    );\n  }\n}\n<\/texteditingcontroller><\/registrationform><\/texteditingcontroller><\/t><\/t><\/code><\/pre>\n<p>\u06cc\u06c1\u0627\u06ba \u06a9\u06cc \u0637\u0627\u0642\u062a \u06c1\u06d2\u06d4 <code>_RegistrationFormState<\/code> \u0627\u067e\u0646\u06d2 \u06a9\u0646\u0679\u0631\u0648\u0644\u0631 \u06a9\u0648 \u0636\u0627\u0626\u0639 \u06a9\u0631\u0646\u0627 \u0646\u06c1 \u0628\u06be\u0648\u0644\u06cc\u06ba\u06d4 \u0645\u06a9\u0633\u0646\u0632 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u062a\u0635\u0631\u0641 \u06a9\u0648 \u06cc\u0642\u06cc\u0646\u06cc \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-the-debounce-mixin-pattern\">\u0688\u06cc\u0628\u0627\u0624\u0646\u0633 \u0645\u06a9\u0633\u06cc\u0646 \u067e\u06cc\u0679\u0631\u0646<\/h3>\n<p>\u0688\u06cc\u0628\u0627\u0624\u0646\u0633 \u0627\u06cc\u06a9 \u0639\u0627\u0645 \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4 \u06c1\u0631 \u0628\u0627\u0631 \u062c\u0628 \u06a9\u0648\u0626\u06cc \u06a9\u0644\u06cc\u062f \u062f\u0628\u0627\u0626\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2 \u062a\u0648 \u06a9\u0627\u0631\u0631\u0648\u0627\u0626\u06cc \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2\u060c \u0622\u067e \u0627\u0633 \u06a9\u0627\u0631\u0631\u0648\u0627\u0626\u06cc \u06a9\u0648 \u0627\u0633 \u0648\u0642\u062a \u062a\u06a9 \u0645\u0648\u062e\u0631 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0628 \u062a\u06a9 \u06a9\u06c1 \u0635\u0627\u0631\u0641 \u0679\u0627\u0626\u067e \u06a9\u0631\u0646\u0627 \u0628\u0646\u062f \u0646\u06c1 \u06a9\u0631 \u062f\u06d2\u06d4 \u06cc\u06c1 \u0645\u0646\u0637\u0642 \u0627\u0646 \u062a\u0645\u0627\u0645 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u067e\u0631 \u06cc\u06a9\u0633\u0627\u06ba \u06c1\u06d2 \u062c\u0648 \u0627\u0633\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06cc \u06c1\u06cc\u06ba\u060c \u062c\u0648 \u0627\u0633\u06d2 \u0627\u06cc\u06a9 \u0628\u06c1\u062a\u0631\u06cc\u0646 \u0645\u06a9\u0633 \u0627\u0645\u06cc\u062f\u0648\u0627\u0631 \u0628\u0646\u0627\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">mixin DebounceMixin<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  Timer? _debounceTimer;\n\n  \/\/ Runs `action` after `delay` has passed without another call.\n  \/\/ Each new call resets the timer.\n  void debounce(VoidCallback action, {Duration delay = const Duration(milliseconds: 500)}) {\n    _debounceTimer?.cancel();\n    _debounceTimer = Timer(delay, action);\n  }\n\n  @override\n  void dispose() {\n    _debounceTimer?.cancel();\n    super.dispose();\n  }\n}\n\n\/\/ Any screen that needs debounced search gets it for free.\nclass _SearchScreenState extends State<searchscreen>\n    with DebounceMixin {\n\n  void _onSearchChanged(String query) {\n    \/\/ This fires 500ms after the user stops typing, not on every keystroke.\n    debounce(() {\n      context.read<searchbloc>().add(SearchQueryChanged(query));\n    });\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    return TextField(\n      onChanged: _onSearchChanged,\n      decoration: const InputDecoration(hintText: 'Search...'),\n    );\n  }\n}\n<\/searchbloc><\/searchscreen><\/t><\/t><\/code><\/pre>\n<h3 id=\"heading-the-loading-state-mixin-pattern\">\u0633\u0679\u06cc\u0679 \u0645\u06a9\u0633\u0646 \u067e\u06cc\u0679\u0631\u0646 \u0644\u0648\u0688 \u06c1\u0648 \u0631\u06c1\u0627 \u06c1\u06d2\u06d4<\/h3>\n<p>\u0628\u06c1\u062a \u0633\u0627\u0631\u06cc \u0627\u0633\u06a9\u0631\u06cc\u0646\u06cc\u06ba \u0627\u06cc\u06a9 \u06c1\u06cc \u0633\u0627\u062e\u062a \u06a9\u0627 \u0627\u0634\u062a\u0631\u0627\u06a9 \u06a9\u0631\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u06cc\u0639\u0646\u06cc\u060c \u06cc\u06c1 \u0644\u0648\u0688 \u06a9\u06cc \u062d\u0627\u0644\u062a\u060c \u063a\u0644\u0637\u06cc \u06a9\u06cc \u062d\u0627\u0644\u062a\u060c \u06cc\u0627 \u0688\u06cc\u0679\u0627 \u06a9\u06cc \u062d\u0627\u0644\u062a \u06c1\u0648\u0633\u06a9\u062a\u06cc \u06c1\u06d2\u06d4 \u062a\u0645\u0627\u0645 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u067e\u0631 \u0627\u0646 \u062a\u06cc\u0646\u0648\u06ba \u0631\u06cc\u0627\u0633\u062a\u0648\u06ba \u06a9\u0627 \u062f\u0633\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0627\u0646\u062a\u0638\u0627\u0645 \u06a9\u0631\u0646\u0627 \u062a\u06a9\u0631\u0627\u0631 \u06a9\u0627 \u0628\u0627\u0639\u062b \u0628\u0646\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u0645\u06a9\u0633\u06cc\u0646 \u0627\u0633 \u06a9\u0648 \u0645\u0639\u06cc\u0627\u0631\u06cc \u0628\u0646\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-dart\">mixin LoadingStateMixin<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  bool _isLoading = false;\n  Object? _error;\n\n  bool get isLoading => _isLoading;\n  bool get hasError => _error != null;\n  Object? get error => _error;\n\n  \/\/ Wraps an async operation with automatic loading state management.\n  \/\/ The consuming class calls this instead of managing booleans manually.\n  Future<r> runWithLoading<r>(Future<r> Function() operation) async {\n    if (_isLoading) return null; \/\/ Prevent duplicate calls\n\n    setState(() {\n      _isLoading = true;\n      _error = null;\n    });\n\n    try {\n      final result = await operation();\n      if (mounted) {\n        setState(() => _isLoading = false);\n      }\n      return result;\n    } catch (e) {\n      if (mounted) {\n        setState(() {\n          _isLoading = false;\n          _error = e;\n        });\n      }\n      return null;\n    }\n  }\n\n  void clearError() {\n    setState(() => _error = null);\n  }\n}\n\n\/\/ Any data-fetching screen gets this for free.\nclass _ProfileScreenState extends State<profilescreen>\n    with LoadingStateMixin {\n\n  User? _user;\n\n  @override\n  void initState() {\n    super.initState();\n    _fetchUser();\n  }\n\n  Future<void> _fetchUser() async {\n    final user = await runWithLoading(\n      () => UserRepository().getUser(widget.userId),\n    );\n    if (user != null && mounted) {\n      setState(() => _user = user);\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    if (isLoading) {\n      return const Center(child: CircularProgressIndicator());\n    }\n\n    if (hasError) {\n      return Center(\n        child: Column(\n          mainAxisSize: MainAxisSize.min,\n          children: [\n            Text('Error: $error'),\n            ElevatedButton(\n              onPressed: () {\n                clearError();\n                _fetchUser();\n              },\n              child: const Text('Retry'),\n            ),\n          ],\n        ),\n      );\n    }\n\n    if (_user == null) {\n      return const Center(child: Text('No user found.'));\n    }\n\n    return ProfileView(user: _user!);\n  }\n}\n<\/void><\/profilescreen><\/r><\/r><\/r><\/t><\/t><\/code><\/pre>\n<p>\u06cc\u06c1 \u0645\u0631\u06a9\u0628 \u06c1\u06d2\u060c <code>LoadingStateMixin<\/code>\u0627\u06cc\u06a9 \u0628\u0644\u0679 \u0627\u0646 \u0637\u0631\u06cc\u0642\u06c1 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 <code>State<\/code> \u0627\u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u062c\u0648 \u0628\u0648\u0627\u0626\u0644\u0631 \u067e\u0644\u06cc\u0679 \u06a9\u0648 \u062f\u06c1\u0631\u0627\u0626\u06d2 \u0628\u063a\u06cc\u0631 \u0644\u0648\u0688\u0646\u06af\u060c \u063a\u0644\u0637\u06cc\u0648\u06ba \u0627\u0648\u0631 \u063a\u06cc\u0631 \u0645\u0637\u0627\u0628\u0642\u062a \u067e\u0630\u06cc\u0631 \u06a9\u0627\u0631\u0631\u0648\u0627\u0626\u06cc\u0648\u06ba \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u062a\u06cc \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0628\u06d2 \u0646\u0642\u0627\u0628 \u06a9\u0631\u06a9\u06d2 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <code>isLoading<\/code>, <code>hasError<\/code>\u0627\u0648\u0631 <code>error<\/code> \u062d\u0627\u0635\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u0627\u060c \u0627\u0648\u0631 <code>runWithLoading<\/code> \u06a9\u0627\u0645\u06cc\u0627\u0628\u06cc\u0648\u06ba \u0627\u0648\u0631 \u063a\u0644\u0637\u06cc\u0648\u06ba \u06a9\u0648 \u0645\u062d\u0641\u0648\u0638 \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u0633\u0646\u0628\u06be\u0627\u0644\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0644\u0648\u0688\u0646\u06af \u06a9\u0648 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0622\u0646 \u0627\u0648\u0631 \u0622\u0641 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0627\u06cc\u06a9 \u0637\u0631\u06cc\u0642\u06c1\u06d4 \u067e\u06be\u0631 \u0645\u0646\u062f\u0631\u062c\u06c1 \u0630\u06cc\u0644 \u0633\u06a9\u0631\u06cc\u0646 \u0638\u0627\u06c1\u0631 \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u0627: <code>_ProfileScreenState<\/code> \u0622\u067e \u0622\u0633\u0627\u0646\u06cc \u0633\u06d2 \u06a9\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>runWithLoading<\/code> \u0688\u06cc\u0679\u0627 \u0628\u0627\u0632\u06cc\u0627\u0641\u062a \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a\u060c UI \u0644\u0648\u0688\u0631\u060c \u063a\u0644\u0637\u06cc \u06a9\u0627 \u067e\u06cc\u063a\u0627\u0645\u060c \u06cc\u0627 \u0627\u0635\u0644 \u0645\u0648\u0627\u062f \u06a9\u0648 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062f\u06c1 \u0627\u0633\u0679\u06cc\u0679\u0633 \u0648\u06cc\u0644\u06cc\u0648 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-the-form-validation-mixin-pattern\">\u0641\u0627\u0631\u0645 \u06a9\u06cc \u062a\u0648\u062b\u06cc\u0642 \u0645\u06a9\u0633\u06cc\u0646 \u067e\u06cc\u0679\u0631\u0646<\/h3>\n<p>\u0641\u0627\u0631\u0645 \u06a9\u06cc \u062a\u0648\u062b\u06cc\u0642 \u06a9\u06cc \u0645\u0646\u0637\u0642 \u062a\u0642\u0631\u06cc\u0628\u0627\u064b \u062a\u0645\u0627\u0645 \u0627\u06cc\u067e\u0633 \u0645\u06cc\u06ba \u0639\u0627\u0644\u0645\u06af\u06cc\u0631 \u06c1\u06d2\u06d4 \u062a\u0645\u0627\u0645 \u0631\u062c\u0633\u0679\u0631\u06cc\u0634\u0646 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0632\u060c \u0644\u0627\u06af \u0627\u0646 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0632\u060c \u0627\u0648\u0631 \u0633\u06cc\u0679 \u0627\u067e \u0627\u0633\u06a9\u0631\u06cc\u0646\u0632 \u062c\u0645\u0639 \u06a9\u0631\u0627\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0622\u067e \u06a9\u06d2 \u0627\u0646 \u067e\u0679 \u06a9\u06cc \u062a\u0648\u062b\u06cc\u0642 \u06a9\u0631\u062a\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u06cc\u0627\u0631 \u062a\u0648\u062b\u06cc\u0642 \u0645\u06a9\u0633\u06cc\u0646 \u06cc\u06c1 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-dart\">mixin FormValidationMixin<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  final _formKey = GlobalKey<formstate>();\n  final Map<string string=\"\"> _fieldErrors = {};\n\n  GlobalKey<formstate> get formKey => _formKey;\n  Map<string string=\"\"> get fieldErrors => Map.unmodifiable(_fieldErrors);\n\n  bool validateForm() {\n    \/\/ Clears all previous field errors\n    setState(() => _fieldErrors.clear());\n\n    final isFormValid = _formKey.currentState?.validate() ?? false;\n\n    if (!isFormValid) {\n      onValidationFailed();\n    }\n\n    return isFormValid;\n  }\n\n  void setFieldError(String field, String? error) {\n    setState(() => _fieldErrors[field] = error);\n  }\n\n  String? getFieldError(String field) => _fieldErrors[field];\n\n  bool get hasAnyError => _fieldErrors.values.any((e) => e != null);\n\n  \/\/ Called when form validation fails. The class can override this\n  \/\/ to show a snackbar, scroll to the first error, or play a shake animation.\n  void onValidationFailed() {}\n}\n<\/string><\/formstate><\/string><\/formstate><\/t><\/t><\/code><\/pre>\n<p>\u06cc\u06c1 <code>FormValidationMixin<\/code> \u06a9\u0686\u06be \u0628\u06be\u06cc \u062f\u0648 <code>State<\/code> \u0641\u0627\u0631\u0645 \u06a9\u06cc \u062a\u0648\u062b\u06cc\u0642 \u06a9\u0627 \u0627\u0646\u062a\u0638\u0627\u0645 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0628\u0644\u0679 \u0627\u0646 \u0637\u0631\u06cc\u0642\u06d2 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0644\u0627\u0633\u0632 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <code>formKey<\/code> \u0627\u067e\u0646\u06d2 \u0641\u0627\u0631\u0645 \u06a9\u0648 \u06a9\u0646\u0679\u0631\u0648\u0644 \u06a9\u0631\u06cc\u06ba\u060c \u0641\u06cc\u0644\u0688 \u0644\u06cc\u0648\u0644 \u06a9\u06cc \u063a\u0644\u0637\u06cc\u0648\u06ba \u06a9\u0648 \u0627\u0633\u0679\u0648\u0631 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0646 \u06a9\u0648 \u0628\u06d2 \u0646\u0642\u0627\u0628 \u06a9\u0631\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0627\u0633 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u062a\u0648\u062b\u06cc\u0642 \u0686\u0644\u0627\u0626\u06cc\u06ba: <code>validateForm<\/code>\u0646\u0627\u06a9\u0627\u0645\u06cc \u067e\u0631 \u0627\u067e\u0646\u06cc \u06a9\u0644\u0627\u0633 \u06a9\u0627 \u0631\u062f \u0639\u0645\u0644 \u0628\u0630\u0631\u06cc\u0639\u06c1 \u06a9\u0631\u06cc\u06ba: <code>onValidationFailed<\/code>. \u06cc\u06c1 \u062f\u0633\u062a\u06cc \u063a\u0644\u0637\u06cc \u06a9\u0648 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u0646\u06d2 \u0627\u0648\u0631 \u063a\u0644\u0637\u06cc\u0648\u06ba \u06a9\u06cc \u062c\u0627\u0646\u0686 \u06a9\u0631\u0646\u06d2\u060c UI \u06a9\u0648 \u0635\u0627\u0641 \u0631\u06a9\u06be\u0646\u06d2 \u0627\u0648\u0631 \u062a\u0648\u062b\u06cc\u0642 \u06a9\u06cc \u0645\u0646\u0637\u0642 \u06a9\u0648 \u062f\u06c1\u0631\u0627\u0646\u06d2 \u06a9\u06cc \u0628\u062c\u0627\u0626\u06d2 \u0633\u0646\u0679\u0631\u0644\u0627\u0626\u0632 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0628\u06be\u06cc \u0627\u062c\u0627\u0632\u062a \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-advanced-concepts\">\u0627\u0639\u0644\u06cc \u062f\u0631\u062c\u06d2 \u06a9\u06d2 \u062a\u0635\u0648\u0631\u0627\u062a<\/h2>\n<h3 id=\"heading-mixins-vs-abstract-classes-vs-extension-methods\">\u0645\u06a9\u0633\u06cc\u0646 \u0628\u0645\u0642\u0627\u0628\u0644\u06c1 \u062e\u0644\u0627\u0635\u06c1 \u06a9\u0644\u0627\u0633 \u0628\u0645\u0642\u0627\u0628\u0644\u06c1 \u062a\u0648\u0633\u06cc\u0639 \u06a9\u0627 \u0637\u0631\u06cc\u0642\u06c1<\/h3>\n<p>\u062f\u06cc\u06af\u0631 \u0688\u0627\u0631\u0679 \u0679\u0648\u0644\u0632 \u06a9\u06d2 \u0645\u0642\u0627\u0628\u0644\u06d2 \u0645\u06cc\u06ba \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0628 \u06a9\u0631\u0646\u0627 \u06c1\u06d2 \u06cc\u06c1 \u0633\u0645\u062c\u06be\u0646\u0627 \u0627\u062a\u0646\u0627 \u06c1\u06cc \u0636\u0631\u0648\u0631\u06cc \u06c1\u06d2 \u062c\u062a\u0646\u0627 \u06cc\u06c1 \u062c\u0627\u0646\u0646\u0627 \u06a9\u06c1 \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u06cc\u0633\u06d2 \u0644\u06a9\u06be\u0646\u0627 \u06c1\u06d2\u06d4 \u06c1\u0631 \u0679\u0648\u0644 \u06a9\u0627 \u0627\u067e\u0646\u0627 \u0645\u0642\u0635\u062f \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p><strong>\u062e\u0644\u0627\u0635\u06c1 \u06a9\u0644\u0627\u0633<\/strong> \u0622\u067e \u0627\u06cc\u06a9 \u0645\u0639\u0627\u06c1\u062f\u06d2 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u062c\u0632\u0648\u06cc \u0646\u0641\u0627\u0630 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0644\u06cc\u06a9\u0646 \u0627\u06cc\u06a9 \u0627\u062c\u0627\u0632\u062a \u06cc\u0627\u0641\u062a\u06c1 \u0633\u067e\u0631 \u06a9\u0644\u0627\u0633 \u06a9\u06d2 \u0633\u0627\u062a\u06be\u06d4<\/p>\n<p>&quot;is-a&#8221; \u062a\u0639\u0644\u0642\u0627\u062a \u06a9\u06cc \u0645\u0627\u0688\u0644\u0646\u06af \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a \u062a\u062c\u0631\u06cc\u062f\u06cc \u06a9\u0644\u0627\u0633\u0632 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 <code>Dog<\/code> \u0686\u0627\u0646\u062f\u06cc <code>Animal<\/code>, <code>PaymentCard<\/code> \u06c1\u06d2 <code>PaymentMethod<\/code>. \u062c\u0628 \u0642\u0633\u0645 \u06a9\u06cc \u0634\u0646\u0627\u062e\u062a \u0627\u06c1\u0645 \u06c1\u0648 \u0627\u0648\u0631 \u0622\u067e \u0644\u06a9\u06be\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06ba \u062a\u0648 \u0622\u067e \u062e\u0644\u0627\u0635\u06c1 \u06a9\u0644\u0627\u0633\u0632 \u0628\u06be\u06cc \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba: <code>if (payment is PaymentMethod)<\/code>.<\/p>\n<p><strong>\u0645\u06a9\u0633<\/strong> \u0633\u067e\u0631 \u06a9\u0644\u0627\u0633 \u0633\u0644\u0627\u0679\u0633 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u06d2 \u0628\u063a\u06cc\u0631 \u0637\u0631\u0632 \u0639\u0645\u0644 \u06a9\u06d2 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0628\u0646\u0688\u0644\u0632 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p>&quot;is&#8221; \u06cc\u0627 &quot;\u0645\u0645\u06a9\u0646\u06c1&#8221; \u062a\u0639\u0644\u0642\u0627\u062a \u06a9\u06cc \u0645\u0627\u0688\u0644\u0646\u06af \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a \u0645\u06a9\u0633\u0646\u0633 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u06a9\u06c1\u062a\u06cc \u06c1\u06d2 &quot;\u06c1\u06cc\u0632 \u0627\u06cc\u0646\u0627\u0644\u06cc\u0679\u06a9\u0633 \u0679\u0631\u06cc\u06a9\u0646\u06af \u06c1\u06d2&#8221;\u060c \u0631\u06cc\u067e\u0648\u0632\u0679\u0631\u06cc \u06a9\u06c1\u062a\u06cc \u06c1\u06d2 &quot;\u0644\u0627\u06af\u0646\u06af \u06a9\u0648 \u0642\u0627\u0628\u0644 \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2&#8221;\u060c \u0627\u0648\u0631 \u0641\u0627\u0631\u0645 \u06a9\u06c1\u062a\u0627 \u06c1\u06d2 &quot;\u062a\u0648\u062b\u06cc\u0642 \u06c1\u06d2&#8221;\u06d4 \u0645\u06a9\u0633\u06cc\u0646\u0632 \u06a9\u0631\u0627\u0633 \u0641\u0646\u06a9\u0634\u0646\u0644\u0679\u06cc \u06a9\u06d2 \u0644\u06cc\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u06a9\u0644\u0627\u0633 \u06a9\u06cc \u0628\u0646\u06cc\u0627\u062f\u06cc \u0634\u0646\u0627\u062e\u062a \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<p><strong>\u062a\u0648\u0633\u06cc\u0639 \u06a9\u0627 \u0637\u0631\u06cc\u0642\u06c1<\/strong> \u0637\u0631\u06cc\u0642\u0648\u06ba \u0645\u06cc\u06ba \u062a\u0631\u0645\u06cc\u0645 \u06cc\u0627 \u0630\u06cc\u0644\u06cc \u06a9\u0644\u0627\u0633 \u06a9\u06cc\u06d2 \u0628\u063a\u06cc\u0631 \u0645\u0648\u062c\u0648\u062f\u06c1 \u0642\u0633\u0645 \u0645\u06cc\u06ba \u0637\u0631\u06cc\u0642\u06d2 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<p>\u0627\u0646 \u0627\u0642\u0633\u0627\u0645 \u0645\u06cc\u06ba \u0627\u0641\u0627\u062f\u06cc\u062a \u06a9\u06d2 \u0637\u0631\u06cc\u0642\u06d2 \u0634\u0627\u0645\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9\u0633\u0679\u06cc\u0646\u0634\u0646\u0632 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba \u062c\u0648 \u0622\u067e \u06a9\u06d2 \u067e\u0627\u0633 \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba\u06d4 <code>toFormatted()<\/code> \u06a9\u0648 <code>DateTime<\/code>\u06cc\u0627 <code>capitalize()<\/code> \u06a9\u0648 <code>String<\/code>. \u0627\u06cc\u06a9\u0633\u0679\u06cc\u0646\u0634\u0646\u0632 \u0641\u06cc\u0644\u0688\u0632 \u06a9\u0648 \u0634\u0627\u0645\u0644 \u06cc\u0627 \u0645\u0648\u062c\u0648\u062f\u06c1 \u0637\u0631\u06cc\u0642\u0648\u06ba \u06a9\u0648 \u0627\u0648\u0648\u0631 \u0631\u0627\u0626\u0688 \u0646\u06c1\u06cc\u06ba \u06a9\u0631 \u0633\u06a9\u062a\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ Abstract class: modeling type identity\nabstract class Shape {\n  double get area; \/\/ Contract\n  double get perimeter; \/\/ Contract\n\n  String describe() => 'A ({runtimeType} with area ){area.toStringAsFixed(2)}';\n}\n\nclass Circle extends Shape {\n  final double radius;\n  Circle(this.radius);\n\n  @override double get area => 3.14159 * radius * radius;\n  @override double get perimeter => 2 * 3.14159 * radius;\n}\n\n\/\/ Mixin: adding behavior without changing identity\nmixin Drawable {\n  void draw(Canvas canvas) {\n    \/\/ Default drawing logic\n  }\n}\n\n\/\/ Extension method: utility on an existing type\nextension DateTimeFormatting on DateTime {\n  String get relativeLabel {\n    final diff = DateTime.now().difference(this);\n    if (diff.inDays > 0) return '${diff.inDays}d ago';\n    if (diff.inHours > 0) return '${diff.inHours}h ago';\n    return '${diff.inMinutes}m ago';\n  }\n}\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u06a9\u0648\u0688 \u0688\u0627\u0631\u0679 \u0645\u06cc\u06ba \u0631\u0648\u06cc\u06d2 \u06a9\u0648 \u0628\u0691\u06be\u0627\u0646\u06d2 \u06cc\u0627 \u0688\u06be\u0627\u0646\u0686\u06d2 \u06a9\u06d2 \u062a\u06cc\u0646 \u0637\u0631\u06cc\u0642\u06d2 \u062f\u06a9\u06be\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<ul>\n<li>\n<p>\u062e\u0644\u0627\u0635\u06c1 \u06a9\u0644\u0627\u0633 (<code>Shape<\/code>) \u0627\u06cc\u06a9 \u0645\u0639\u0627\u06c1\u062f\u06d2 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0633 \u06a9\u06cc \u062a\u0645\u0627\u0645 \u0634\u06a9\u0644\u06cc\u06ba \u0634\u06cc\u0626\u0631\u0646\u06af \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a \u0639\u0645\u0644 \u06a9\u0631\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 <code>describe<\/code> \u0637\u0631\u06cc\u0642\u06c1<\/p>\n<\/li>\n<li>\n<p>\u0627\u06cc\u06a9 \u06c1\u06cc \u06a9\u0644\u0627\u0633 <code>Circle<\/code> \u0627\u0633 \u0645\u0639\u0627\u06c1\u062f\u06d2 \u06a9\u0648 \u0627\u067e\u0646\u06cc \u0645\u0646\u0637\u0642 \u0633\u06d2 \u0646\u0627\u0641\u0630 \u06a9\u0631\u06cc\u06ba\u06d4 <code>area<\/code> \u0627\u0648\u0631 <code>perimeter<\/code><\/p>\n<\/li>\n<li>\n<p>\u0645\u06a9\u0633 (<code>Drawable<\/code>) \u0627\u0648\u0631 \u062f\u0631\u062c \u0630\u06cc\u0644 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0627\u0639\u0645\u0627\u0644 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba: <code>draw<\/code> \u0622\u067e \u06a9\u0633\u06cc \u0628\u06be\u06cc \u06a9\u0644\u0627\u0633 \u0633\u06d2 \u0627\u0633 \u06a9\u06cc ID \u062a\u0628\u062f\u06cc\u0644 \u06a9\u06cc\u06d2 \u0628\u063a\u06cc\u0631 \u062c\u0691 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<li>\n<p>\u0627\u0648\u0631 \u062a\u0648\u0633\u06cc\u0639 (<code>DateTimeFormatting<\/code>) \u0627\u06cc\u06a9 \u0645\u062f\u062f\u06af\u0627\u0631 \u0637\u0631\u06cc\u0642\u06c1 \u0634\u0627\u0645\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 <code>relativeLabel<\/code> \u06a9\u0648 <code>DateTime<\/code> \u0679\u0627\u0626\u067e \u06a9\u0631\u06a9\u06d2\u060c \u0622\u067e \u0627\u0635\u0644 \u06a9\u0644\u0627\u0633 \u0645\u06cc\u06ba \u062a\u0631\u0645\u06cc\u0645 \u06a9\u06cc\u06d2 \u0628\u063a\u06cc\u0631 &quot;2 \u06af\u06be\u0646\u0679\u06d2 \u067e\u06c1\u0644\u06d2&#8221; \u062c\u06cc\u0633\u06d2 \u0627\u0646\u0633\u0627\u0646 \u062f\u0648\u0633\u062a \u0679\u0627\u0626\u0645 \u0644\u06cc\u0628\u0644 \u0622\u0633\u0627\u0646\u06cc \u0633\u06d2 \u062d\u0627\u0635\u0644 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<\/li>\n<\/ul>\n<h3 id=\"heading-mixins-and-interfaces-together\">\u0645\u06a9\u0633\u0646\u0633 \u0627\u0648\u0631 \u0627\u0646\u0679\u0631\u0641\u06cc\u0633 \u06a9\u0648 \u0627\u06cc\u06a9 \u0633\u0627\u062a\u06be \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u0627<\/h3>\n<p>\u0645\u06a9\u0633\u0646\u0633 \u0627\u0648\u0631 <code>implements<\/code> \u06c1\u0645 \u0645\u0644 \u06a9\u0631 \u0637\u0627\u0642\u062a\u0648\u0631 \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0622\u067e \u06a9\u06d2 \u067e\u0627\u0633 \u0627\u06cc\u06a9 \u0645\u06a9\u0633\u06cc\u0646 \u06c1\u0648\u0633\u06a9\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0627\u0646\u0679\u0631\u0641\u06cc\u0633 \u06a9\u0627 \u0688\u06cc\u0641\u0627\u0644\u0679 \u0646\u0641\u0627\u0630 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0628\u06a9\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06cc \u06a9\u0644\u0627\u0633 \u06a9\u0648 \u067e\u0648\u0644\u06cc\u0645\u0648\u0631\u0641\u06a9 \u06c1\u0648\u0646\u06d2 \u06a9\u06cc \u0628\u06be\u06cc \u0627\u062c\u0627\u0632\u062a \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">abstract interface class Disposable {\n  void dispose();\n}\n\n\/\/ The mixin provides a real implementation of dispose.\n\/\/ Classes using this mixin satisfy the Disposable interface.\nmixin AutoDispose implements Disposable {\n  final List<streamsubscription> _subscriptions = [];\n  final List<timer> _timers = [];\n\n  void addSubscription(StreamSubscription subscription) {\n    _subscriptions.add(subscription);\n  }\n\n  void addTimer(Timer timer) {\n    _timers.add(timer);\n  }\n\n  @override\n  void dispose() {\n    for (final sub in _subscriptions) {\n      sub.cancel();\n    }\n    for (final timer in _timers) {\n      timer.cancel();\n    }\n    _subscriptions.clear();\n    _timers.clear();\n  }\n}\n\nclass DataService with AutoDispose {\n  DataService() {\n    \/\/ Register resources. They will all be cleaned up when dispose() is called.\n    addSubscription(\n      someStream.listen((data) => handleData(data)),\n    );\n    addTimer(\n      Timer.periodic(const Duration(minutes: 1), (_) => refresh()),\n    );\n  }\n}\n\n\/\/ This works because AutoDispose implements Disposable.\nvoid cleanUp(Disposable resource) {\n  resource.dispose();\n}\n<\/timer><\/streamsubscription><\/code><\/pre>\n<p>\u06cc\u06c1 \u06a9\u0648\u0688 <code>Disposable<\/code> \u0627\u06cc\u06a9 \u0627\u0646\u0679\u0631\u0641\u06cc\u0633 \u062c\u0633 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4 <code>dispose<\/code> \u0637\u0631\u06cc\u0642\u06c1 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <code>AutoDispose<\/code> \u0627\u06cc\u06a9 \u0645\u06a9\u0633\u06cc\u0646 \u062c\u0648 \u0627\u0633\u06d2 \u0679\u0631\u06cc\u06a9 \u06a9\u0631\u06a9\u06d2 \u0627\u0648\u0631 \u062e\u0648\u062f\u06a9\u0627\u0631 \u0637\u0648\u0631 \u067e\u0631 \u0633\u0628\u0633\u06a9\u0631\u067e\u0634\u0646\u0632 \u0627\u0648\u0631 \u0679\u0627\u0626\u0645\u0631\u0632 \u06a9\u0648 \u0645\u0646\u0638\u0645 \u06a9\u0631\u06a9\u06d2 \u0644\u0627\u06af\u0648 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u062a\u0648 \u06a9\u0648\u0626\u06cc \u0628\u06be\u06cc \u06a9\u0644\u0627\u0633 <code>DataService<\/code> \u0645\u06a9\u0633\u0646\u0633 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0622\u067e \u0648\u0633\u0627\u0626\u0644 \u06a9\u0648 \u0631\u062c\u0633\u0679\u0631 \u06a9\u0631\u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>addSubscription<\/code> \u0627\u0648\u0631 <code>addTimer<\/code> \u0627\u06af\u0644\u06cc \u0628\u0627\u0631\u060c \u06c1\u0631 \u0686\u06cc\u0632 \u06a9\u0648 \u0645\u062d\u0641\u0648\u0638 \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u0636\u0627\u0626\u0639 \u06a9\u0631\u06cc\u06ba\u06d4 <code>dispose<\/code> \u06a9\u06c1\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u067e\u06be\u0631 \u0628\u06be\u06cc \u06a9\u06c1\u06cc\u06ba \u0628\u06be\u06cc \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 <code>Disposable<\/code> \u06cc\u06c1 \u0645\u062a\u0648\u0642\u0639 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-testing-mixins-in-isolation\">\u062a\u0646\u06c1\u0627\u0626\u06cc \u0645\u06cc\u06ba \u0645\u06a9\u0633\u0646\u0633 \u06a9\u06cc \u062c\u0627\u0646\u0686 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u0645\u06a9\u0633\u06cc\u0646 \u06a9\u06d2 \u0633\u0628 \u0633\u06d2 \u0642\u06cc\u0645\u062a\u06cc \u062a\u0639\u0645\u06cc\u0631\u0627\u062a\u06cc \u0641\u0648\u0627\u0626\u062f \u0645\u06cc\u06ba \u0633\u06d2 \u0627\u06cc\u06a9 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u0627\u0646 \u06a9\u0627 \u0622\u0632\u0627\u062f\u0627\u0646\u06c1 \u0637\u0648\u0631 \u067e\u0631 \u062a\u062c\u0631\u0628\u06c1 \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 \u0622\u067e \u06a9\u0648 \u0627\u067e\u0646\u06d2 \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u06d2 \u0631\u0648\u06cc\u06d2 \u06a9\u0648 \u062c\u0627\u0646\u0686\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u067e\u0648\u0631\u06d2 \u0641\u0644\u0679\u0631 \u0648\u06cc\u062c\u06cc\u0679 \u06a9\u0648 \u06af\u06be\u0645\u0627\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0627\u06cc\u06a9 \u06a9\u0645 \u0633\u06d2 \u06a9\u0645 \u0679\u06cc\u0633\u0679 \u06a9\u0644\u0627\u0633 \u0628\u0646\u0627\u0626\u06cc\u06ba \u062c\u0648 \u0645\u06a9\u0633\u0646 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06d2 \u0627\u0648\u0631 \u062e\u0648\u062f \u0627\u0633 \u06a9\u06cc \u062c\u0627\u0646\u0686 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ test\/mixins\/loading_state_mixin_test.dart\n\nimport 'package:flutter_test\/flutter_test.dart';\nimport 'package:flutter\/material.dart';\n\n\/\/ A minimal fake State that uses the mixin -- no real widget needed.\nclass TestLoadingState extends State<statefulwidget>\n    with LoadingStateMixin {\n  @override\n  Widget build(BuildContext context) => const SizedBox();\n}\n\nvoid main() {\n  group('LoadingStateMixin', () {\n    testWidgets('starts in non-loading state', (tester) async {\n      final state = TestLoadingState();\n\n      expect(state.isLoading, false);\n      expect(state.hasError, false);\n      expect(state.error, null);\n    });\n\n    testWidgets('sets loading true during operation', (tester) async {\n      await tester.pumpWidget(\n        MaterialApp(home: StatefulBuilder(\n          builder: (context, setState) {\n            return const SizedBox();\n          },\n        )),\n      );\n\n      \/\/ Test the mixin behavior through the widget test infrastructure\n      \/\/ ...\n    });\n\n    test('debounce mixin cancels previous timers', () async {\n      \/\/ Pure Dart test -- no widget infrastructure needed\n      int callCount = 0;\n\n      \/\/ Test debounce behavior\n      \/\/ ...\n    });\n  });\n}\n<\/statefulwidget><\/code><\/pre>\n<p>\u06cc\u06c1 \u0679\u06cc\u0633\u0679 \u0641\u0627\u0626\u0644 \u06c1\u06d2\u06d4 <code>LoadingStateMixin<\/code> \u0627\u0633 \u06a9\u06cc \u062a\u0635\u062f\u06cc\u0642 Flutter \u06a9\u06d2 \u0679\u06cc\u0633\u0679\u0646\u06af \u0679\u0648\u0644\u0632 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u06a9\u0645 \u0633\u06d2 \u06a9\u0645 \u062c\u0639\u0644\u06cc \u0628\u0646\u0627 \u06a9\u0631 \u06a9\u06cc \u062c\u0627\u062a\u06cc \u06c1\u06d2\u06d4 <code>State<\/code> \u06cc\u06c1 \u0627\u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u06c1\u06d2 \u062c\u0648 \u0645\u06a9\u0633\u0646\u0633 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4 \u067e\u06be\u0631 \u06cc\u0642\u06cc\u0646\u06cc \u0628\u0646\u0627\u0626\u06cc\u06ba \u06a9\u06c1 \u06cc\u06c1 \u0644\u0648\u0688\u0646\u06af \u06cc\u0627 \u063a\u0644\u0637\u06cc\u0648\u06ba \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u0634\u0631\u0648\u0639 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0622\u067e\u0631\u06cc\u0634\u0646 \u06a9\u06d2 \u062f\u0648\u0631\u0627\u0646 \u0679\u06be\u06cc\u06a9 \u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0627\u0633 \u0633\u06d2 \u06cc\u06c1 \u0628\u06be\u06cc \u067e\u062a\u06c1 \u0686\u0644\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u06a9\u0686\u06be \u0631\u0648\u06cc\u0648\u06ba \u06a9\u0648 \u0645\u06a9\u0645\u0644 \u0648\u06cc\u062c\u06cc\u0679 \u0679\u06cc\u0633\u0679 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062c\u0627\u0646\u0686\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u060c \u062c\u0628 \u06a9\u06c1 \u062f\u06cc\u06af\u0631 \u0631\u0648\u06cc\u0648\u06ba \u06a9\u0648 \u062e\u0627\u0644\u0635 \u0688\u0627\u0631\u0679 \u0679\u06cc\u0633\u0679 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0679\u06cc\u0633\u0679 \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u060c \u062c\u06cc\u0633\u06d2 \u0688\u06cc\u0628\u0627\u0624\u0646\u0633 \u0644\u0627\u062c\u06a9\u06d4<\/p>\n<p>\u062e\u0627\u0644\u0635 \u0688\u0627\u0631\u0679 \u0645\u06a9\u0633\u0646\u0633 (\u0631\u06cc\u0627\u0633\u062a\u06cc \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2) \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u062c\u0627\u0646\u0686 \u0628\u06c1\u062a \u0622\u0633\u0627\u0646 \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u0641\u0644\u0679\u0631 \u0648\u06cc\u062c\u06cc\u0679 \u06a9\u06d2 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0688\u06be\u0627\u0646\u0686\u06d2 \u06a9\u06cc \u0628\u0627\u0644\u06a9\u0644 \u0628\u06be\u06cc \u0636\u0631\u0648\u0631\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ A pure Dart mixin with no Flutter dependency\nmixin Serializable {\n  Map<string dynamic=\"\"> toJson();\n\n  String toJsonString() => toJson().toString();\n\n  bool isEquivalentTo(Serializable other) {\n    return toJson().toString() == other.toJson().toString();\n  }\n}\n\n\/\/ Test it with a plain Dart test\nclass TestModel with Serializable {\n  final String name;\n  TestModel(this.name);\n\n  @override\n  Map<string dynamic=\"\"> toJson() => {'name': name};\n}\n\nvoid main() {\n  test('Serializable.isEquivalentTo compares correctly', () {\n    final a = TestModel('Ade');\n    final b = TestModel('Ade');\n    final c = TestModel('Chioma');\n\n    expect(a.isEquivalentTo(b), true);\n    expect(a.isEquivalentTo(c), false);\n  });\n}\n<\/string><\/string><\/code><\/pre>\n<p>\u06cc\u06c1 \u06a9\u0648\u0688 \u062f\u0631\u062c \u0630\u06cc\u0644 \u062e\u0627\u0644\u0635 \u0688\u0627\u0631\u0679 \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u0627 \u06c1\u06d2: <code>Serializable<\/code> \u0627\u0633\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06cc \u062a\u0645\u0627\u0645 \u06a9\u0644\u0627\u0633\u0648\u06ba \u06a9\u0648 \u0627\u0633\u06d2 \u0646\u0627\u0641\u0630 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u06af\u06cc\u06d4 <code>toJson<\/code>. \u0627\u0633 \u06a9\u06d2 \u0628\u0639\u062f \u06cc\u06c1 \u0645\u062f\u062f\u06af\u0627\u0631 \u0637\u0631\u06cc\u0642\u06d2 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0627\u0633 \u0688\u06cc\u0679\u0627 \u06a9\u0648 \u0633\u0679\u0631\u0646\u06af \u0645\u06cc\u06ba \u062a\u0628\u062f\u06cc\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0646 \u06a9\u06cc JSON \u0646\u0645\u0627\u0626\u0646\u062f\u06af\u06cc \u0645\u06cc\u06ba \u062f\u0648 \u0627\u0634\u06cc\u0627\u0621 \u06a9\u0627 \u0645\u0648\u0627\u0632\u0646\u06c1 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0686\u06cc\u06a9 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0627\u06cc\u06a9 \u0622\u0633\u0627\u0646 \u0637\u0631\u06cc\u0642\u06c1 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u0622\u06cc\u0627 \u062f\u0648 \u0627\u0634\u06cc\u0627\u0621 \u0627\u06cc\u06a9 \u062c\u06cc\u0633\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u06a9\u06c1 <code>TestModel<\/code> \u06a9\u0644\u0627\u0633 \u06cc\u06c1 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u06cc \u06c1\u06d2 \u06a9\u06c1 \u0627\u0633 \u06a9\u0648 \u0644\u0627\u06af\u0648 \u06a9\u0631\u06a9\u06d2 \u06cc\u06c1 \u06a9\u06cc\u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <code>toJson<\/code>\u0679\u06cc\u0633\u0679\u0648\u06ba \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u062c\u0648 \u0627\u0633 \u0628\u0627\u062a \u06a9\u0648 \u06cc\u0642\u06cc\u0646\u06cc \u0628\u0646\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u0627\u06cc\u06a9 \u062c\u06cc\u0633\u06d2 \u0688\u06cc\u0679\u0627 \u0648\u0627\u0644\u06cc \u0627\u0634\u06cc\u0627\u0621 \u06a9\u0648 \u0645\u0633\u0627\u0648\u06cc \u0633\u0645\u062c\u06be\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0645\u062e\u062a\u0644\u0641 \u0688\u06cc\u0679\u0627 \u0648\u0627\u0644\u06cc \u0627\u0634\u06cc\u0627\u0621 \u06a9\u0648 \u0646\u06c1\u06cc\u06ba \u0633\u0645\u062c\u06be\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-performance-considerations\">\u06a9\u0627\u0631\u06a9\u0631\u062f\u06af\u06cc \u06a9\u06d2 \u062a\u062d\u0641\u0638\u0627\u062a<\/h3>\n<p>\u06a9\u0644\u0627\u0633 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u06c1\u06cc \u06a9\u0648\u0688 \u06a9\u0648 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0644\u06a9\u06be\u0646\u06d2 \u06a9\u06d2 \u0645\u0642\u0627\u0628\u0644\u06d2 \u0645\u06cc\u06ba \u0645\u06a9\u0633\u0646\u0633 \u06a9\u06d2 \u067e\u0627\u0633 \u06a9\u0648\u0626\u06cc \u0631\u0646 \u0679\u0627\u0626\u0645 \u0627\u0648\u0648\u0631 \u06c1\u06cc\u0688 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0688\u0627\u0631\u0679 \u0631\u0646 \u0679\u0627\u0626\u0645 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u06a9\u0645\u067e\u0627\u0626\u0644 \u0679\u0627\u0626\u0645 \u067e\u0631 \u0645\u06a9\u0633\u06cc\u0646 \u0644\u0627\u0626\u0646\u0631\u0627\u0626\u0632\u06cc\u0634\u0646 \u06a9\u0648 \u062d\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0646\u062a\u06cc\u062c\u06d2 \u0645\u06cc\u06ba \u0622\u0646\u06d2 \u0648\u0627\u0644\u06cc \u06a9\u0644\u0627\u0633 \u0627\u0633 \u0637\u0631\u062d \u06c1\u06d2 \u062c\u06cc\u0633\u06d2 \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u06d2 \u062a\u0645\u0627\u0645 \u0637\u0631\u06cc\u0642\u06d2 \u0627\u0648\u0631 \u0641\u06cc\u0644\u0688\u0632 \u0628\u0631\u0627\u06c1 \u0631\u0627\u0633\u062a \u0627\u0633 \u0645\u06cc\u06ba \u062f\u0627\u062e\u0644 \u06a9\u06cc\u06d2 \u06af\u0626\u06d2 \u06c1\u0648\u06ba\u06d4 \u0627\u0633 \u0633\u06d2 \u0622\u06af\u06d2 \u06a9\u0648\u0626\u06cc \u0645\u062a\u062d\u0631\u06a9 \u0688\u0633\u067e\u06cc\u0686\u060c \u067e\u0631\u0627\u06a9\u0633\u06cc \u067e\u0631\u062a\u060c \u0627\u0648\u0631 \u0648\u0631\u0686\u0648\u0626\u0644 \u0645\u06cc\u062a\u06be\u0688 \u0679\u06cc\u0628\u0644 \u0627\u0648\u0648\u0631 \u06c1\u06cc\u0688 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 \u062c\u0648 \u0645\u0633\u0627\u0648\u06cc \u06a9\u0644\u0627\u0633 \u06a9\u06d2 \u062f\u0631\u062c\u06c1 \u0628\u0646\u062f\u06cc \u0645\u06cc\u06ba \u06c1\u0648\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0648\u0627\u062d\u062f \u0635\u0648\u0631\u062a \u062d\u0627\u0644 \u062c\u06c1\u0627\u06ba \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u0646\u0641\u06cc\u06af\u0631\u06cc\u0634\u0646 \u06a9\u0627\u0631\u06a9\u0631\u062f\u06af\u06cc \u06a9\u0648 \u0645\u062a\u0627\u062b\u0631 \u06a9\u0631 \u0633\u06a9\u062a\u06cc \u06c1\u06d2 \u0648\u06c1 \u06c1\u06d2 \u0627\u06af\u0631 \u06c1\u0627\u0679 \u067e\u0627\u062a\u06be \u0645\u06cc\u06ba \u0628\u06c1\u062a \u06af\u06c1\u0631\u0627 \u0645\u06a9\u0633\u06cc\u0646 \u0686\u06cc\u0646 \u06c1\u0648 (\u0627\u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u0645\u06cc\u06ba 10 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0645\u06a9\u0633\u06cc\u0646)\u06d4 \u0627\u0633 \u0645\u0639\u0627\u0645\u0644\u06d2 \u0645\u06cc\u06ba\u060c \u0645\u0633\u0626\u0644\u06c1 \u062e\u0648\u062f \u0645\u06a9\u0633\u0646 \u06a9\u0627 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u060c \u0628\u0644\u06a9\u06c1 \u0641\u06cc \u06a9\u0627\u0644 \u06a9\u0648\u0688 \u06a9\u06cc \u0645\u0642\u062f\u0627\u0631 \u06a9\u0627 \u06c1\u06d2\u06d4 \u0627\u0686\u06be\u0627 \u0645\u06a9\u0633\u0646 \u0688\u06cc\u0632\u0627\u0626\u0646\u060c \u062c\u06c1\u0627\u06ba \u06c1\u0631 \u0645\u06a9\u0633 \u06a9\u06cc \u0627\u06cc\u06a9 \u0630\u0645\u06c1 \u062f\u0627\u0631\u06cc \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u060c \u0642\u062f\u0631\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0627\u0633 \u06a9\u0648 \u0631\u0648\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-best-practices-in-real-apps\">\u062d\u0642\u06cc\u0642\u06cc \u0627\u06cc\u067e\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0628\u06c1\u062a\u0631\u06cc\u0646 \u0637\u0631\u06cc\u0642\u06d2<\/h2>\n<h3 id=\"heading-one-mixin-one-concern\">\u0627\u06cc\u06a9 \u0645\u0631\u06a9\u0628\u060c \u0627\u06cc\u06a9 \u062a\u0634\u0648\u06cc\u0634<\/h3>\n<p>\u0645\u06a9\u0633\u06cc\u0646 \u0688\u06cc\u0632\u0627\u0626\u0646 \u06a9\u0627 \u0633\u0628 \u0633\u06d2 \u0627\u06c1\u0645 \u0627\u0635\u0648\u0644 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u06c1\u0631 \u0645\u06a9\u0633 \u06a9\u06cc \u0628\u0627\u0644\u06a9\u0644 \u0627\u06cc\u06a9 \u0630\u0645\u06c1 \u062f\u0627\u0631\u06cc \u06c1\u0648\u0646\u06cc \u0686\u0627\u06c1\u06cc\u06d2\u06d4 \u062c\u0633 \u06a9\u0627 \u0646\u0627\u0645 \u0645\u06a9\u0633\u06cc\u0646 \u06c1\u06d2\u06d4 <code>ScreenBehavior<\/code> \u06cc\u06c1 \u06a9\u0648\u0626\u06cc \u0645\u06a9\u0633 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2 \u062c\u0648 \u062a\u062c\u0632\u06cc\u06c1\u060c \u06a9\u0646\u06cc\u06a9\u0679\u06cc\u0648\u06cc\u0679\u06cc\u060c \u0644\u0627\u06af\u0646\u06af \u0627\u0648\u0631 \u062a\u0648\u062b\u06cc\u0642 \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u0627\u0644\u06c1\u06cc \u06c1\u0633\u062a\u06cc \u06c1\u06d2 \u062c\u0648 \u0645\u0644\u0628\u0648\u0633 \u0644\u0628\u0627\u0633 \u067e\u06c1\u0646\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u06af\u0631 \u0622\u067e \u0645\u0648\u062c\u0648\u062f\u06c1 \u0645\u06a9\u0633\u0646 \u0645\u06cc\u06ba \u063a\u06cc\u0631 \u0645\u062a\u0639\u0644\u0642\u06c1 \u0637\u0631\u06cc\u0642\u06d2 \u0634\u0627\u0645\u0644 \u06a9\u0631 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u06cc\u06c1 \u0627\u0633\u06d2 \u062a\u0642\u0633\u06cc\u0645 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0627\u0634\u0627\u0631\u06c1 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ Wrong: one mixin doing too much\nmixin ScreenBehavior<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  void trackEvent(String name) { \/* ... *\/ }     \/\/ analytics\n  bool get isConnected { \/* ... *\/ }             \/\/ connectivity\n  void log(String msg) { \/* ... *\/ }             \/\/ logging\n  bool validateEmail(String e) { \/* ... *\/ }     \/\/ validation\n  void showSnackBar(String msg) { \/* ... *\/ }    \/\/ UI interaction\n}\n\n\/\/ Right: each concern is its own mixin\nmixin ScreenAnalytics<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  void trackEvent(String name) { \/* ... *\/ }\n}\n\nmixin ConnectivityAware<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  bool get isConnected { \/* ... *\/ }\n}\n\nmixin Logger {\n  void log(String msg) { \/* ... *\/ }\n}\n<\/t><\/t><\/t><\/t><\/t><\/t><\/code><\/pre>\n<p>\u0627\u0633 \u0645\u062b\u0627\u0644 \u0645\u06cc\u06ba\u060c \u067e\u06c1\u0644\u0627 \u0645\u0631\u06a9\u0628 \u06c1\u06d2 <code>ScreenBehavior<\/code>\u0622\u067e \u0628\u06c1\u062a \u0632\u06cc\u0627\u062f\u06c1 \u063a\u06cc\u0631 \u0645\u062a\u0639\u0644\u0642\u06c1 \u06a9\u0627\u0645 \u06a9\u0631 \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba: \u062a\u062c\u0632\u06cc\u0627\u062a\u060c \u06a9\u0646\u06cc\u06a9\u0679\u06cc\u0648\u06cc\u0679\u06cc\u060c \u0644\u0627\u06af\u0646\u06af\u060c \u062a\u0648\u062b\u06cc\u0642\u060c UI \u06a9\u0627\u0645 \u0648\u063a\u06cc\u0631\u06c1\u06d4 \u0627\u0633 \u0633\u06d2 \u062f\u06cc\u06a9\u06be \u0628\u06be\u0627\u0644 \u0627\u0648\u0631 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0645\u0634\u06a9\u0644 \u06c1\u0648 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u06cc\u06a9 \u0628\u06c1\u062a\u0631 \u0637\u0631\u06cc\u0642\u06c1 \u06cc\u06c1 \u06c1\u06d2 \u06a9\u06c1 \u06c1\u0631 \u0630\u0645\u06c1 \u062f\u0627\u0631\u06cc \u06a9\u0648 \u0627\u0633 \u06a9\u06d2 \u0627\u067e\u0646\u06d2 \u0645\u0631\u06a9\u0648\u0632 \u0645\u0631\u06a9\u0628 \u0645\u06cc\u06ba \u062a\u0642\u0633\u06cc\u0645 \u06a9\u06cc\u0627 \u062c\u0627\u0626\u06d2: <code>ScreenAnalytics<\/code>, <code>ConnectivityAware<\/code>\u0627\u0648\u0631 <code>Logger<\/code>\u0644\u06c1\u0670\u0630\u0627\u060c \u06c1\u0631 \u0645\u06a9\u0633 \u06a9\u0627 \u0627\u06cc\u06a9 \u06c1\u06cc \u0645\u0642\u0635\u062f \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0635\u0631\u0641 \u0636\u0631\u0648\u0631\u062a \u06a9\u06d2 \u0648\u0642\u062a \u06c1\u06cc \u0627\u0633\u06d2 \u0635\u0627\u0641 \u0633\u062a\u06be\u0631\u0627 \u0628\u0646\u0627\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-always-call-super-in-lifecycle-methods\">\u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0637\u0631\u06cc\u0642\u0648\u06ba \u0645\u06cc\u06ba \u06c1\u0645\u06cc\u0634\u06c1 \u0633\u067e\u0631 \u06a9\u0648 \u06a9\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/h3>\n<p>\u062c\u0628 \u0627\u06cc\u06a9 \u0645\u06a9\u0633\u0646 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u0648 \u0627\u0648\u0648\u0631 \u0631\u0627\u0626\u06cc\u0688 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0627\u0633\u06d2 \u06a9\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2: <code>super<\/code> \u06cc\u06c1 \u0627\u062e\u062a\u06cc\u0627\u0631\u06cc \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0627\u0633 \u0686\u06cc\u0632 \u06a9\u0627 \u062d\u0635\u06c1 \u06c1\u06d2 \u062c\u0648 \u0645\u06a9\u0633\u0646 \u06a9\u0646\u0641\u06cc\u06af\u0631\u06cc\u0634\u0646 \u06a9\u0648 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u0628\u063a\u06cc\u0631 <code>super<\/code>\u0644\u0627\u0626\u0646\u0631\u0627\u0626\u0632\u06cc\u0634\u0646 \u0686\u06cc\u0646 \u0628\u0631\u06cc\u06a9\u0633 \u0627\u0648\u0631 \u0686\u06cc\u0646 \u0645\u06cc\u06ba \u062f\u06cc\u06af\u0631 \u0645\u06a9\u0633\u0646\u0633 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u06a9\u0648\u0688 \u067e\u0631 \u0639\u0645\u0644 \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">mixin SomeMixin<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  @override\n  void initState() {\n    super.initState(); \/\/ ALWAYS call super, and ALWAYS call it before your code\n    \/\/ Your setup code here\n  }\n\n  @override\n  void dispose() {\n    \/\/ Your cleanup code here\n    super.dispose(); \/\/ In dispose, call super LAST, after your cleanup\n  }\n}\n<\/t><\/t><\/code><\/pre>\n<p>\u067e\u06be\u0691\u067e\u06be\u0691\u0627\u0646\u06d2 \u06a9\u06d2 \u0627\u0635\u0648\u0644 \u062f\u0631\u062c \u0630\u06cc\u0644 \u06c1\u06cc\u06ba: <code>initState<\/code>\u06a9\u0627\u0644 <code>super<\/code> \u067e\u06c1\u0644\u06d2 \u0645\u06cc\u06ba <code>dispose<\/code>\u06a9\u0627\u0644 <code>super<\/code> \u0622\u062e\u0631\u06cc \u06cc\u06c1 \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u0627\u0631 \u06a9\u06cc \u0639\u06a9\u0627\u0633\u06cc \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 <code>State<\/code> \u06cc\u06c1 \u0627\u067e\u0646\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0633 \u0628\u0627\u062a \u06a9\u0648 \u06cc\u0642\u06cc\u0646\u06cc \u0628\u0646\u0627\u062a\u0627 \u06c1\u06d2 \u06a9\u06c1 \u0648\u0633\u0627\u0626\u0644 \u06a9\u0648 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0627\u0648\u0631 \u0635\u0627\u0641 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u0627\u0646 \u06a9\u06d2 \u0628\u0646\u06cc\u0627\u062f\u06cc \u0648\u0633\u0627\u0626\u0644 \u06a9\u0648 \u062e\u062a\u0645 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u067e\u06c1\u0644\u06d2 \u062a\u0631\u062a\u06cc\u0628 \u062f\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-project-structure-for-mixins\">\u0645\u06a9\u0633\u06cc\u0646 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u06a9\u0627 \u0688\u06be\u0627\u0646\u0686\u06c1<\/h3>\n<p>\u067e\u0631\u0648\u0688\u06a9\u0634\u0646 \u06a9\u0648\u0688\u0628\u06cc\u0633 \u0645\u06cc\u06ba\u060c \u0645\u06a9\u0633\u0646\u0633 \u0627\u06cc\u06a9 \u0645\u062e\u0635\u0648\u0635 \u062c\u06af\u06c1 \u0633\u06d2 \u0641\u0627\u0626\u062f\u06c1 \u0627\u0679\u06be\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062c\u0633 \u0633\u06d2 \u062f\u0631\u06cc\u0627\u0641\u062a \u06a9\u0631\u0646\u0627 \u0627\u0648\u0631 \u0627\u0646\u062f\u0627\u0632\u06c1 \u0644\u06af\u0627\u0646\u0627 \u0622\u0633\u0627\u0646 \u06c1\u0648 \u062c\u0627\u062a\u0627 \u06c1\u06d2:<\/p>\n<pre><code class=\"language-plaintext\">lib\/\n  mixins\/\n    analytics_mixin.dart        -- Screen analytics tracking\n    connectivity_mixin.dart     -- Network state monitoring\n    debounce_mixin.dart         -- Input debouncing\n    form_validation_mixin.dart  -- Form validation orchestration\n    loading_state_mixin.dart    -- Loading\/error\/data state management\n    logger_mixin.dart           -- Structured logging\n    lifecycle_logger_mixin.dart -- Logs initState and dispose calls\n\n  screens\/\n    home\/\n      home_screen.dart          -- Uses analytics + connectivity + logger\n    search\/\n      search_screen.dart        -- Uses debounce + loading state\n    settings\/\n      settings_screen.dart      -- Uses form validation + loading state\n<\/code><\/pre>\n<p>\u0645\u06a9\u0633\u0632 \u06a9\u0648 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u0633\u06d2 \u0627\u0644\u06af \u0631\u06a9\u06be\u0646\u06d2 \u0633\u06d2 \u0622\u067e \u06a9\u06d2 \u067e\u0648\u0631\u06d2 \u067e\u0631\u0648\u062c\u06cc\u06a9\u0679 \u0645\u06cc\u06ba \u0627\u0633\u06a9\u0631\u06cc\u0646 \u0641\u0627\u0626\u0644\u0648\u06ba \u06a9\u0648 \u06a9\u06be\u0648\u062f\u0646\u06d2 \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u0627\u0646\u06c1\u06cc\u06ba \u062a\u0644\u0627\u0634 \u06a9\u0631\u0646\u0627\u060c \u062c\u0627\u0646\u0686\u0646\u0627 \u0627\u0648\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u0627 \u0622\u0633\u0627\u0646 \u06c1\u0648\u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-name-mixins-by-capability-not-by-consumer\">\u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u06cc \u0628\u0646\u06cc\u0627\u062f \u067e\u0631 \u0646\u0627\u0645\u0648\u06ba \u06a9\u0648 \u0645\u0644\u0627\u0646\u0627<\/h3>\n<p>\u0645\u06a9\u0633\u06cc\u0646 \u06a9\u0633\u06cc \u0645\u062e\u0635\u0648\u0635 \u0635\u0627\u0631\u0641 \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u0641\u0639\u0627\u0644\u06cc\u062a \u06cc\u0627 \u0631\u0648\u06cc\u06d2 \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u0633 \u06a9\u06d2 \u0645\u0637\u0627\u0628\u0642 \u0646\u0627\u0645 \u0631\u06a9\u06be\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ Wrong: names tied to a specific consumer\nmixin HomeScreenAnalytics { }\nmixin LoginFormValidation { }\nmixin DashboardConnectivity { }\n\n\/\/ Right: names describe the capability\nmixin ScreenAnalytics { }\nmixin FormValidation { }\nmixin ConnectivityAware { }\n<\/code><\/pre>\n<p>\u0641\u0646\u06a9\u0634\u0646 \u06a9\u06d2 \u0646\u0627\u0645 \u0648\u0627\u0644\u06d2 \u0645\u06a9\u0633\u0646\u0632 \u0642\u062f\u0631\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0627\u0633 \u0648\u0642\u062a \u067e\u0627\u0626\u06d2 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba \u062c\u0628 \u0688\u0648\u06cc\u0644\u067e\u0631\u0632 &quot;\u06a9\u06cc\u0627 \u0627\u06cc\u0633\u06d2 \u06a9\u0648\u0626\u06cc \u0645\u06a9\u0633\u06cc\u0646 \u06c1\u06cc\u06ba \u062c\u0648 \u062a\u062c\u0632\u06cc\u0627\u062a\u06cc \u0679\u0631\u06cc\u06a9\u0646\u06af \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u061f&#8221; \u0627\u0633\u06a9\u0631\u06cc\u0646 \u06a9\u06d2 \u0646\u0627\u0645\u0648\u06ba \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0645\u06a9\u0633\u0646\u0633 \u0627\u0633 \u0637\u0631\u062d \u062f\u0631\u06cc\u0627\u0641\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<h3 id=\"heading-document-the-contract\">\u0645\u0639\u0627\u06c1\u062f\u06d2 \u06a9\u06cc \u062f\u0633\u062a\u0627\u0648\u06cc\u0632\u0627\u062a<\/h3>\n<p>\u0648\u06c1 \u0645\u06a9\u0633 \u062c\u0648 \u062a\u062c\u0631\u06cc\u062f\u06cc \u0627\u0631\u06a9\u0627\u0646 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u06cc\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06cc \u06a9\u0644\u0627\u0633\u0648\u06ba \u067e\u0631 \u062a\u0642\u0627\u0636\u06d2 \u0639\u0627\u0626\u062f \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0646 \u0636\u0631\u0648\u0631\u06cc\u0627\u062a \u06a9\u0648 \u0648\u0627\u0636\u062d \u0637\u0648\u0631 \u067e\u0631 \u062f\u0633\u062a\u0627\u0648\u06cc\u0632 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u06d4 \u0645\u06a9\u0633\u06cc\u0646 \u0644\u06af\u0627\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0688\u0648\u06cc\u0644\u067e\u0631\u0632 \u06a9\u0648 \u06cc\u06c1 \u062c\u0627\u0646\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2 \u06a9\u06c1 \u0648\u06c1 \u06a9\u0633 \u0686\u06cc\u0632 \u06a9\u0648 \u0644\u0627\u06af\u0648 \u06a9\u0631\u0646\u06d2 \u067e\u0631 \u0631\u0627\u0636\u06cc \u06c1\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/\/ A mixin that tracks screen analytics automatically.\n\/\/\/\n\/\/\/ Usage:\n\/\/\/ ```dart\n\/\/\/ class _MyScreenState extends State<myscreen>\n\/\/\/     with ScreenAnalyticsMixin {\n\/\/\/   @override\n\/\/\/   String get screenName => 'MyScreen';\n\/\/\/ }\n\/\/\/ ```\n\/\/\/\n\/\/\/ Requires:\n\/\/\/ - [screenName]: A stable, unique identifier for this screen.\n\/\/\/   Used as the event property in all analytics calls.\n\/\/\/\n\/\/\/ Provides:\n\/\/\/ - Automatic `screen_opened` event on initState.\n\/\/\/ - Automatic `screen_closed` event on dispose.\n\/\/\/ - [trackAction]: Manual event tracking for user interactions.\nmixin ScreenAnalyticsMixin<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  String get screenName;\n\n  @override\n  void initState() {\n    super.initState();\n    _track('screen_opened');\n  }\n\n  @override\n  void dispose() {\n    _track('screen_closed');\n    super.dispose();\n  }\n\n  void trackAction(String action, [Map<string dynamic=\"\">? data]) {\n    _track(action, data);\n  }\n\n  void _track(String event, [Map<string dynamic=\"\">? data]) {\n    AnalyticsService.instance.track(event, {\n      'screen': screenName,\n      ...?data,\n    });\n  }\n}\n<\/string><\/string><\/t><\/t><\/myscreen><\/code><\/pre>\n<h2 id=\"heading-when-to-use-mixins-and-when-not-to\">\u0645\u06a9\u0633 \u06a9\u0628 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba \u0627\u0648\u0631 \u06a9\u0628 \u0646\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4<\/h2>\n<h3 id=\"heading-where-mixins-shine\">\u062c\u06c1\u0627\u06ba \u0645\u06a9\u0633\u0646\u0633 \u0686\u0645\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/h3>\n<p>\u0645\u06a9\u0633\u06cc\u0646\u0632 \u0635\u062d\u06cc\u062d \u0627\u0646\u062a\u062e\u0627\u0628 \u06c1\u06cc\u06ba \u062c\u0628 \u0622\u067e \u06a9\u06d2 \u067e\u0627\u0633 \u0627\u06cc\u0633\u0627 \u0631\u0648\u06cc\u06c1 \u06c1\u06d2 \u062c\u0648 \u062f\u0631\u062d\u0642\u06cc\u0642\u062a \u0627\u06cc\u06a9 \u062f\u0648\u0633\u0631\u06d2 \u06a9\u0648 \u0622\u067e\u0633 \u0645\u06cc\u06ba \u062c\u0648\u0691\u062a\u0627 \u06c1\u06d2\u060c \u06cc\u0639\u0646\u06cc \u0627\u06cc\u0633\u0627 \u0637\u0631\u0632 \u0639\u0645\u0644 \u062c\u0648 \u0622\u067e \u06a9\u06cc \u0645\u0637\u0644\u0648\u0628\u06c1 \u06a9\u0644\u0627\u0633 \u06a9\u06cc \u0628\u0646\u06cc\u0627\u062f\u06cc \u0634\u0646\u0627\u062e\u062a \u06a9\u06cc \u0648\u0636\u0627\u062d\u062a \u0646\u06c1\u06cc\u06ba \u06a9\u0631\u062a\u0627\u060c \u0644\u06cc\u06a9\u0646 \u0645\u062a\u0639\u062f\u062f \u063a\u06cc\u0631 \u0645\u062a\u0639\u0644\u0642\u06c1 \u06a9\u0644\u0627\u0633\u0648\u06ba \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0627\u0634\u062a\u0631\u0627\u06a9 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4<\/p>\n<p>\u0641\u0644\u0679\u0631 \u0627\u06cc\u067e\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0631\u0627\u0633 \u06a9\u0679\u0646\u06af \u062e\u062f\u0634\u0627\u062a \u0645\u06cc\u06ba \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0633\u06d2 \u0645\u062a\u0639\u0644\u0642 \u0631\u0648\u06cc\u06d2 \u062c\u06cc\u0633\u06d2 \u062a\u062c\u0632\u06cc\u0627\u062a\u060c \u0644\u0627\u06af\u0646\u06af\u060c \u06a9\u0646\u06a9\u0634\u0646 \u06a9\u06cc \u0646\u06af\u0631\u0627\u0646\u06cc\u060c \u0627\u0648\u0631 \u0631\u06cc\u0627\u0633\u062a \u06a9\u06cc \u0628\u062d\u0627\u0644\u06cc \u0634\u0627\u0645\u0644 \u06c1\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0648\u06c1 \u0637\u0631\u0632 \u0639\u0645\u0644 \u06c1\u06d2 \u062c\u0633 \u06a9\u06cc \u0628\u06c1\u062a \u0633\u06cc \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u06a9\u0648 \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u060c \u06cc\u06c1 \u0627\u0646 \u0633\u0628 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06cc\u06a9\u0633\u0627\u06ba \u06cc\u0627 \u062a\u0642\u0631\u06cc\u0628\u0627\u064b \u06cc\u06a9\u0633\u0627\u06ba \u06c1\u06d2\u060c \u0627\u0648\u0631 \u06c1\u0631 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u06a9\u0648 \u062f\u0648\u0633\u0631\u0648\u06ba \u0633\u06d2 \u0645\u062e\u062a\u0644\u0641 \u0628\u0646\u0627\u0646\u06d2 \u0633\u06d2 \u0627\u0633 \u06a9\u0627 \u06a9\u0648\u0626\u06cc \u0644\u06cc\u0646\u0627 \u062f\u06cc\u0646\u0627 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u06af\u0631 \u0622\u067e \u067e\u06c1\u0644\u06d2 \u0633\u06d2 \u0637\u06d2 \u0634\u062f\u06c1 \u0646\u0641\u0627\u0630 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0645\u0639\u0627\u06c1\u062f\u06c1 \u0646\u0627\u0641\u0630 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u0645\u06a9\u0633\u06cc\u0646 \u0628\u06be\u06cc \u0635\u062d\u06cc\u062d \u0627\u0646\u062a\u062e\u0627\u0628 \u06c1\u06cc\u06ba\u06d4 \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u062a\u062c\u0631\u06cc\u062f\u06cc \u0645\u0645\u0628\u0631 \u067e\u06cc\u0679\u0631\u0646 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2\u060c \u0622\u067e \u06a9\u06c1\u06c1 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u060c &quot;\u0627\u0633 \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u0648 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06cc \u062a\u0645\u0627\u0645 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u06a9\u0648 \u0627\u06cc\u06a9 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u06a9\u0627 \u0646\u0627\u0645 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2\u060c \u0627\u0648\u0631 \u0627\u0633 \u06a9\u06d2 \u0628\u062f\u0644\u06d2 \u0645\u06cc\u06ba \u0645\u06a9\u0633\u06cc\u0646 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u062a\u0645\u0627\u0645 \u0679\u0631\u06cc\u06a9\u0646\u06af \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644 \u0644\u06d2 \u06af\u0627\u06d4&#8221; \u0627\u0633 \u0642\u0633\u0645 \u06a9\u06cc \u062a\u0631\u062a\u06cc\u0628-\u0639\u0645\u0644 \u062f\u0631\u0622\u0645\u062f \u06a9\u0627 \u0646\u0645\u0648\u0646\u06c1 \u0635\u0627\u0641\u060c \u062e\u0648\u062f \u062f\u0633\u062a\u0627\u0648\u06cc\u0632\u06cc \u06a9\u0648\u0688 \u062a\u06cc\u0627\u0631 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u062f\u0648\u0628\u0627\u0631\u06c1 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0648\u0633\u0627\u0626\u0644 \u06a9\u0627 \u0627\u0646\u062a\u0638\u0627\u0645 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0627 \u0627\u06cc\u06a9 \u0627\u0648\u0631 \u0637\u0627\u0642\u062a\u0648\u0631 \u0645\u0639\u0627\u0645\u0644\u06c1 \u06c1\u06d2\u06d4 \u062a\u0645\u0627\u0645 \u0648\u0633\u0627\u0626\u0644 \u062c\u0646 \u06a9\u0648 \u0622\u06af\u06d2 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4 <code>initState<\/code> \u0627\u0648\u0631 \u0627\u0633 \u0645\u06cc\u06ba \u062a\u0628\u0627\u06c1 \u06c1\u0648 \u06af\u06cc\u0627\u06d4 <code>dispose<\/code> \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u06d2 \u0627\u0645\u06cc\u062f\u0648\u0627\u0631\u0648\u06ba \u0645\u06cc\u06ba \u0627\u06cc\u0646\u06cc\u0645\u06cc\u0634\u0646 \u06a9\u0646\u0679\u0631\u0648\u0644\u0631\u0632\u060c \u0627\u0633\u0679\u0631\u06cc\u0645 \u0633\u0628\u0633\u06a9\u0631\u067e\u0634\u0646\u0632\u060c \u0679\u0627\u0626\u0645\u0631\u0632\u060c \u0641\u0648\u06a9\u0633 \u0646\u0648\u0688\u0633\u060c \u0627\u0648\u0631 \u0627\u0633\u06a9\u0631\u0648\u0644 \u06a9\u0646\u0679\u0631\u0648\u0644\u0631\u0632 \u0634\u0627\u0645\u0644 \u06c1\u06cc\u06ba\u06d4 \u0627\u0646 \u0645\u06cc\u06ba \u0633\u06d2 \u06c1\u0631 \u0627\u06cc\u06a9 \u0645\u0631\u06a9\u0628 \u06c1\u06d2 \u062c\u0633 \u06a9\u06d2 \u0644\u06a9\u06be\u06d2 \u062c\u0627\u0646\u06d2 \u06a9\u0627 \u0627\u0646\u062a\u0638\u0627\u0631 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-where-mixins-are-the-wrong-tool\">\u062c\u0628 \u0645\u06a9\u0633\u0646\u0633 \u063a\u0644\u0637 \u0679\u0648\u0644 \u06c1\u06cc\u06ba\u06d4<\/h3>\n<p>\u0645\u06a9\u0633\u06cc\u0646 \u0645\u0646\u0627\u0633\u0628 \u062a\u062c\u0631\u06cc\u062f \u06a9\u06cc \u062c\u06af\u06c1 \u0646\u06c1\u06cc\u06ba \u0644\u06cc\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u06af\u0631 \u0622\u067e \u0627\u06cc\u06a9 \u0645\u06a9\u0633\u06cc\u0646 \u0644\u06a9\u06be \u0631\u06c1\u06d2 \u06c1\u06cc\u06ba \u062c\u0633 \u0645\u06cc\u06ba \u0627\u06c1\u0645 \u06a9\u0627\u0631\u0648\u0628\u0627\u0631\u06cc \u0645\u0646\u0637\u0642 \u06c1\u06d2\u060c \u062a\u0648 \u06cc\u06c1 \u0627\u0633 \u0628\u0627\u062a \u06a9\u06cc \u0639\u0644\u0627\u0645\u062a \u06c1\u06d2 \u06a9\u06c1 \u0648\u06c1 \u0645\u0646\u0637\u0642 \u06a9\u0633\u06cc \u0628\u0644\u0627\u06a9\u060c \u0631\u06cc\u067e\u0648\u0632\u0679\u0631\u06cc\u060c \u0633\u0631\u0648\u0633\u060c \u06cc\u0627 \u0631\u06cc\u06af\u0648\u0644\u0631 \u0688\u0627\u0631\u0679 \u06a9\u0644\u0627\u0633 \u0645\u06cc\u06ba \u06c1\u06d2 \u0646\u06c1 \u06a9\u06c1 \u0645\u06a9\u0633 \u0645\u06cc\u06ba\u06d4 \u0645\u06a9\u0633\u0646\u0633 \u06a9\u0648 \u0627\u0633 \u0628\u0627\u062a \u06a9\u06cc \u0646\u0634\u0627\u0646\u062f\u06c1\u06cc \u06a9\u0631\u0646\u06cc \u0686\u0627\u06c1\u06cc\u06d2 \u06a9\u06c1 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u06a9\u06cc\u0633\u06d2 \u06a9\u0627\u0645 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u060c \u0646\u06c1 \u06a9\u06c1 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u06a9\u06cc\u0627 \u06a9\u0631\u062a\u06cc \u06c1\u06d2 \u06cc\u0627 \u06cc\u06c1 \u06a9\u0633 \u0688\u06cc\u0679\u0627 \u067e\u0631 \u06a9\u0627\u0631\u0631\u0648\u0627\u0626\u06cc \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u06af\u0631 \u0645\u0637\u0644\u0648\u0628\u06c1 \u0631\u0648\u06cc\u06c1 \u062d\u0642\u06cc\u0642\u062a \u0645\u06cc\u06ba \u0622\u0628\u062c\u06cc\u06a9\u0679 \u06a9\u06cc \u0633\u0637\u062d \u067e\u0631 \u06c1\u06d2\u060c \u06cc\u0639\u0646\u06cc \u0622\u067e \u0631\u0648\u06cc\u06d2 \u06a9\u06cc \u0627\u06cc\u06a9 \u0645\u062b\u0627\u0644 \u0628\u0646\u0627 \u06a9\u0631 \u0627\u0633\u06d2 \u067e\u0627\u0633 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 \u0645\u06a9\u0633\u06cc\u0646 \u0628\u06be\u06cc \u0627\u06cc\u06a9 \u0628\u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06c1\u06d2\u06d4 \u0627\u06af\u0631 \u0622\u067e \u0644\u06a9\u06be\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u062a\u0648 <code>final handler = SomeHandler()<\/code> \u0627\u0648\u0631 \u0627\u0633\u06d2 \u0627\u0646\u062d\u0635\u0627\u0631 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0627\u0646\u062c\u06cc\u06a9\u0634\u0646 \u06a9\u0631\u06cc\u06ba\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u06a9\u0644\u0627\u0633 \u06c1\u06d2\u060c \u0645\u06a9\u0633 \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0645\u06a9\u0633\u0632 \u06a9\u0648 \u0641\u0648\u0631\u06cc \u0646\u06c1\u06cc\u06ba \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627\u06d4<\/p>\n<p>\u0627\u06af\u0631 \u0622\u067e \u06a9\u06d2 \u0631\u0648\u06cc\u06d2 \u06a9\u0648 \u067e\u06cc\u0686\u06cc\u062f\u06c1 \u06a9\u0646\u0633\u0679\u0631\u06a9\u0679\u0631 \u062f\u0644\u0627\u0626\u0644 \u06cc\u0627 \u0627\u0646\u062d\u0635\u0627\u0631 \u0627\u0646\u062c\u06cc\u06a9\u0634\u0646 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2 \u062a\u0648 \u0622\u067e \u06a9\u0648 \u0645\u06a9\u0633\u0646\u0633 \u0633\u06d2 \u0628\u06be\u06cc \u0628\u0686\u0646\u0627 \u0686\u0627\u06c1\u0626\u06d2\u06d4 \u0645\u06a9\u0633\u06cc\u0646 \u0645\u06cc\u06ba \u0631\u0648\u0627\u06cc\u062a\u06cc \u0645\u0639\u0646\u0648\u06ba \u0645\u06cc\u06ba \u06a9\u0646\u0633\u0679\u0631\u06a9\u0679\u0631 \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u06af\u0631 \u0622\u067e \u062c\u0633 \u0637\u0631\u0632 \u0639\u0645\u0644 \u06a9\u0648 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0646\u0641\u06cc\u06af\u0631\u06cc\u0634\u0646 \u0622\u0628\u062c\u06cc\u06a9\u0679 \u06a9\u0648 \u062a\u0639\u0645\u06cc\u0631 \u067e\u0631 \u0645\u0646\u062a\u0642\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u060c \u062a\u0648 \u0627\u0633 \u0622\u0628\u062c\u06cc\u06a9\u0679 \u06a9\u0648 \u0628\u0637\u0648\u0631 \u06a9\u0644\u0627\u0633 \u0628\u0646\u0627\u0626\u06cc\u06ba \u0627\u0648\u0631 \u0627\u0633\u06d2 \u0627\u0646\u062c\u06cc\u06a9\u0634\u0646 \u062f\u06cc\u06ba\u06d4<\/p>\n<p>\u062f\u0627\u062e\u0644\u06cc \u0646\u0641\u0627\u0630 \u06a9\u06cc \u062a\u0641\u0635\u06cc\u0644\u0627\u062a \u06a9\u06d2 \u0644\u06cc\u06d2 \u067e\u06cc\u06a9\u062c \u06a9\u06cc \u062d\u062f\u0648\u062f \u0645\u06cc\u06ba \u0645\u06a9\u0633\u0646\u0633 \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a \u0645\u062d\u062a\u0627\u0637 \u0631\u06c1\u06cc\u06ba\u06d4 \u0645\u06a9\u0633\u06cc\u0646 \u0637\u0627\u0642\u062a\u0648\u0631 \u0628\u0627\u0626\u0646\u0688\u0646\u06af \u0645\u06cc\u06a9\u0627\u0646\u0632\u0645 \u06c1\u06cc\u06ba\u06d4 \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u0648 \u0631\u06cc \u0641\u06cc\u06a9\u0679\u0631 \u06a9\u0631\u0646\u06d2 \u0633\u06d2 \u0627\u0646 \u062a\u0645\u0627\u0645 \u06a9\u0644\u0627\u0633\u0648\u06ba \u067e\u0631 \u0627\u062b\u0631 \u067e\u0691\u062a\u0627 \u06c1\u06d2 \u062c\u0648 \u0627\u0633\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0627\u06af\u0631 \u06cc\u06c1 \u06a9\u0633\u06cc \u062e\u0635\u0648\u0635\u06cc\u062a \u06a9\u06cc \u0648\u0627\u0642\u0639\u06cc \u0627\u0646\u062f\u0631\u0648\u0646\u06cc \u0646\u0641\u0627\u0630 \u06a9\u06cc \u062a\u0641\u0635\u06cc\u0644 \u06c1\u06d2\u060c \u062a\u0648 \u0645\u06cc\u06ba \u0645\u0646\u0637\u0642 \u06a9\u0648 \u06a9\u0644\u0627\u0633 \u0645\u06cc\u06ba \u0631\u06a9\u06be\u0646\u06d2 \u06cc\u0627 \u0627\u0633\u06d2 \u0627\u06cc\u06a9 \u0639\u0627\u0645 \u0645\u062f\u062f\u06af\u0627\u0631 \u06a9\u0644\u0627\u0633 \u0645\u06cc\u06ba \u0646\u06a9\u0627\u0644\u0646\u06d2 \u06a9\u0648 \u062a\u0631\u062c\u06cc\u062d \u062f\u06cc\u062a\u0627 \u06c1\u0648\u06ba \u062c\u0633\u06d2 \u062a\u0645\u0627\u0645 \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u0648 \u0686\u06be\u0648\u0626\u06d2 \u0628\u063a\u06cc\u0631 \u062a\u0628\u062f\u06cc\u0644 \u06a9\u06cc\u0627 \u062c\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-common-mistakes\">\u0639\u0627\u0645 \u063a\u0644\u0637\u06cc\u0627\u06ba<\/h2>\n<h3 id=\"heading-forgetting-super-in-lifecycle-overrides\">\u0641\u0631\u0627\u0645\u0648\u0634\u06cc <code>super<\/code> \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u06a9\u06cc \u0646\u0626\u06cc \u062a\u0639\u0631\u06cc\u0641<\/h3>\n<p>\u06cc\u06c1 \u0633\u0628 \u0633\u06d2 \u0639\u0627\u0645 \u0645\u06a9\u0633\u0646 \u0628\u06af \u06c1\u06d2 \u0627\u0648\u0631 \u0679\u06be\u06cc\u06a9 \u0679\u06be\u06cc\u06a9 \u06c1\u06d2 \u06a9\u06cc\u0648\u0646\u06a9\u06c1 \u06cc\u06c1 \u06c1\u0645\u06cc\u0634\u06c1 \u0641\u0648\u0631\u06cc \u062d\u0627\u062f\u062b\u06d2 \u06a9\u0627 \u0633\u0628\u0628 \u0646\u06c1\u06cc\u06ba \u0628\u0646\u062a\u0627\u06d4 \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0645\u06a9\u0633 \u0686\u06cc\u0646\u0632 \u06a9\u0648 \u062a\u0648\u0691 \u062f\u06cc\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ BROKEN: forgetting super.initState() in a mixin\nmixin BrokenMixin<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  @override\n  void initState() {\n    \/\/ super.initState() is missing.\n    \/\/ Any other mixin in the chain behind this one will NEVER have\n    \/\/ its initState() called. Their setup code is silently skipped.\n    _setupSomething();\n  }\n}\n\n\/\/ CORRECT: always call super\nmixin CorrectMixin<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  @override\n  void initState() {\n    super.initState(); \/\/ Chain continues to the next mixin and State\n    _setupSomething();\n  }\n}\n<\/t><\/t><\/t><\/t><\/code><\/pre>\n<p>\u0642\u0648\u0627\u0646\u06cc\u0646 \u0645\u0637\u0644\u0642 \u06c1\u06cc\u06ba\u06d4 \u0627\u06af\u0631 \u0622\u067e \u06a9\u0627 \u0645\u06a9\u0633\u0646 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u0648 \u0627\u0648\u0648\u0631 \u0631\u0627\u0626\u06cc\u0688 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u0622\u067e \u06a9\u0648 \u06a9\u0627\u0644 \u06a9\u0631\u0646\u0627 \u0686\u0627\u06c1\u06cc\u06d2: <code>super<\/code>. \u06a9\u0648\u0626\u06cc \u0645\u0633\u062a\u062b\u0646\u06cc\u0627\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06cc\u06ba.<\/p>\n<h3 id=\"heading-applying-a-mixin-without-the-on-constraint-to-a-state\">\u0645\u06a9\u0633\u0686\u0631 \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u0645\u06a9\u0633\u0646 \u0644\u06af\u0627\u0646\u0627 <code>on<\/code> \u0631\u06cc\u0627\u0633\u062a \u067e\u0631 \u067e\u0627\u0628\u0646\u062f\u06cc\u0627\u06ba<\/h3>\n<p>\u06a9\u0686\u06be \u0645\u06a9\u0633\u0646\u0633 \u062e\u0627\u0635 \u0637\u0648\u0631 \u067e\u0631 \u0627\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0688\u06cc\u0632\u0627\u0626\u0646 \u06a9\u06cc\u06d2 \u06af\u0626\u06d2 \u06c1\u06cc\u06ba: <code>State<t\/><\/code> \u0627\u0639\u062a\u0631\u0627\u0636\u060c \u0627\u0633\u062a\u0639\u0645\u0627\u0644 <code>setState<\/code>, <code>mounted<\/code>, <code>context<\/code>\u06cc\u0627 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u06a9\u0627 \u0637\u0631\u06cc\u0642\u06c1\u06d4 \u0627\u0646 \u0645\u06a9\u0633\u0646\u0633 \u06a9\u0648 \u0627\u0633\u0679\u06cc\u0679 \u06a9\u0644\u0627\u0633 \u06a9\u06d2 \u0639\u0644\u0627\u0648\u06c1 \u06a9\u0633\u06cc \u0627\u0648\u0631 \u06a9\u0644\u0627\u0633 \u067e\u0631 \u0644\u0627\u06af\u0648 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0646\u062a\u06cc\u062c\u06d2 \u0645\u06cc\u06ba \u062a\u0627\u0644\u06cc\u0641 \u06a9\u06cc \u062e\u0631\u0627\u0628\u06cc \u06c1\u0648\u06af\u06cc\u06d4<\/p>\n<p>\u0644\u06cc\u06a9\u0646 \u0627\u06cc\u06a9 \u0632\u06cc\u0627\u062f\u06c1 \u06c1\u0648\u0634\u06cc\u0627\u0631 \u0648\u0631\u0698\u0646 \u0627\u06cc\u06a9 \u0645\u06a9\u0633\u06cc\u0646 \u0644\u06a9\u06be\u0646\u0627 \u06c1\u0648\u06af\u0627 \u062c\u0648 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2: <code>setState<\/code> \u0627\u0639\u0644\u0627\u0646 \u06a9\u06cc\u06d2 \u0628\u063a\u06cc\u0631 <code>on State<t\/><\/code> \u0632\u0628\u0631\u062f\u0633\u062a\u06cc \u0631\u06a9\u0627\u0648\u0679\u0648\u06ba \u06a9\u06d2 \u0628\u063a\u06cc\u0631\u060c \u0688\u0627\u0631\u0679 \u0627\u0633 \u0628\u0627\u062a \u06a9\u06cc \u0636\u0645\u0627\u0646\u062a \u0646\u06c1\u06cc\u06ba \u062f\u06cc\u062a\u0627: <code>setState<\/code> \u06cc\u06c1 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0637\u0628\u0642\u06d2 \u0645\u06cc\u06ba \u0645\u0648\u062c\u0648\u062f \u06c1\u06d2 \u0627\u0648\u0631 \u0645\u0628\u06c1\u0645 \u063a\u0644\u0637\u06cc\u0648\u06ba \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062a\u0627\u0644\u06cc\u0641 \u06a9\u0648 \u0646\u0627\u06a9\u0627\u0645 \u0628\u0646\u0627 \u0633\u06a9\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ WRONG: uses setState without declaring the constraint\nmixin BrokenLoadingMixin {\n  bool _isLoading = false;\n\n  void startLoading() {\n    setState(() => _isLoading = true); \/\/ ERROR: setState is not defined here\n  }\n}\n\n\/\/ CORRECT: declare what types this mixin requires\nmixin LoadingMixin<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  bool _isLoading = false;\n\n  void startLoading() {\n    setState(() => _isLoading = true); \/\/ Works: State<t> guarantees setState\n  }\n}\n<\/t><\/t><\/t><\/code><\/pre>\n<h3 id=\"heading-forgetting-superbuild-in-automatickeepaliveclientmixin\">\u0641\u0631\u0627\u0645\u0648\u0634\u06cc <code>super.build<\/code> \u06a9\u0648 <code>AutomaticKeepAliveClientMixin<\/code><\/h3>\n<p><code>AutomaticKeepAliveClientMixin<\/code>    \u06cc\u06c1 \u0641\u0644\u0679\u0631 \u0645\u06a9\u0633\u0646\u0633 \u0645\u06cc\u06ba \u0645\u0646\u0641\u0631\u062f \u06c1\u06d2 \u06a9\u06c1 \u0627\u0633\u06d2 \u06a9\u0627\u0644 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4 <code>super.build(context)<\/code> \u0622\u067e \u06a9\u06d2 \u0627\u0646\u062f\u0631 <code>build<\/code> \u0637\u0631\u06cc\u0642\u06c1 \u0627\u06cc\u0633\u0627 \u06a9\u0631\u0646\u0627 \u0628\u06be\u0648\u0644 \u062c\u0627\u0646\u06d2 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u0632\u0646\u062f\u06c1 \u0631\u06a9\u06be\u0646\u06d2 \u06a9\u0627 \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u0627\u0631 \u06a9\u0628\u06be\u06cc \u0628\u06be\u06cc \u0641\u0639\u0627\u0644 \u0646\u06c1\u06cc\u06ba \u06c1\u0648\u06af\u0627 \u0627\u0648\u0631 \u0648\u06cc\u062c\u06cc\u0679 \u06a9\u0648 \u062e\u0648\u0628\u0635\u0648\u0631\u062a\u06cc \u0633\u06d2 \u062d\u0630\u0641 \u06a9\u0631 \u062f\u06cc\u0627 \u062c\u0627\u0626\u06d2 \u06af\u0627\u060c \u062e\u0648\u062f \u0628\u062e\u0648\u062f \u0645\u06a9\u0633\u06cc\u0646 \u06a9\u06d2 \u067e\u0648\u0631\u06d2 \u0645\u0642\u0635\u062f \u06a9\u0648 \u0634\u06a9\u0633\u062a \u062f\u06d2 \u06af\u0627\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ WRONG: forgets super.build -- keep-alive never activates\nclass _BrokenState extends State<mywidget>\n    with AutomaticKeepAliveClientMixin {\n  @override\n  bool get wantKeepAlive => true;\n\n  @override\n  Widget build(BuildContext context) {\n    \/\/ Missing: super.build(context)\n    return const Placeholder();\n  }\n}\n\n\/\/ CORRECT: always call super.build when using this mixin\nclass _CorrectState extends State<mywidget>\n    with AutomaticKeepAliveClientMixin {\n  @override\n  bool get wantKeepAlive => true;\n\n  @override\n  Widget build(BuildContext context) {\n    super.build(context); \/\/ Registers this widget with the keep-alive system\n    return const Placeholder();\n  }\n}\n<\/mywidget><\/mywidget><\/code><\/pre>\n<h3 id=\"heading-using-a-mixin-as-a-god-object\">\u0645\u06a9\u0633\u0646\u0633 \u06a9\u0648 \u062e\u062f\u0627 \u06a9\u06cc \u0627\u0634\u06cc\u0627\u0621 \u06a9\u06d2 \u0637\u0648\u0631 \u067e\u0631 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u0627<\/h3>\n<p>\u0646\u0638\u0645 \u0648 \u0636\u0628\u0637 \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u0628\u0691\u06be\u0646\u06d2 \u0648\u0627\u0644\u06d2 \u0645\u06a9\u0633\u0646\u0633 \u062e\u062f\u0627\u0626\u06cc \u0637\u0628\u0642\u06d2 \u06a9\u06d2 \u0645\u0633\u0626\u0644\u06d2 \u06a9\u0627 \u0627\u067e\u0646\u0627 \u0648\u0631\u0698\u0646 \u0628\u0646 \u062c\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u062c\u0628 \u0627\u06cc\u06a9 \u0645\u06a9\u0633 10 \u0645\u062e\u062a\u0644\u0641 \u0686\u06cc\u0632\u0648\u06ba \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644 \u0644\u06cc\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u06cc\u06c1 \u0627\u06cc\u06a9 \u0641\u0648\u06a9\u0633\u0688\u060c \u062f\u0648\u0628\u0627\u0631\u06c1 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06cc\u0648\u0646\u0679 \u0646\u06c1\u06cc\u06ba \u0631\u06c1\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0627\u06cc\u06a9 \u06a9\u06cc\u0686 \u0622\u0644 \u0628\u06cc\u06af \u06c1\u06d2 \u062c\u0648 \u062a\u0645\u0627\u0645 \u0635\u0627\u0631\u0641\u06cc\u0646 \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0642\u0631\u06cc\u0628\u06cc \u0631\u0634\u062a\u06c1 \u067e\u06cc\u062f\u0627 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ WRONG: one mixin handling too many unrelated concerns\nmixin AppBehaviorMixin<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  \/\/ Analytics\n  void trackEvent(String name) { }\n\n  \/\/ Connectivity\n  bool get isConnected { return true; }\n\n  \/\/ Logging\n  void log(String message) { }\n\n  \/\/ Form validation\n  bool validateEmail(String email) { return true; }\n\n  \/\/ Snackbar management\n  void showSuccessSnackBar(String message) { }\n  void showErrorSnackBar(String message) { }\n\n  \/\/ Loading state\n  bool get isLoading { return false; }\n\n  \/\/ Navigation\n  void navigateToHome() { }\n}\n\n\/\/ CORRECT: separate concerns into focused mixins\nmixin ScreenAnalytics<t extends=\"\" statefulwidget=\"\"> on State<t> { \/* ... *\/ }\nmixin ConnectivityAware<t extends=\"\" statefulwidget=\"\"> on State<t> { \/* ... *\/ }\nmixin Logger { \/* ... *\/ }\nmixin SnackBarHelper<t extends=\"\" statefulwidget=\"\"> on State<t> { \/* ... *\/ }\nmixin LoadingStateMixin<t extends=\"\" statefulwidget=\"\"> on State<t> { \/* ... *\/ }\n<\/t><\/t><\/t><\/t><\/t><\/t><\/t><\/t><\/t><\/t><\/code><\/pre>\n<h3 id=\"heading-mixin-order-dependency-without-documentation\">\u062f\u0633\u062a\u0627\u0648\u06cc\u0632\u0627\u062a \u06a9\u06d2 \u0628\u063a\u06cc\u0631 \u0645\u062e\u0644\u0648\u0637 \u0622\u0631\u0688\u0631 \u0627\u0646\u062d\u0635\u0627\u0631<\/h3>\n<p>\u0645\u06a9\u0633 \u0644\u0627\u0626\u0646 \u0644\u0627\u0626\u0646\u0631\u0627\u0626\u0632\u06cc\u0634\u0646 \u06a9\u06cc \u062a\u0631\u062a\u06cc\u0628 \u062a\u0639\u06cc\u06cc\u0646\u0627\u062a\u06cc \u06c1\u06d2\u060c \u0644\u06cc\u06a9\u0646 \u062d\u06cc\u0631\u0627\u0646 \u06a9\u0646 \u0631\u0648\u06cc\u06c1 \u06c1\u0648 \u0633\u06a9\u062a\u0627 \u06c1\u06d2 \u0627\u06af\u0631 \u062f\u0648\u0646\u0648\u06ba \u0645\u06a9\u0633\u0646\u0633 \u0627\u06cc\u06a9 \u06c1\u06cc \u0648\u0633\u0627\u0626\u0644 \u0645\u06cc\u06ba \u062a\u0631\u0645\u06cc\u0645 \u06a9\u0631\u06cc\u06ba \u06cc\u0627 \u0627\u06cc\u06a9 \u06c1\u06cc \u0637\u0631\u06cc\u0642\u06c1 \u06a9\u0648 \u06a9\u0627\u0644 \u06a9\u0631\u06cc\u06ba\u06d4 \u0627\u06af\u0631 \u0645\u06a9\u0633 \u06a9\u0627 \u0631\u0648\u06cc\u06c1 \u0622\u0631\u0688\u0631 \u067e\u0631 \u0645\u0646\u062d\u0635\u0631 \u06c1\u06d2 \u062a\u0648 \u0627\u0633\u06d2 \u0648\u0627\u0636\u062d \u0637\u0648\u0631 \u067e\u0631 \u062f\u0633\u062a\u0627\u0648\u06cc\u0632 \u06a9\u0631\u06cc\u06ba\u06d4<\/p>\n<pre><code class=\"language-dart\">\/\/ These two mixins both override initState.\n\/\/ Their order in the `with` clause determines which runs first.\n\/\/ Document this clearly so future developers do not accidentally swap them.\n\n\/\/\/ IMPORTANT: LoggerMixin must come BEFORE AnalyticsMixin in the `with` clause.\n\/\/\/ LoggerMixin sets up the logging infrastructure that AnalyticsMixin relies on.\n\/\/\/\n\/\/\/ Correct:   with LoggerMixin, AnalyticsMixin\n\/\/\/ Incorrect: with AnalyticsMixin, LoggerMixin\nmixin AnalyticsMixin<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  @override\n  void initState() {\n    super.initState();\n    \/\/ By the time this runs, LoggerMixin has already run (it was before us),\n    \/\/ so log() is ready to use.\n    log('Analytics initialized for ${runtimeType}');\n    _trackScreenOpen();\n  }\n}\n<\/t><\/t><\/code><\/pre>\n<h2 id=\"heading-mini-end-to-end-example\">\u0645\u0646\u06cc \u0627\u06cc\u0646\u0688 \u0679\u0648 \u0627\u06cc\u0646\u0688 \u0645\u062b\u0627\u0644<\/h2>\n<p>\u0622\u0626\u06cc\u06d2 \u0627\u06cc\u06a9 \u0645\u06a9\u0645\u0644\u060c \u06a9\u0627\u0645 \u06a9\u0631\u0646\u06d2 \u0648\u0627\u0644\u06cc \u0641\u0644\u0679\u0631 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u0628\u0646\u0627\u0626\u06cc\u06ba \u062c\u0648 \u0627\u06cc\u06a9 \u0645\u0631\u0628\u0648\u0637 \u0645\u062b\u0627\u0644 \u0645\u06cc\u06ba \u0645\u06a9\u0633 \u06a9\u06d2 \u062a\u0645\u0627\u0645 \u0628\u0646\u06cc\u0627\u062f\u06cc \u062a\u0635\u0648\u0631\u0627\u062a \u06a9\u0648 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4 \u06c1\u0645 \u06c1\u06cc\u06ba <code>SearchScreen<\/code> \u06cc\u06c1 \u062a\u06cc\u0646 \u062d\u0633\u0628 \u0636\u0631\u0648\u0631\u062a \u0645\u06a9\u0633\u0646\u0633 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0641\u0644\u0679\u0631 \u06a9\u06cc \u0628\u0644\u0679 \u0627\u0646 \u062e\u0635\u0648\u0635\u06cc\u0627\u062a \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u0627 \u06c1\u06d2: \u0627\u06cc\u06a9 \u0644\u0627\u06af\u0646\u06af \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u0627\u06cc\u06a9 \u0688\u06cc\u0628\u0627\u0624\u0646\u0633 \u0627\u0646 \u067e\u0679 \u06a9\u06d2 \u0644\u06cc\u06d2\u060c \u0627\u0648\u0631 \u0627\u06cc\u06a9 \u0627\u0633\u0679\u06cc\u0679 \u0645\u06cc\u0646\u062c\u0645\u0646\u0679 \u06a9\u0648 \u0644\u0648\u0688 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2\u06d4 <code>AutomaticKeepAliveClientMixin<\/code> \u067e\u0648\u0631\u06d2 \u0679\u06cc\u0628 \u0646\u06cc\u0648\u06cc\u06af\u06cc\u0634\u0646 \u0645\u06cc\u06ba \u062d\u0627\u0644\u062a \u06a9\u0648 \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-the-mixins\">\u0645\u06a9\u0633<\/h3>\n<pre><code class=\"language-dart\">\/\/ lib\/mixins\/logger_mixin.dart\n\n\/\/\/ Provides structured logging with automatic class name tagging.\n\/\/\/ This mixin has no Flutter dependency and can be applied to any class.\nmixin LoggerMixin {\n  String get tag => runtimeType.toString();\n\n  void log(String message) {\n    \/\/ In production, replace with your logging framework (e.g., logger package).\n    debugPrint('[(tag] )message');\n  }\n\n  void logError(String message, [Object? error, StackTrace? stackTrace]) {\n    debugPrint('[(tag] ERROR: )message');\n    if (error != null) debugPrint('[(tag] Caused by: )error');\n    if (stackTrace != null) debugPrint(stackTrace.toString());\n  }\n}\n<\/code><\/pre>\n<pre><code class=\"language-dart\">\n\/\/ lib\/mixins\/debounce_mixin.dart\n\nimport 'dart:async';\nimport 'package:flutter\/material.dart';\n\n\/\/\/ Provides debounced callback execution for State classes.\n\/\/\/ Automatically cancels the pending timer on dispose.\n\/\/\/\n\/\/\/ Requires: must be applied to a State<t> object.\n\/\/\/\n\/\/\/ Provides:\n\/\/\/ - [debounce]: delays an action until input has stopped for [delay] duration.\nmixin DebounceMixin<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  Timer? _debounceTimer;\n\n  \/\/\/ Delays [action] by [delay]. Resets the delay on every new call.\n  \/\/\/ Useful for responding to text field changes without firing on every keystroke.\n  void debounce(\n    VoidCallback action, {\n    Duration delay = const Duration(milliseconds: 500),\n  }) {\n    _debounceTimer?.cancel();\n    _debounceTimer = Timer(delay, action);\n  }\n\n  @override\n  void dispose() {\n    \/\/ Cancels any pending debounce timer automatically.\n    \/\/ The consuming class never needs to manage this manually.\n    _debounceTimer?.cancel();\n    super.dispose();\n  }\n}\n<\/t><\/t><\/t><\/code><\/pre>\n<pre><code class=\"language-dart\">\/\/ lib\/mixins\/loading_state_mixin.dart\n\nimport 'package:flutter\/material.dart';\n\n\/\/\/ Manages loading, error, and idle states for async operations.\n\/\/\/\n\/\/\/ Requires: must be applied to a State<t> object.\n\/\/\/\n\/\/\/ Provides:\n\/\/\/ - [isLoading]: true while an operation is running.\n\/\/\/ - [hasError]: true if the last operation failed.\n\/\/\/ - [error]: the error object from the last failure.\n\/\/\/ - [runWithLoading]: wraps any async operation with automatic state management.\n\/\/\/ - [clearError]: resets the error state.\nmixin LoadingStateMixin<t extends=\"\" statefulwidget=\"\"> on State<t> {\n  bool _isLoading = false;\n  Object? _error;\n\n  bool get isLoading => _isLoading;\n  bool get hasError => _error != null;\n  Object? get error => _error;\n\n  \/\/\/ Runs [operation], automatically setting loading state before it starts\n  \/\/\/ and clearing it when it finishes (whether successfully or not).\n  \/\/\/ Returns the result of [operation], or null if it threw an error.\n  Future<r> runWithLoading<r>(Future<r> Function() operation) async {\n    if (_isLoading) return null;\n\n    setState(() {\n      _isLoading = true;\n      _error = null;\n    });\n\n    try {\n      final result = await operation();\n      if (mounted) setState(() => _isLoading = false);\n      return result;\n    } catch (e) {\n      if (mounted) {\n        setState(() {\n          _isLoading = false;\n          _error = e;\n        });\n      }\n      return null;\n    }\n  }\n\n  \/\/\/ Clears the current error state, returning the UI to idle.\n  void clearError() {\n    setState(() => _error = null);\n  }\n}\n<\/r><\/r><\/r><\/t><\/t><\/t><\/code><\/pre>\n<h3 id=\"heading-the-data-model-and-fake-service\">\u0688\u06cc\u0679\u0627 \u0645\u0627\u0688\u0644\u0632 \u0627\u0648\u0631 \u062c\u0639\u0644\u06cc \u062e\u062f\u0645\u0627\u062a<\/h3>\n<pre><code class=\"language-dart\">\/\/ lib\/models\/search_result.dart\n\nclass SearchResult {\n  final String id;\n  final String title;\n  final String subtitle;\n  final String category;\n\n  const SearchResult({\n    required this.id,\n    required this.title,\n    required this.subtitle,\n    required this.category,\n  });\n}\n<\/code><\/pre>\n<pre><code class=\"language-dart\">\/\/ lib\/services\/search_service.dart\n\nimport '..\/models\/search_result.dart';\n\nclass SearchService {\n  static const _fakeResults = [\n    SearchResult(id: '1', title: 'Flutter Basics', subtitle: 'Getting started with Flutter', category: 'Tutorial'),\n    SearchResult(id: '2', title: 'Dart Mixins', subtitle: 'Deep dive into Dart mixin system', category: 'Article'),\n    SearchResult(id: '3', title: 'State Management', subtitle: 'Bloc, Riverpod, and Provider compared', category: 'Guide'),\n    SearchResult(id: '4', title: 'Flutter Animations', subtitle: 'Animation controllers and tickers', category: 'Tutorial'),\n    SearchResult(id: '5', title: 'GraphQL Flutter', subtitle: 'Using graphql_flutter in production', category: 'Guide'),\n    SearchResult(id: '6', title: 'Testing Flutter Apps', subtitle: 'Unit, widget, and integration tests', category: 'Article'),\n  ];\n\n  Future<list>> search(String query) async {\n    \/\/ Simulate a network delay\n    await Future.delayed(const Duration(milliseconds: 600));\n\n    if (query.trim().isEmpty) return [];\n\n    return _fakeResults\n        .where((r) =>\n            r.title.toLowerCase().contains(query.toLowerCase()) ||\n            r.subtitle.toLowerCase().contains(query.toLowerCase()))\n        .toList();\n  }\n}\n<\/list><\/code><\/pre>\n<h3 id=\"heading-the-search-screen\">\u062a\u0644\u0627\u0634 \u06a9\u06cc \u0633\u06a9\u0631\u06cc\u0646<\/h3>\n<pre><code class=\"language-dart\">\/\/ lib\/screens\/search_screen.dart\n\nimport 'package:flutter\/material.dart';\nimport '..\/mixins\/logger_mixin.dart';\nimport '..\/mixins\/debounce_mixin.dart';\nimport '..\/mixins\/loading_state_mixin.dart';\nimport '..\/models\/search_result.dart';\nimport '..\/services\/search_service.dart';\n\nclass SearchScreen extends StatefulWidget {\n  const SearchScreen({super.key});\n\n  @override\n  State<searchscreen> createState() => _SearchScreenState();\n}\n\nclass _SearchScreenState extends State<searchscreen>\n    \/\/ AutomaticKeepAliveClientMixin: preserves this tab's state when the user\n    \/\/ switches to another tab and then returns. The search query and results\n    \/\/ stay intact without re-fetching.\n    with\n        AutomaticKeepAliveClientMixin,\n        \/\/ LoggerMixin: provides log() and logError() throughout this State.\n        \/\/ No `on State` constraint because it is a pure Dart mixin.\n        LoggerMixin,\n        \/\/ DebounceMixin: provides debounce() and auto-cancels the timer on dispose.\n        DebounceMixin,\n        \/\/ LoadingStateMixin: provides runWithLoading(), isLoading, hasError, error.\n        LoadingStateMixin {\n\n  \/\/ AutomaticKeepAliveClientMixin requires this getter.\n  \/\/ Returning true keeps this widget alive when it scrolls off screen\n  \/\/ or when the user navigates away in a TabView or PageView.\n  @override\n  bool get wantKeepAlive => true;\n\n  final _searchController = TextEditingController();\n  final _searchService = SearchService();\n  List<searchresult> _results = [];\n  String _lastQuery = '';\n\n  @override\n  void initState() {\n    \/\/ The mixin linearization order matters here.\n    \/\/ super.initState() calls through the chain:\n    \/\/ LoadingStateMixin -> DebounceMixin -> AutomaticKeepAliveClientMixin -> State\n    super.initState();\n    log('SearchScreen initialized');\n  }\n\n  @override\n  void dispose() {\n    \/\/ DebounceMixin.dispose() is called via super.dispose() automatically.\n    \/\/ We only need to dispose resources we explicitly own.\n    _searchController.dispose();\n    \/\/ super.dispose() chains through all mixins' dispose methods.\n    super.dispose();\n    log('SearchScreen disposed');\n  }\n\n  \/\/ Called every time the search text field changes.\n  void _onSearchChanged(String query) {\n    \/\/ DebounceMixin.debounce() delays the actual search call by 500ms.\n    \/\/ If the user types another character within 500ms, the timer resets.\n    \/\/ This prevents a network call on every single keystroke.\n    debounce(() => _performSearch(query));\n  }\n\n  Future<void> _performSearch(String query) async {\n    if (query == _lastQuery) return; \/\/ Avoid redundant searches\n    _lastQuery = query;\n\n    log('Searching for: \"$query\"');\n\n    if (query.trim().isEmpty) {\n      setState(() => _results = []);\n      return;\n    }\n\n    \/\/ LoadingStateMixin.runWithLoading() handles all the state transitions:\n    \/\/ sets isLoading = true before the call,\n    \/\/ sets isLoading = false when it completes,\n    \/\/ captures any error into the error property if it throws.\n    final results = await runWithLoading(\n      () => _searchService.search(query),\n    );\n\n    if (results != null && mounted) {\n      setState(() => _results = results);\n      log('Search returned ({results.length} results for \")query\"');\n    }\n  }\n\n  @override\n  Widget build(BuildContext context) {\n    \/\/ AutomaticKeepAliveClientMixin REQUIRES super.build(context) to be called.\n    \/\/ Without it, the keep-alive mechanism never activates.\n    super.build(context);\n\n    return Scaffold(\n      appBar: AppBar(\n        title: const Text('Search'),\n        bottom: PreferredSize(\n          preferredSize: const Size.fromHeight(56),\n          child: Padding(\n            padding: const EdgeInsets.fromLTRB(16, 0, 16, 8),\n            child: TextField(\n              controller: _searchController,\n              onChanged: _onSearchChanged,\n              decoration: InputDecoration(\n                hintText: 'Search articles, tutorials...',\n                prefixIcon: const Icon(Icons.search),\n                suffixIcon: _searchController.text.isNotEmpty\n                    ? IconButton(\n                        icon: const Icon(Icons.clear),\n                        onPressed: () {\n                          _searchController.clear();\n                          _onSearchChanged('');\n                        },\n                      )\n                    : null,\n                filled: true,\n                fillColor: Theme.of(context).colorScheme.surfaceVariant,\n                border: OutlineInputBorder(\n                  borderRadius: BorderRadius.circular(12),\n                  borderSide: BorderSide.none,\n                ),\n              ),\n            ),\n          ),\n        ),\n      ),\n      body: _buildBody(),\n    );\n  }\n\n  Widget _buildBody() {\n    \/\/ LoadingStateMixin.isLoading and hasError are available here\n    \/\/ because of the mixin composition.\n\n    if (isLoading) {\n      return const Center(child: CircularProgressIndicator());\n    }\n\n    if (hasError) {\n      return Center(\n        child: Column(\n          mainAxisSize: MainAxisSize.min,\n          children: [\n            const Icon(Icons.error_outline, size: 48, color: Colors.red),\n            const SizedBox(height: 12),\n            Text(\n              error?.toString() ?? 'An error occurred',\n              textAlign: TextAlign.center,\n            ),\n            const SizedBox(height: 16),\n            ElevatedButton(\n              onPressed: () {\n                clearError(); \/\/ LoadingStateMixin.clearError()\n                _performSearch(_lastQuery);\n              },\n              child: const Text('Retry'),\n            ),\n          ],\n        ),\n      );\n    }\n\n    if (_searchController.text.isEmpty) {\n      return const Center(\n        child: Column(\n          mainAxisSize: MainAxisSize.min,\n          children: [\n            Icon(Icons.search, size: 64, color: Colors.grey),\n            SizedBox(height: 16),\n            Text(\n              'Start typing to search',\n              style: TextStyle(color: Colors.grey, fontSize: 16),\n            ),\n          ],\n        ),\n      );\n    }\n\n    if (_results.isEmpty) {\n      return Center(\n        child: Column(\n          mainAxisSize: MainAxisSize.min,\n          children: [\n            const Icon(Icons.search_off, size: 64, color: Colors.grey),\n            const SizedBox(height: 16),\n            Text(\n              'No results for \"${_searchController.text}\"',\n              style: const TextStyle(color: Colors.grey, fontSize: 16),\n            ),\n          ],\n        ),\n      );\n    }\n\n    return ListView.separated(\n      padding: const EdgeInsets.all(16),\n      itemCount: _results.length,\n      separatorBuilder: (_, __) => const SizedBox(height: 8),\n      itemBuilder: (context, index) {\n        final result = _results[index];\n        return SearchResultCard(result: result);\n      },\n    );\n  }\n}\n\nclass SearchResultCard extends StatelessWidget {\n  final SearchResult result;\n\n  const SearchResultCard({super.key, required this.result});\n\n  @override\n  Widget build(BuildContext context) {\n    return Card(\n      child: ListTile(\n        leading: CircleAvatar(\n          backgroundColor: _categoryColor(result.category),\n          child: Text(\n            result.category[0],\n            style: const TextStyle(\n              color: Colors.white,\n              fontWeight: FontWeight.bold,\n            ),\n          ),\n        ),\n        title: Text(\n          result.title,\n          style: const TextStyle(fontWeight: FontWeight.w600),\n        ),\n        subtitle: Text(result.subtitle),\n        trailing: Chip(\n          label: Text(\n            result.category,\n            style: const TextStyle(fontSize: 11),\n          ),\n          padding: EdgeInsets.zero,\n          visualDensity: VisualDensity.compact,\n        ),\n      ),\n    );\n  }\n\n  Color _categoryColor(String category) {\n    switch (category) {\n      case 'Tutorial':\n        return Colors.blue;\n      case 'Article':\n        return Colors.green;\n      case 'Guide':\n        return Colors.orange;\n      default:\n        return Colors.purple;\n    }\n  }\n}\n<\/void><\/searchresult><\/searchscreen><\/searchscreen><\/code><\/pre>\n<p>\u06cc\u06c1 <code>SearchScreen<\/code> \u0627\u06cc\u06a9 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0645\u06a9\u0633\u0646\u0633 \u06a9\u0648 \u06cc\u06a9\u062c\u0627 \u06a9\u0631\u0646\u06d2 \u06a9\u0627 \u0637\u0631\u06cc\u0642\u06c1 \u062f\u06a9\u06be\u0627\u062a\u0627 \u06c1\u06d2\u06d4 <code>State<\/code> \u0627\u0633\u0628\u0627\u0642 \u062c\u0648 \u0635\u0627\u0641 \u0637\u0648\u0631 \u067e\u0631 \u062e\u062f\u0634\u0627\u062a \u06a9\u0648 \u0627\u0644\u06af \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>AutomaticKeepAliveClientMixin<\/code> \u0679\u06cc\u0628\u0632 \u06a9\u0648 \u0633\u0648\u0626\u0686 \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a \u0627\u0633\u06a9\u0631\u06cc\u0646 \u06a9\u06cc \u062d\u0627\u0644\u062a \u06a9\u0648 \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4 <code>LoggerMixin<\/code> \u0644\u0627\u06af\u0646\u06af \u06a9\u0648 \u0633\u0646\u0628\u06be\u0627\u0644\u0646\u0627\u060c <code>DebounceMixin<\/code> \u0627\u0646 \u067e\u0679 \u067e\u0631\u0648\u0633\u06cc\u0633\u0646\u06af \u0645\u06cc\u06ba \u062a\u0627\u062e\u06cc\u0631 \u06a9\u0631\u06a9\u06d2 \u0636\u0631\u0648\u0631\u062a \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0633\u0631\u0686 \u06a9\u0627\u0644\u0632 \u06a9\u0648 \u0631\u0648\u06a9\u062a\u0627 \u06c1\u06d2\u06d4 <code>LoadingStateMixin<\/code> \u0644\u0648\u0688\u0646\u06af \u0627\u0648\u0631 \u062e\u0631\u0627\u0628\u06cc \u06a9\u06cc \u062d\u0627\u0644\u062a\u0648\u06ba \u06a9\u0627 \u0627\u0646\u062a\u0638\u0627\u0645 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0622\u067e \u06a9\u0648 \u0627\u067e\u0646\u06d2 UI \u0627\u0648\u0631 \u0645\u0646\u0637\u0642 \u06a9\u0648 \u0645\u0646\u0638\u0645 \u0631\u06a9\u06be\u0646\u06d2 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u062f\u06cc\u062a\u0627 \u06c1\u06d2 \u062c\u0628 \u06a9\u06c1 \u0633\u0648\u0627\u0644\u0627\u062a \u06a9\u0648 \u0688\u06cc\u0628\u0627\u0624\u0646\u0633 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u0627\u0648\u0631 \u0628\u0644\u0679 \u0627\u0646 \u0644\u0648\u0688\/\u0627\u06cc\u0631\u0631 \u06c1\u06cc\u0646\u0688\u0644\u0646\u06af \u06a9\u0627 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u062a\u06d2 \u06c1\u0648\u0626\u06d2 \u062a\u0644\u0627\u0634\u06cc\u06ba \u0686\u0644\u0627\u0646\u06d2 \u0627\u0648\u0631 \u0646\u062a\u0627\u0626\u062c \u06a9\u0648 \u0645\u0624\u062b\u0631 \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u0627\u067e \u0688\u06cc\u0679 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062c\u0628\u06a9\u06c1 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u0635\u0627\u0631\u0641 \u06a9\u06d2 \u0627\u0646 \u067e\u0679 \u067e\u0631 \u0631\u062f \u0639\u0645\u0644 \u0638\u0627\u06c1\u0631 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<h3 id=\"heading-the-entry-point\">\u062f\u0627\u062e\u0644\u06c1 \u067e\u0648\u0627\u0626\u0646\u0679<\/h3>\n<pre><code class=\"language-dart\">\/\/ lib\/main.dart\n\nimport 'package:flutter\/material.dart';\nimport 'screens\/search_screen.dart';\n\nvoid main() {\n  runApp(const MyApp());\n}\n\nclass MyApp extends StatelessWidget {\n  const MyApp({super.key});\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      title: 'Mixins Demo',\n      debugShowCheckedModeBanner: false,\n      theme: ThemeData(\n        colorScheme: ColorScheme.fromSeed(seedColor: Colors.indigo),\n        useMaterial3: true,\n      ),\n      home: DefaultTabController(\n        length: 2,\n        child: Scaffold(\n          appBar: AppBar(\n            bottom: const TabBar(\n              tabs: [\n                Tab(icon: Icon(Icons.search), text: 'Search'),\n                Tab(icon: Icon(Icons.home), text: 'Home'),\n              ],\n            ),\n          ),\n          body: const TabBarView(\n            children: [\n              SearchScreen(), \/\/ Uses four mixins\n              Center(child: Text('Home Tab')),\n            ],\n          ),\n        ),\n      ),\n    );\n  }\n}\n<\/code><\/pre>\n<p>\u06cc\u06c1 \u0645\u06a9\u0645\u0644\u060c \u0642\u0627\u0628\u0644 \u0639\u0645\u0644 \u0645\u062b\u0627\u0644 \u062a\u0645\u0627\u0645 \u06a9\u0644\u06cc\u062f\u06cc \u0645\u0631\u06a9\u0628 \u062a\u0635\u0648\u0631\u0627\u062a \u06a9\u0648 \u0633\u06cc\u0627\u0642 \u0648 \u0633\u0628\u0627\u0642 \u0645\u06cc\u06ba \u0631\u06a9\u06be\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<p>\u06a9\u06c1 <code>_SearchScreenState<\/code> \u0628\u06cc\u06a9 \u0648\u0642\u062a \u0686\u0627\u0631 \u0645\u06a9\u0633\u0646\u0633 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u06cc\u06ba:<\/p>\n<ol>\n<li>\n<p><code>AutomaticKeepAliveClientMixin<\/code>    \u0679\u06cc\u0628 \u0631\u06c1\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2<\/p>\n<\/li>\n<li>\n<p><code>LoggerMixin<\/code>    \u0633\u0679\u0631\u06a9\u0686\u0631\u0688 \u0644\u0627\u06af\u0646\u06af \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0633\u06cc\u0679 \u0627\u067e \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4<\/p>\n<\/li>\n<li>\n<p><code>DebounceMixin<\/code>    \u0688\u0633\u067e\u0648\u0632\u0644 \u067e\u0631 \u062e\u0648\u062f\u06a9\u0627\u0631 \u0679\u0627\u0626\u0645\u0631 \u06a9\u0644\u06cc\u0646 \u0627\u067e \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062e\u0648\u062f\u06a9\u0627\u0631 \u0628\u0627\u0632\u06cc\u0627\u0641\u062a \u0688\u06cc\u0628\u0627\u0624\u0646\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2\u061b<\/p>\n<\/li>\n<li>\n<p>\u0627\u0648\u0631 <code>LoadingStateMixin<\/code> \u06a9\u0644\u06cc\u0646 \u063a\u06cc\u0631 \u0645\u0637\u0627\u0628\u0642\u062a \u067e\u0630\u06cc\u0631 \u06a9\u0627\u0645 \u0631\u06cc\u0627\u0633\u062a\u06cc \u0627\u0646\u062a\u0638\u0627\u0645 \u06a9\u06d2 \u0644\u06cc\u06d2\u06d4<\/p>\n<\/li>\n<\/ol>\n<p>\u0645\u06a9\u0633 \u0644\u0627\u0626\u0646 \u0644\u0627\u0626\u0646\u0631\u0627\u0626\u0632\u06cc\u0634\u0646 \u0622\u0631\u0688\u0631 \u062c\u0627\u0646 \u0628\u0648\u062c\u06be \u06a9\u0631 \u06c1\u06d2 \u0627\u0648\u0631 \u0627\u0633 \u067e\u0631 \u062a\u0628\u0635\u0631\u06c1 \u06a9\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2\u06d4 \u06a9\u06c1 <code>super<\/code> \u0633\u0644\u0633\u0644\u06c1 \u062f\u0648\u0646\u0648\u06ba \u0645\u06cc\u06ba \u0634\u0627\u0646\u062f\u0627\u0631 \u06c1\u06d2\u06d4 <code>initState<\/code> \u0627\u0648\u0631 <code>dispose<\/code>. \u06c1\u0631 \u0645\u06a9\u0633 \u06a9\u06cc \u0628\u0627\u0644\u06a9\u0644 \u0627\u06cc\u06a9 \u0630\u0645\u06c1 \u062f\u0627\u0631\u06cc \u06c1\u0648\u062a\u06cc \u06c1\u06d2\u06d4 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 <code>State<\/code> \u06a9\u0644\u0627\u0633 \u0635\u0631\u0641 \u0627\u067e\u0646\u06cc \u0645\u0646\u0637\u0642 \u067e\u0631 \u0641\u0648\u06a9\u0633 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u060c \u062c\u0648 UI \u06a9\u0648 \u0633\u0631\u0686 \u0633\u0631\u0648\u0633 \u0633\u06d2 \u0645\u0646\u0633\u0644\u06a9 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u06d4<\/p>\n<h2 id=\"heading-conclusion\">\u0646\u062a\u06cc\u062c\u06c1<\/h2>\n<p>\u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0645\u0635\u0646\u0641\u06cc\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u06a9\u0633\u06cc\u0646\u0632 \u06a9\u0648\u0626\u06cc \u062e\u0627\u0635 \u0632\u0628\u0627\u0646 \u06a9\u06cc \u062e\u0635\u0648\u0635\u06cc\u062a \u0646\u06c1\u06cc\u06ba \u06c1\u06d2\u06d4 \u0641\u0644\u0679\u0631 \u0688\u0648\u06cc\u0644\u067e\u0631\u0632 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0627\u06cc\u06a9 \u0639\u0645\u0644\u06cc\u060c \u0631\u0648\u0632\u0645\u0631\u06c1 \u06a9\u0627 \u0679\u0648\u0644 \u062c\u0648 \u0635\u0627\u0641\u060c \u0628\u0631\u0642\u0631\u0627\u0631 \u0631\u06a9\u06be\u0646\u06d2 \u06a9\u06d2 \u0642\u0627\u0628\u0644\u060c \u0627\u0648\u0631 \u062f\u0648\u0628\u0627\u0631\u06c1 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0648\u0688 \u0644\u06a9\u06be\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u062c\u0633 \u0644\u0645\u062d\u06d2 \u0622\u067e \u0627\u0633\u06cc \u0686\u06cc\u0632 \u06a9\u0648 \u06a9\u0627\u067e\u06cc \u06a9\u0631\u0646\u0627 \u0686\u06be\u0648\u0691 \u062f\u06cc\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 <code>initState<\/code> \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u062c\u0628 \u0622\u067e \u0627\u0633\u06d2 \u0627\u067e\u0646\u06cc \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u067e\u0631 \u0633\u06cc\u0679 \u06a9\u0631 \u0644\u06cc\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u0641\u0648\u06a9\u0633\u0688\u060c \u0679\u06cc\u0633\u0679 \u0634\u062f\u06c1 \u0645\u06a9\u0633\u0646\u0632 \u062a\u06a9 \u067e\u06c1\u0646\u0686\u0646\u0627 \u0634\u0631\u0648\u0639 \u06a9\u0631 \u062f\u06cc\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u062a\u0648 \u0622\u067e \u06a9\u0627 \u06a9\u0648\u0688 \u0628\u06cc\u0633 \u0646\u0645\u0627\u06cc\u0627\u06ba \u0637\u0648\u0631 \u067e\u0631 \u0628\u06c1\u062a\u0631 \u06c1\u0648 \u062c\u0627\u0626\u06d2 \u06af\u0627\u06d4 \u0628\u06be\u0648\u0644\u06cc \u06c1\u0648\u0626\u06cc \u067e\u0631\u0648\u0633\u06cc\u0633\u0646\u06af \u06a9\u0627\u0644\u0632\u060c \u062f\u06cc\u06a9\u06be \u0628\u06be\u0627\u0644 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06a9\u0645 \u062a\u06a9\u0631\u0627\u0631\u060c \u0627\u0648\u0631 \u0648\u0627\u0636\u062d \u06a9\u0648\u0688 \u06a9\u06cc \u0648\u062c\u06c1 \u0633\u06d2 \u06a9\u0645 \u06a9\u06cc\u0691\u06d2 \u06c1\u06cc\u06ba \u062c\u0648 \u062a\u0628\u0635\u0631\u0648\u06ba \u06a9\u06d2 \u0628\u062c\u0627\u0626\u06d2 \u06a9\u0645\u067e\u0648\u0632\u06cc\u0634\u0646 \u06a9\u06d2 \u0630\u0631\u06cc\u0639\u06d2 \u0627\u0631\u0627\u062f\u06d2 \u06a9\u0648 \u0628\u062a\u0627\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0628\u0635\u06cc\u0631\u062a \u062c\u0648 \u0645\u06a9\u0633\u0646 \u06a9\u0644\u06a9 \u06a9\u0631\u062a\u06cc \u06c1\u06d2 \u0648\u06c1 &quot;is-a&#8221; \u0627\u0648\u0631 &quot;can-do&#8221; \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u0641\u0631\u0642 \u06a9\u0648 \u0633\u0645\u062c\u06be \u0631\u06c1\u06cc \u06c1\u06d2\u06d4 \u0648\u0631\u0627\u062b\u062a \u06a9\u0627 \u0645\u0637\u0644\u0628 \u0634\u0646\u0627\u062e\u062a \u06a9\u0627 \u0646\u0645\u0648\u0646\u06c1 \u06c1\u06d2\u06d4 <code>Dog<\/code> \u0686\u0627\u0646\u062f\u06cc <code>Animal<\/code>. \u0645\u06a9\u0633\u06cc\u0646 \u0645\u0627\u0688\u0644\u0646\u06af \u06a9\u06cc \u0641\u0639\u0627\u0644\u06cc\u062a \u06a9\u06d2 \u0644\u06cc\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0622\u067e \u0627\u0633\u06a9\u0631\u06cc\u0646 \u067e\u0631 \u062a\u062c\u0632\u06cc\u0627\u062a \u06a9\u0648 \u0679\u0631\u06cc\u06a9 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0631\u06cc\u067e\u0648\u0632\u0679\u0631\u06cc\u0648\u06ba \u0645\u06cc\u06ba \u0644\u0627\u06af \u0627\u0646 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0641\u0627\u0631\u0645 \u06a9\u06cc \u062a\u0648\u062b\u06cc\u0642 \u06a9\u0631 \u0633\u06a9\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0627\u06cc\u06a9 \u0628\u0627\u0631 \u062c\u0628 \u0622\u067e \u0627\u0633 \u0627\u0645\u062a\u06cc\u0627\u0632 \u06a9\u0648 \u0627\u0646\u062f\u0631\u0648\u0646\u06cc \u0628\u0646\u0627 \u0644\u06cc\u06ba \u06af\u06d2\u060c \u062a\u0648 \u0622\u067e \u0642\u062f\u0631\u062a\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0627\u067e\u0646\u06d2 \u0645\u0648\u062c\u0648\u062f\u06c1 \u06a9\u0648\u0688 \u0645\u06cc\u06ba \u0645\u06a9\u0633 \u0627\u0646 \u0645\u0648\u0627\u0642\u0639 \u06a9\u06cc \u0646\u0634\u0627\u0646\u062f\u06c1\u06cc \u06a9\u0631\u06cc\u06ba \u06af\u06d2\u06d4<\/p>\n<p>\u0641\u0644\u0679\u0631 \u06a9\u0627 \u0627\u067e\u0646\u0627 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0645\u06a9\u0633\u06cc\u0646 \u0688\u06cc\u0632\u0627\u0626\u0646 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0645\u0627\u0633\u0679\u0631 \u06a9\u0644\u0627\u0633 \u06c1\u06d2\u06d4 \u062c\u0628 \u0628\u06be\u06cc \u0645\u06cc\u06ba \u0679\u0627\u0626\u067e \u06a9\u0631\u062a\u0627 \u06c1\u0648\u06ba\u06d4 <code>with SingleTickerProviderStateMixin<\/code>\u062a\u0645 \u06c1\u0648 <code>Ticker<\/code>\u06a9\u0627 \u067e\u0648\u0631\u0627 \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u067e\u0648\u0634\u06cc\u062f\u06c1 \u06c1\u06d2 \u0627\u0648\u0631 \u0635\u0631\u0641 \u0627\u06cc\u06a9 \u0641\u0646\u06a9\u0634\u0646 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0635\u062d\u06cc\u062d \u0642\u0633\u0645 \u06a9\u06cc \u06a9\u0644\u0627\u0633\u0648\u06ba \u067e\u0631 \u0641\u0639\u0627\u0644 \u06c1\u06d2 (<code>vsync<\/code>) \u062c\u0628 \u06a9\u0648\u0626\u06cc \u0648\u06cc\u062c\u06cc\u0679 \u062d\u0630\u0641 \u06c1\u0648\u062c\u0627\u062a\u0627 \u06c1\u06d2\u060c \u062a\u0648 \u06cc\u06c1 \u0645\u06a9\u0645\u0644 \u0637\u0648\u0631 \u067e\u0631 \u063a\u0627\u0626\u0628 \u06c1\u0648\u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u06cc\u06c1 \u0648\u06c1 \u0622\u0626\u06cc\u0688\u06cc\u0644 \u06c1\u06d2 \u062c\u0633 \u06a9\u06cc \u062e\u0648\u0627\u06c1\u0634 \u06c1\u06d2: \u0632\u06cc\u0627\u062f\u06c1 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0641\u0639\u0627\u0644\u06cc\u062a\u060c \u0633\u0637\u062d \u06a9\u0627 \u06a9\u0645 \u0627\u0632 \u06a9\u0645 \u0631\u0642\u0628\u06c1\u060c \u0627\u0648\u0631 \u0635\u0641\u0631 \u0645\u06cc\u0645\u0648\u0631\u06cc \u06a9\u0627 \u0644\u06cc\u06a9\u06d4<\/p>\n<p>\u0644\u06a9\u06cc\u0631\u06cc\u0627\u0626\u0632\u06cc\u0634\u0646 \u0645\u0627\u0688\u0644 \u0688\u0627\u0631\u0679 \u06a9\u06d2 \u0645\u06a9\u0633\u0646 \u0633\u0633\u0679\u0645 \u06a9\u0648 \u0628\u06be\u0631\u0648\u0633\u06c1 \u0641\u0631\u0627\u06c1\u0645 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u062c\u06c1\u0627\u06ba \u0627\u06cc\u06a9 \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u0648\u0631\u0627\u062b\u062a \u0627\u0628\u06c1\u0627\u0645 \u067e\u06cc\u062f\u0627 \u06a9\u0631\u062a\u06cc \u06c1\u06d2\u060c \u0644\u06a9\u06cc\u0631\u06cc\u0627\u0626\u0632\u06cc\u0634\u0646 \u0627\u06cc\u06a9 \u062a\u0639\u06cc\u06cc\u0646\u0627\u062a\u06cc \u0632\u0646\u062c\u06cc\u0631 \u0628\u0646\u0627\u062a\u06cc \u06c1\u06d2 \u062c\u06c1\u0627\u06ba \u062a\u0645\u0627\u0645 \u0645\u06a9\u0633\u0646\u0632 \u06a9\u0648 \u0627\u06cc\u06a9 \u067e\u06cc\u0634 \u0642\u06cc\u0627\u0633\u06cc \u062a\u0631\u062a\u06cc\u0628 \u0645\u06cc\u06ba \u0639\u0645\u0644 \u0645\u06cc\u06ba \u0644\u0627\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2 \u0627\u0648\u0631 \u062a\u0645\u0627\u0645 \u0645\u06a9\u0633\u0646\u0632 \u06a9\u0648 \u0639\u0645\u0644 \u0645\u06cc\u06ba \u0644\u0627\u06cc\u0627 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 <code>super<\/code> \u06a9\u0627\u0644 \u0627\u06af\u0644\u06d2 \u0644\u0646\u06a9 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u062c\u0627\u0631\u06cc \u06c1\u06d2\u06d4 \u0627\u0633 \u0633\u0644\u0633\u0644\u06c1 \u06a9\u0648 \u0633\u0645\u062c\u06be\u06cc\u06ba \u0627\u0648\u0631 \u06c1\u0645\u06cc\u0634\u06c1 \u0627\u0633 \u06a9\u0627 \u0627\u062d\u062a\u0631\u0627\u0645 \u06a9\u0631\u06cc\u06ba\u06d4 <code>super<\/code> \u0644\u0627\u0626\u0641 \u0633\u0627\u0626\u06cc\u06a9\u0644 \u0627\u0648\u0648\u0631 \u0631\u0627\u0626\u0688 \u06a9\u0627\u0644\u0632 \u0645\u06a9\u0633\u0646\u0633 \u06a9\u06d2 \u0645\u062d\u0641\u0648\u0638 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0648\u0627\u062d\u062f \u0627\u06c1\u0645 \u062a\u0631\u06cc\u0646 \u0645\u06a9\u06cc\u0646\u06cc\u06a9\u0644 \u0627\u06cc\u0631\u06cc\u0627 \u06c1\u06cc\u06ba\u06d4<\/p>\n<p>\u0627\u067e\u0646\u06d2 \u0645\u06a9\u0633\u0646\u0633 \u06a9\u0648 \u0627\u0686\u06be\u06cc \u0637\u0631\u062d \u0633\u06d2 \u0644\u06a9\u06be\u0646\u06d2 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0648\u06c1\u06cc \u0646\u0638\u0645 \u0648 \u0636\u0628\u0637 \u062f\u0631\u06a9\u0627\u0631 \u06c1\u0648\u062a\u0627 \u06c1\u06d2 \u062c\u06cc\u0633\u0627 \u06a9\u06c1 \u0627\u0686\u06be\u06d2 \u0641\u0646\u06a9\u0634\u0646\u0632 \u0644\u06a9\u06be\u0646\u0627\u06d4 \u0627\u0633 \u06a9\u0627 \u0645\u0637\u0644\u0628 \u06c1\u06d2 \u06a9\u06c1 \u0622\u067e \u06a9\u0648 \u0627\u06cc\u06a9 \u0630\u0645\u06c1 \u062f\u0627\u0631\u06cc\u060c \u0627\u06cc\u06a9 \u0648\u0627\u0636\u062d \u0646\u0627\u0645\u060c \u0627\u06cc\u06a9 \u062a\u062d\u0631\u06cc\u0631\u06cc \u0645\u0639\u0627\u06c1\u062f\u06c1\u060c \u0627\u0648\u0631 \u0622\u0632\u0627\u062f \u062c\u0627\u0646\u0686 \u06a9\u06d2 \u0627\u0645\u06a9\u0627\u0646 \u06a9\u06cc \u0636\u0631\u0648\u0631\u062a \u06c1\u06d2\u06d4<\/p>\n<p>\u0627\u0686\u06be\u06cc \u0637\u0631\u062d \u0633\u06d2 \u0688\u06cc\u0632\u0627\u0626\u0646 \u06a9\u06cc\u06d2 \u06af\u0626\u06d2 \u0645\u06a9\u0633\u0646\u0633 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0645\u06cc\u06ba \u0622\u0646\u06d2 \u067e\u0631 \u063a\u06cc\u0631 \u0645\u062a\u0632\u0644\u0632\u0644 \u06c1\u0648\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0688\u0648\u06cc\u0644\u067e\u0631 \u062c\u0648 \u0627\u0633\u06d2 \u0644\u0627\u06af\u0648 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0648\u06c1 \u06a9\u0645 \u06a9\u0648\u0688 \u0644\u06a9\u06be\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u06a9\u0645 \u063a\u0644\u0637\u06cc\u0627\u06ba \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba\u060c \u0627\u0648\u0631 \u0635\u0631\u0641 \u0627\u067e\u0646\u06cc \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u06a9\u06cc \u0645\u062e\u0635\u0648\u0635 \u0645\u0646\u0637\u0642 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0633\u0648\u0686\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 \u0645\u06a9\u0633\u06cc\u0646 \u0628\u0627\u0642\u06cc \u06a9\u0627 \u062e\u06cc\u0627\u0644 \u0631\u06a9\u06be\u062a\u0627 \u06c1\u06d2\u06d4<\/p>\n<p>\u0686\u06be\u0648\u0679\u06cc \u0634\u0631\u0648\u0639\u0627\u062a \u06a9\u0631\u06cc\u06ba\u06d4 \u0628\u0648\u0627\u0626\u0644\u0631 \u067e\u0644\u06cc\u0679 \u06a9\u0627 \u0645\u0646\u062f\u0631\u062c\u06c1 \u0630\u06cc\u0644 \u0679\u06a9\u0691\u0627 \u0644\u06cc\u06ba \u062c\u0633\u06d2 \u0622\u067e \u062f\u0648 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u06a9\u06d2 \u062f\u0631\u0645\u06cc\u0627\u0646 \u06a9\u0627\u067e\u06cc \u0627\u0648\u0631 \u067e\u06cc\u0633\u0679 \u06a9\u0631\u062a\u06d2 \u06c1\u06cc\u06ba \u0627\u0648\u0631 \u067e\u0648\u0686\u06be\u062a\u06d2 \u06c1\u06cc\u06ba \u06a9\u06c1 \u06a9\u06cc\u0627 \u06cc\u06c1 \u0645\u06a9\u0633\u06cc\u0646 \u0645\u06cc\u06ba \u06c1\u06d2\u06d4 \u06c1\u0627\u06ba\u060c \u062a\u0642\u0631\u06cc\u0628\u0627\u064b \u062a\u0645\u0627\u0645 \u0645\u0639\u0627\u0645\u0644\u0627\u062a \u0645\u06cc\u06ba\u06d4 \u0627\u0633\u06d2 \u0646\u06a9\u0627\u0644\u06cc\u06ba \u0627\u0648\u0631 \u062f\u0648\u0646\u0648\u06ba \u0627\u0633\u06a9\u0631\u06cc\u0646\u06cc\u06ba \u0641\u0648\u0631\u06cc \u0637\u0648\u0631 \u067e\u0631 \u0648\u0627\u0636\u062d \u06c1\u0648 \u062c\u0627\u0626\u06cc\u06ba \u06af\u06cc\u06d4<\/p>\n<p>\u0627\u067e\u0646\u06cc \u0645\u06a9\u0633\u06cc\u0646 \u0644\u0627\u0626\u0628\u0631\u06cc\u0631\u06cc \u06a9\u0648 \u0628\u062a\u062f\u0631\u06cc\u062c \u0628\u0646\u0627 \u06a9\u0631 \u0627\u0648\u0631 \u06c1\u0631 \u0645\u06a9\u0633\u0627\u0626\u0646 \u06a9\u0648 \u0634\u0627\u0645\u0644 \u06a9\u0631\u062a\u06d2 \u0648\u0642\u062a \u062c\u0627\u0646\u0686 \u06a9\u0631\u060c \u0648\u0642\u062a \u06af\u0632\u0631\u0646\u06d2 \u06a9\u06d2 \u0633\u0627\u062a\u06be \u0633\u0627\u062a\u06be \u0622\u067e \u062f\u0648\u0628\u0627\u0631\u06c1 \u0642\u0627\u0628\u0644 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u0631\u0648\u06cc\u06d2 \u06a9\u06cc \u062a\u06c1\u0648\u06ba \u06a9\u06cc \u0679\u0648\u0644 \u06a9\u0679 \u062c\u0645\u0639 \u06a9\u0631\u06cc\u06ba \u06af\u06d2 \u062c\u0648 \u0622\u067e \u06a9\u0648 \u06c1\u0631 \u0646\u0626\u06cc \u0627\u0633\u06a9\u0631\u06cc\u0646 \u06a9\u0648 \u067e\u0686\u06be\u0644\u06cc \u0633\u06d2 \u0632\u06cc\u0627\u062f\u06c1 \u062a\u06cc\u0632 \u0627\u0648\u0631 \u062f\u0631\u0633\u062a \u0637\u0631\u06cc\u0642\u06d2 \u0633\u06d2 \u0628\u0646\u0627\u0646\u06d2 \u06a9\u06cc \u0627\u062c\u0627\u0632\u062a \u062f\u06d2 \u06af\u06cc\u06d4<\/p>\n<h2 id=\"heading-references\">\u062d\u0648\u0627\u0644\u06c1 \u062c\u0627\u062a<\/h2>\n<h3 id=\"heading-dart-language-documentation\">\u0688\u0627\u0631\u0679 \u0632\u0628\u0627\u0646 \u06a9\u06cc \u062f\u0633\u062a\u0627\u0648\u06cc\u0632\u0627\u062a<\/h3>\n<h3 id=\"heading-flutter-framework-mixins\">\u0641\u0644\u0679\u0631 \u0641\u0631\u06cc\u0645 \u0648\u0631\u06a9 \u0645\u06a9\u0633\u06cc\u0646<\/h3>\n<h3 id=\"heading-learning-resources\">\u0633\u06cc\u06a9\u06be\u0646\u06d2 \u06a9\u06d2 \u0645\u0648\u0627\u062f<\/h3>\n<ul>\n<li>\n<p><strong>\u0645\u0648\u062b\u0631 \u0688\u0627\u0631\u0679\u0633: \u0688\u06cc\u0632\u0627\u0626\u0646<\/strong>: \u0688\u0627\u0631\u0679 API \u0688\u06cc\u0632\u0627\u0626\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u06af\u0648\u06af\u0644 \u06a9\u06cc \u0622\u0641\u06cc\u0634\u0644 \u0627\u0633\u0679\u0627\u0626\u0644 \u06af\u0627\u0626\u06cc\u0688\u060c \u0628\u0634\u0645\u0648\u0644 \u06a9\u0644\u0627\u0633\u0632\u060c \u0645\u06a9\u0633\u06cc\u0646\u0632\u060c \u0627\u0648\u0631 \u0627\u06cc\u06a9\u0633\u0679\u06cc\u0646\u0634\u0646 \u06a9\u06d2 \u0637\u0631\u06cc\u0642\u06d2 \u0627\u0633\u062a\u0639\u0645\u0627\u0644 \u06a9\u0631\u0646\u06d2 \u06a9\u06d2 \u0628\u0627\u0631\u06d2 \u0645\u06cc\u06ba \u0631\u06c1\u0646\u0645\u0627\u0626\u06cc\u06d4 https:\/\/dart.dev\/active-dart\/design<\/p>\n<\/li>\n<li>\n<p><strong>\u06c1\u0641\u062a\u06c1 \u06a9\u0627 \u0641\u0644\u0679\u0631 \u0648\u06cc\u062c\u06cc\u0679: \u0645\u06a9\u0633\u06cc\u0646 \u067e\u0631 \u0645\u0628\u0646\u06cc \u0648\u06cc\u062c\u06cc\u0679<\/strong>: \u0641\u0644\u0679\u0631 \u06a9\u06cc \u0622\u0641\u06cc\u0634\u0644 \u06cc\u0648\u0679\u06cc\u0648\u0628 \u0633\u06cc\u0631\u06cc\u0632 \u0645\u06cc\u06ba \u06a9\u0626\u06cc \u0627\u0642\u0633\u0627\u0637 \u0634\u0627\u0645\u0644 \u06c1\u06cc\u06ba \u062c\u0633 \u0645\u06cc\u06ba \u0628\u062a\u0627\u06cc\u0627 \u06af\u06cc\u0627 \u06c1\u06d2 \u06a9\u06c1 \u0641\u0644\u0679\u0631 \u06a9\u06d2 \u0648\u06cc\u062c\u06cc\u0679 \u0633\u0633\u0679\u0645 \u06a9\u0648 \u06a9\u0633 \u0637\u0631\u062d \u0645\u06a9\u0633 \u06a9\u0631\u062a\u0627 \u06c1\u06d2\u06d4 https:\/\/www.youtube.com\/@flutterdev<\/p>\n<\/li>\n<li>\n<p><strong>\u0688\u0627\u0631\u0679 \u0627\u0633\u067e\u06cc\u06a9\u0633: \u0645\u06a9\u0633\u0646\u0633<\/strong>: \u06cc\u06c1 \u0627\u0646 \u0642\u0627\u0631\u0626\u06cc\u0646 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0645\u06a9\u0633\u0646\u0633 \u06a9\u06d2 \u0644\u06cc\u06d2 \u0633\u0631\u06a9\u0627\u0631\u06cc \u0632\u0628\u0627\u0646 \u06a9\u06cc \u062a\u0641\u0635\u06cc\u0644\u0627\u062a \u06a9\u0627 \u0633\u06cc\u06a9\u0634\u0646 \u06c1\u06d2 \u062c\u0648 \u0644\u06a9\u06cc\u0631\u06cc\u0627\u0626\u0632\u06cc\u0634\u0646 \u0627\u0648\u0631 \u0645\u06a9\u0633\u0627\u0626\u0646 \u0627\u06cc\u067e\u0644\u06cc \u06a9\u06cc\u0634\u0646 \u06a9\u06d2 \u0635\u062d\u06cc\u062d \u0627\u0635\u0648\u0644\u0648\u06ba \u06a9\u0648 \u0633\u0645\u062c\u06be\u0646\u0627 \u0686\u0627\u06c1\u062a\u06d2 \u06c1\u06cc\u06ba\u06d4 https:\/\/dart.dev\/guides\/language\/spec<\/p>\n<\/li>\n<\/ul><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u06c1\u0631 \u0641\u0644\u0679\u0631 \u0688\u0648\u06cc\u0644\u067e\u0631 \u06a9\u06d2 \u0633\u0641\u0631 \u0645\u06cc\u06ba \u0627\u06cc\u06a9 \u0646\u0642\u0637\u06c1 \u0627\u06cc\u0633\u0627 \u0622\u062a\u0627 \u06c1\u06d2 \u062c\u0628 \u0648\u0631\u0627\u062b\u062a \u06a9\u0627 \u0645\u0627\u0688\u0644 \u0679\u0648\u0679\u0646\u0627 \u0634\u0631\u0648\u0639 \u06c1\u0648 \u062c\u0627\u062a\u0627 \u06c1\u06d2\u06d4 \u062a\u0645 \u06c1\u0648 StatefulWidget \u0627\u0646 \u0627\u0633\u06a9\u0631\u06cc\u0646\u0648\u06ba \u06a9\u06d2 \u0644\u06cc\u06d2 \u062c\u0648 \u0645\u062a\u062d\u0631\u06a9 \u062a\u0635\u0627\u0648\u06cc\u0631 \u0686\u0644\u0627\u062a\u06cc \u06c1\u06cc\u06ba\u06d4 \u0627\u0633 \u06a9\u06d2 \u0627\u0646\u062f\u0631 \u0627\u067e\u0646\u06cc \u0627\u06cc\u0646\u06cc\u0645\u06cc\u0634\u0646 \u0645\u0646\u0637\u0642 \u06a9\u0648 \u0627\u062d\u062a\u06cc\u0627\u0637 \u0633\u06d2 \u0644\u06a9\u06be\u06cc\u06ba: SingleTickerProviderStateMixin. \u0686\u0646\u062f \u06c1\u0641\u062a\u0648\u06ba \u0645\u06cc\u06ba \u06c1\u0645 \u0627\u06cc\u06a9 \u0628\u0627\u0644\u06a9\u0644 \u0645\u062e\u062a\u0644\u0641 \u0627\u0633\u06a9\u0631\u06cc\u0646 \u0628\u0646\u0627\u0626\u06cc\u06ba \u06af\u06d2 \u062c\u0633 \u06a9\u06d2 [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":22465,"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-22464","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts\/22464","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/comments?post=22464"}],"version-history":[{"count":1,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts\/22464\/revisions"}],"predecessor-version":[{"id":22466,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/posts\/22464\/revisions\/22466"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/media\/22465"}],"wp:attachment":[{"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/media?parent=22464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/categories?post=22464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/umang.pk\/en_us\/wp-json\/wp\/v2\/tags?post=22464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}