Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions Source.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
---
title: Flutter Interview Questions
---
* What is the difference between Stateless and Stateful Widget in Flutter? </br>
If a widget can change—when a user interacts with it, for example—it’s stateful.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello! I believe the purpose of this repository is just to post questions and not answers about flutter interviews.

A stateless widget never changes. Icon, IconButton, and Text are examples of stateless widgets. Stateless widgets subclass
StatelessWidget.
A stateful widget is dynamic: for example, it can change its appearance in response to events triggered by user interactions or when it receives data. Checkbox, Radio, Slider, InkWell, Form, and TextField are examples of stateful widgets. Stateful widgets subclass
StatefulWidget.
A widget’s state is stored in a State object, separating the widget’s state from its appearance. The state consists of values that
can change, like a slider’s current value or whether a checkbox is checked. When the widget’s state changes, the state object calls
setState(), telling the framework to redraw the widget.

* What is the difference between Stateless and Stateful Widget in Flutter?
* Explain Stateful Widget Lifecycle?
* When to use WidgetsBindingObserver?
* Explain Stateful Widget Lifecycle? </br>
<a> https://flutterbyexample.com/stateful-widget-lifecycle </a>
* When to use WidgetsBindingObserver? </br>
If we want to listen to the events of the app life cycle we implement a WidgetsBindingObserver interface in main screen's
StatefulWidget next, we get the instance of WidgetBinding and add an observer to it.
<a> https://medium.com/pharos-production/flutter-app-lifecycle-4b0ab4a4211a </a>
* What is a Flutter Tree Shaking?
* What is a Spacer Widget?
* What is a Spacer Widget? </br>
<a> https://api.flutter.dev/flutter/widgets/Spacer-class.html </a>
* Difference between HotRestart and Hot Reload?
* What is an Inherited Widget and list some examples?
* Why is the build() method on State and not Stateful Widget?
Expand All @@ -29,4 +42,4 @@ title: Flutter Interview Questions
* How would you access Stateful Widget properties from it's State?
* What is InheritedWidget in Flutter?
* Is there a suggested limit to the number of FloatingActionButtons a screen can have?. Give reason(s) for your answer
* Mention two or more operations that would require one to use or return a Future?
* Mention two or more operations that would require one to use or return a Future?