Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
March 24, 2022 01:33 am GMT

Stateful widgets

Stateful Widget: Durum Bilgisi Olan Widget

Durum bilgisi olan bir widget (stateful widget) internal
state'e (dahili duruma) sahiptir ve bu durumu ynetebilir.

Tm durum bilgisi olan widget'larn karlk gelen durum nesneleri(state object) vardr. ekil 3.3 durum bilgisi olan bir widget tree'yi gstermektedir.

Image description
ekil 3.3

ekildeki MyHomePage aa dmnn(tree node) MyHomePageState aa dmne bal olduuna dikkat edin. Bu, tm StatefulWidget rneklerinin aslnda dahil olan iki snfa sahip olduunu gsterir.

Aadaki kod tm stateful widgetlarn sahip olduu yapy gsterir:

class MyHomePage extends StatefulWidget {  @override  _MyHomePageState createState() => _MyHomePageState();}class _MyHomePageState extends State<MyHomePage> {  @override  Widget build(BuildContext context) {    // ..  }}

Reference: Flutter in Action chapter-3


Original Link: https://dev.to/gulsenkeskin/stateful-widgets-5ene

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To