Skip to content

Instantly share code, notes, and snippets.

View data-between-widgets.dart
// Flutter
class CustomCard extends StatelessWidget {
CustomCard({@required this.index, @required
this.onPress});
final index;
final Function onPress;
@override
Widget build(BuildContext context) {
View dart-strong-typing.dart
void main() {
strongTypingExample();
weakTypingExample();
}
void printInts(List<int> a) => print(a);
void strongTypingExample() {
var list = <int>[]; // Removing <int> results in a type error
list.add(1);