Skip to content

Instantly share code, notes, and snippets.

View theshivamlko's full-sized avatar
🏠
Working from home

shivam srivastava theshivamlko

🏠
Working from home
View GitHub Profile
Container(
height: AppUtils.deviceHeight,
child: FlutterMap(
mapController: mapController,
options: MapOptions(
zoom: 10, minZoom: 2, plugins: [MarkerClusterPlugin()]),
layers: [
TileLayerOptions(
maxZoom: 10,
keepBuffer: 4,
// https://navoki.com
import 'package:http/http.dart' as http;
void main() {
getUserData().then((response) {
print('Response: $response');
}).catchError((error) {
if (error is SocketException)
print('Show UI, Internet Not Available!');
else if (error is TimeoutException)
// https://navoki.com
import 'dart:async';
import 'package:http/http.dart' as http;
void main() {
StreamSubscription<String> streamSubscription;
streamSubscription = getUserData().asStream().listen((value) {
// https://navoki.com
import 'package:http/http.dart' as http;
void main() {
getUserData().then((response) {
print('User Registered: $response');
});
}
// https://navoki.com
import 'package:http/http.dart' as http;
void main() {
getUserData().then((response) {
print('Response: $response');
});
}
Future<String> getUserData()async {
// https://navoki.com
main() {
print("Message 1");
getSum().then((value){
print("Sum: $value");
print("Message 2");
// https://navoki.com
main() {
print("Message 1");
getSum().then((value){
print("Sum: $value");
print("Message 2");
// https://navoki.com
main() {
print("Message 1");
getSum().then((value){
print("Sum: $value");
print("Message 2");