
Explore Kotlin flow, a stream of data that emits multiple values asynchronously. Identify producer, intermediaries, and consumer, and how repositories feed the UI with live updates while preserving type consistency.
Create an empty Android project, add the Kotlin Flow dependency, sync the project, and consult the documentation to explore the flow features.
Understand asynchronous programming in Kotlin Flow by contrasting it with synchronous code, and learn how suspend functions run in the background using dispatchers and scope with a user list example.
learn to create a simple Kotlin flow with a flow builder, emit values, delay between emissions, and collect to start the flow.
Learn how to collect a Kotlin Flow multiple times without data loss, as values arrive asynchronously. Explore observable flows and repeated collection yielding the same results.
Learn how to cancel Kotlin Flow using timeouts and lifecycle aware scopes. Explore architecture component and lifecycleScope to stop flows when activities or fragments are destroyed.
Filter operator in Kotlin Flow is explained with examples showing how to filter a stream before collect, logging results like 10 and 14.
Learn how to use the Kotlin Flow take operator to limit a flow after a count and take the first n items, with examples taking the first three or two.
Explore Kotlin Flow terminal operators, from collect to reduce, toList, and toSet, with hands-on examples of mapping, summing, and producing a single value.
Explore the Kotlin Flow buffer operator, which buffers flow emissions via a channel with default capacity 64 to decouple producer and collector and improve throughput.
Explore the conflation operator in Kotlin Flow, which drops previous values and retains only the latest when producers are faster than consumers, unlike the buffer operator.
Discover how the Kotlin Flow zip operator combines two flows into paired emissions and completes when one flow finishes, canceling the other. Use it for parallel network calls.
Learn how the Kotlin flow combine operator merges two streams by emitting latest values with a transform, and compare its behavior to zip using practical timing examples.
Explore exception handling in Kotlin Flow with classic try/catch and declarative patterns, logging errors upstream and downstream, using on each and catch to protect flows.
Explore the Kotlin Flow flatMapConcat operator, compare it with the map operator, and learn how flat mapping flattens inner flows to emit individual values from multiple sources, with delays.
Explore Kotlin Flow's flatMapMerge, revealing how it mixes emissions from inner flows concurrently while handling delays, with details on sequential vs. concurrent behavior and practical usage notes.
Explore Kotlin Flow's flatMapLatest and flatMap, showing how newer emissions cancel prior inner flows after a 500 ms delay, so only the latest values emit.
Integrate the starter Kotlin Flow project with Retrofit API to fetch tasks from the API, store them in a local database, and retrieve updates via the Flow API.
Modify the app to validate api token using flow, implement loading, success, and error states, and connect the token repository, retrofit service, and flow logic to drive login and navigation.
Implement the assignment by handling no internet connection and sorting the pilot data with the existing models; a solution will be provided in the next lecture.
Demonstrates a Kotlin Flow based solution for Assignment 1 to observe data changes and handle no internet connection.
Explore Kotlin Flow with Room to store and retrieve tax data in a local database. Implement flow-based data access, update the repository, and observe changes in the tax view.
Use Kotlin flow to fetch new records from the API by max id, insert them into the local database, and refresh the home fragment data via repository and view model.
Send a new record from the home screen to the remote API using Kotlin Flow, with loading, success, and error handling, and reflect results in the UI.
Apply Kotlin Flow to the edit flow by updating the edit fragment and view models to send updates to the API and refresh the local view on success.
Implement kotlin flow for assignment 2 by wiring retrofit api calls and handling loading, success, and errors. Update the view model and fragment user interface based on result sets.
Implement network layer for a Kotlin Flow project by wiring a free API endpoint, paging with the page parameter, and modeling the response data with data, remote, and network packages.
Implement a paging source for Kotlin flow to fetch Beijing data, map API responses to models, and manage page keys, loading data via a network service and handling pagination.
Build and implement a Kotlin Flow repository layer by defining a tax repository interface and its concrete implementation, wiring network data sources and paging configuration for efficient data loading.
Implement a Kotlin Flow view model by creating a new model and repository, and expose a function to fetch the tax list with paging data.
Implement a view model in the main activity using a custom factory to pass parameters, wire a repository and paging source with manual dependency injection, and prepare for the adapter.
Create a layout for the Kotlin Flow course by integrating a RecyclerView with a ProgressBar and a segment control, add image assets, implement the adapter, and run the app.
Learn to implement a paging data adapter in Kotlin, including creating the adapter with a companion object, wiring view binding, and binding items for a recycler view.
Implement a recycler view by building and binding a paging adapter, setting a layout manager, and binding data across pages while handling the lifecycle and internet permission.
Implement addLoadStateListener in Kotlin Flow to listen to loading and error states, combine them for a unified progress indicator, and control visibility based on load status.
Adjust the paging config by tuning the preferred distance and initial load size to fetch data ahead. This reduces repeated requests during scrolling and conserves bandwidth and resources.
In this course we will learn from basic to advance concept of Kotlin Flow. If you are already familiar with Kotlin and Coroutines this is a great time get you hands dirty with Kotlin Flow.
One can compare Kotlin Coroutines and Flow with RxJava. Most of the Android Architecture Components have been written in Kotlin Coroutines and Flow so its a great time to learn about Kotlin Flow.