Kotlin-Flow-Android-Examples - Learn Flow for Android by Examples
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 conditionZip
-> Zips values from the current flow with another flowFilterIsInstance
-> Returns a flow containing only values that are instances of specified data typeFilterNot
-> Returns a flow containing only values of the original flow that do not match the given conditionFilterNotNull
-> 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 flowsFlatMapMerge
-> 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 flowDistinctUntilChanged
-> suppress duplicate items emittedFlattenMerge
-> 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 conditionMerge
-> Merges the given flows into a single flow without preserving an order of elements.OnCompletion
-> Invokes it when the given flow is completed or cancelledOnStart
-> Invokes it when the given flow is startedScanReduce
-> Reduces the given flow with give condition, emitting every intermediate result, including initial valueTransformLatest
-> 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.