This file contains 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
0eNrsvduSW8mxpvkqbbxmylacI2S2+6JnnmCm72RlZSQrq5QmFsnOSmpv2Ta9+wBIJLAyMxz4PwdGdRBvShJV/BHLTxHh/rvHf795//Hr7Zf7u08P37///Plvb/7838c/+eXNn//y3+Bf2P5/dx8+f3r841/ufvr07uP2zx7+8eX2zZ/f3D3c/vzm7ZtP737e/q/7d3cf3/zz7Zu7Tz/c/tebP4d/vj37Vx5u/+vhy8d3D7c3H9/d/3R788vD50+3K4z4z+/evrn99HD3cHf7uIbd//jH95++/vz+9n7zI89+/ebDX9/dfbrZ/+jbN18+/7L5m58/bX9/u6LU/lTevvnHmz/fxM1/++d2gS/w4gHvl4cN4k9/fbjZfdYEazwhzXCSjJPbKZz8/PvML8v92Ze9ffPD3f3th8d/I09wC5FbCmflVtXvTeGk3JqME0/KrWtySxHKbRxwP3y9//vtD6Z19D1qfI5ZJphh4UY3VUII4uqysbrZF4fITXm+uqStLgUiu8wNb766Iq4uEtlVbs7z1TVuImkK1FHAzOngHvGle8QZ/ODGMl1nXLhe50Boh0gRfnCMXMPzdSYaWZbnq6sz0MzNJkxXV3S9pgPQeelVGrBefHSagTZug/OP7jRgKSoZ3LCnq0u6h0SgkhRoHBRUkhxeMv/oxM57B28O/aU3hxk88Jcn4PYcts1gC4cdglQr9u4N7AyIe4wB1GWgEuYfOtvk0+Cw7by284KMqUTbmGbqyUH3dGBMObKjO3SBnPiqBVvN/Jw2N7FccCgxgPSzWQK2mhuHVWwVndtSoraqe1jabyahnLfVsnDYdn61Bd7660EYVTnTlehMKgTjclzUs902Iu2AsnCDzyponYPOrLcU5/VAlGxl8APCNwbfnynuvMTB7mZY81Tmg8MKgbyCGxRw6Ro4rODSFe5q0KVrcua7LJeuWT0mA5euxXlXFYVQ1TWDiFEbWzP0ucr2vQgjRtVvYwm4dFs4rODSLejb6dPZIp136RbV1EOc28X |
This file contains 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
abstract class A { | |
@override | |
String toString({int param = 1}) => "A:$param"; | |
} | |
mixin M { | |
String toString() => "M"; | |
} | |
class B extends A with M { |
This file contains 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
#!/usr/bin/env bash | |
# How to use | |
# 1. Put all unzipped SDKs into a folder | |
# 2. Put this file in the same folder | |
# 3. Update the `SYMOLIC_LINK` value to the one reffered by $PATH | |
# 4. call this script from anywhere, it would list all SDKs, and recreate the $SYMOLIC_LINK to the selected SDK | |
SYMOLIC_LINK=~/Workspace/flutter | |
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) |
This file contains 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(const SwitchApp()); | |
class SwitchApp extends StatelessWidget { | |
const SwitchApp({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
This file contains 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
{ | |
"for": { | |
"prefix": "for", | |
"body": ["for(int ${1:i} = ${2:0}; $1 < $3; $1++){", " $4", "}"], | |
"description": "For loop" | |
}, | |
"fore": { | |
"prefix": "fore", | |
"body": ["for(final ${1:item} in ${2: list}){", " $3", "}"], | |
"description": "for each" |
This file contains 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
{ | |
"frf": { | |
"prefix": "frf", | |
"body": [ | |
"import 'package:freezed_annotation/freezed_annotation.dart';", | |
"", | |
"part '$TM_FILENAME_BASE.freezed.dart';", | |
"" | |
], | |
"description": "Frezed - file" |
This file contains 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 DocumentNotFoundException implements Exception { | |
final String path; | |
DocumentNotFoundException(this.path); | |
@override | |
String toString() => | |
'DocumentNotFoundException\n Document $path does not exist.'; | |
} |
This file contains 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
Stream<String> test1(Future<String> future) async* { | |
try { | |
yield "a"; | |
yield await future; | |
yield "b"; | |
} catch (ex) { | |
yield ex.toString(); | |
} | |
yield "c"; | |
} |
This file contains 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
abstract class Stated<T> { | |
const Stated._(); | |
factory Stated.idle() => const _Idle<Never>(); | |
const factory Stated.value(T value) = _Value; | |
TypeChecker<T> typeChecker() => TypeChecker<T>(); | |
void someMethod(Future<T> future) async { | |
print(await future); |
This file contains 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
abstract class Stated<T> { | |
const Stated._(); | |
factory Stated.idle() => const _Idle(); | |
const factory Stated.value(T value) = _Value; | |
Type get valueType => T; | |
} | |
class _Idle<T> extends Stated<T>{ |
NewerOlder