Flutter developer

Flutter developer

Share

the developers are allowed in this group any type of question related to programing you post on this

10/08/2023

How to Pick Custom Thumbnail From Video - Flutter - Android / iOS

18/05/2023

6) What is AppLifecycleState?

AppLifecycleState is as follows:

inactive — The application is in an inactive state and is not receiving user input. (iOS only).
paused — The application is not currently visible to the user, not responding to user input, and running in the background.
resumed — The application is visible and responding to user input.
suspending — The application will be suspended momentarily. (Android only).
For more detail click here.

7) What is pubspec.yaml file?
It is responsible for handling importing images/fonts/third-party packages which you want to include in your project.
The pubspec. yaml file is used to define the dependencies of your Flutter project. This metadata information is written in the YAML language. This file can have the following fields name, version, description, homepage, repository, documentation, dependencies, environment, and more about the pubspec.yaml file.

8) what is the difference between a flutter package and the flutter plugin.
A “package” contains only Dart code.
A “plugin” contains both Dart and Native code (kotlin/js/swift/…)

Flutter plugins: (Native-related developments).
Flutter plugin is the wrapper of the native code like android( Kotlin or java) and iOS(swift or objective c)
Flutter can do anything that a native application can through the use of Platform Channels and Message Passing. Flutter instructs the native iOS/Android code to act and returns the result to Dart.

Flutter packages or modules: (Make the development faster by using code from util libraries).
Flutter supports using shared packages contributed by other developers to the Flutter and Dart ecosystems. This allows for quickly building an app without having to develop everything from scratch.

A package can use plugins if it wants to. It will still qualify as a package.

9) What is the difference between WidgetsApp and MaterialApp?

WidgetsApp:- A convenience class that wraps several widgets that are commonly required for an application.
One of the primary roles that WidgetsApp provides is binding the system back button to pop the Navigator or quitting the application.

MaterialApp:- A convenience widget that wraps several widgets that are commonly required for material design applications.
It builds upon a WidgetsApp by adding material-design specific functionality, such as AnimatedTheme and GridPaper.

10) What’s the difference between hot reload and hot restart?

In simple words,
Hot Reload is just updating the changes in your program.
But Hot Restart will again remove your previous state and run the complete program.

Hot Reload

Flutter hot reload features works with a combination of the Small r key on the command prompt or Terminal.
The hot reload feature quickly compile the newly added code in our file and sent the code to Dart Virtual Machine. After done updating the Code Dart Virtual Machine update the app UI with widgets.
Hot Reload takes less time than Hot restart.
There is also a drawback in Hot Reload, If you are using States in your application then Hot Reload preservers the States so they will not update on Hot Reload our set to their default values.
Hot Restart

A hot restart is much different from a hot reload.
In Hot restart, it destroys the preserved State value and set them to their default. So if you are using state value in your application then after every hot restart the developer gets a fully compiled application and all the states will be set to their defaults.
The app widget tree is completely rebuilt with a new type of code.
Hot Restart takes much higher time than Hot reload.

18/05/2023

1)What is Flutter?
Flutter is an open-source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase.
Flutter is not a language; it is an SDK. Flutter apps use the Dart programming language for creating an app. The first alpha version of Flutter was released in May 2017.

2) What is Dart?
It is open-source and developed by Google in 2011. The purpose of Dart programming is to create frontend user interfaces for the web and mobile apps.
Dart is a client-optimized language for developing fast apps on any platform. Its goal is to offer the most productive programming language for multi-platform development.

3)What are the Flutter widgets?
Flutter widgets are built using a modern framework that takes inspiration from React. The central idea is that you build your UI out of widgets. Widgets describe what their view should look like given their current configuration and state. When a widget’s state changes, the widget rebuilds its description, which the framework diffs against the previous description to determine the minimal changes needed in the underlying render tree to transition from one state to the next.

4) What is the Difference Between Stateless and Stateful Widget in Flutter?

A stateless widget is useful when the part of the user interface you are describing does not depend on anything other than the configuration information and the BuildContext whereas a Stateful widget is useful when the part of the user interface you are describing can change dynamically.

A Stateful Widget is a mutable widget that is the reason it can be drawn multiple times within its lifetime.
It is referred to as dynamic because it can change the inner data during the widget's lifetime. A widget that allows us to refresh the screen is called a Stateful widget. This widget does not have a build() method. It has the createState() method, which returns a class that extends the Flutters State Class. The examples of the Stateful widget are Checkbox, Radio, Slider, InkWell, Form, and TextField.

A Stateless widget will never rebuild by itself but can from external events.
The Stateless widget does not have any state information. It remains static throughout its lifecycle. Examples of the Stateless widget are Text, Row, Column, Container, etc. If the screen or widget contains static content, it should be a Stateless widget, but if you want to change the content, it needs to be a Stateful widget.

5) What is StatefulWidget LifeCycle?

The lifecycle has the following simplified steps:

createState(): When we build a new StatefulWidget, this one calls createState() right away and this override method must exist.
initState(): It is the first method called after the Widget is created.This is our equivalent to onCreate() and viewDidLoad()
didChangeDependencies() : This method is called immediately after initState() on the first time the widget is built.
build() : This is called right after didChangeDependencies(). All the GUI is rendered here and will be called every single time the UI needs to be rendered.
didUpdateWidget(): It’ll be called once the parent Widget did a change and needs to redraw the UI.
deactivate(): Framework calls this method whenever it removes this State object from the tree
dispose(): It is called when this object and its State are removed from the tree permanently and will never build again.

18/05/2023

Top 100 Flutter Interview Questions
Visit my Page

Photos from Flutter developer's post 29/10/2022

Hive database in flutter

Photos from Flutter developer's post 24/10/2022

Container vs SizedBox

21/10/2022

Currently working on plant store app

Photos from Flutter developer's post 21/10/2022

8 way to build flutter app

Photos from Flutter developer's post 19/10/2022

🤔🤔

Want your school to be the top-listed School/college in Peshawar?

Click here to claim your Sponsored Listing.

Location

Category

Telephone

Address


Peshawar
25000