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
$1(k1:v1, k2:v2,...kn:vn) | |
//$1 - Class name | |
//k1..kn - Reference method parameter | |
//v1..vn - Value of method parameter | |
MyWidget(name: categoryName, color: categoryColor, iconLocation: categoryIcon) |
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 '$1'; | |
//$1 - Module Import | |
import 'package:meta/meta.dart'; |
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
//SYNTAX | |
class $1 extends StatelessWidget { | |
final T1 v1; | |
var T2 v2; | |
const $1({ | |
Key key, | |
@required this.v1, | |
this.v2, | |
}) : assert( v1 != null ), |
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
//Syntax | |
class Api { | |
final HttpClient _httpClient = HttpClient(); | |
final String _url = 'urltoaccess.com'; | |
//GET /$path/B | |
Future<TypeToConvert> callType1( | |
String path, String param1, String param2, String param3) async { | |
final uri = Uri.https(_url, '/$path/B', | |
{'param1': param1, 'param2': param2, 'param3': param3}); |
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
final api = Api(); | |
final result = await api.callType1(convert, | |
param1, param2, param3); | |
if (result == null) { | |
setState(() { | |
_showErrorUI = true; | |
}); | |
} else { | |
setState(() { |
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
{ | |
"H1": [ | |
{ | |
"K1": "V1", | |
"K2": 1.0 | |
}, | |
{ | |
"K1": "V2", | |
"K2": 2.0 | |
} |
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 T1 extends StatelessWidget { | |
final T1 v1; | |
const $1({ | |
Key key, | |
@required this.v1, | |
}) : assert( v1 != null ), | |
super(key: key); | |
@override |
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 CategoryRoute extends StatefulWidget { | |
const CategoryRoute(); | |
@override | |
_CategoryRouteState createState() => _CategoryRouteState(); | |
} | |
class _CategoryRouteState extends State<CategoryRoute> { | |
final _categories = <Category>[]; |