Skip to content

Instantly share code, notes, and snippets.

main() {
double lat = 74.4312, long = 12.3321;
print('$lat:$long');
}
java.lang.RuntimeException:
at com.google.firebase.firestore.util.AsyncQueue.access$000 (AsyncQueue.java)
or .access$100 (AsyncQueue.java)
or .callTask (AsyncQueue.java)
or .containsDelayedTask (AsyncQueue.java)
or .enqueue (AsyncQueue.java)
or .enqueueAfterDelay (AsyncQueue.java)
or .getExecutor (AsyncQueue.java)
or .lambda$callTask$0 (AsyncQueue.java)
or .lambda$callTask$1 (AsyncQueue.java)
@creativecreatorormaybenot
creativecreatorormaybenot / gist:fa3b8410e6ba167d35ec1c28d81ad593
Created July 23, 2019 07:41
android.database.CursorWindowAllocationException in android.database.CursorWindow.<init> (j3popltespr, Android 6.0)
java.lang.RuntimeException:
at com.google.firebase.firestore.util.AsyncQueue.access$000 (AsyncQueue.java)
or .access$100 (AsyncQueue.java)
or .callTask (AsyncQueue.java)
or .containsDelayedTask (AsyncQueue.java)
or .enqueue (AsyncQueue.java)
or .enqueueAfterDelay (AsyncQueue.java)
or .getExecutor (AsyncQueue.java)
or .lambda$callTask$0 (AsyncQueue.java)
or .lambda$callTask$1 (AsyncQueue.java)
@creativecreatorormaybenot
creativecreatorormaybenot / gist:f9e5f3a6e39db32b55077f401a6eea92
Created July 23, 2019 07:44
android.database.CursorWindowAllocationExceptionin in io.grpc.ForwardingClientCallListener.onClose (j3popltespr, Android 6.0)
java.lang.RuntimeException:
at com.google.firebase.firestore.util.AsyncQueue.access$000 (AsyncQueue.java)
or .access$100 (AsyncQueue.java)
or .callTask (AsyncQueue.java)
or .containsDelayedTask (AsyncQueue.java)
or .enqueue (AsyncQueue.java)
or .enqueueAfterDelay (AsyncQueue.java)
or .getExecutor (AsyncQueue.java)
or .lambda$callTask$0 (AsyncQueue.java)
or .lambda$callTask$1 (AsyncQueue.java)
import 'package:flutter/material.dart';
main() {
runApp(MaterialApp(
home: Scaffold(
body: SafeArea(
child: Stack(
children: <Widget>[
const Lines(),
const IgnorePointer(
[√] Flutter (Channel master, v1.8.2-pre.165, on Windows 10, locale en-US)
• Flutter version 1.8.2-pre.165 at flutterRoot
• Framework revision 53186706de (16 hours ago), 2019-07-23 23:06:40 -0400
• Engine revision ef99738baf
• Dart version 2.5.0 (build 2.5.0-dev.1.0 fedd74669a)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
• Android SDK at androidSdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.0
import 'dart:convert';
void main() {
final String string = '[{"name": "Dart", "value": 1}]';
final data = jsonDecode(string);
print(data[0]['name']);
print(data[0]['value']);
}
@creativecreatorormaybenot
creativecreatorormaybenot / main.dart
Last active July 25, 2019 19:55
NonStopTickerProviderMixin
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart';
mixin NonStopTickerProviderMixin implements TickerProvider {
@override
Ticker createTicker(TickerCallback onTick) => Ticker(onTick);
}
void main() {
runApp(MaterialApp(home: const Init()));
@creativecreatorormaybenot
creativecreatorormaybenot / navigation_notifier.dart
Last active July 26, 2019 04:54
If you want your State.didChangeDependencies method to be called when a new route is pushed or popped above, just use this mixin.
import 'package:flutter/material.dart';
/// When using this mixin by appending `with NavigationNotifierMixin` to
/// your [State], your [State.didChangeDependencies] method will be called
/// every time the [Navigator] pushes a route or pops any route above the
/// route your [StatefulWidget] lives in.
mixin NavigationNotifierMixin<T extends StatefulWidget> on State<T> {
@override
void didChangeDependencies() {
// The TickerMode InheritedWidget changes when navigating,
import 'template_string.dart';
main() {
final templateUrl = TemplateString('{host}/api/v3/{container}/{resourceid}');
final params = <String, dynamic>{'host': 'www.api.com', 'container': 'books', 'resourceid': 10};
print(templateUrl.format(params)); // www.api.com/api/v3/books/10
print(TemplateString('no parameters').format({})); // no parameters
print(TemplateString('{only}{parameters}')