Flutter apps use the Dart programming language.
Getter methods read data from class fields, while setter methods set data to class fields.
To send a stream of data from the native platform back to Flutter, useful for monitoring sensor data.
It allows building applications for multiple platforms from a single codebase.
The UI layer that holds visible components and provides visualization of the data stored in the Model.
To save, reset, or validate multiple fields at once.
AppLifecycleState represents the state of the application, including inactive, paused, resumed, and suspending.
They handle null values and prevent null reference errors.
When a widget’s state changes, it rebuilds its description, and the framework determines the minimal changes needed in the render tree.
Nothing happens; the method or property is not accessed.
When making a quick demo app.
The application is visible and responding to user input.
To allow computations based on whether a value is null, serving as shorthand for longer expressions.
Named parameters are parameters that can have default values and are specified by name when calling a function.
It indicates single-assignment; a final variable must have an initializer and cannot be changed once assigned.
Flutter is developed by Google.
An open-source programming language developed by Google in 2011 for creating frontend user interfaces for web and mobile apps.
The widget is rebuilt to reflect the updated state, resulting in a dynamic, responsive user interface.
Debug mode includes debugging information for easy debugging, while release mode usually has optimizations enabled.
A Stream is like an async Iterator in JavaScript, representing values that can change over time, often used for web sockets or events.
A list of plugins used during the development stage to test the app.
To size the child to a specific aspect ratio based on the largest width permitted by layout constraints.
Double.infinity means to be as big as the parent allows, while MediaQuery means to be as big as the screen.
Dependencies are packages required for the app to run, while dev_dependencies are packages needed only during development.
Use square brackets around the optional parameters in the function definition.
A Future returns only once, while a Stream can return multiple times as values change over time.
State values are preserved and do not update; they remain at their current values.
Hot Restart destroys preserved state values and resets them to their default.
To inform the ViewModel about the user’s action and observe the ViewModel without containing application logic.
During development, when you want to use hot reload.
A wrapper of native code for Android (Kotlin or Java) and iOS (Swift or Objective-C).
An adaptive app adjusts to run on different device types, such as mobile and desktop, and requires handling mouse and keyboard inputs.
Ephemeral State refers to state variables that are inside of the Stateful widget.
Cupertino widgets are used to build iOS-like apps, while Material widgets implement the Material design language for various platforms including Android.
The application is in an inactive state and is not receiving user input (iOS only).
It provides modularity, testability, and a cleaner, more maintainable codebase.
It can change the TYPE and VALUE of the variable later in code.
A parameter that must be provided when calling a function, like in the example findVolume(int length, int breath, int height).
ChangeNotifier with Provider or MobX, as they allow direct method calls on the state class in response to events.
Uncompleted or completed.
When you want a value that may not be available right now but will be available later and will not change.
Final can't change TYPE or VALUE; const is a compile-time constant; static modifies members and retains values until program execution finishes.
They listen to changes and trigger a new build when notified of a new value.
A Key is a unique identifier for a widget that helps Flutter identify it from its previous state.
Provider, Riverpod, Bloc, and Redux.
It exposes relevant data streams to the View and serves as a link between the Model and the View.
A widget’s 'state' is the information or data that it holds over time, determining how the widget should be displayed on the screen.
It provides the UI and visualizes data while tracking user actions to notify the Presenter.
Through the use of Platform Channels and Message Passing.
The actual size of the device and detailed information about its layout preferences.
Fast development, expressive and flexible UI, and native performance.
It compiles newly added code and sends it to the Dart Virtual Machine, which then updates the app UI with widgets.
Isolates are used for concurrent execution of tasks that may take a long time, such as network requests or computationally intensive operations.
It enables full customization of the UI, resulting in fast rendering and expressive designs.
It can’t change the TYPE of the variable, but can change the VALUE later in code.
findVolume(int length, int breath, int height) { print('length = $length, breath = $breath, height = $height'); }
State changes.
No, platform channels are not used on the web.
The app widget tree is completely rebuilt with a new type of code.
Dart programming language.
By compiling to native ARM code and using a high-performance rendering engine.
An optimization technique that removes unused modules during the build process, effectively eliminating dead code.
It stores application data, handles domain logic, and communicates with database and network layers.
To analyze performance.
A GlobalKey is unique across the entire app and is useful for identifying a widget from a different part of the app.
If 'name' is null, 'Admin' is assigned to 'userName'; otherwise, 'name' is assigned to 'userName'.
To speed up development by using code from utility libraries.
The size of the original widget and the constraints provided by the parent widget.
By using a state management solution such as inherited widget or a third-party library.
Parameters that can be disclosed with square brackets and are not required.
Both are used for asynchronous programming and will return in the future.
By incorporating critical platform differences such as scrolling, navigation, and icons into its widgets.
You can call it with or without the optional parameters, e.g., findVolume(10, 20, 30) or findVolume(10, 20).
It means a member is available in the class itself instead of on instances of the class.
length = 10, breath = 20, height = null.
A class that extends the Flutter State Class.
A function is free and can exist anywhere, while a method is a member of an object or class.
May 2017.
A responsive app has its layout adjusted for the available screen size, often re-laying out the UI based on window size or device orientation.
Expanded takes up all available space along the main axis, while Flexible allows a child to be flexible in its size.
It establishes the relationship between the View and the Model, containing core application logic and updating the Model based on user responses.
Components built using a modern framework that allows you to construct your UI out of widgets.
In MVVM, the ViewModel replaces the Presenter and separates data presentation logic from core business logic.
BLoC, ChangeNotifier with Provider, Redux, MobX, and RxDart.
Using a for loop or the await for syntax.
The Material design language.
Keys can have a performance impact on your app, so they should only be used when necessary.
No, you cannot await the results of an asynchronous generator.
It indicates that a widget may be disposed but is not guaranteed.
When you want to react to changes in a value over time.
Flutter is an open-source software development kit developed by Google.
Flutter is an open-source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase.
Model, View, and Controller.
It allows control over the axis along which children are placed, either horizontally or vertically.
By using an underscore '_' before the variable name, making it accessible only within the same file.
To ensure UI widgets have the components that you expect.
A Future object.
The challenges of the MVC pattern.
A ValueKey is based on a value (like a string or integer) and is useful for identifying a widget within a list based on its value.
The AOT-compiled code runs inside an efficient Dart runtime that enforces the sound Dart type system and manages memory using fast object allocation and a generational garbage collector.
It allows you to get a reference to the theme or another widget, such as using Scaffold.of(context) to show a material dialog.
Performing operations that may take time, like making a network request or reading a file.
They collaborate to get and save data.
Hot reload updates the UI without losing the app state, while hot restart resets the app state.
To avoid wastefulness and improve performance by not rebuilding parts of the UI that don’t need to change.
A widget that allows us to refresh the screen and has a createState() method.
Yes, you can nest a Scaffold, which is one of the features of Flutter.
It coordinates the execution of code across multiple isolates by sending messages and scheduling execution.
1. A method is implicitly passed the object it was called on. 2. A method can operate on data within the class.
It allows the framework to call the builder function at layout time and provides the parent widget’s constraints.
Marks a function as an asynchronous generator, returning an object that implements the Stream interface.
It controls the entire UI and can be nested to layer drawers, snack bars, and bottom sheets.
It is rarely needed unless creating a widget similar to Scaffold.
To access properties or methods of an object that may be null without throwing a null reference error.
WidgetsApp is a convenience class for common application widgets, while MaterialApp adds material-design specific functionality.
A Future represents a potential value or error that will be available at some time in the future.
Material-design specific functionality like AnimatedTheme and GridPaper.
It can’t change the TYPE or VALUE of the variable later in code.
It handles importing images, fonts, and third-party packages, and defines the dependencies of your Flutter project.
YAML language.
A package contains only Dart code, while a plugin contains both Dart and native code (kotlin/js/swift/etc.).
When the screen or widget contains static content.
A function is a piece of code called by name, can take parameters, and optionally return data.
A stream is a sequence of asynchronous events that provides an asynchronous sequence of data, allowing multiple listeners to receive the same value.
The validity of your business logic.
The parent allows any size, while the child wants the biggest size allowed by the parent.
The event loop is a central concept that manages the flow of control within an app, processing events and updating the app’s state.
That your app is working as a whole.
You receive each new value, as well as notifications if the Stream has an error or has completed.
It manages the state of the View and takes actions based on user input notifications from the View.
It binds the system back button to pop the Navigator or quit the application.
By registering callbacks that handle the value or error once it is available.
Deactivate is called when a widget is removed from the tree temporarily, while dispose is called when it is removed permanently.
Java or Kotlin for Android, and Objective-C or Swift for iOS.
An asynchronous request with one and only one response.
Checkbox, Radio, Slider, InkWell, Form, and TextField.
'const' makes a variable constant at compile-time, while 'final' allows for runtime assignment.
Unit tests, widget tests, and integration tests.
Column, ListView, OverflowBox.
MediaQuery provides a higher-level view of the app’s screen size and device layout preferences, while LayoutBuilder depends on the size of the enclosing parent widget.
A list of plugins included while deploying the app after development.
Hot Reload updates changes without losing the previous state, while Hot Restart removes the previous state and runs the complete program.
An isolate is a separate thread of execution that is isolated from the main thread, allowing for concurrent execution of code.
It is the widget's element in the Element tree, unique to every widget.
Stateless widgets do not depend on dynamic data, while Stateful widgets can change dynamically and maintain mutable state.
It abstracts the data sources.
Because they can change their inner data during the widget’s lifetime.
The application will be suspended momentarily (Android only).
A synchronous operation blocks other operations until it completes, while a synchronous function only performs synchronous operations.
No, Flutter is an SDK (Software Development Kit).
A set of tools for performance management and debugging, allowing inspection of UI layout and diagnosing performance issues.
Marks a function as asynchronous, returning a Future object that can be awaited.
To provide a default value when an expression evaluates to null.
It tells Flutter that it doesn't need to rebuild the widget.
A UniqueKey is unique within a widget's parent and is useful for identifying a widget within a list of widgets.
App State refers to state variables that are outside of the Stateful widget and are used by many widgets.
A TextField widget in a FormField.
The application is not currently visible to the user, not responding to user input, and running in the background.
C, C++, Dart, and Skia.
FutureBuilder is for one-time responses, while StreamBuilder is for continuous data updates.
BLoC or Redux, as they handle immutable states well.
They make nullable types usable without throwing an error, especially when parsing JSON data.
It indicates that a widget is being removed from the tree permanently.
MVC separates the application into Model, View, and Controller; MVP separates it into Model, View, and Presenter; MVVM separates it into Model, View, and ViewModel.
It makes the object's entire deep state fixed at compile time, rendering it frozen and immutable.
It stores data, handles domain logic, and communicates with the database and network layers.
A factory constructor can return an existing instance of a class instead of creating a new one, useful for memory management or costly operations.
It changes the constraints sent to the children of rows and columns, helping to fill the available spaces.
All synchronous code before the first await keyword executes immediately.
Keep the subtree as small as possible and create a custom widget with a child parameter if needed.
An object that implements the Stream interface.
Mockito and test plugins.
To save or reset the form field.
When you want a widget to take up as much space as its parent allows.
The Small 'r' key on the command prompt or Terminal.
Keys can identify each item and preserve its state when it is reordered.
Single subscription streams and broadcast streams.
Refactor a large widget tree into smaller individual widgets, each with its own build method.
A stream intended for individual messages that can be handled one at a time, allowing multiple listeners.
To resize widgets in rows and columns while adjusting the space of different child widgets in relation to their parent widgets.
To create frontend user interfaces for web and mobile apps.
It fetches data from the model and applies UI logic to decide what to display.
For simple user input capture.
Future<void> test2() async { var a = await fetchData(); }
By providing a rich set of fully customizable widgets to build native interfaces quickly.
Whenever you need to identify a widget and preserve its state, especially in lists or forms.
BLoC or RxDart.
You can use platform channels, specifically method channels, to send serialized data between Dart and native code.
Handling one-time asynchronous requests like HTTP calls.
It defaults to null.
A stream that contains a sequence of events that must be delivered in order and can only be listened to once.
Hot Restart takes much longer than Hot Reload.
It is called first after the widget is created, similar to onCreate() in Android.
To identify each field and preserve its state as the user fills out the form.
Continuous data updates like location updates or music playback.
Due to its fast development, expressive UI, and native performance.
A widget is a basic building block of a Flutter app's user interface.
An asynchronous operation allows other operations to execute before it completes, while an asynchronous function performs at least one asynchronous operation and can also perform synchronous operations.
You may miss initial events, making the rest of the stream nonsensical.
At any time, and you will receive events that occur while you are listening.
When the widget tree changes, to preserve the state of widgets.
It is called when the parent widget changes and needs to redraw the UI.
A widget that will never rebuild by itself and has no state information.
createState().
It is called when the object and its state are removed from the tree.
Hot reload, rich widget library, and cross-platform capabilities.
A feature that allows developers to see changes in the code instantly without restarting the app.
It manages the project's dependencies and metadata.
Stateful widgets maintain state that can change, while Stateless widgets do not.
All the GUI is rendered and it is called every time the UI needs to be rendered.