What programming language do Flutter apps use?
Flutter apps use the Dart programming language.
What are getter and setter methods?
Getter methods read data from class fields, while setter methods set data to class fields.
1/210
p.2
Dart Programming Language

What programming language do Flutter apps use?

Flutter apps use the Dart programming language.

p.19
Dart Programming Language

What are getter and setter methods?

Getter methods read data from class fields, while setter methods set data to class fields.

p.10
Platform Channels and Message Passing

What is the purpose of an event channel in Flutter?

To send a stream of data from the native platform back to Flutter, useful for monitoring sensor data.

p.2
Flutter Framework

What is the main advantage of using Flutter?

It allows building applications for multiple platforms from a single codebase.

p.22
Flutter Architecture Patterns

What does the View component represent in the MVC pattern?

The UI layer that holds visible components and provides visualization of the data stored in the Model.

p.14
Widget Management in Flutter

What is the purpose of using TextFormField in a Form?

To save, reset, or validate multiple fields at once.

p.5
App Lifecycle and State Management

What is AppLifecycleState?

AppLifecycleState represents the state of the application, including inactive, paused, resumed, and suspending.

p.24
Dart Programming Language

What do the ?? and ? operators do in Dart?

They handle null values and prevent null reference errors.

p.3
Widget Management in Flutter

How do Flutter widgets respond to state changes?

When a widget’s state changes, it rebuilds its description, and the framework determines the minimal changes needed in the render tree.

p.25
Dart Programming Language

What happens when the null-aware access operator (?.) is used on a null object?

Nothing happens; the method or property is not accessed.

p.10
State Management Solutions

When is a stateful widget often sufficient?

When making a quick demo app.

p.5
App Lifecycle and State Management

What does the 'resumed' state signify in AppLifecycleState?

The application is visible and responding to user input.

p.13
Dart Programming Language

What is the purpose of the Null Aware Operator in Dart?

To allow computations based on whether a value is null, serving as shorthand for longer expressions.

p.27
Dart Programming Language

What are named parameters in Dart?

Named parameters are parameters that can have default values and are specified by name when calling a function.

p.19
Dart Programming Language

What does the 'final' keyword mean in Dart?

It indicates single-assignment; a final variable must have an initializer and cannot be changed once assigned.

p.2
Flutter Framework

Who is the creator of Flutter?

Flutter is developed by Google.

p.3
Dart Programming Language

What is Dart?

An open-source programming language developed by Google in 2011 for creating frontend user interfaces for web and mobile apps.

p.20
Stateful vs. Stateless Widgets

What happens when a widget's state changes?

The widget is rebuilt to reflect the updated state, resulting in a dynamic, responsive user interface.

p.24
App Lifecycle and State Management

What is the difference between debug mode and release mode?

Debug mode includes debugging information for easy debugging, while release mode usually has optimizations enabled.

p.15
Async Programming in Dart

What is a Stream in Dart?

A Stream is like an async Iterator in JavaScript, representing values that can change over time, often used for web sockets or events.

p.21
pubspec.yaml and Dependency Management

What are dev_dependencies in Flutter?

A list of plugins used during the development stage to test the app.

p.18
Widget Management in Flutter

What is the purpose of the AspectRatio widget?

To size the child to a specific aspect ratio based on the largest width permitted by layout constraints.

p.17
Widget Management in Flutter

What is the difference between Double.infinity and MediaQuery?

Double.infinity means to be as big as the parent allows, while MediaQuery means to be as big as the screen.

p.20
pubspec.yaml and Dependency Management

What is the difference between dependencies and dev_dependencies in Dart?

Dependencies are packages required for the app to run, while dev_dependencies are packages needed only during development.

p.26
Dart Programming Language

How do you define a function with optional positional parameters in Dart?

Use square brackets around the optional parameters in the function definition.

p.29
Async Programming in Dart

What is a key difference between Future and Stream?

A Future returns only once, while a Stream can return multiple times as values change over time.

p.7
App Lifecycle and State Management

What happens to state values during Hot Reload?

State values are preserved and do not update; they remain at their current values.

p.7
App Lifecycle and State Management

What is the effect of Hot Restart on state values?

Hot Restart destroys preserved state values and resets them to their default.

p.24
Flutter Architecture Patterns

What is the purpose of the View layer in the MVVM architecture?

To inform the ViewModel about the user’s action and observe the ViewModel without containing application logic.

p.24
App Lifecycle and State Management

When do we use debug mode in Flutter?

During development, when you want to use hot reload.

p.6
Flutter Framework

What is a Flutter plugin?

A wrapper of native code for Android (Kotlin or Java) and iOS (Swift or Objective-C).

p.16
Flutter Framework

What is an adaptive app?

An adaptive app adjusts to run on different device types, such as mobile and desktop, and requires handling mouse and keyboard inputs.

p.20
State Management Solutions

What is Ephemeral State?

Ephemeral State refers to state variables that are inside of the Stateful widget.

p.13
Flutter Framework

What is the difference between Material and Cupertino widgets?

Cupertino widgets are used to build iOS-like apps, while Material widgets implement the Material design language for various platforms including Android.

p.5
App Lifecycle and State Management

What does the 'inactive' state mean in AppLifecycleState?

The application is in an inactive state and is not receiving user input (iOS only).

p.22
Flutter Architecture Patterns

Why is the MVP pattern widely accepted?

It provides modularity, testability, and a cleaner, more maintainable codebase.

p.18
Dart Programming Language

What does dynamic mean in Dart?

It can change the TYPE and VALUE of the variable later in code.

p.25
Dart Programming Language

What is a required parameter in Dart?

A parameter that must be provided when calling a function, like in the example findVolume(int length, int breath, int height).

p.10
State Management Solutions

Which state management solutions are recommended for those overwhelmed by options?

ChangeNotifier with Provider or MobX, as they allow direct method calls on the state class in response to events.

p.15
Async Programming in Dart

What are the two states of a Future?

Uncompleted or completed.

p.29
Async Programming in Dart

When should you use a Future?

When you want a value that may not be available right now but will be available later and will not change.

p.18
Dart Programming Language

What is the difference between final, const, and static?

Final can't change TYPE or VALUE; const is a compile-time constant; static modifies members and retains values until program execution finishes.

p.14
State Management Solutions

How do both StreamBuilder and FutureBuilder behave?

They listen to changes and trigger a new build when notified of a new value.

p.27
Widget Management in Flutter

What is the purpose of a Key in Flutter?

A Key is a unique identifier for a widget that helps Flutter identify it from its previous state.

p.1
State Management Solutions

What are some common state management solutions in Flutter?

Provider, Riverpod, Bloc, and Redux.

p.24
Flutter Architecture Patterns

What role does the ViewModel play in MVVM?

It exposes relevant data streams to the View and serves as a link between the Model and the View.

p.20
Stateful vs. Stateless Widgets

What is the definition of 'State' in Flutter?

A widget’s 'state' is the information or data that it holds over time, determining how the widget should be displayed on the screen.

p.23
Flutter Architecture Patterns

What does the View layer do in the MVVM pattern?

It provides the UI and visualizes data while tracking user actions to notify the Presenter.

p.6
Platform Channels and Message Passing

How does Flutter communicate with native code?

Through the use of Platform Channels and Message Passing.

p.17
Widget Management in Flutter

What does MediaQuery provide?

The actual size of the device and detailed information about its layout preferences.

p.8
Flutter Framework

What are some major features of Flutter?

Fast development, expressive and flexible UI, and native performance.

p.7
App Lifecycle and State Management

How does Hot Reload work in Flutter?

It compiles newly added code and sends it to the Dart Virtual Machine, which then updates the app UI with widgets.

p.11
Async Programming in Dart

Why are isolates used in Flutter?

Isolates are used for concurrent execution of tasks that may take a long time, such as network requests or computationally intensive operations.

p.8
Flutter Framework

What does the layered architecture in Flutter allow for?

It enables full customization of the UI, resulting in fast rendering and expressive designs.

p.18
Dart Programming Language

What does var mean in Dart?

It can’t change the TYPE of the variable, but can change the VALUE later in code.

p.25
Dart Programming Language

Can you give an example of a required parameter function in Dart?

findVolume(int length, int breath, int height) { print('length = $length, breath = $breath, height = $height'); }

p.8
Stateful vs. Stateless Widgets

What triggers widget rebuilding in Flutter?

State changes.

p.9
Platform Channels and Message Passing

Can you use platform channels on the web in Flutter?

No, platform channels are not used on the web.

p.7
App Lifecycle and State Management

How does the app widget tree behave during Hot Restart?

The app widget tree is completely rebuilt with a new type of code.

p.1
Dart Programming Language

What programming language is used in Flutter?

Dart programming language.

p.1
Flutter Architecture Patterns

How does Flutter achieve high performance?

By compiling to native ARM code and using a high-performance rendering engine.

p.12
Flutter Architecture Patterns

What is tree shaking in Flutter?

An optimization technique that removes unused modules during the build process, effectively eliminating dead code.

p.22
Flutter Architecture Patterns

What is the role of the Model in the MVC pattern?

It stores application data, handles domain logic, and communicates with database and network layers.

p.24
App Lifecycle and State Management

What is the purpose of profile mode in Flutter?

To analyze performance.

p.28
Widget Management in Flutter

What is a GlobalKey in Flutter?

A GlobalKey is unique across the entire app and is useful for identifying a widget from a different part of the app.

p.25
Dart Programming Language

How does the null coalescing operator (??) work with the variable 'name'?

If 'name' is null, 'Admin' is assigned to 'userName'; otherwise, 'name' is assigned to 'userName'.

p.6
pubspec.yaml and Dependency Management

What is the purpose of Flutter packages?

To speed up development by using code from utility libraries.

p.17
Widget Management in Flutter

What does LayoutBuilder depend on?

The size of the original widget and the constraints provided by the parent widget.

p.20
State Management Solutions

How can you manage App State?

By using a state management solution such as inherited widget or a third-party library.

p.26
Dart Programming Language

What are optional positional parameters in Dart?

Parameters that can be disclosed with square brackets and are not required.

p.29
Async Programming in Dart

What is a key similarity between Future and Stream in Dart?

Both are used for asynchronous programming and will return in the future.

p.8
Flutter Framework

How does Flutter achieve native performance?

By incorporating critical platform differences such as scrolling, navigation, and icons into its widgets.

p.26
Dart Programming Language

What is the syntax for calling a function with optional parameters?

You can call it with or without the optional parameters, e.g., findVolume(10, 20, 30) or findVolume(10, 20).

p.18
Dart Programming Language

What does static mean in Dart?

It means a member is available in the class itself instead of on instances of the class.

p.26
Dart Programming Language

What is the output of the function findVolume(10, 20)?

length = 10, breath = 20, height = null.

p.4
Stateful vs. Stateless Widgets

What does the createState() method return?

A class that extends the Flutter State Class.

p.16
Dart Programming Language

What is the main difference between a function and a method?

A function is free and can exist anywhere, while a method is a member of an object or class.

p.3
Flutter Framework

When was the first alpha version of Flutter released?

May 2017.

p.16
Flutter Framework

What does it mean for an app to be responsive?

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.

p.12
Widget Management in Flutter

What is the difference between expanded and flexible widgets?

Expanded takes up all available space along the main axis, while Flexible allows a child to be flexible in its size.

p.22
Flutter Architecture Patterns

What is the function of the Controller in the MVC pattern?

It establishes the relationship between the View and the Model, containing core application logic and updating the Model based on user responses.

p.3
Widget Management in Flutter

What are Flutter widgets?

Components built using a modern framework that allows you to construct your UI out of widgets.

p.23
Flutter Architecture Patterns

How does the MVVM pattern differ from the MVP pattern?

In MVVM, the ViewModel replaces the Presenter and separates data presentation logic from core business logic.

p.10
State Management Solutions

What are some popular state management solutions in Flutter?

BLoC, ChangeNotifier with Provider, Redux, MobX, and RxDart.

p.30
Async Programming in Dart

How can you consume values from an asynchronous generator?

Using a for loop or the await for syntax.

p.13
Flutter Framework

What design language do Material widgets implement?

The Material design language.

p.28
Widget Management in Flutter

Why is it important to use keys judiciously in Flutter?

Keys can have a performance impact on your app, so they should only be used when necessary.

p.30
Async Programming in Dart

Can you await the results of an asynchronous generator?

No, you cannot await the results of an asynchronous generator.

p.21
App Lifecycle and State Management

What does deactivate indicate in Flutter?

It indicates that a widget may be disposed but is not guaranteed.

p.29
Async Programming in Dart

When should you use a Stream?

When you want to react to changes in a value over time.

p.1
Flutter Framework

What is Flutter?

Flutter is an open-source software development kit developed by Google.

p.2
Flutter Framework

What is Flutter?

Flutter is an open-source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase.

p.22
Flutter Architecture Patterns

What are the three components of the MVC pattern?

Model, View, and Controller.

p.12
Widget Management in Flutter

What does the Flex widget do in Flutter?

It allows control over the axis along which children are placed, either horizontally or vertically.

p.11
Dart Programming Language

How do you create private variables in Dart?

By using an underscore '_' before the variable name, making it accessible only within the same file.

p.10
State Management Solutions

What is the focus of widget tests?

To ensure UI widgets have the components that you expect.

p.30
Async Programming in Dart

What does an asynchronous function return?

A Future object.

p.22
Flutter Architecture Patterns

What does the MVP pattern aim to overcome?

The challenges of the MVC pattern.

p.28
Widget Management in Flutter

What is a ValueKey in Flutter?

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.

p.29
Dart Programming Language

How does AOT compilation work in Dart?

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.

p.9
Flutter Architecture Patterns

How is BuildContext useful?

It allows you to get a reference to the theme or another widget, such as using Scaffold.of(context) to show a material dialog.

p.30
Async Programming in Dart

What is an example use case for asynchronous functions?

Performing operations that may take time, like making a network request or reading a file.

p.23
Flutter Architecture Patterns

How do the Model and ViewModel work together in MVVM?

They collaborate to get and save data.

p.6
App Lifecycle and State Management

What is the difference between hot reload and hot restart?

Hot reload updates the UI without losing the app state, while hot restart resets the app state.

p.8
State Management Solutions

Why is it important to reduce unnecessary widget rebuilding?

To avoid wastefulness and improve performance by not rebuilding parts of the UI that don’t need to change.

p.4
Stateful vs. Stateless Widgets

What is a Stateful widget in Flutter?

A widget that allows us to refresh the screen and has a createState() method.

p.7
Widget Management in Flutter

Can you nest a Scaffold in Flutter?

Yes, you can nest a Scaffold, which is one of the features of Flutter.

p.12
App Lifecycle and State Management

What is the role of the event loop in Flutter?

It coordinates the execution of code across multiple isolates by sending messages and scheduling execution.

p.16
Dart Programming Language

What are the two key differences between a method and a function?

1. A method is implicitly passed the object it was called on. 2. A method can operate on data within the class.

p.17
Widget Management in Flutter

What is the purpose of the LayoutBuilder widget in Flutter?

It allows the framework to call the builder function at layout time and provides the parent widget’s constraints.

p.30
Async Programming in Dart

What is the purpose of the async* keyword in Dart?

Marks a function as an asynchronous generator, returning an object that implements the Stream interface.

p.8
Flutter Framework

What is the purpose of the Scaffold widget in Flutter?

It controls the entire UI and can be nested to layer drawers, snack bars, and bottom sheets.

p.18
Widget Management in Flutter

Why is using MediaQuery in certain situations considered bad?

It is rarely needed unless creating a widget similar to Scaffold.

p.25
Dart Programming Language

What is the null-aware access operator (?.) used for?

To access properties or methods of an object that may be null without throwing a null reference error.

p.6
Widget Management in Flutter

What is the difference between WidgetsApp and MaterialApp?

WidgetsApp is a convenience class for common application widgets, while MaterialApp adds material-design specific functionality.

p.15
Async Programming in Dart

What is a Future in Dart?

A Future represents a potential value or error that will be available at some time in the future.

p.6
Widget Management in Flutter

What additional features does MaterialApp provide?

Material-design specific functionality like AnimatedTheme and GridPaper.

p.18
Dart Programming Language

What does final mean in Dart?

It can’t change the TYPE or VALUE of the variable later in code.

p.5
pubspec.yaml and Dependency Management

What is the purpose of the pubspec.yaml file?

It handles importing images, fonts, and third-party packages, and defines the dependencies of your Flutter project.

p.5
pubspec.yaml and Dependency Management

What language is the metadata in the pubspec.yaml file written?

YAML language.

p.5
pubspec.yaml and Dependency Management

What is the difference between a Flutter package and a Flutter plugin?

A package contains only Dart code, while a plugin contains both Dart and native code (kotlin/js/swift/etc.).

p.4
Stateful vs. Stateless Widgets

When should you use a Stateless widget?

When the screen or widget contains static content.

p.16
Dart Programming Language

How is a function defined?

A function is a piece of code called by name, can take parameters, and optionally return data.

p.11
Async Programming in Dart

What is a stream in Flutter?

A stream is a sequence of asynchronous events that provides an asynchronous sequence of data, allowing multiple listeners to receive the same value.

p.10
State Management Solutions

What do unit tests check in Flutter?

The validity of your business logic.

p.18
Widget Management in Flutter

What paradox occurs when using double.infinity with certain Widgets?

The parent allows any size, while the child wants the biggest size allowed by the parent.

p.11
App Lifecycle and State Management

What is the event loop in Flutter?

The event loop is a central concept that manages the flow of control within an app, processing events and updating the app’s state.

p.10
State Management Solutions

What do integration tests verify?

That your app is working as a whole.

p.15
Async Programming in Dart

What happens when you listen to a Stream?

You receive each new value, as well as notifications if the Stream has an error or has completed.

p.23
Flutter Architecture Patterns

What is the responsibility of the ViewModel in the MVVM pattern?

It manages the state of the View and takes actions based on user input notifications from the View.

p.6
Widget Management in Flutter

What role does WidgetsApp play in a Flutter application?

It binds the system back button to pop the Navigator or quit the application.

p.15
Async Programming in Dart

How can you handle the value or error of a Future?

By registering callbacks that handle the value or error once it is available.

p.21
App Lifecycle and State Management

What is the difference between deactivate and dispose in Flutter?

Deactivate is called when a widget is removed from the tree temporarily, while dispose is called when it is removed permanently.

p.9
Platform Channels and Message Passing

What languages can be used for writing native code in Flutter?

Java or Kotlin for Android, and Objective-C or Swift for iOS.

p.14
Async Programming in Dart

What does a Future represent in Dart?

An asynchronous request with one and only one response.

p.4
Stateful vs. Stateless Widgets

Can you name some examples of Stateful widgets?

Checkbox, Radio, Slider, InkWell, Form, and TextField.

p.19
Dart Programming Language

How does the 'const' keyword differ from 'final' in Dart?

'const' makes a variable constant at compile-time, while 'final' allows for runtime assignment.

p.10
State Management Solutions

What are the three main types of tests in Flutter?

Unit tests, widget tests, and integration tests.

p.18
Widget Management in Flutter

Which Widgets allow their children to be as big as they want?

Column, ListView, OverflowBox.

p.17
Widget Management in Flutter

How does MediaQuery differ from LayoutBuilder?

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.

p.21
pubspec.yaml and Dependency Management

What are dependencies in Flutter?

A list of plugins included while deploying the app after development.

p.7
App Lifecycle and State Management

What is the main difference between Hot Reload and Hot Restart in Flutter?

Hot Reload updates changes without losing the previous state, while Hot Restart removes the previous state and runs the complete program.

p.11
Async Programming in Dart

What is an isolate in Flutter?

An isolate is a separate thread of execution that is isolated from the main thread, allowing for concurrent execution of code.

p.9
Flutter Architecture Patterns

What is BuildContext in Flutter?

It is the widget's element in the Element tree, unique to every widget.

p.3
Stateful vs. Stateless Widgets

What is the difference between Stateless and Stateful Widgets in Flutter?

Stateless widgets do not depend on dynamic data, while Stateful widgets can change dynamically and maintain mutable state.

p.23
Flutter Architecture Patterns

What does the Model layer in MVVM abstract?

It abstracts the data sources.

p.3
Stateful vs. Stateless Widgets

Why are Stateful widgets referred to as dynamic?

Because they can change their inner data during the widget’s lifetime.

p.5
App Lifecycle and State Management

What does the 'suspending' state mean in AppLifecycleState?

The application will be suspended momentarily (Android only).

p.15
Async Programming in Dart

What is the difference between a synchronous operation and a synchronous function?

A synchronous operation blocks other operations until it completes, while a synchronous function only performs synchronous operations.

p.2
Flutter Framework

Is Flutter a programming language?

No, Flutter is an SDK (Software Development Kit).

p.12
Flutter Framework

What are DevTools in Flutter?

A set of tools for performance management and debugging, allowing inspection of UI layout and diagnosing performance issues.

p.30
Async Programming in Dart

What does the async keyword do in Dart?

Marks a function as asynchronous, returning a Future object that can be awaited.

p.25
Dart Programming Language

What is the purpose of the null coalescing operator (??) in Dart?

To provide a default value when an expression evaluates to null.

p.9
Widget Management in Flutter

Why should you use the const constructor in Flutter?

It tells Flutter that it doesn't need to rebuild the widget.

p.28
Widget Management in Flutter

What is a UniqueKey in Flutter?

A UniqueKey is unique within a widget's parent and is useful for identifying a widget within a list of widgets.

p.20
State Management Solutions

What is App State?

App State refers to state variables that are outside of the Stateful widget and are used by many widgets.

p.14
Widget Management in Flutter

What does TextFormField wrap around?

A TextField widget in a FormField.

p.5
App Lifecycle and State Management

What does the 'paused' state indicate in AppLifecycleState?

The application is not currently visible to the user, not responding to user input, and running in the background.

p.21
Flutter Architecture Patterns

What technology is Flutter built with?

C, C++, Dart, and Skia.

p.14
State Management Solutions

What is the main difference between StreamBuilder and FutureBuilder?

FutureBuilder is for one-time responses, while StreamBuilder is for continuous data updates.

p.11
State Management Solutions

What state management solutions are suitable for handling undo/redo functionality?

BLoC or Redux, as they handle immutable states well.

p.13
Dart Programming Language

Why are null-aware operators useful in Dart?

They make nullable types usable without throwing an error, especially when parsing JSON data.

p.21
App Lifecycle and State Management

What does dispose indicate in Flutter?

It indicates that a widget is being removed from the tree permanently.

p.21
Flutter Architecture Patterns

What are the differences between MVC, MVP, and MVVM architecture patterns?

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.

p.19
Dart Programming Language

What happens when 'const' is used on an object in Dart?

It makes the object's entire deep state fixed at compile time, rendering it frozen and immutable.

p.23
Flutter Architecture Patterns

What is the role of the Model in the MVVM pattern?

It stores data, handles domain logic, and communicates with the database and network layers.

p.19
Dart Programming Language

What is a factory constructor in Dart?

A factory constructor can return an existing instance of a class instead of creating a new one, useful for memory management or costly operations.

p.13
Widget Management in Flutter

How does the Expanded widget function in Flutter?

It changes the constraints sent to the children of rows and columns, helping to fill the available spaces.

p.29
Async Programming in Dart

What happens when an async function runs until the first await keyword?

All synchronous code before the first await keyword executes immediately.

p.9
Widget Management in Flutter

What is a recommended practice for the subtree of a stateful widget?

Keep the subtree as small as possible and create a custom widget with a child parameter if needed.

p.30
Async Programming in Dart

What does an asynchronous generator function return?

An object that implements the Stream interface.

p.21
pubspec.yaml and Dependency Management

What plugins are commonly used in the development stage of Flutter?

Mockito and test plugins.

p.14
Widget Management in Flutter

What is the role of a GlobalKey when using TextFormField without a Form?

To save or reset the form field.

p.17
Widget Management in Flutter

When should you typically use Double.infinity?

When you want a widget to take up as much space as its parent allows.

p.7
App Lifecycle and State Management

What key combination is used for Hot Reload in Flutter?

The Small 'r' key on the command prompt or Terminal.

p.28
Widget Management in Flutter

How can keys help when reordering items in a list?

Keys can identify each item and preserve its state when it is reordered.

p.27
Async Programming in Dart

What are the two kinds of streams in Dart?

Single subscription streams and broadcast streams.

p.8
State Management Solutions

What is one method to reduce widget rebuilding?

Refactor a large widget tree into smaller individual widgets, each with its own build method.

p.27
Async Programming in Dart

What is a broadcast stream?

A stream intended for individual messages that can be handled one at a time, allowing multiple listeners.

p.13
Widget Management in Flutter

What is the purpose of the Flexible widget in Flutter?

To resize widgets in rows and columns while adjusting the space of different child widgets in relation to their parent widgets.

p.3
Dart Programming Language

What is the primary purpose of Dart?

To create frontend user interfaces for web and mobile apps.

p.23
Flutter Architecture Patterns

What is the function of the Presenter in the MVP pattern?

It fetches data from the model and applies UI logic to decide what to display.

p.14
Widget Management in Flutter

When is it sufficient to use TextField instead of TextFormField?

For simple user input capture.

p.29
Async Programming in Dart

What is an example of an async function in Dart?

Future<void> test2() async { var a = await fetchData(); }

p.8
Flutter Framework

How does Flutter enable fast development?

By providing a rich set of fully customizable widgets to build native interfaces quickly.

p.28
Widget Management in Flutter

When should you use keys in Flutter?

Whenever you need to identify a widget and preserve its state, especially in lists or forms.

p.11
State Management Solutions

Which state management solutions are recommended for stream-based solutions?

BLoC or RxDart.

p.9
Platform Channels and Message Passing

How do you communicate with native code in a Flutter app?

You can use platform channels, specifically method channels, to send serialized data between Dart and native code.

p.14
Async Programming in Dart

What type of tasks is FutureBuilder commonly used for?

Handling one-time asynchronous requests like HTTP calls.

p.26
Dart Programming Language

What happens if an optional parameter is not passed in Dart?

It defaults to null.

p.27
Async Programming in Dart

What is a single subscription stream?

A stream that contains a sequence of events that must be delivered in order and can only be listened to once.

p.7
App Lifecycle and State Management

Which takes longer, Hot Reload or Hot Restart?

Hot Restart takes much longer than Hot Reload.

p.4
Stateful vs. Stateless Widgets

What does the initState() method do?

It is called first after the widget is created, similar to onCreate() in Android.

p.28
Widget Management in Flutter

What is the purpose of using keys in forms with multiple input fields?

To identify each field and preserve its state as the user fills out the form.

p.14
State Management Solutions

What kind of updates does StreamBuilder listen for?

Continuous data updates like location updates or music playback.

p.1
Flutter Framework

Why is Flutter popular among developers?

Due to its fast development, expressive UI, and native performance.

p.1
Widget Management in Flutter

What is a widget in Flutter?

A widget is a basic building block of a Flutter app's user interface.

p.15
Async Programming in Dart

What is the difference between an asynchronous operation and an asynchronous function?

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.

p.27
Async Programming in Dart

What happens if you try to listen to a single subscription stream again?

You may miss initial events, making the rest of the stream nonsensical.

p.27
Async Programming in Dart

When can you start listening to a broadcast stream?

At any time, and you will receive events that occur while you are listening.

p.27
Widget Management in Flutter

When should you use Keys in Flutter?

When the widget tree changes, to preserve the state of widgets.

p.4
Stateful vs. Stateless Widgets

What is the purpose of the didUpdateWidget() method?

It is called when the parent widget changes and needs to redraw the UI.

p.4
Stateful vs. Stateless Widgets

What is a Stateless widget?

A widget that will never rebuild by itself and has no state information.

p.4
Stateful vs. Stateless Widgets

What is the first method called in the Stateful widget lifecycle?

createState().

p.4
Stateful vs. Stateless Widgets

What does the dispose() method do in the Stateful widget lifecycle?

It is called when the object and its state are removed from the tree.

p.1
Flutter Framework

What are some key features of Flutter?

Hot reload, rich widget library, and cross-platform capabilities.

p.1
Flutter Framework

What is 'hot reload' in Flutter?

A feature that allows developers to see changes in the code instantly without restarting the app.

p.1
pubspec.yaml and Dependency Management

What is the purpose of the 'pubspec.yaml' file in Flutter?

It manages the project's dependencies and metadata.

p.1
Stateful vs. Stateless Widgets

What is the difference between Stateful and Stateless widgets?

Stateful widgets maintain state that can change, while Stateless widgets do not.

p.4
Stateful vs. Stateless Widgets

What happens in the build() method of a Stateful widget?

All the GUI is rendered and it is called every time the UI needs to be rendered.

Study Smarter, Not Harder
Study Smarter, Not Harder