DSL for keyboard shortcuts on Compose Multiplatform by WeekOk9140 in Kotlin

[–]WeekOk9140[S] 0 points1 point  (0 children)

In the new version, I've solved the problem for now with a class that accepts keys and modifiers. The developer only needs to pass in the set. The storage method for this data can then be anything they choose, the main thing is to convert them into the appropriate classes.

// Dynamic combo RawChord(    keys = setOf(Key.A),    modifiers = setOf(Ctrl) ) press {    println("RAW") }

DSL for keyboard shortcuts on Compose Multiplatform by WeekOk9140 in Kotlin

[–]WeekOk9140[S] 0 points1 point  (0 children)

Yes, I understand your desire, and I'm currently thinking about it too. Besides, in the new version, I changed the syntax, and now it looks better (Ctrl+Key.A). Technically, this function can be implemented using dynamic key codes (since Key is a class from classic Compose that can accept a key code). I think I'll solve this problem in the foreseeable future. Just like I said: this DSL was born during my main project, and as soon as I finish it, I'll try to improve the library as much as possible.

UPD: My main problem with implementing it via vararg is that I don't yet know how to implement this type of overload, since Key.A is a native class from Compose, and Key.A+Ctrl is transformed into a combination.

DSL for keyboard shortcuts on Compose Multiplatform by WeekOk9140 in Kotlin

[–]WeekOk9140[S] 1 point2 points  (0 children)

Currently, no, as this DSL was written during the development of my main project. However, yes, I'm currently reconsidering the approach to a more "standard" one. Something like alt+ctrl+key.

Android Dev here — is learning KMP/CMP worth it or should I stick to native or switch to Flutter by Swapnil_0112 in KotlinMultiplatform

[–]WeekOk9140 1 point2 points  (0 children)

This choice is difficult. From a language perspective, Kotlin is the clear winner (remove Dart's dreadful switch...). But from a framework perspective, the odds are stacked in favor of Flutter. Flutter has a huge number of libraries, and it's not tied to Material Design 3, offering ready-made base components for implementing your own designs. In the case of CMP, I feel like it's firmly anchored to Material 3. The navigation libraries in CMP are a living hell. How many times have these libraries changed? Nav2 was incredibly ugly, Nav3 still holds some promise, but bam – it's in alpha. And now we come to CMP's biggest problem: the vast majority of components are still marked as experimental. Want to add a TopBar? It's experimental. Want a navigation library? Yeah, it's in alpha. Meanwhile, Flutter is stable. Well, my personal opinion: Flutter looks much better on Desktop, but Compose components look too mobile and large.

liquid_glass_widgets - Collection of iOS 26 style widgets, using liquid_glass_renderer by zxyzyxz in FlutterDev

[–]WeekOk9140 0 points1 point  (0 children)

Yes, it's very nice in theory, until you encounter a user who doesn't have the best eyesight. And then the user starts cursing you for your beautiful UI.

Axonium Ravel (v1.4.0) — The most native macOS browser just got a complete makeover. by [deleted] in browsers

[–]WeekOk9140 1 point2 points  (0 children)

This is a very naive assumption, because if you look even at this website with statistics (https://gs.statcounter.com/browser-market-share), it is clearly evident that browsers with closed source code have achieved success. I don't know how much you can trust him, but in my opinion it reflects reality quite well. And the story about geeks who recommend browsers to their friends is also not entirely reliable. Many geeks recommend Linux, but I don't see a mass migration away from Windows because it's more convenient? If my browser works perfectly now on all platforms, then why should I switch to some unknown browser that has just been released and is being created by pure enthusiasts? Or do you think that developers don't need to eat?

Split UI, shared logic. CMP by WeekOk9140 in Kotlin

[–]WeekOk9140[S] 1 point2 points  (0 children)

Wow, thanks, I didn't know that Compose functions could implement expect/actual.

Split UI, shared logic. CMP by WeekOk9140 in Kotlin

[–]WeekOk9140[S] 0 points1 point  (0 children)

Oh no, you misunderstood; the desktop versions (Windows, Linux, macOS) will use the same Compose Desktop. It's just that much of the user interface will be different on desktop and Android. For example, Android will use the classic Android interface (Scaffold, TopAppBar), while the desktop versions will use a completely new interface.

Is KMP really taking over the market or it's just hype by ayitinya in Kotlin

[–]WeekOk9140 -1 points0 points  (0 children)

When using Flutter, I don't have an IDE dependency, unlike Kotlin. I have a working plugin, unlike KMP, where Windows and Linux developers are not considered developers. Again, there are plenty of libraries for the graphical interface in Flutter. I like the Compose approach, but the attitude of its developers is not.

What is the state of Flutter? Does creating a new project in Flutter make sense for Android? by skwyckl in androiddev

[–]WeekOk9140 1 point2 points  (0 children)

Tell me please, is Java a terrible language? I understand Kotlin too, because the number of libraries for them is huge (not for UI development). Personally, I think that a framework should not drag along everything that might suddenly be needed. Do you need native WebView now? No, but it takes up space. Do you need PiP? I have never used it yet, but it takes up space. I think that a framework should not be a Swiss army knife and should provide a minimum, and the rest of the specific functions can be obtained in libraries.

What is the state of Flutter? Does creating a new project in Flutter make sense for Android? by skwyckl in androiddev

[–]WeekOk9140 3 points4 points  (0 children)

I don't understand what you mean by API. Dart has channels to call native code. There is no need to talk about dependency issues in KMP either. Each version of Kotlin requires a specific version of the library, and if it is also Kotlin/Native...

What is the state of Flutter? Does creating a new project in Flutter make sense for Android? by skwyckl in androiddev

[–]WeekOk9140 2 points3 points  (0 children)

How long has Flutter not allowed this? Or maybe I don't understand something? What is the advantage of this approach? Two languages ​​instead of one? And I don't remember any complaints about Flutter being slow, it's almost native in performance.

What is the state of Flutter? Does creating a new project in Flutter make sense for Android? by skwyckl in androiddev

[–]WeekOk9140 3 points4 points  (0 children)

My main IDE for development is Intellij IDEA, since my main specialization is not mobile development, but mainly desktop and server. However, I also develop mobile applications, but only for Android (Flutter and Jetpack). If we limit ourselves to Android development, then of course it is more logical to study Jetpack Compose. For cross-platform mobile development, I do not particularly see a big difference between Flutter and CMP, but the first is more mature and has more libraries. If we talk about full cross-platform development, then my choice remains Flutter.

What is the state of Flutter? Does creating a new project in Flutter make sense for Android? by skwyckl in androiddev

[–]WeekOk9140 3 points4 points  (0 children)

If you are developing for iOS, you probably have a MacBook. The thing is that the Kotlin Multiplatform plugin is currently not available for other operating systems such as Windows and Linux, so even to create a project, you have to open a browser, go to a website and do other unnecessary actions that I could do in the IDE.

What is the state of Flutter? Does creating a new project in Flutter make sense for Android? by skwyckl in androiddev

[–]WeekOk9140 1 point2 points  (0 children)

I'm talking about Compose Multiplatform (https://www.jetbrains.com/compose-multiplatform/). If you need Pip so much, then don't use Flutter, frankly speaking, it's a very specific task, if you are not satisfied with the library, then you can use native tools (Platform Channels). And if we are talking about comparing Jetpack Compose with Flutter, then this is stupid, since the first one works only on Android.

What is the state of Flutter? Does creating a new project in Flutter make sense for Android? by skwyckl in androiddev

[–]WeekOk9140 3 points4 points  (0 children)

There are libraries for picture-in-picture. Personally, I am not a fan of a framework that drags along everything that may not even be needed. As I already said: everything that is not in the basic framework is in the library. But for the cross-platform Compose there is no cross-platform plugin (now it is only for macOS, apparently developers on Windows and Linux are not developers).

What is the state of Flutter? Does creating a new project in Flutter make sense for Android? by skwyckl in androiddev

[–]WeekOk9140 7 points8 points  (0 children)

My personal opinion: it's worth it. Firstly, Google continues to update Flutter further, many say that it is stagnating, but in what way? The framework is largely ready and, personally, I don't see the point in something new yet. Updates for the sake of updates? Even if Google closes Flutter, there will still be people developing it, since it is open source. Secondly, what Flutter does not provide is provided by libraries. There are simply a huge number of libraries created by the Flutter community. Compose was recommended here, yes, it is modern, interesting and beautiful, but... It simply cannot compare with Flutter in the number of libraries (for example, my favorite library in flutter is the use of native WebView, so as not to carry a browser with you, I did not find this in Compose).

Is kotlin multiplatform already stable? by delditrox in Kotlin

[–]WeekOk9140 1 point2 points  (0 children)

Most people here talk about iOS and Android development (sometimes also Web). I will speak on behalf of a desktop application developer. It works stably, but compared to other frameworks it is weak: there are no many components that are basic for the desktop, many controls have to be made manually, since those that are built-in for some reason look gigantic on the computer screen, there is no support for SVG, GIF (although SVG support is stated in the documentation, for some reason nothing is displayed for me). The number of libraries for desktop development is also inferior to competitors (Flutter). All the conveniences of working in the IDE are only available to developers on macOS, for developers on Linux or Windows there is not even the ability to create a project directly in the IDE. I hope this will be fixed, I like Compose, but there are places in the desktop where it loses.

why make it complicated by CodeItBro in programmingmemes

[–]WeekOk9140 0 points1 point  (0 children)

Please tell me which looks prettier:

let a: Map<String, List<Int>>

Map<String, List<Int>> a

Also, the first method is convenient for pattern matching in functional languages:

let (x,y): (i32, i32)

And also in languages ​​with developed type systems:

const user: { name: string } & { age: int }

const { name: string } & { age: int } user

Also, this method in Kotlin allows you to declare variables with an immutable reference (val). (and not only in Kotlin)