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
Stream<String> delayedTextStream() async* { | |
for (int i = 1; i <= 5; i++) { | |
await Future.delayed(Duration(seconds: 2)); | |
yield 'Text $i'; | |
} | |
} | |
Future<void> main() async { | |
Stream<String> stream = delayedTextStream(); |
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
package com.example.basketballjetpack | |
import androidx.compose.foundation.layout.Arrangement | |
import androidx.compose.foundation.layout.Column | |
import androidx.compose.foundation.layout.Row | |
import androidx.compose.foundation.layout.fillMaxSize | |
import androidx.compose.foundation.layout.padding | |
import androidx.compose.material3.Button | |
import androidx.compose.material3.Scaffold | |
import androidx.compose.material3.Text |
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
package com.example.firstkotlin | |
import kotlinx.coroutines.Deferred | |
import kotlinx.coroutines.async | |
import kotlinx.coroutines.delay | |
import kotlinx.coroutines.launch | |
import kotlinx.coroutines.runBlocking | |
import kotlin.random.Random | |
import kotlin.time.Duration | |
import kotlin.time.Duration.Companion.seconds |
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
package com.example.basketball; | |
import android.os.Bundle; | |
import android.widget.Button; | |
import android.widget.TextView; | |
import androidx.activity.EdgeToEdge; | |
import androidx.appcompat.app.AppCompatActivity; | |
import androidx.core.graphics.Insets; | |
import androidx.core.view.ViewCompat; |