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
import io.reactivex.Observable | |
import io.reactivex.Single | |
import io.reactivex.disposables.Disposables | |
import io.socket.client.IO | |
import io.socket.client.Socket | |
import io.socket.emitter.Emitter | |
class RxIO(uri: String) { | |
private val socket = IO.socket(uri) |
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
import android.content.Context | |
import com.google.android.gms.maps.GoogleMap | |
import com.google.android.gms.maps.SupportMapFragment | |
import io.reactivex.Observable | |
import io.reactivex.Single | |
import io.reactivex.disposables.Disposables | |
@androidx.annotation.CheckResult | |
fun SupportMapFragment.map(): Single<GoogleMap> = | |
Single.create { emitter -> |
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
import 'dart:async'; | |
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter_svg/svg.dart'; | |
import 'package:google_maps_flutter/google_maps_flutter.dart'; | |
/// A button resembling the built-in 'compass' indicator from Google Maps SDK. | |
/// This supports both light and dark themes. Requires material, | |
/// google_maps_flutter and flutter_svg. |
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
import 'package:google_maps_flutter/google_maps_flutter.dart'; | |
List<LatLng> polylineDecode(String polyline) { | |
final codeUnits = polyline.codeUnits; | |
final len = codeUnits.length; | |
// For speed we preallocate to an upper bound on the final length, then | |
// truncate the array before returning. | |
final path = <LatLng>[]; | |
var index = 0; |
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
import 'dart:ui'; | |
extension StringLocalizedCase on String { | |
String toLocalizedUpperCase(Locale locale) { | |
if (locale.languageCode == 'tr' || locale.languageCode == 'az') { | |
return replaceAll('i', 'İ').replaceAll('ı', 'I').toUpperCase(); | |
} | |
return toUpperCase(); | |
} |
OlderNewer