This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<vector xmlns:android="http://schemas.android.com/apk/res/android" | |
android:width="200dp" | |
android:height="76dp" | |
android:viewportWidth="375" | |
android:viewportHeight="142"> | |
<path | |
android:fillColor="@color/reni" | |
android:pathData="M140.407,117.271l-2.842,0.119c1.568,3.405 -0.686,2.409 -0.686,2.409 -3.557,-1.764 -2.09,-3.652 0.862,-5.488l-3.527,-0.469c-3.172,4.412 -4.198,1.801 -4.198,1.801 1.736,-5.19 3.887,-4.97 8.357,-4.281l-5.146,-1.14c-5.282,5.074 -5.837,2.738 -5.837,2.738 3.124,-8.143 8.457,-7.198 13.706,-4.938 -0.929,-3.519 -12.622,-11.07 -8.086,-11.259 2.929,-0.122 15.523,7.598 17.141,20.002 0.165,1.27 21.07,5.05 21.07,5.05l-4.629,8.967 -22.269,-7.195c-4.323,-1.483 -3.916,-6.316 -3.916,-6.316z" /> | |
<path | |
android:fillColor="@color/primary_muted_5" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Articles: | |
- [Typesafe Error Handling in Kotlin](https://kotlin.christmas/2019/17) | |
- [Sealed Classes Instead of Exceptions in Kotlin](https://phauer.com/2019/sealed-classes-exceptions-kotlin/) | |
- [Kotlin’s Missing Type, Either](https://medium.com/@Robert_Chrzanow/kotlins-missing-type-either-51602db80fda) | |
Libraries | |
- https://github.com/michaelbull/kotlin-result | |
- https://github.com/kittinunf/Result | |
Discussions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<vector xmlns:android="http://schemas.android.com/apk/res/android" | |
android:width="100dp" | |
android:height="34dp" | |
android:viewportWidth="100" | |
android:viewportHeight="34"> | |
<path | |
android:fillColor="@color/car_logo_fill" | |
android:pathData="M1.3,2l-1,1s0.2,0.1 0.2,0l0.4,-0.3 0.4,0.3 1.1,0.6 1.3,0.6h1l2.2,0.2L10.7,4.4a162.2,162.2 0,0 0,6 0L22,4.4l1.5,0.1 1.3,0.2 0.3,0.2L25.1,5h0.2l0.1,-0.2 0.1,-0.2v-0.3l-0.7,-0.1A37.8,37.8 0,0 1,21 3a18.2,18.2 0,0 0,-4.7 -0.6L11.3,2.4l-1,-0.1h-1l-0.5,-0.1L8.8,2h2.1L12,2h2.8A116.5,116.5 0,0 1,20 2l1.7,0.4c0.6,0 1.1,0.3 1.8,0.5l2,0.5 1.7,0.1h2.5l3,0.1c0.5,0 3,0.2 3.8,0.4 1.3,0.2 2.6,1.1 2.8,2.2 0.2,1.5 -1.4,3 -1.5,4.4l-0.1,1 -0.3,0.3 0.1,0.2s0,-0.2 0.2,-0.3a14.7,14.7 0,0 1,1.3 -2v-0.7l0.6,-1.2L41,6.7l1,-1c0.2,-0.2 0.5,-0.5 0.6,-0.8 0.2,-0.2 0.2,-0.6 0.2,-0.9l-0.3,-0.6c0,-0.1 0,-0.4 -0.2,-0.5l-0.5,-0.3 -0.3,-0.4 -0.5,-0.1 -1.4,-0.2a39.3,39.3 0,0 0,-9.5 -0.1h-2l-3.7,-0.2 -3,-0.2h-6.8l-2.1,0.2 -2,0.1L5.7,1.7l-1.6,-0.1 -1.8,-0.2h-0.7l-0.4,0.5zM42.1,1.8l-0.6,0.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<vector xmlns:android="http://schemas.android.com/apk/res/android" | |
android:width="100dp" | |
android:height="100dp" | |
android:viewportWidth="100" | |
android:viewportHeight="100"> | |
<group> | |
<clip-path | |
android:pathData="M0,0h100v100H0z"/> | |
<path | |
android:fillColor="@color/car_logo_fill" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open class User(val userId: Int, val userName: String) | |
class Editor(userId: Int, userName: String, val rank: Int) : User(userId, userName) | |
class Moderator(userId: Int, userName: String, val type: Int) : User(userId, userName) | |
class Staff(userId: Int, userName: String, val department: String) : User(userId, userName) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// OverridenFromAnotherFile.kt | |
// Error: getAge() is not visible because is protected | |
val userAge = User().getAge() | |
// Error: getAge() is not visible because inherits the protected modifier | |
val moderatorAge = Moderator().getAge() | |
// getAge() is visible because the modifier is declared explicitly as public | |
val staffAge = Staff().getAge() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Overridden.kt | |
public open class User { | |
protected open fun getAge() = 16 | |
} | |
public class Moderator : User() { | |
// getAge() inherits the protected modifier as default | |
override fun getAge() = 18 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// User is public | |
// The User primary constructor is private | |
class User private constructor(id : Int) { | |
// ... | |
} | |
// Moderator is internal | |
// The Moderator primary constructor is private | |
internal Moderator private constructor(id : Int) { | |
// ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// DifferentModule.kt file | |
// ERROR: numberThree is not visible because this file is in a different module than Internal.kt | |
// ERROR: numberEight is not visible because User() is in a different module than Internal.kt | |
private const val numberEleven = numberThree.plus(User().numberEight) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SameModule.kt file | |
// numberThree is visible because this file is in the same module than Internal.kt | |
// numberEight is visible because this file is in the same module than User | |
private const val numberEleven = numberThree.plus(User().numberEight) |