Skip to content
Kotlin Flow Android Examples - How to use it in Android Project
Kotlin
Branch: master
Clone or download
Latest commit 8e4dbf2 Jan 20, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Refactored Project Jan 20, 2020
art Refactored Project Jan 20, 2020
gradle/wrapper Refactored Project Jan 20, 2020
.gitignore Project Init Jan 7, 2020
CONTRIBUTING.md Refactored Project Jan 20, 2020
LICENSE Refactored Project Jan 20, 2020
README.md Refactored Project Jan 20, 2020
build.gradle
gradle.properties Refactored Project Jan 20, 2020
gradlew Refactored Project Jan 20, 2020
gradlew.bat Refactored Project Jan 20, 2020
settings.gradle Refactored Project Jan 20, 2020

README.md

Kotlin-Flow-Android-Examples - Learn Flow for Android by Examples

Mindorks Mindorks Community Mindorks Android Store Open Source Love License

This project is for:

  • Who wants to learn Kotlin Flow

Just Build the project and start learning Flow by examples.

If you want to get started with Kotlin Flow, checkout the blog

Kotlin Flow Operators Examples present in this sample project

  • Filter -> Returns a flow containing only values of the original flow that matches the given condition
  • Zip -> Zips values from the current flow with another flow
  • FilterIsInstance -> Returns a flow containing only values that are instances of specified data type
  • FilterNot -> Returns a flow containing only values of the original flow that do not match the given condition
  • FilterNotNull -> Returns a flow containing only values of the original flow that are not null.
  • FlatMapConcat -> Transforms the flow and then concatenating and flattening these flows.
  • FlatMapLatest -> Transforms the flow and then flattening last flows
  • FlatMapMerge -> Transforms elements emitted by the original flow, that returns another flow, and then merging and flattening these flows.
  • FlattenConcat -> Flattens the given flow of flows into a single flow
  • DistinctUntilChanged -> suppress duplicate items emitted
  • FlattenMerge -> Flattens the given flow of flows into a single flow with alimit on the number of concurrently collected flows.
  • Map -> Returns a flow containing the results of applying the given condition
  • Merge -> Merges the given flows into a single flow without preserving an order of elements.
  • OnCompletion -> Invokes it when the given flow is completed or cancelled
  • OnStart -> Invokes it when the given flow is started
  • ScanReduce -> Reduces the given flow with give condition, emitting every intermediate result, including initial value
  • TransformLatest -> Transforms the last item collected from flow

If this project helps you in anyway, show your love ❤️ by putting a ⭐️ on this project ✌️

Check out MindOrks awesome open source projects here

License

   Copyright (C) 2020 MINDORKS NEXTGEN PRIVATE LIMITED

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
You can’t perform that action at this time.