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.os.Build; | |
| import java.lang.reflect.Method; | |
| public class Device { | |
| /** | |
| * @return The device's serial number, visible to the user in {@code Settings > About phone/tablet/device > Status | |
| * > Serial number}, or {@code null} if the serial number couldn't be found | |
| */ | |
| public static String getSerialNumber() { |
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:async/async.dart'; | |
| import 'package:flutter/material.dart'; | |
| final navigatorKey = GlobalKey<NavigatorState>(); | |
| class InactivityObserver extends StatefulWidget { | |
| const InactivityObserver({ | |
| super.key, | |
| required this.inactivityTimeout, | |
| required this.child, |
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
| package app.munch.facebookappevents; | |
| import android.os.Bundle; | |
| import com.facebook.appevents.AppEventsLogger; | |
| import io.flutter.plugin.common.MethodCall; | |
| import io.flutter.plugin.common.MethodChannel; | |
| import io.flutter.plugin.common.MethodChannel.MethodCallHandler; | |
| import io.flutter.plugin.common.MethodChannel.Result; | |
| import io.flutter.plugin.common.PluginRegistry.Registrar; |
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:flutter/material.dart'; | |
| void main() => runApp(new MyApp()); | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return new MaterialApp( | |
| title: 'Flutter Demo', | |
| theme: new ThemeData( |
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
| #!/bin/bash | |
| # only works atm if only one jdk package in downloads | |
| DOWNLOADS=$HOME/Downloads | |
| CURRENT_VERSION=$(java -version 2>&1) | |
| JDK=` ls $DOWNLOADS | grep "jdk"` | |
| STUDIO_URL=http://dl.google.com/android/studio/install/0.3.2/android-studio-bundle-132.893413-linux.tgz | |
| if [ "uname -m" == "i386" -o "uname -m" == "i686" ]; then | |
| ARCH=32 | |
| else |