Skip to content

Instantly share code, notes, and snippets.

Avatar

Randy Sugianto (Yuku) yukuku

  • Indeed
  • Singapore
View GitHub Profile
View main.dart
Future<dynamic> f() async {
throw 'f';
}
dynamic g() {
throw 'g';
}
void main() async {
try {
@yukuku
yukuku / Debouncer.java
Last active Oct 29, 2015
Debouncer for Android: Delays processing of a payload, and if another payload is submitted afterwards, the earlier ones are not processed nor delivered any more.
View Debouncer.java
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import java.lang.ref.WeakReference;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
View MaterialDialogPreference.java
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.preference.DialogPreference;
import android.preference.PreferenceManager;
import android.util.AttributeSet;
import android.view.View;
import android.view.Window;
View designer.html
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../paper-toast/paper-toast.html">
<polymer-element name="my-element">