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 java.io.IOException; | |
import java.util.concurrent.TimeUnit; | |
import rx.Observable; | |
import rx.functions.Func1; | |
import rx.functions.Func2; | |
import rx.schedulers.Schedulers; | |
/** | |
* Created by jimmy on 30/05/2017. |
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 | |
# This Scrip generates a common ANDROID DEV Key to be used by all develovers | |
# instead of using the one created by Android Studio. | |
# This will help when integrating with services like Firebase or when sending | |
# a dev apk to the team. | |
# ------------------------------------------------------------------------------------------------ | |
# Example of configuration: https://coderwall.com/p/r09hoq/android-generate-release-debug-keystores |
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.graphics.Typeface | |
import androidx.compose.foundation.Canvas | |
import androidx.compose.foundation.background | |
import androidx.compose.foundation.layout.BoxWithConstraints | |
import androidx.compose.foundation.layout.Column | |
import androidx.compose.foundation.layout.Row | |
import androidx.compose.foundation.layout.RowScope | |
import androidx.compose.foundation.layout.fillMaxHeight | |
import androidx.compose.foundation.layout.fillMaxWidth | |
import androidx.compose.runtime.Composable |
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:math'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: CounterMagnification(), |
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 -ex | |
# NOTE: ANDROID_HOME must be configured as an environment variable. | |
# Kill all the existing adb servers and start over a new adb server. | |
function restart_adb_server() { | |
echo "********************* Restarting adb ... *********************" | |
adb kill-server | |
sleep 2 | |
adb start-server | |
sleep 2 |
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'; | |
GlobalKey _keyMyApp = GlobalKey(); | |
GlobalKey _keyMaterialApp = GlobalKey(); | |
GlobalKey _keyHomePage = GlobalKey(); | |
GlobalKey _keyScaffold = GlobalKey(); | |
GlobalKey _keyAppbar = GlobalKey(); | |
GlobalKey _keyCenter = GlobalKey(); | |
GlobalKey _keyFAB = GlobalKey(); | |
GlobalKey _keyText = GlobalKey(); |
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
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
theme: ThemeData( | |
primarySwatch: Colors.blue, | |
visualDensity: VisualDensity.adaptivePlatformDensity, | |
), | |
home: MyHomePage(title: 'Flutter Demo Home Page'), |
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:convert'; | |
import 'dart:io'; | |
import 'package:ansicolor/ansicolor.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:http/http.dart' as http; | |
void main() { | |
runZoned( |
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:convert'; | |
import 'dart:io'; | |
Future<void> main() async { | |
// We'll create a local server that will be listening for requests at port 8082 | |
final server = await HttpServer.bind('127.0.0.1', 8082); | |
await for (HttpRequest req in server) { | |
// All requests will be logged into a local 'logs.tmp' file | |
final File file = File('./logs.tmp'); |
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
void main() async { | |
// Do not include it when building for production | |
Stetho.initialize(); | |
// Run the app | |
runApp(MyApp()); | |
} |
NewerOlder