Move to real generic method syntax (#7235)

This commit is contained in:
Ian Hickson
2017-01-21 20:58:44 -08:00
committed by GitHub
parent 2e196037f5
commit 15a7eb3b6c
60 changed files with 154 additions and 157 deletions

View File

@@ -278,12 +278,11 @@ String requireEnvVar(String name) {
return value;
}
dynamic/*=T*/ requireConfigProperty/*<T>*/(
Map<String, dynamic/*<T>*/ > map, String propertyName) {
T requireConfigProperty<T>(Map<String, dynamic> map, String propertyName) {
if (!map.containsKey(propertyName))
fail('Configuration property not found: $propertyName');
return map[propertyName];
T result = map[propertyName];
return result;
}
String jsonEncode(dynamic data) {

View File

@@ -411,7 +411,7 @@ class CardCollectionState extends State<CardCollection> {
cardCollection = new ScrollableList(
snapOffsetCallback: _snapToCenter ? _toSnapOffset : null,
itemExtent: kFixedCardHeight,
children: _cardIndices.map/*<Widget>*/((int index) => _buildCard(context, index))
children: _cardIndices.map<Widget>((int index) => _buildCard(context, index))
);
} else {
cardCollection = new LazyBlock(