Skip to content

Instantly share code, notes, and snippets.

View nurmaj's full-sized avatar

Nurma J nurmaj

  • Bishkek, Kyrgyzstan
View GitHub Profile
import android.content.Context
import android.net.ConnectivityManager
import android.net.Network
import android.net.NetworkCapabilities
import android.net.NetworkRequest
import kotlinx.coroutines.channels.awaitClose
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.callbackFlow
interface ConnectivityObserver {
@nurmaj
nurmaj / TabViewRotationFix.swift
Last active September 20, 2022 05:18
SwiftUI TabView Orientation change fix
import SwiftUI
struct TabViewRotationFix: View {
@State
private var selectedTab = Int.zero
@State
private var isLandscape = false
var body: some View {
GeometryReader { proxy in
ScrollView {