Sample project to demonstrate how to have clear and better interactions between composables and viewmodels.

Overview

Form Validation

Sample project to demonstrate how to have clear and better interactions between composables and viewmodels.

Concepts used

  • uiState concept to maintain the state for our composables inside view model and update the UI composables based on the state changes.
  • shared flow to fire events for result and displays toast message from composable.
  • launched effect to handle state change happening outside of the composable but in the same scope.

Medium Article

If you want to read more in detail, please read here: https://saurabhpant.medium.com/cleaner-way-to-interact-between-composable-and-viewmodel-in-jetpack-compose-14c8b3a74bbe

You might also like...
A simple path finding visualizer mobile app to demonstrate the use of Jetpack Compose UI toolkit in Android.
A simple path finding visualizer mobile app to demonstrate the use of Jetpack Compose UI toolkit in Android.

Path Finding Visualizer App using Jetpack Compose A simple path finding visualizer mobile app to demonstrate the use of Jetpack Compose UI toolkit in

Simple superhero lexicon app to demonstrate Jetpack Compose.
Simple superhero lexicon app to demonstrate Jetpack Compose.

Superhero Lexicon ๐Ÿฆนโ€โ™‚๏ธ Simple and Pretty Superhero App developed using Jetpack Compose UI Technologies Used ๐Ÿ›  Kotlin - First class and official prog

Simple composable for rendering transitions between backstacks.
Simple composable for rendering transitions between backstacks.

compose-backstack Simple library for Jetpack Compose for rendering backstacks of screens and animated transitions when the stack changes. It is not a

This library will make it easier to pass arguments between screens in Jetpack Compose.
This library will make it easier to pass arguments between screens in Jetpack Compose.

Compose Navigation This library will make it easier to pass arguments between screens in Jetpack Compose Setup allprojects { repositories { ...

A simple library for automatically animating between Compose states.

compose-autotransition Status: Experimental A simple library for automatically animating between Compose states. var scale by remember { mutableStateO

Simple-stack FTUE sample using Compose integration (and Rx)

Sample code using simple-stack and the Compose integration to display "First-Time User Experience", based on an older version of "Conditional Navigation" section of Jetpack Navigation documentation.

๐Ÿš€ Sample Android Clean Architecture on Rorty App focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.
๐Ÿš€ Sample Android Clean Architecture on Rorty App focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.

Android Clean Architecture Android Clean Architecture in Rorty is a sample project that presents modern, approach to Android application development u

Sample app that shows how to create a bitmap from a Jetpack composable
Sample app that shows how to create a bitmap from a Jetpack composable

Creating Bitmaps From Jetpack Composables This app demonstrates how to create a bitmap from a Jetpack composable without the need to display the compo

A sample of how to implement a design system in Jetpack Compose

[WIP] Sample Design System This project aims to hold an example of how to implement a design system with Jetpack Compose. At this moment it only has t

Owner
Saurabh Pant
Saurabh Pant
Common preference/settings Composables for Jetpack Compose.

ComposePrefs ComposePrefs is a preferences library for Jetpack Compose which makes it easy to implement preferences/settings in your Compose Android a

Jamal Mulla 54 Jan 5, 2023
Puck - Make composables draggable with kotlin

Puck Make Composables Draggable. Including in your project Gradle Add below code

Shivam Dhuria 44 Dec 10, 2022
ComposePrefs3 is a fully featured library of preference composables for Jetpack Compose.

ComposePrefs3 This is the M3 version of ComposePrefs. The M2 version can be found here. ComposePrefs3 is a preferences library for Jetpack Compose whi

Jamal Mulla 21 Dec 2, 2022
A sample project in Kotlin to demonstrate Jetpack Compose, MVVM, Coroutines, Hilt, Room, Coil, Retrofit, Moshi, Leak Canary and Repository pattern

Jetpack-Compose-Boilerplate This repository contains a sample project in Kotlin to demonstrate Jetpack Compose, MVVM, Coroutines, Hilt, Room, Coil, Re

Areg Petrosyan 14 Dec 12, 2022
๐Ÿš€๐Ÿ“ฑ๐Ÿ’–Animated LazyColumn/Row changes scale/color with animation and have a current selected item like a Pager. An elegant alternative for selecting from a list

Compose AnimatedList Animated infinite and finite LazyRow and LazyColumn with scale and color animations on scroll change based on how far they are to

Smart Tool Factory 47 Nov 16, 2022
This repo is to demonstrate the jetpack compose 's canvas api's usage and creating an icon pack using the basic functions.

Jetpack Compose Canvas API Demo App We all know that Jetpack Compose has now reached the 1.0.0 release milestone. This is a huge change we can say for

vikas kumar 32 Dec 15, 2022
ToDo-Task-App - An Android App built to demonstrate the use of Jetpack Compose, Material You, Room Database, and MVVM

ToDo Task App ToDo Task App is a sample Android app built with Jetpack Compose.

null 0 Jan 17, 2022
๐Ÿ”– A Quotes Application built to Demonstrate the Jetpack Compose UI

?? A Quotes Application built to Demonstrate the Jetpack Compose UI

Sanju S 466 Dec 27, 2022
A simple Snake application to demonstrate the use of Compose for Desktop platform with Kotlin

Snake App using Compose for Desktop A simple Snake desktop application to demonstrate the use of Compose UI toolkit for Desktop platform with Kotlin.

Serge Nino Martin Villasica 12 Nov 18, 2022
๐Ÿ”– A Quotes Application built to Demonstrate the Compose for Desktop UI

?? JetQuotes A Quotes Application built to Demonstrate the use of Jetpack Compose for building declarative UI in Desktop. Made with love โค๏ธ by Spikeys

Sanju S 60 Sep 9, 2022