masalah 1pilihanWhat is a key characteristic of stateless widgets in Flutter?They maintain their own stateThey are immutableThey require a State classThey rebuild when state changes
masalah 2pilihanIn which scenario should you use a stateful widget?When displaying static textWhen data is managed by its parentWhen the UI needs to change dynamicallyWhen displaying a non-interactive image
masalah 3pilihanWhat method do you override to create the UI in a StatelessWidget?build()setState()createState()initState()
masalah 4pilihanWhich method is used in a StatefulWidget to update the UI based on state changes?build()setState()createState()dispose()
masalah 5pilihanWhat is a benefit of using stateless widgets?Complex implementationBetter performance for static contentRequires managing stateRebuilds frequently
masalah 6pilihanWhat are the two classes involved in implementing a StatefulWidget?Widget and StateStatelessWidget and StatefulWidgetState and ImmutableStateWidget and BuildContext
masalah 7pilihanHow does a StatelessWidget handle updates when data changes?It updates only the changed stateIt rebuilds completelyIt uses setState()It does not update
masalah 8pilihanWhich of the following is not a use case for a stateless widget?Displaying a fixed iconShowing a constant textHandling a dynamic listDisplaying a non-interactive image
masalah 9pilihanWhen should you choose a stateless widget over a stateful widget?When the UI needs to change dynamicallyWhen internal state management is neededWhen performance optimization is importantWhen handling user interactions
masalah 10pilihanWhat is the role of the State class in a StatefulWidget?To render UI elementsTo manage mutable stateTo implement the build methodTo dispose of the widget