Per-Erik Bergman
Per-Erik Bergman
  • Видео 13
  • Просмотров 12 525
Build a Color Picker App with Jetpack Compose – Master State Hoisting in Kotlin Multiplatform!
In this video, we dive deep into Jetpack Compose and Kotlin Multiplatform to build a color picker app while mastering state hoisting! 🎨
By following along, you’ll learn how to:
• Use state hoisting to manage shared state across multiple screens.
• Build a clean and decoupled navigation setup using Jetpack Compose Navigation.
• Implement a color picker pattern, which can be adapted to any type of selection UI in your apps.
• Avoid common pitfalls like state modification during composition.
• Follow best practices in Jetpack Compose and Kotlin Multiplatform development.
🛠 What You’ll Build:
• A color picker app where users select a color from a list and display it on the main screen.
• The ap...
Просмотров: 258

Видео

Implementing Fallback Solutions with Kotlin Multiplatform and Koin Dependency Injection
Просмотров 1754 месяца назад
In this video, I explore how to handle platform-specific implementations in Kotlin Multiplatform (KMP) projects when the shared module and the `actual/expect` pattern aren't sufficient. Using Koin for dependency injection, I demonstrate how to create and inject platform-specific services for both Android and iOS. What You'll Learn: - Setting up Koin dependency injection in a KMP project. - Crea...
Build Environment Setup for KMP Projects
Просмотров 4505 месяцев назад
Description: Welcome back to the channel! In today's tutorial, we're focusing on configuring environment-specific builds for a Kotlin Multiplatform (KMP) project in both Android Studio and Xcode. This step-by-step guide will help you set up and manage different environments like development and production for Android, iOS, and desktop applications. 🔗 Useful Links: - GitHub Repository for the Pr...
Firebase Firestore in Kotlin Multiplatform
Просмотров 2,9 тыс.6 месяцев назад
Building a Cross-Platform Contact App with Kotlin and Firebase | Android, iOS, and Desktop Description: Welcome back to the channel! In today's tutorial, we're diving into building a cross-platform contact app using Kotlin and Firebase, targeting Android, iOS, and Desktop. This comprehensive guide will walk you through setting up your project, configuring Firebase, and implementing a repository...
Unit Testing in Kotlin Multiplatform
Просмотров 4817 месяцев назад
Hello and welcome to this week's video! Have you ever wondered about setting up effective tests for your Kotlin Multiplatform projects? Or how to ensure your code is reliable across different platforms? If so, you're in the right place! I'm Per-Erik, and on this channel, we dive deep into Kotlin Multiplatform to make your development journey smoother and more efficient. Today, we're tackling th...
ViewModel in Kotlin Multiplatform
Просмотров 9417 месяцев назад
In this video, I will guides you through the process of integrating a ViewModel in a Kotlin Multiplatform project using Koin. You’ll learn how to set up the necessary dependencies, configure the build.gradle.kts file for different platforms, and instantiate the ViewModel for Android, iOS, and JVM. This tutorial is a continuation of the previous video, so make sure to watch that first. Links to ...
Dependency Injection in Kotlin Multiplatform
Просмотров 5187 месяцев назад
In today's video, we'll explore dependency injection, giving you the knowledge to start using it in your Kotlin Multiplatform project. As always, leave your comments and suggestions on topics you'd like me to cover. Timecodes 0:00 Intro 0:35 What is dependency injection 1:42 Dependencies 2:32 App Module 3:31 Initialization 4:00 Obtain an instance 4:08 Interface 5:30 Platform Module 7:32 Common ...
Navigate in Kotlin Multiplatform
Просмотров 1,2 тыс.8 месяцев назад
Welcome to our latest tutorial on Kotlin Multiplatform Navigation! In this comprehensive guide, we explore various navigation techniques tailored for Kotlin Multiplatform development. GitHub Repository: [KMP Navigation Repo](github.com/pererikbergman/kmp-navigation) Timecodes 0:00 Intro 0:37 Tab Navigation 3:03 Simple Dialog 5:39 Compose Navigation 9:42 BottomBar Navigation 13:40 BottomSheet 16...
Kotlin Multiplatform Networking with Ktor
Просмотров 7688 месяцев назад
Explore the power of Ktor for network operations in this quick overview! Learn how Ktor simplifies building asynchronous servers and clients in connected systems using Kotlin. For more in-depth details, check out the official Ktor documentation here. Source Code: github.com/pererikbergman/kmp-ktor Don't forget to like, subscribe, and hit the notification bell for more tutorials!
Database with SQLDelight in Kotlin Multiplatform
Просмотров 2,2 тыс.8 месяцев назад
Welcome to this video where I guide you through using SQLDelight for database management in Kotlin Multiplatform projects. Whether you're a seasoned developer or just starting, this video will equip you with the knowledge to efficiently synchronize your database operations across iOS, Android and Desktop! What You Will Learn: - Setting up SQLDelight in a Kotlin Multiplatform project. - Creating...
Creating Your First Kotlin Multiplatform App.
Просмотров 5709 месяцев назад
In this video we will learn how Kotlin Multiplatform Mobile (KMP) aligns with traditional Android app development. In this session, we'll construct a simple, one-screen BMI Calculator application. Discover how to manage UI states, handle user interactions, and set up dependencies like MOKO ViewModel and Material3. This guide is ideal for Android developers curious about expanding their toolkit ...
Kotlin Multiplatform Project Structure
Просмотров 8429 месяцев назад
Dive into the core of Kotlin Multiplatform with our latest video, "Kotlin Multiplatform Project Structure: Modules, Source Folders & Gradle Overview." Designed specifically for software engineers and mobile app developers, this video serves as a high-level guide through the essential components of a Kotlin Multiplatform project. From modules to source folders and the intricacies of using Gradle...
Setting Up Your Kotlin Multiplatform Development Environment
Просмотров 1,2 тыс.9 месяцев назад
In this inaugural video of our Kotlin Multiplatform series, "Setting Up Your Kotlin Multiplatform Development Environment," we dive into the crucial first step of any development project: environment setup. This comprehensive tutorial is tailored for software engineers and mobile app developers embarking on their journey with Kotlin Multiplatform. We cover all the essential tools and software y...

Комментарии

  • @ARICHA_SAMSON
    @ARICHA_SAMSON Час назад

    🔥🔥 content,,, you are God Sent. Please continue with the KMP projects. 1. Authentication 2. Storage we are waiting

  • @rokiAichannel
    @rokiAichannel 19 часов назад

    Please complete the series ❤

  • @rouseki295
    @rouseki295 4 дня назад

    when I run the desktop app everything works but when I package the app and install it, it says "Failed to Launch JVM" why?

  • @raghavendra6978
    @raghavendra6978 4 дня назад

    Thank you!

  • @AshishDwivedi-v6t
    @AshishDwivedi-v6t 24 дня назад

    This video is really helpful. It is calm and informative, especially for people whose first language is not English. Thank you for making it easy to understand!

  • @MohamadJamous-s1w
    @MohamadJamous-s1w Месяц назад

    Very helpful and clear, keep it up!

  • @Dabayare
    @Dabayare Месяц назад

    What is the best PC spec for development of Kotllin multiplatform?

  • @bek_groider
    @bek_groider 2 месяца назад

    That would be great, if you also show how to observe viewModel state in iOS. Currently we are using moko libs

  • @ImranSiddiquiClasses
    @ImranSiddiquiClasses 2 месяца назад

    thanks for ur videos its so good.

  • @sewminisathsarani8218
    @sewminisathsarani8218 2 месяца назад

    sir i had error, how to solve that java.lang.SecurityException: Unknown calling package name 'com.google.android.gms'

  • @cliff_odume
    @cliff_odume 2 месяца назад

    Thanks very much, please keep making more videos. Especially on dependency injection and best practice for arraging project tree structures.

  • @vengateshm2122
    @vengateshm2122 2 месяца назад

    Using pickedColor mutableStateOf is one way of doing. We can also use navcontroller to set the result to previous screen. In screen b Button(onClick = { // Set the result in the previous screen's SavedStateHandle navController.previousBackStackEntry?.savedStateHandle?.set(RESULT_KEY, "Result from ScreenB") navController.popBackStack() // Navigate back to ScreenA }) { Text("Go back with result") } In screen A // Mutable state to hold the result from ScreenB var result by remember { mutableStateOf<String?>(null) } // Use LaunchedEffect to access the SavedStateHandle and get the result when available LaunchedEffect(navController.currentBackStackEntry) { val savedStateHandle = navController.currentBackStackEntry?.savedStateHandle savedStateHandle?.get<String>(RESULT_KEY)?.let { resultValue -> result = resultValue // Clear the result after consuming it, if needed savedStateHandle.remove<String>(RESULT_KEY) } } This might prevent whole AppNavigation recomposition.

  • @aaron524
    @aaron524 2 месяца назад

    When I run it in Web, it doesn't work with below error: --- Could not determine the dependencies of task ':kotlinNpmInstall'. > Could not resolve all dependencies for configuration ':composeApp:wasmJsNpmAggregated'. > Could not resolve dev.gitlive:firebase-firestore:2.1.0. --- Doesn't the gitlive firebase sdk support web?

  • @youssefsoliman3341
    @youssefsoliman3341 2 месяца назад

    Can you make video about realme database?❤

    • @pererikbergman
      @pererikbergman 2 месяца назад

      Hi, I have one about SQLDelight: ruclips.net/video/Mwr49Rgj70k/видео.html

    • @youssefsoliman3341
      @youssefsoliman3341 2 месяца назад

      @@pererikbergman yes i saw this video about 9 times but i got problem that desktop application not show the database data while compose app, ios app running well thank you for your interest♥

  • @martinkompan439
    @martinkompan439 3 месяца назад

    👻

  • @shawnsvega
    @shawnsvega 3 месяца назад

    Wow! Thanks for making this. This tutorial will probably save me days of work

  • @youssefsoliman3341
    @youssefsoliman3341 3 месяца назад

    i suffer alot with KMP the first thing when i added svg to the project i got too many errors then when i downloaded the reposotry when i run it it give me this Error: Could not find or load main class MainKt Caused by: java.lang.ClassNotFoundException: MainKt i hate KMP 😟

  • @bonyadDua
    @bonyadDua 3 месяца назад

    listOf( iosX64(), iosArm64(), iosSimulatorArm64() ).forEach { iosTarget -> iosTarget.binaries.framework { baseName = "ComposeApp" isStatic = true // Required when using NativeSQLiteDriver linkerOpts.add("-lsqlite3") } }

  • @vipulyaara
    @vipulyaara 3 месяца назад

    The desktop implementation was very helpful. You saved me hours/days of work. Thank you so much.

  • @funnitish3909
    @funnitish3909 3 месяца назад

    Sir please make a video on firebase storage integration on kmp desktop or all os projects

  • @Alexanderchib
    @Alexanderchib 3 месяца назад

    Attach the links to the projects, plz

    • @pererikbergman
      @pererikbergman 3 месяца назад

      There is no project, this is out-of-the box structure when you download the project from: kmp.jetbrains.com/

  • @javierguerrero3754
    @javierguerrero3754 4 месяца назад

    lets go into mvvm and mvi to see how that might work ;) ..... you're the boss

    • @pererikbergman
      @pererikbergman 4 месяца назад

      Challenge accepted, I am actually working on a little longer video that will cover MVVM with MVI, let's see when it's ready :)

    • @javierguerrero3754
      @javierguerrero3754 4 месяца назад

      @@pererikbergman cool, I’ve been working because of your guides in a MVI project, hope it would work 😅 … great videos 🦾 greetings from Costa Rica

  • @sruthimundayil5384
    @sruthimundayil5384 4 месяца назад

    how to add splashscreen and detail screen without bottomtab in this code?

  • @javierguerrero3754
    @javierguerrero3754 4 месяца назад

    yes please, lets review how would authentication will work, thanks boss!!

  • @OrlandoRamosFlores
    @OrlandoRamosFlores 4 месяца назад

    Thank you very much for sharing your knowledge Please could you make an authentication video?

  • @JUANUNIX1982
    @JUANUNIX1982 4 месяца назад

    Thanks bro amazing!!!

  • @neyasbit
    @neyasbit 5 месяцев назад

    nice 🔥

  • @developStudioIn
    @developStudioIn 5 месяцев назад

    I will share your videos with colleagues

    • @pererikbergman
      @pererikbergman 5 месяцев назад

      Thank you, I appreciate your support

  • @developStudioIn
    @developStudioIn 5 месяцев назад

    Useful content pls make more detailed videos

  • @abu-bakrpereirakebe508
    @abu-bakrpereirakebe508 5 месяцев назад

    🚀🚀🚀

  • @touhid7078
    @touhid7078 5 месяцев назад

    Thank you so much. 1 question: If I use "factory" instead of "single" for platformModule in this case - will it be a good practice?

    • @pererikbergman
      @pererikbergman 5 месяцев назад

      It's completely up to what you are doing, a factory will create a new instance every time while single will only create one instance and return the same instance every time it's requested.

  • @touhid7078
    @touhid7078 5 месяцев назад

    Any way to implement MVVM including web and desktop support?

    • @pererikbergman
      @pererikbergman 5 месяцев назад

      Yes, check out my video about ViewModel: ruclips.net/video/4ieIpYo1sVg/видео.html, web (wasm), should work as is.

    • @touhid7078
      @touhid7078 5 месяцев назад

      @@pererikbergman Thank you

  • @antonkuznetsov3296
    @antonkuznetsov3296 5 месяцев назад

    Brilliant tutorial! Thank you so much!

  • @UniverseZ333
    @UniverseZ333 6 месяцев назад

    Great content Eric, where are you from? Greetings from Brazil! o/

    • @pererikbergman
      @pererikbergman 5 месяцев назад

      I am from Sweden but live in Thailand

  • @kaletsugas
    @kaletsugas 6 месяцев назад

    Thanks for the video, new subscriber here. How would you support product flavors for KMP? Say I have a build for UAT, staging and prod environments?

    • @pererikbergman
      @pererikbergman 6 месяцев назад

      Thanks for the Sub I have a video in the making about that! I just have a few more things to figure out :)

  • @vengateshm2122
    @vengateshm2122 6 месяцев назад

    Useful content. Thanks for sharing.

  • @joeybasile545
    @joeybasile545 6 месяцев назад

    How did you track down these required dependencies?

    • @pererikbergman
      @pererikbergman 6 месяцев назад

      Mainly on: cashapp.github.io/sqldelight/2.0.2/ & github.com/cashapp/sqldelight

  • @andromadusnaruto1544
    @andromadusnaruto1544 6 месяцев назад

    Awesome tutorial! Definitely coming back for more...👍🏾

  • @technopradyumn
    @technopradyumn 6 месяцев назад

    Please make video in compose multiplatrform app in kotlin for ios sndroid desktop and website using supabase database login, sign up by otp , and login with google , etc like features and all crude operation with supabe databse and push notification storage to store video images just crude operation app only

    • @pererikbergman
      @pererikbergman 6 месяцев назад

      I never worked with Supabase, so we will see if that comes up.

  • @rsumanradhakrishnan3747
    @rsumanradhakrishnan3747 6 месяцев назад

    We want tutorials on authentication via Firebase, specifically phone number authentication with OTP verification.

  • @robertwhelan9469
    @robertwhelan9469 7 месяцев назад

    I enjoyed the video but I cannot get the desktop app to run. No run configuration, fails if I try to run Main.kt - hints please.

  • @Andyliu0425
    @Andyliu0425 7 месяцев назад

    Hello! Is there a way to share a ViewModel on iOS using SwiftUI?

    • @pererikbergman
      @pererikbergman 7 месяцев назад

      Hi! I haven't tried the view model from Google with SwiftUI but you get the same functionality with the moko-viewmodel, and I seen many people using that one with SwiftUI

  • @chax255
    @chax255 7 месяцев назад

    Hello Per-Erick I have been following up your videos and I am kinda new to the idea of MVVM and I would like to learn from you about the idea and how I can use it in KMM and regular jetpack

    • @pererikbergman
      @pererikbergman 7 месяцев назад

      I will have a track of architectural content soon. Thanks for your support!

  • @pam24
    @pam24 7 месяцев назад

    by use KoinApplication inside our compose app, we don't need to define startKoin in our Android module?

    • @pererikbergman
      @pererikbergman 7 месяцев назад

      Exactly, a little less code 🤓

  • @pam24
    @pam24 7 месяцев назад

    Cool video 🔥I'll waiting video about datastore for multiplatfrom from you 😄

  • @pankajbohra8637
    @pankajbohra8637 7 месяцев назад

    Source code is unavailable

    • @pererikbergman
      @pererikbergman 7 месяцев назад

      Sorry, my bad. It should be fixed now.

  • @rsumanradhakrishnan3747
    @rsumanradhakrishnan3747 8 месяцев назад

    Thanks for the video. Can you please make a KMP video related to Google Maps? I know it is too early, but I cannot wait for it.

    • @pererikbergman
      @pererikbergman 8 месяцев назад

      I will look into it, the first videos I planned will all contain things that works on desktop as well, not sure google maps does. But I will check!

    • @rsumanradhakrishnan3747
      @rsumanradhakrishnan3747 8 месяцев назад

      @@pererikbergman Thanks for your effort. It will help many developer

  • @nqmgaming2004
    @nqmgaming2004 8 месяцев назад

    🎉

  • @Alexmez
    @Alexmez 8 месяцев назад

    Great video

  • @zakariazakivic1430
    @zakariazakivic1430 8 месяцев назад

    Nice video thanks, please do a full app playlist.

    • @pererikbergman
      @pererikbergman 8 месяцев назад

      Sure thing! It's in the plan :D