Install graphviz
sudo brew install graphviz
Open SequelPro, choose database and export dot
file. Now, run the command:
name: Flutter CI | |
# This workflow is triggered on pushes to the repository. | |
on: | |
push: | |
branches: | |
- master | |
# This is a basic workflow to help you get started with Actions | |
name: CD Internal-Lane | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
tags: | |
- "internal-v*.*.*" # on every version tag will build a new android artifact example: v3.1.2+6 | |
jobs: |
#!/bin/bash | |
# Delete Archived Applications | |
rm -r ~/Library/Developer/Xcode/Archives/*/ | |
# Delete Devired Data | |
rm -r ~/Library/Developer/Xcode/DerivedData/*/ | |
# Delete Apple cached files | |
rm -r ~/Library/Developer/CoreSimulator/Caches/dyld/*/*/ |
import 'dart:convert'; | |
Map<String, dynamic> parseJwt(String token) { | |
final parts = token.split('.'); | |
if (parts.length != 3) { | |
throw Exception('invalid token'); | |
} | |
final payload = _decodeBase64(parts[1]); | |
final payloadMap = json.decode(payload); |
import 'dart:async'; | |
import 'dart:convert'; | |
import 'package:flutter/material.dart'; | |
import 'package:http/http.dart' as http; | |
void main() => runApp(MaterialApp( | |
home: MyApp(), | |
)); |
A quick cheatsheet of useful snippet for Flutter
A widget is the basic type of controller in Flutter Material.
There are two type of basic Widget we can extend our classes: StatefulWidget
or StatelessWidget
.
StatefulWidget are all the widget that interally have a dynamic value that can change during usage. It can receive an input value in the constructor or reference to functions. You need to create two classes like:
/* | |
reference link ->https://www.opengeeks.me/2015/08/filechooser-and-android-webview/ | |
https://github.com/OpenGeeksMe/Android-File-Chooser | |
*/ | |
import android.app.Activity; | |
import android.app.ProgressDialog; | |
import android.content.Intent; | |
import android.graphics.Bitmap; | |
import android.net.Uri; |
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
const axios = require('axios'); // promised based requests - like fetch() | |
function getCoffee() { | |
return new Promise(resolve => { | |
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
}); | |
} |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.