mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Updates samples for latest beta release of the Flutter SDK (#492)
* Updating for beta release * Re-adding pub get to Flutter travis script
This commit is contained in:
@@ -108,25 +108,25 @@ class _$BuiltComplexObjectSerializer
|
||||
result.aListOfStrings.replace(serializers.deserialize(value,
|
||||
specifiedType:
|
||||
const FullType(BuiltList, const [const FullType(String)]))
|
||||
as BuiltList<dynamic>);
|
||||
as BuiltList<Object>);
|
||||
break;
|
||||
case 'aListOfInts':
|
||||
result.aListOfInts.replace(serializers.deserialize(value,
|
||||
specifiedType:
|
||||
const FullType(BuiltList, const [const FullType(int)]))
|
||||
as BuiltList<dynamic>);
|
||||
as BuiltList<Object>);
|
||||
break;
|
||||
case 'aListOfDoubles':
|
||||
result.aListOfDoubles.replace(serializers.deserialize(value,
|
||||
specifiedType:
|
||||
const FullType(BuiltList, const [const FullType(double)]))
|
||||
as BuiltList<dynamic>);
|
||||
as BuiltList<Object>);
|
||||
break;
|
||||
case 'aListOfObjects':
|
||||
result.aListOfObjects.replace(serializers.deserialize(value,
|
||||
specifiedType: const FullType(
|
||||
BuiltList, const [const FullType(BuiltSimpleObject)]))
|
||||
as BuiltList<dynamic>);
|
||||
as BuiltList<Object>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,19 +90,19 @@ class _$BuiltSimpleObjectSerializer
|
||||
result.aListOfStrings.replace(serializers.deserialize(value,
|
||||
specifiedType:
|
||||
const FullType(BuiltList, const [const FullType(String)]))
|
||||
as BuiltList<dynamic>);
|
||||
as BuiltList<Object>);
|
||||
break;
|
||||
case 'aListOfInts':
|
||||
result.aListOfInts.replace(serializers.deserialize(value,
|
||||
specifiedType:
|
||||
const FullType(BuiltList, const [const FullType(int)]))
|
||||
as BuiltList<dynamic>);
|
||||
as BuiltList<Object>);
|
||||
break;
|
||||
case 'aListOfDoubles':
|
||||
result.aListOfDoubles.replace(serializers.deserialize(value,
|
||||
specifiedType:
|
||||
const FullType(BuiltList, const [const FullType(double)]))
|
||||
as BuiltList<dynamic>);
|
||||
as BuiltList<Object>);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// ignore_for_file: argument_type_not_assignable, strong_mode_implicit_dynamic_parameter, strong_mode_implicit_dynamic_variable
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -43,20 +41,20 @@ class BasicsPage extends StatelessWidget {
|
||||
final boldStyle =
|
||||
localTheme.bodyText2.copyWith(fontWeight: FontWeight.w600);
|
||||
|
||||
final dynamic dynamicListOfInts = json.decode(JsonStrings.listOfInts);
|
||||
final dynamicListOfInts = json.decode(JsonStrings.listOfInts) as List;
|
||||
final strongListOfInts = List<int>.from(dynamicListOfInts);
|
||||
|
||||
final dynamic dynamicListOfStrings = json.decode(JsonStrings.listOfStrings);
|
||||
final dynamicListOfStrings = json.decode(JsonStrings.listOfStrings) as List;
|
||||
final strongListOfStrings = List<String>.from(dynamicListOfStrings);
|
||||
|
||||
final dynamic dynamicListOfDoubles = json.decode(JsonStrings.listOfDoubles);
|
||||
final dynamicListOfDoubles = json.decode(JsonStrings.listOfDoubles) as List;
|
||||
final strongListOfDoubles = List<double>.from(dynamicListOfDoubles);
|
||||
|
||||
final dynamic dynamicListOfDynamics =
|
||||
json.decode(JsonStrings.listOfDynamics);
|
||||
final dynamicListOfDynamics =
|
||||
json.decode(JsonStrings.listOfDynamics) as List;
|
||||
final strongListOfDynamics = List<dynamic>.from(dynamicListOfDynamics);
|
||||
|
||||
final dynamic dynamicMapOfDynamics = json.decode(JsonStrings.mapOfDynamics);
|
||||
final dynamicMapOfDynamics = json.decode(JsonStrings.mapOfDynamics) as Map;
|
||||
final strongMapOfDynamics = Map<String, dynamic>.from(dynamicMapOfDynamics);
|
||||
|
||||
return ListView(
|
||||
@@ -151,7 +149,7 @@ class ConvertedSimplePage extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
var objects = JsonStrings.simpleObjects.map(
|
||||
(jsonString) {
|
||||
final dynamic parsedJson = json.decode(jsonString);
|
||||
final parsedJson = json.decode(jsonString) as Map<String, dynamic>;
|
||||
return ConvertedSimpleObject.fromJson(parsedJson);
|
||||
},
|
||||
).toList();
|
||||
@@ -172,7 +170,7 @@ class ConvertedComplexPage extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
var objects = JsonStrings.complexObjects.map(
|
||||
(jsonString) {
|
||||
final dynamic parsedJson = json.decode(jsonString);
|
||||
final parsedJson = json.decode(jsonString) as Map<String, dynamic>;
|
||||
return ConvertedComplexObject.fromJson(parsedJson);
|
||||
},
|
||||
).toList();
|
||||
@@ -191,12 +189,12 @@ class ConvertedComplexPage extends StatelessWidget {
|
||||
class ConvertedListPage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final dynamic parsedJson = json.decode(JsonStrings.listOfSimpleObjects);
|
||||
final parsedJson = json.decode(JsonStrings.listOfSimpleObjects) as List;
|
||||
|
||||
final dynamic deserializedObjects =
|
||||
parsedJson.map((dynamic o) => ConvertedComplexObject.fromJson(o));
|
||||
final deserializedObjects = parsedJson.map((dynamic o) =>
|
||||
ConvertedComplexObject.fromJson(o as Map<String, dynamic>));
|
||||
|
||||
final dynamic listOfObjects = deserializedObjects.toList();
|
||||
final listOfObjects = deserializedObjects.toList();
|
||||
|
||||
return ListView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
@@ -214,7 +212,7 @@ class SerializableSimplePage extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
var objects = JsonStrings.simpleObjects.map(
|
||||
(jsonString) {
|
||||
final dynamic parsedJson = json.decode(jsonString);
|
||||
final parsedJson = json.decode(jsonString) as Map<String, dynamic>;
|
||||
return SerializableSimpleObject.fromJson(parsedJson);
|
||||
},
|
||||
).toList();
|
||||
@@ -235,7 +233,7 @@ class SerializableComplexPage extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
var objects = JsonStrings.complexObjects.map(
|
||||
(jsonString) {
|
||||
final dynamic parsedJson = json.decode(jsonString);
|
||||
final parsedJson = json.decode(jsonString) as Map<String, dynamic>;
|
||||
return SerializableComplexObject.fromJson(parsedJson);
|
||||
},
|
||||
).toList();
|
||||
@@ -254,12 +252,12 @@ class SerializableComplexPage extends StatelessWidget {
|
||||
class SerializableListPage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final dynamic parsedJson = json.decode(JsonStrings.listOfSimpleObjects);
|
||||
final parsedJson = json.decode(JsonStrings.listOfSimpleObjects) as List;
|
||||
|
||||
final dynamic deserializedObjects =
|
||||
parsedJson.map((dynamic o) => SerializableSimpleObject.fromJson(o));
|
||||
final deserializedObjects = parsedJson.map((dynamic o) =>
|
||||
SerializableSimpleObject.fromJson(o as Map<String, dynamic>));
|
||||
|
||||
final dynamic listOfObjects = deserializedObjects.toList();
|
||||
final listOfObjects = deserializedObjects.toList();
|
||||
|
||||
return ListView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
@@ -319,12 +317,13 @@ class BuiltComplexPage extends StatelessWidget {
|
||||
class BuiltListPage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final dynamic parsedJson = json.decode(JsonStrings.listOfSimpleObjects);
|
||||
final parsedJson = json.decode(JsonStrings.listOfSimpleObjects) as List;
|
||||
|
||||
final dynamic deserializedObjects = parsedJson.map((dynamic o) =>
|
||||
serializers.deserializeWith(BuiltComplexObject.serializer, o));
|
||||
final deserializedObjects = parsedJson.map((dynamic o) =>
|
||||
serializers.deserializeWith(
|
||||
BuiltComplexObject.serializer, o as Map<String, dynamic>));
|
||||
|
||||
final dynamic listOfObjects = deserializedObjects.toList();
|
||||
final listOfObjects = deserializedObjects.toList();
|
||||
|
||||
return ListView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0),
|
||||
|
||||
@@ -15,13 +15,6 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.39.8"
|
||||
archive:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: archive
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.13"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -35,7 +28,7 @@ packages:
|
||||
name: async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.4.1"
|
||||
version: "2.4.2"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -106,6 +99,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "7.1.0"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: characters
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -120,6 +120,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
clock:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: clock
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
code_builder:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -133,7 +140,7 @@ packages:
|
||||
name: collection
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.14.12"
|
||||
version: "1.14.13"
|
||||
convert:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -162,6 +169,13 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.3.6"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: fake_async
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
fixnum:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -214,13 +228,6 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.1.4"
|
||||
image:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.12"
|
||||
io:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -262,7 +269,7 @@ packages:
|
||||
name: matcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.12.6"
|
||||
version: "0.12.8"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -304,7 +311,7 @@ packages:
|
||||
name: path
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.6.4"
|
||||
version: "1.7.0"
|
||||
pedantic:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
@@ -312,13 +319,6 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.9.0"
|
||||
petitparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: petitparser
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
pool:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -386,7 +386,7 @@ packages:
|
||||
name: stack_trace
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.9.3"
|
||||
version: "1.9.5"
|
||||
stream_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -421,7 +421,7 @@ packages:
|
||||
name: test_api
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.2.15"
|
||||
version: "0.2.17"
|
||||
timing:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -435,7 +435,7 @@ packages:
|
||||
name: typed_data
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.6"
|
||||
version: "1.2.0"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -457,13 +457,6 @@ packages:
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
xml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: xml
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.6.1"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -472,4 +465,4 @@ packages:
|
||||
source: hosted
|
||||
version: "2.2.1"
|
||||
sdks:
|
||||
dart: ">=2.7.0 <3.0.0"
|
||||
dart: ">=2.9.0-14.0.dev <3.0.0"
|
||||
|
||||
Reference in New Issue
Block a user