Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Kotlin Flow
Rating: 3.8 out of 5(42 ratings)
556 students

Kotlin Flow

Kotlin Flow For Android Developer
Created byRichard Dewan
Last updated 8/2022
English

What you'll learn

  • Kotlin Flow

Course content

3 sections45 lectures6h 20m total length
  • Getting Started With Kotlin Flow5:51

    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.

  • Kotlin Dependencies1:54

    Create an empty Android project, add the Kotlin Flow dependency, sync the project, and consult the documentation to explore the flow features.

  • Understand Asynchronous Programming7:20

    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.

  • Write Your First Kotlin Flow6:32

    learn to create a simple Kotlin flow with a flow builder, emit values, delay between emissions, and collect to start the flow.

  • Kotlin Flow Collect Multiple Times3:21

    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.

  • Kotlin Flow Builder5:28
  • Cancel Kotlin Flow8:35

    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.

  • Kotlin Flow Filter Operator4:32

    Filter operator in Kotlin Flow is explained with examples showing how to filter a stream before collect, logging results like 10 and 14.

  • Kotlin Flow Map Operator4:49
  • Kotlin Flow Transform Operator3:36
  • Kotlin Flow Take Operator2:43

    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.

  • Kotlin Flow Terminal Operator9:24

    Explore Kotlin Flow terminal operators, from collect to reduce, toList, and toSet, with hands-on examples of mapping, summing, and producing a single value.

  • Kotlin Flow Completion7:13
  • Kotlin Flow Change Flow Context8:16
  • Kotlin Flow Buffer11:23

    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.

  • Kotlin Flow Conflate Operator5:40

    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.

  • Kotlin Flow CollectLatest7:18
  • Kotlin Flow Zip Operator5:32

    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.

  • Kotlin Flow Combine Operator11:26

    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.

  • Kotin Flow Exception Handling15:42

    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.

  • Kotlin Flow FlatMapConcat7:57

    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.

  • Kotlin Flow FlatMapMerge7:51

    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.

  • Kotlin Flow FlatMapLatest5:21

    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.

Requirements

  • Student must have basic understanding of Kotlin Coroutines

Description

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.

Who this course is for:

  • Android Developer