1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-10 14:58:34 +00:00

Landing beta changes in master for the new stable release (#747)

This commit is contained in:
Andrew Brogdon
2021-03-03 11:44:35 -08:00
committed by GitHub
parent 6c81510d6e
commit 8c1cd0b049
101 changed files with 1006 additions and 1040 deletions

View File

@@ -9,11 +9,7 @@
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@@ -26,8 +22,6 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@@ -38,13 +32,11 @@
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@@ -57,8 +49,6 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -68,9 +58,7 @@
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B80C3931E831B6300D905FE /* App.framework */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEBA1CF902C7004384FC /* Flutter.framework */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
@@ -201,7 +189,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
@@ -253,7 +241,6 @@
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -330,7 +317,6 @@
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
@@ -386,7 +372,6 @@
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;

View File

@@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
location = "self:">
</FileRef>
</Workspace>

View File

@@ -14,29 +14,21 @@ abstract class BuiltComplexObject
static Serializer<BuiltComplexObject> get serializer =>
_$builtComplexObjectSerializer;
@nullable
String get aString;
String? get aString;
@nullable
int get anInt;
int? get anInt;
@nullable
double get aDouble;
double? get aDouble;
@nullable
BuiltSimpleObject get anObject;
BuiltSimpleObject? get anObject;
@nullable
BuiltList<String> get aListOfStrings;
BuiltList<String>? get aListOfStrings;
@nullable
BuiltList<int> get aListOfInts;
BuiltList<int>? get aListOfInts;
@nullable
BuiltList<double> get aListOfDoubles;
BuiltList<double>? get aListOfDoubles;
@nullable
BuiltList<BuiltSimpleObject> get aListOfObjects;
BuiltList<BuiltSimpleObject>? get aListOfObjects;
BuiltComplexObject._();

View File

@@ -20,55 +20,63 @@ class _$BuiltComplexObjectSerializer
Iterable<Object> serialize(Serializers serializers, BuiltComplexObject object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[];
if (object.aString != null) {
Object? value;
value = object.aString;
if (value != null) {
result
..add('aString')
..add(serializers.serialize(object.aString,
..add(serializers.serialize(value,
specifiedType: const FullType(String)));
}
if (object.anInt != null) {
value = object.anInt;
if (value != null) {
result
..add('anInt')
..add(serializers.serialize(object.anInt,
specifiedType: const FullType(int)));
..add(serializers.serialize(value, specifiedType: const FullType(int)));
}
if (object.aDouble != null) {
value = object.aDouble;
if (value != null) {
result
..add('aDouble')
..add(serializers.serialize(object.aDouble,
..add(serializers.serialize(value,
specifiedType: const FullType(double)));
}
if (object.anObject != null) {
value = object.anObject;
if (value != null) {
result
..add('anObject')
..add(serializers.serialize(object.anObject,
..add(serializers.serialize(value,
specifiedType: const FullType(BuiltSimpleObject)));
}
if (object.aListOfStrings != null) {
value = object.aListOfStrings;
if (value != null) {
result
..add('aListOfStrings')
..add(serializers.serialize(object.aListOfStrings,
..add(serializers.serialize(value,
specifiedType:
const FullType(BuiltList, const [const FullType(String)])));
}
if (object.aListOfInts != null) {
value = object.aListOfInts;
if (value != null) {
result
..add('aListOfInts')
..add(serializers.serialize(object.aListOfInts,
..add(serializers.serialize(value,
specifiedType:
const FullType(BuiltList, const [const FullType(int)])));
}
if (object.aListOfDoubles != null) {
value = object.aListOfDoubles;
if (value != null) {
result
..add('aListOfDoubles')
..add(serializers.serialize(object.aListOfDoubles,
..add(serializers.serialize(value,
specifiedType:
const FullType(BuiltList, const [const FullType(double)])));
}
if (object.aListOfObjects != null) {
value = object.aListOfObjects;
if (value != null) {
result
..add('aListOfObjects')
..add(serializers.serialize(object.aListOfObjects,
..add(serializers.serialize(value,
specifiedType: const FullType(
BuiltList, const [const FullType(BuiltSimpleObject)])));
}
@@ -85,7 +93,7 @@ class _$BuiltComplexObjectSerializer
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
final Object value = iterator.current;
switch (key) {
case 'aString':
result.aString = serializers.deserialize(value,
@@ -137,24 +145,24 @@ class _$BuiltComplexObjectSerializer
class _$BuiltComplexObject extends BuiltComplexObject {
@override
final String aString;
final String? aString;
@override
final int anInt;
final int? anInt;
@override
final double aDouble;
final double? aDouble;
@override
final BuiltSimpleObject anObject;
final BuiltSimpleObject? anObject;
@override
final BuiltList<String> aListOfStrings;
final BuiltList<String>? aListOfStrings;
@override
final BuiltList<int> aListOfInts;
final BuiltList<int>? aListOfInts;
@override
final BuiltList<double> aListOfDoubles;
final BuiltList<double>? aListOfDoubles;
@override
final BuiltList<BuiltSimpleObject> aListOfObjects;
final BuiltList<BuiltSimpleObject>? aListOfObjects;
factory _$BuiltComplexObject(
[void Function(BuiltComplexObjectBuilder) updates]) =>
[void Function(BuiltComplexObjectBuilder)? updates]) =>
(new BuiltComplexObjectBuilder()..update(updates)).build();
_$BuiltComplexObject._(
@@ -224,62 +232,63 @@ class _$BuiltComplexObject extends BuiltComplexObject {
class BuiltComplexObjectBuilder
implements Builder<BuiltComplexObject, BuiltComplexObjectBuilder> {
_$BuiltComplexObject _$v;
_$BuiltComplexObject? _$v;
String _aString;
String get aString => _$this._aString;
set aString(String aString) => _$this._aString = aString;
String? _aString;
String? get aString => _$this._aString;
set aString(String? aString) => _$this._aString = aString;
int _anInt;
int get anInt => _$this._anInt;
set anInt(int anInt) => _$this._anInt = anInt;
int? _anInt;
int? get anInt => _$this._anInt;
set anInt(int? anInt) => _$this._anInt = anInt;
double _aDouble;
double get aDouble => _$this._aDouble;
set aDouble(double aDouble) => _$this._aDouble = aDouble;
double? _aDouble;
double? get aDouble => _$this._aDouble;
set aDouble(double? aDouble) => _$this._aDouble = aDouble;
BuiltSimpleObjectBuilder _anObject;
BuiltSimpleObjectBuilder? _anObject;
BuiltSimpleObjectBuilder get anObject =>
_$this._anObject ??= new BuiltSimpleObjectBuilder();
set anObject(BuiltSimpleObjectBuilder anObject) =>
set anObject(BuiltSimpleObjectBuilder? anObject) =>
_$this._anObject = anObject;
ListBuilder<String> _aListOfStrings;
ListBuilder<String>? _aListOfStrings;
ListBuilder<String> get aListOfStrings =>
_$this._aListOfStrings ??= new ListBuilder<String>();
set aListOfStrings(ListBuilder<String> aListOfStrings) =>
set aListOfStrings(ListBuilder<String>? aListOfStrings) =>
_$this._aListOfStrings = aListOfStrings;
ListBuilder<int> _aListOfInts;
ListBuilder<int>? _aListOfInts;
ListBuilder<int> get aListOfInts =>
_$this._aListOfInts ??= new ListBuilder<int>();
set aListOfInts(ListBuilder<int> aListOfInts) =>
set aListOfInts(ListBuilder<int>? aListOfInts) =>
_$this._aListOfInts = aListOfInts;
ListBuilder<double> _aListOfDoubles;
ListBuilder<double>? _aListOfDoubles;
ListBuilder<double> get aListOfDoubles =>
_$this._aListOfDoubles ??= new ListBuilder<double>();
set aListOfDoubles(ListBuilder<double> aListOfDoubles) =>
set aListOfDoubles(ListBuilder<double>? aListOfDoubles) =>
_$this._aListOfDoubles = aListOfDoubles;
ListBuilder<BuiltSimpleObject> _aListOfObjects;
ListBuilder<BuiltSimpleObject>? _aListOfObjects;
ListBuilder<BuiltSimpleObject> get aListOfObjects =>
_$this._aListOfObjects ??= new ListBuilder<BuiltSimpleObject>();
set aListOfObjects(ListBuilder<BuiltSimpleObject> aListOfObjects) =>
set aListOfObjects(ListBuilder<BuiltSimpleObject>? aListOfObjects) =>
_$this._aListOfObjects = aListOfObjects;
BuiltComplexObjectBuilder();
BuiltComplexObjectBuilder get _$this {
if (_$v != null) {
_aString = _$v.aString;
_anInt = _$v.anInt;
_aDouble = _$v.aDouble;
_anObject = _$v.anObject?.toBuilder();
_aListOfStrings = _$v.aListOfStrings?.toBuilder();
_aListOfInts = _$v.aListOfInts?.toBuilder();
_aListOfDoubles = _$v.aListOfDoubles?.toBuilder();
_aListOfObjects = _$v.aListOfObjects?.toBuilder();
final $v = _$v;
if ($v != null) {
_aString = $v.aString;
_anInt = $v.anInt;
_aDouble = $v.aDouble;
_anObject = $v.anObject?.toBuilder();
_aListOfStrings = $v.aListOfStrings?.toBuilder();
_aListOfInts = $v.aListOfInts?.toBuilder();
_aListOfDoubles = $v.aListOfDoubles?.toBuilder();
_aListOfObjects = $v.aListOfObjects?.toBuilder();
_$v = null;
}
return this;
@@ -287,14 +296,12 @@ class BuiltComplexObjectBuilder
@override
void replace(BuiltComplexObject other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
ArgumentError.checkNotNull(other, 'other');
_$v = other as _$BuiltComplexObject;
}
@override
void update(void Function(BuiltComplexObjectBuilder) updates) {
void update(void Function(BuiltComplexObjectBuilder)? updates) {
if (updates != null) updates(this);
}
@@ -313,7 +320,7 @@ class BuiltComplexObjectBuilder
aListOfDoubles: _aListOfDoubles?.build(),
aListOfObjects: _aListOfObjects?.build());
} catch (_) {
String _$failedField;
late String _$failedField;
try {
_$failedField = 'anObject';
_anObject?.build();

View File

@@ -13,23 +13,17 @@ abstract class BuiltSimpleObject
static Serializer<BuiltSimpleObject> get serializer =>
_$builtSimpleObjectSerializer;
@nullable
String get aString;
String? get aString;
@nullable
int get anInt;
int? get anInt;
@nullable
double get aDouble;
double? get aDouble;
@nullable
BuiltList<String> get aListOfStrings;
BuiltList<String>? get aListOfStrings;
@nullable
BuiltList<int> get aListOfInts;
BuiltList<int>? get aListOfInts;
@nullable
BuiltList<double> get aListOfDoubles;
BuiltList<double>? get aListOfDoubles;
BuiltSimpleObject._();

View File

@@ -20,42 +20,48 @@ class _$BuiltSimpleObjectSerializer
Iterable<Object> serialize(Serializers serializers, BuiltSimpleObject object,
{FullType specifiedType = FullType.unspecified}) {
final result = <Object>[];
if (object.aString != null) {
Object? value;
value = object.aString;
if (value != null) {
result
..add('aString')
..add(serializers.serialize(object.aString,
..add(serializers.serialize(value,
specifiedType: const FullType(String)));
}
if (object.anInt != null) {
value = object.anInt;
if (value != null) {
result
..add('anInt')
..add(serializers.serialize(object.anInt,
specifiedType: const FullType(int)));
..add(serializers.serialize(value, specifiedType: const FullType(int)));
}
if (object.aDouble != null) {
value = object.aDouble;
if (value != null) {
result
..add('aDouble')
..add(serializers.serialize(object.aDouble,
..add(serializers.serialize(value,
specifiedType: const FullType(double)));
}
if (object.aListOfStrings != null) {
value = object.aListOfStrings;
if (value != null) {
result
..add('aListOfStrings')
..add(serializers.serialize(object.aListOfStrings,
..add(serializers.serialize(value,
specifiedType:
const FullType(BuiltList, const [const FullType(String)])));
}
if (object.aListOfInts != null) {
value = object.aListOfInts;
if (value != null) {
result
..add('aListOfInts')
..add(serializers.serialize(object.aListOfInts,
..add(serializers.serialize(value,
specifiedType:
const FullType(BuiltList, const [const FullType(int)])));
}
if (object.aListOfDoubles != null) {
value = object.aListOfDoubles;
if (value != null) {
result
..add('aListOfDoubles')
..add(serializers.serialize(object.aListOfDoubles,
..add(serializers.serialize(value,
specifiedType:
const FullType(BuiltList, const [const FullType(double)])));
}
@@ -72,7 +78,7 @@ class _$BuiltSimpleObjectSerializer
while (iterator.moveNext()) {
final key = iterator.current as String;
iterator.moveNext();
final dynamic value = iterator.current;
final Object value = iterator.current;
switch (key) {
case 'aString':
result.aString = serializers.deserialize(value,
@@ -113,20 +119,20 @@ class _$BuiltSimpleObjectSerializer
class _$BuiltSimpleObject extends BuiltSimpleObject {
@override
final String aString;
final String? aString;
@override
final int anInt;
final int? anInt;
@override
final double aDouble;
final double? aDouble;
@override
final BuiltList<String> aListOfStrings;
final BuiltList<String>? aListOfStrings;
@override
final BuiltList<int> aListOfInts;
final BuiltList<int>? aListOfInts;
@override
final BuiltList<double> aListOfDoubles;
final BuiltList<double>? aListOfDoubles;
factory _$BuiltSimpleObject(
[void Function(BuiltSimpleObjectBuilder) updates]) =>
[void Function(BuiltSimpleObjectBuilder)? updates]) =>
(new BuiltSimpleObjectBuilder()..update(updates)).build();
_$BuiltSimpleObject._(
@@ -185,48 +191,49 @@ class _$BuiltSimpleObject extends BuiltSimpleObject {
class BuiltSimpleObjectBuilder
implements Builder<BuiltSimpleObject, BuiltSimpleObjectBuilder> {
_$BuiltSimpleObject _$v;
_$BuiltSimpleObject? _$v;
String _aString;
String get aString => _$this._aString;
set aString(String aString) => _$this._aString = aString;
String? _aString;
String? get aString => _$this._aString;
set aString(String? aString) => _$this._aString = aString;
int _anInt;
int get anInt => _$this._anInt;
set anInt(int anInt) => _$this._anInt = anInt;
int? _anInt;
int? get anInt => _$this._anInt;
set anInt(int? anInt) => _$this._anInt = anInt;
double _aDouble;
double get aDouble => _$this._aDouble;
set aDouble(double aDouble) => _$this._aDouble = aDouble;
double? _aDouble;
double? get aDouble => _$this._aDouble;
set aDouble(double? aDouble) => _$this._aDouble = aDouble;
ListBuilder<String> _aListOfStrings;
ListBuilder<String>? _aListOfStrings;
ListBuilder<String> get aListOfStrings =>
_$this._aListOfStrings ??= new ListBuilder<String>();
set aListOfStrings(ListBuilder<String> aListOfStrings) =>
set aListOfStrings(ListBuilder<String>? aListOfStrings) =>
_$this._aListOfStrings = aListOfStrings;
ListBuilder<int> _aListOfInts;
ListBuilder<int>? _aListOfInts;
ListBuilder<int> get aListOfInts =>
_$this._aListOfInts ??= new ListBuilder<int>();
set aListOfInts(ListBuilder<int> aListOfInts) =>
set aListOfInts(ListBuilder<int>? aListOfInts) =>
_$this._aListOfInts = aListOfInts;
ListBuilder<double> _aListOfDoubles;
ListBuilder<double>? _aListOfDoubles;
ListBuilder<double> get aListOfDoubles =>
_$this._aListOfDoubles ??= new ListBuilder<double>();
set aListOfDoubles(ListBuilder<double> aListOfDoubles) =>
set aListOfDoubles(ListBuilder<double>? aListOfDoubles) =>
_$this._aListOfDoubles = aListOfDoubles;
BuiltSimpleObjectBuilder();
BuiltSimpleObjectBuilder get _$this {
if (_$v != null) {
_aString = _$v.aString;
_anInt = _$v.anInt;
_aDouble = _$v.aDouble;
_aListOfStrings = _$v.aListOfStrings?.toBuilder();
_aListOfInts = _$v.aListOfInts?.toBuilder();
_aListOfDoubles = _$v.aListOfDoubles?.toBuilder();
final $v = _$v;
if ($v != null) {
_aString = $v.aString;
_anInt = $v.anInt;
_aDouble = $v.aDouble;
_aListOfStrings = $v.aListOfStrings?.toBuilder();
_aListOfInts = $v.aListOfInts?.toBuilder();
_aListOfDoubles = $v.aListOfDoubles?.toBuilder();
_$v = null;
}
return this;
@@ -234,14 +241,12 @@ class BuiltSimpleObjectBuilder
@override
void replace(BuiltSimpleObject other) {
if (other == null) {
throw new ArgumentError.notNull('other');
}
ArgumentError.checkNotNull(other, 'other');
_$v = other as _$BuiltSimpleObject;
}
@override
void update(void Function(BuiltSimpleObjectBuilder) updates) {
void update(void Function(BuiltSimpleObjectBuilder)? updates) {
if (updates != null) updates(this);
}
@@ -258,7 +263,7 @@ class BuiltSimpleObjectBuilder
aListOfInts: _aListOfInts?.build(),
aListOfDoubles: _aListOfDoubles?.build());
} catch (_) {
String _$failedField;
late String _$failedField;
try {
_$failedField = 'aListOfStrings';
_aListOfStrings?.build();

View File

@@ -16,22 +16,20 @@ class ConvertedComplexObject {
this.aListOfObjects,
});
final String aString;
final int anInt;
final double aDouble;
final ConvertedSimpleObject anObject;
final List<String> aListOfStrings;
final List<int> aListOfInts;
final List<double> aListOfDoubles;
final List<ConvertedSimpleObject> aListOfObjects;
final String? aString;
final int? anInt;
final double? aDouble;
final ConvertedSimpleObject? anObject;
final List<String>? aListOfStrings;
final List<int>? aListOfInts;
final List<double>? aListOfDoubles;
final List<ConvertedSimpleObject>? aListOfObjects;
factory ConvertedComplexObject.fromJson(Map<String, dynamic> json) {
if (json == null) return null;
return ConvertedComplexObject(
aString: json['aString'] as String,
anInt: json['anInt'] as int,
aDouble: json['aDouble'] as double,
aString: json['aString'] as String?,
anInt: json['anInt'] as int?,
aDouble: json['aDouble'] as double?,
anObject: json['anObject'] != null
? ConvertedSimpleObject.fromJson(
json['anObject'] as Map<String, dynamic>)

View File

@@ -12,20 +12,18 @@ class ConvertedSimpleObject {
this.aListOfDoubles,
});
final String aString;
final int anInt;
final double aDouble;
final List<String> aListOfStrings;
final List<int> aListOfInts;
final List<double> aListOfDoubles;
final String? aString;
final int? anInt;
final double? aDouble;
final List<String>? aListOfStrings;
final List<int>? aListOfInts;
final List<double>? aListOfDoubles;
factory ConvertedSimpleObject.fromJson(Map<String, dynamic> json) {
if (json == null) return null;
return ConvertedSimpleObject(
aString: json['aString'] as String,
anInt: json['anInt'] as int,
aDouble: json['aDouble'] as double,
aString: json['aString'] as String?,
anInt: json['anInt'] as int?,
aDouble: json['aDouble'] as double?,
aListOfStrings: json['aListOfStrings'] != null
? List<String>.from(json['aListOfStrings'] as Iterable<dynamic>)
: null,

View File

@@ -20,14 +20,14 @@ class SerializableComplexObject {
this.aListOfObjects,
});
final String aString;
final int anInt;
final double aDouble;
final SerializableSimpleObject anObject;
final List<String> aListOfStrings;
final List<int> aListOfInts;
final List<double> aListOfDoubles;
final List<SerializableSimpleObject> aListOfObjects;
final String? aString;
final int? anInt;
final double? aDouble;
final SerializableSimpleObject? anObject;
final List<String>? aListOfStrings;
final List<int>? aListOfInts;
final List<double>? aListOfDoubles;
final List<SerializableSimpleObject>? aListOfObjects;
factory SerializableComplexObject.fromJson(Map<String, dynamic> json) =>
_$SerializableComplexObjectFromJson(json);

View File

@@ -9,24 +9,25 @@ part of 'serializable_complex_object.dart';
SerializableComplexObject _$SerializableComplexObjectFromJson(
Map<String, dynamic> json) {
return SerializableComplexObject(
aString: json['aString'] as String,
anInt: json['anInt'] as int,
aDouble: (json['aDouble'] as num)?.toDouble(),
aString: json['aString'] as String?,
anInt: json['anInt'] as int?,
aDouble: (json['aDouble'] as num?)?.toDouble(),
anObject: json['anObject'] == null
? null
: SerializableSimpleObject.fromJson(
json['anObject'] as Map<String, dynamic>),
aListOfStrings:
(json['aListOfStrings'] as List)?.map((e) => e as String)?.toList(),
aListOfInts: (json['aListOfInts'] as List)?.map((e) => e as int)?.toList(),
aListOfDoubles: (json['aListOfDoubles'] as List)
?.map((e) => (e as num)?.toDouble())
?.toList(),
aListOfObjects: (json['aListOfObjects'] as List)
?.map((e) => e == null
? null
: SerializableSimpleObject.fromJson(e as Map<String, dynamic>))
?.toList(),
aListOfStrings: (json['aListOfStrings'] as List<dynamic>?)
?.map((e) => e as String)
.toList(),
aListOfInts:
(json['aListOfInts'] as List<dynamic>?)?.map((e) => e as int).toList(),
aListOfDoubles: (json['aListOfDoubles'] as List<dynamic>?)
?.map((e) => (e as num).toDouble())
.toList(),
aListOfObjects: (json['aListOfObjects'] as List<dynamic>?)
?.map(
(e) => SerializableSimpleObject.fromJson(e as Map<String, dynamic>))
.toList(),
);
}

View File

@@ -19,12 +19,12 @@ class SerializableSimpleObject {
this.aListOfDoubles,
});
final String aString;
final int anInt;
final double aDouble;
final List<String> aListOfStrings;
final List<int> aListOfInts;
final List<double> aListOfDoubles;
final String? aString;
final int? anInt;
final double? aDouble;
final List<String>? aListOfStrings;
final List<int>? aListOfInts;
final List<double>? aListOfDoubles;
factory SerializableSimpleObject.fromJson(Map<String, dynamic> json) =>
_$SerializableSimpleObjectFromJson(json);

View File

@@ -9,15 +9,17 @@ part of 'serializable_simple_object.dart';
SerializableSimpleObject _$SerializableSimpleObjectFromJson(
Map<String, dynamic> json) {
return SerializableSimpleObject(
aString: json['aString'] as String,
anInt: json['anInt'] as int,
aDouble: (json['aDouble'] as num)?.toDouble(),
aListOfStrings:
(json['aListOfStrings'] as List)?.map((e) => e as String)?.toList(),
aListOfInts: (json['aListOfInts'] as List)?.map((e) => e as int)?.toList(),
aListOfDoubles: (json['aListOfDoubles'] as List)
?.map((e) => (e as num)?.toDouble())
?.toList(),
aString: json['aString'] as String?,
anInt: json['anInt'] as int?,
aDouble: (json['aDouble'] as num?)?.toDouble(),
aListOfStrings: (json['aListOfStrings'] as List<dynamic>?)
?.map((e) => e as String)
.toList(),
aListOfInts:
(json['aListOfInts'] as List<dynamic>?)?.map((e) => e as int).toList(),
aListOfDoubles: (json['aListOfDoubles'] as List<dynamic>?)
?.map((e) => (e as num).toDouble())
.toList(),
);
}

View File

@@ -21,7 +21,7 @@ class MyApp extends StatelessWidget {
}
class MyHomePage extends StatelessWidget {
MyHomePage({Key key}) : super(key: key);
MyHomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {

View File

@@ -39,7 +39,7 @@ class BasicsPage extends StatelessWidget {
Widget build(BuildContext context) {
final localTheme = Theme.of(context).textTheme;
final boldStyle =
localTheme.bodyText2.copyWith(fontWeight: FontWeight.w600);
localTheme.bodyText2!.copyWith(fontWeight: FontWeight.w600);
final dynamicListOfInts = json.decode(JsonStrings.listOfInts) as List;
final strongListOfInts = List<int>.from(dynamicListOfInts);
@@ -134,7 +134,7 @@ class BasicsPage extends StatelessWidget {
},
children: createMapRows(
strongMapOfDynamics,
localTheme.bodyText2,
localTheme.bodyText2!,
boldStyle,
),
),
@@ -275,7 +275,7 @@ class BuiltSimplePage extends StatelessWidget {
Widget build(BuildContext context) {
var objects = JsonStrings.simpleObjects.map(
(jsonString) {
final dynamic parsedJson = json.decode(jsonString);
final parsedJson = json.decode(jsonString) as Object;
return serializers.deserializeWith(
BuiltSimpleObject.serializer, parsedJson);
},
@@ -297,7 +297,7 @@ class BuiltComplexPage extends StatelessWidget {
Widget build(BuildContext context) {
var objects = JsonStrings.complexObjects.map(
(jsonString) {
final dynamic parsedJson = json.decode(jsonString);
final parsedJson = json.decode(jsonString) as Object;
return serializers.deserializeWith(
BuiltComplexObject.serializer, parsedJson);
},

View File

@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
String prettyPrintList(Iterable iter) {
String prettyPrintList(Iterable? iter) {
if (iter == null) return 'NULL';
final buff = StringBuffer();

View File

@@ -14,7 +14,7 @@ class SimpleObjectView extends StatelessWidget {
Widget build(BuildContext context) {
final localTheme = Theme.of(context).textTheme;
final boldStyle =
localTheme.bodyText2.copyWith(fontWeight: FontWeight.w600);
localTheme.bodyText2!.copyWith(fontWeight: FontWeight.w600);
if (simpleObject == null) return Text('NULL', style: localTheme.bodyText2);
@@ -59,7 +59,7 @@ class SimpleObjectView extends StatelessWidget {
Text('aListOfStrings:', style: boldStyle),
Text(
prettyPrintList(
simpleObject.aListOfStrings as Iterable<dynamic>,
simpleObject.aListOfStrings as Iterable<dynamic>?,
),
style: localTheme.bodyText2,
),
@@ -69,7 +69,7 @@ class SimpleObjectView extends StatelessWidget {
children: [
Text('aListOfInts:', style: boldStyle),
Text(
prettyPrintList(simpleObject.aListOfInts as Iterable<dynamic>),
prettyPrintList(simpleObject.aListOfInts as Iterable<dynamic>?),
style: localTheme.bodyText2,
),
],
@@ -81,7 +81,8 @@ class SimpleObjectView extends StatelessWidget {
child: Text('aListOfDoubles:', style: boldStyle),
),
Text(
prettyPrintList(simpleObject.aListOfDoubles as Iterable<dynamic>),
prettyPrintList(
simpleObject.aListOfDoubles as Iterable<dynamic>?),
style: localTheme.bodyText2,
),
],
@@ -126,7 +127,7 @@ class ComplexObjectView extends StatelessWidget {
ComplexObjectView(dynamic obj) : complexObject = obj;
List<Widget> _generateSimpleObjectWidgets(Iterable<dynamic> simpleObjects) {
List<Widget> _generateSimpleObjectWidgets(Iterable<dynamic>? simpleObjects) {
if (simpleObjects == null) {
return [
const Padding(
@@ -158,7 +159,7 @@ class ComplexObjectView extends StatelessWidget {
Widget build(BuildContext context) {
final localTheme = Theme.of(context).textTheme;
final boldStyle =
localTheme.bodyText2.copyWith(fontWeight: FontWeight.w600);
localTheme.bodyText2!.copyWith(fontWeight: FontWeight.w600);
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -216,7 +217,7 @@ class ComplexObjectView extends StatelessWidget {
Text('aListOfStrings:', style: boldStyle),
Text(
prettyPrintList(
complexObject.aListOfStrings as Iterable<dynamic>),
complexObject.aListOfStrings as Iterable<dynamic>?),
style: localTheme.bodyText2,
),
],
@@ -226,7 +227,7 @@ class ComplexObjectView extends StatelessWidget {
Text('aListOfInts:', style: boldStyle),
Text(
prettyPrintList(
complexObject.aListOfInts as Iterable<dynamic>),
complexObject.aListOfInts as Iterable<dynamic>?),
style: localTheme.bodyText2,
),
],
@@ -239,7 +240,7 @@ class ComplexObjectView extends StatelessWidget {
),
Text(
prettyPrintList(
complexObject.aListOfDoubles as Iterable<dynamic>),
complexObject.aListOfDoubles as Iterable<dynamic>?),
style: localTheme.bodyText2,
),
],
@@ -257,7 +258,7 @@ class ComplexObjectView extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: _generateSimpleObjectWidgets(
complexObject.aListOfObjects as Iterable<dynamic>),
complexObject.aListOfObjects as Iterable<dynamic>?),
),
),
],

View File

@@ -7,14 +7,14 @@ packages:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "7.0.0"
version: "12.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "0.39.17"
version: "0.40.6"
args:
dependency: transitive
description:
@@ -28,91 +28,91 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0-nullsafety.1"
version: "2.5.0-nullsafety.3"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0-nullsafety.3"
build:
dependency: transitive
description:
name: build
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.6.2"
build_config:
dependency: transitive
description:
name: build_config
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.2"
version: "0.4.5"
build_daemon:
dependency: transitive
description:
name: build_daemon
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.4"
version: "2.1.7"
build_resolvers:
dependency: transitive
description:
name: build_resolvers
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.11"
version: "1.5.3"
build_runner:
dependency: "direct dev"
description:
name: build_runner
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.2"
version: "1.11.1"
build_runner_core:
dependency: transitive
description:
name: build_runner_core
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.1"
version: "6.1.7"
built_collection:
dependency: "direct main"
description:
name: built_collection
url: "https://pub.dartlang.org"
source: hosted
version: "4.3.2"
version: "5.0.0-nullsafety.0"
built_value:
dependency: "direct main"
description:
name: built_value
url: "https://pub.dartlang.org"
source: hosted
version: "7.1.0"
version: "8.0.0-nullsafety.0"
built_value_generator:
dependency: "direct dev"
description:
name: built_value_generator
url: "https://pub.dartlang.org"
source: hosted
version: "7.1.0"
version: "8.0.0-nullsafety.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.3"
version: "1.1.0-nullsafety.5"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0-nullsafety.3"
checked_yaml:
dependency: transitive
description:
@@ -133,21 +133,21 @@ packages:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0-nullsafety.3"
code_builder:
dependency: transitive
description:
name: code_builder
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.0"
version: "3.6.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety.3"
version: "1.15.0-nullsafety.5"
convert:
dependency: transitive
description:
@@ -162,27 +162,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.5"
csslib:
dependency: transitive
description:
name: csslib
url: "https://pub.dartlang.org"
source: hosted
version: "0.16.2"
dart_style:
dependency: transitive
description:
name: dart_style
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.6"
version: "1.3.10"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0-nullsafety.3"
file:
dependency: transitive
description:
@@ -196,7 +189,7 @@ packages:
name: fixnum
url: "https://pub.dartlang.org"
source: hosted
version: "0.10.11"
version: "1.0.0"
flutter:
dependency: "direct main"
description: flutter
@@ -221,13 +214,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
html:
dependency: transitive
description:
name: html
url: "https://pub.dartlang.org"
source: hosted
version: "0.14.0+4"
http_multi_server:
dependency: transitive
description:
@@ -262,49 +248,49 @@ packages:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.2"
version: "0.6.3"
json_annotation:
dependency: "direct main"
description:
name: json_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.1"
version: "4.0.0-nullsafety.0"
json_serializable:
dependency: "direct dev"
description:
name: json_serializable
url: "https://pub.dartlang.org"
source: hosted
version: "3.5.1"
version: "4.0.0-nullsafety.0"
logging:
dependency: transitive
description:
name: logging
url: "https://pub.dartlang.org"
source: hosted
version: "0.11.4"
version: "1.0.0"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10-nullsafety.1"
version: "0.12.10-nullsafety.3"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0-nullsafety.6"
mime:
dependency: transitive
description:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.7"
version: "1.0.0"
node_interop:
dependency: transitive
description:
@@ -332,14 +318,14 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.1"
version: "1.8.0-nullsafety.3"
pedantic:
dependency: "direct dev"
description:
name: pedantic
url: "https://pub.dartlang.org"
source: hosted
version: "1.9.2"
version: "1.10.0"
pool:
dependency: transitive
description:
@@ -381,7 +367,7 @@ packages:
name: shelf_web_socket
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.3"
version: "0.2.4"
sky_engine:
dependency: transitive
description: flutter
@@ -393,28 +379,28 @@ packages:
name: source_gen
url: "https://pub.dartlang.org"
source: hosted
version: "0.9.7+1"
version: "0.9.10+1"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.2"
version: "1.8.0-nullsafety.4"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0-nullsafety.6"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0-nullsafety.3"
stream_transform:
dependency: transitive
description:
@@ -428,21 +414,21 @@ packages:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0-nullsafety.3"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0-nullsafety.3"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19-nullsafety.2"
version: "0.2.19-nullsafety.6"
timing:
dependency: transitive
description:
@@ -456,14 +442,14 @@ packages:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0-nullsafety.5"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.3"
version: "2.1.0-nullsafety.5"
watcher:
dependency: transitive
description:
@@ -477,7 +463,7 @@ packages:
name: web_socket_channel
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
version: "1.2.0"
yaml:
dependency: transitive
description:
@@ -486,4 +472,4 @@ packages:
source: hosted
version: "2.2.1"
sdks:
dart: ">=2.10.0-110 <2.11.0"
dart: ">=2.12.0-0.0 <3.0.0"

View File

@@ -2,12 +2,12 @@ name: jsonexample
description: A demonstration of JSON parsing
environment:
sdk: '>=2.5.0 <3.0.0'
sdk: '>=2.12.0-0 <3.0.0'
dependencies:
json_annotation: ^3.0.1
built_collection: ^4.3.2
built_value: ^7.0.4
json_annotation: ^4.0.0-0
built_collection: ^5.0.0-0
built_value: ^8.0.0-0
flutter:
sdk: flutter
@@ -15,9 +15,9 @@ dependencies:
dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^1.7.2
built_value_generator: ^7.0.4
json_serializable: ^3.2.5
build_runner: ^1.11.1
built_value_generator: ^8.0.0-0
json_serializable: ^4.0.0-0
pedantic: ^1.9.0
flutter:

View File

@@ -127,22 +127,23 @@ void main() {
expect(complexObject.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.aListOfInts, [1, 2, 3]);
expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.anObject.aString, 'Blah, blah, blah.');
expect(complexObject.anObject.anInt, 1);
expect(complexObject.anObject.aDouble, 1.0);
expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.anObject.aListOfInts, [1, 2, 3]);
expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects.length, 3);
expect(complexObject.anObject?.aString, 'Blah, blah, blah.');
expect(complexObject.anObject?.anInt, 1);
expect(complexObject.anObject?.aDouble, 1.0);
expect(complexObject.anObject?.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.anObject?.aListOfInts, [1, 2, 3]);
expect(complexObject.anObject?.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects?.length, 3);
for (var i = 0; i < 3; i++) {
expect(complexObject.aListOfObjects[i].aString, 'Blah, blah, blah.');
expect(complexObject.aListOfObjects[i].anInt, i + 1);
expect(complexObject.aListOfObjects[i].aDouble, 1.0);
expect(complexObject.aListOfObjects[i].aListOfStrings,
expect(complexObject.aListOfObjects?[i].aString, 'Blah, blah, blah.');
expect(complexObject.aListOfObjects?[i].anInt, i + 1);
expect(complexObject.aListOfObjects?[i].aDouble, 1.0);
expect(complexObject.aListOfObjects?[i].aListOfStrings,
['one', 'two', 'three']);
expect(complexObject.aListOfObjects[i].aListOfInts, [1, 2, 3]);
expect(complexObject.aListOfObjects[i].aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects?[i].aListOfInts, [1, 2, 3]);
expect(
complexObject.aListOfObjects?[i].aListOfDoubles, [1.0, 2.0, 3.0]);
}
});
@@ -169,21 +170,21 @@ void main() {
expect(complexObject.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.aListOfInts, [1, 2, 3]);
expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.anObject.aString, isNull);
expect(complexObject.anObject.anInt, isNull);
expect(complexObject.anObject.aDouble, isNull);
expect(complexObject.anObject.aListOfStrings, isNull);
expect(complexObject.anObject.aListOfInts, isNull);
expect(complexObject.anObject.aListOfDoubles, isNull);
expect(complexObject.aListOfObjects.length, 3);
expect(complexObject.anObject?.aString, isNull);
expect(complexObject.anObject?.anInt, isNull);
expect(complexObject.anObject?.aDouble, isNull);
expect(complexObject.anObject?.aListOfStrings, isNull);
expect(complexObject.anObject?.aListOfInts, isNull);
expect(complexObject.anObject?.aListOfDoubles, isNull);
expect(complexObject.aListOfObjects?.length, 3);
for (var i = 0; i < 3; i++) {
expect(complexObject.aListOfObjects[i].aString, isNull);
expect(complexObject.aListOfObjects[i].anInt, isNull);
expect(complexObject.aListOfObjects[i].aDouble, isNull);
expect(complexObject.aListOfObjects[i].aListOfStrings, isNull);
expect(complexObject.aListOfObjects[i].aListOfInts, isNull);
expect(complexObject.aListOfObjects[i].aListOfDoubles, isNull);
expect(complexObject.aListOfObjects?[i].aString, isNull);
expect(complexObject.aListOfObjects?[i].anInt, isNull);
expect(complexObject.aListOfObjects?[i].aDouble, isNull);
expect(complexObject.aListOfObjects?[i].aListOfStrings, isNull);
expect(complexObject.aListOfObjects?[i].aListOfInts, isNull);
expect(complexObject.aListOfObjects?[i].aListOfDoubles, isNull);
}
});
@@ -197,22 +198,23 @@ void main() {
expect(complexObject.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.aListOfInts, [1, 2, 3]);
expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.anObject.aString, 'Blah, blah, blah.');
expect(complexObject.anObject.anInt, 1);
expect(complexObject.anObject.aDouble, 1.0);
expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.anObject.aListOfInts, [1, 2, 3]);
expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects.length, 3);
expect(complexObject.anObject?.aString, 'Blah, blah, blah.');
expect(complexObject.anObject?.anInt, 1);
expect(complexObject.anObject?.aDouble, 1.0);
expect(complexObject.anObject?.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.anObject?.aListOfInts, [1, 2, 3]);
expect(complexObject.anObject?.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects?.length, 3);
for (var i = 0; i < 3; i++) {
expect(complexObject.aListOfObjects[i].aString, 'Blah, blah, blah.');
expect(complexObject.aListOfObjects[i].anInt, i + 1);
expect(complexObject.aListOfObjects[i].aDouble, 1.0);
expect(complexObject.aListOfObjects[i].aListOfStrings,
expect(complexObject.aListOfObjects?[i].aString, 'Blah, blah, blah.');
expect(complexObject.aListOfObjects?[i].anInt, i + 1);
expect(complexObject.aListOfObjects?[i].aDouble, 1.0);
expect(complexObject.aListOfObjects?[i].aListOfStrings,
['one', 'two', 'three']);
expect(complexObject.aListOfObjects[i].aListOfInts, [1, 2, 3]);
expect(complexObject.aListOfObjects[i].aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects?[i].aListOfInts, [1, 2, 3]);
expect(
complexObject.aListOfObjects?[i].aListOfDoubles, [1.0, 2.0, 3.0]);
}
});
});
@@ -228,22 +230,23 @@ void main() {
expect(complexObject.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.aListOfInts, [1, 2, 3]);
expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.anObject.aString, 'Blah, blah, blah.');
expect(complexObject.anObject.anInt, 1);
expect(complexObject.anObject.aDouble, 1.0);
expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.anObject.aListOfInts, [1, 2, 3]);
expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects.length, 3);
expect(complexObject.anObject?.aString, 'Blah, blah, blah.');
expect(complexObject.anObject?.anInt, 1);
expect(complexObject.anObject?.aDouble, 1.0);
expect(complexObject.anObject?.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.anObject?.aListOfInts, [1, 2, 3]);
expect(complexObject.anObject?.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects?.length, 3);
for (var i = 0; i < 3; i++) {
expect(complexObject.aListOfObjects[i].aString, 'Blah, blah, blah.');
expect(complexObject.aListOfObjects[i].anInt, i + 1);
expect(complexObject.aListOfObjects[i].aDouble, 1.0);
expect(complexObject.aListOfObjects[i].aListOfStrings,
expect(complexObject.aListOfObjects?[i].aString, 'Blah, blah, blah.');
expect(complexObject.aListOfObjects?[i].anInt, i + 1);
expect(complexObject.aListOfObjects?[i].aDouble, 1.0);
expect(complexObject.aListOfObjects?[i].aListOfStrings,
['one', 'two', 'three']);
expect(complexObject.aListOfObjects[i].aListOfInts, [1, 2, 3]);
expect(complexObject.aListOfObjects[i].aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects?[i].aListOfInts, [1, 2, 3]);
expect(
complexObject.aListOfObjects?[i].aListOfDoubles, [1.0, 2.0, 3.0]);
}
});
@@ -270,21 +273,21 @@ void main() {
expect(complexObject.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.aListOfInts, [1, 2, 3]);
expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.anObject.aString, isNull);
expect(complexObject.anObject.anInt, isNull);
expect(complexObject.anObject.aDouble, isNull);
expect(complexObject.anObject.aListOfStrings, isNull);
expect(complexObject.anObject.aListOfInts, isNull);
expect(complexObject.anObject.aListOfDoubles, isNull);
expect(complexObject.aListOfObjects.length, 3);
expect(complexObject.anObject?.aString, isNull);
expect(complexObject.anObject?.anInt, isNull);
expect(complexObject.anObject?.aDouble, isNull);
expect(complexObject.anObject?.aListOfStrings, isNull);
expect(complexObject.anObject?.aListOfInts, isNull);
expect(complexObject.anObject?.aListOfDoubles, isNull);
expect(complexObject.aListOfObjects?.length, 3);
for (var i = 0; i < 3; i++) {
expect(complexObject.aListOfObjects[i].aString, isNull);
expect(complexObject.aListOfObjects[i].anInt, isNull);
expect(complexObject.aListOfObjects[i].aDouble, isNull);
expect(complexObject.aListOfObjects[i].aListOfStrings, isNull);
expect(complexObject.aListOfObjects[i].aListOfInts, isNull);
expect(complexObject.aListOfObjects[i].aListOfDoubles, isNull);
expect(complexObject.aListOfObjects?[i].aString, isNull);
expect(complexObject.aListOfObjects?[i].anInt, isNull);
expect(complexObject.aListOfObjects?[i].aDouble, isNull);
expect(complexObject.aListOfObjects?[i].aListOfStrings, isNull);
expect(complexObject.aListOfObjects?[i].aListOfInts, isNull);
expect(complexObject.aListOfObjects?[i].aListOfDoubles, isNull);
}
});
@@ -298,22 +301,23 @@ void main() {
expect(complexObject.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.aListOfInts, [1, 2, 3]);
expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.anObject.aString, 'Blah, blah, blah.');
expect(complexObject.anObject.anInt, 1);
expect(complexObject.anObject.aDouble, 1.0);
expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.anObject.aListOfInts, [1, 2, 3]);
expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects.length, 3);
expect(complexObject.anObject?.aString, 'Blah, blah, blah.');
expect(complexObject.anObject?.anInt, 1);
expect(complexObject.anObject?.aDouble, 1.0);
expect(complexObject.anObject?.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.anObject?.aListOfInts, [1, 2, 3]);
expect(complexObject.anObject?.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects?.length, 3);
for (var i = 0; i < 3; i++) {
expect(complexObject.aListOfObjects[i].aString, 'Blah, blah, blah.');
expect(complexObject.aListOfObjects[i].anInt, i + 1);
expect(complexObject.aListOfObjects[i].aDouble, 1.0);
expect(complexObject.aListOfObjects[i].aListOfStrings,
expect(complexObject.aListOfObjects?[i].aString, 'Blah, blah, blah.');
expect(complexObject.aListOfObjects?[i].anInt, i + 1);
expect(complexObject.aListOfObjects?[i].aDouble, 1.0);
expect(complexObject.aListOfObjects?[i].aListOfStrings,
['one', 'two', 'three']);
expect(complexObject.aListOfObjects[i].aListOfInts, [1, 2, 3]);
expect(complexObject.aListOfObjects[i].aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects?[i].aListOfInts, [1, 2, 3]);
expect(
complexObject.aListOfObjects?[i].aListOfDoubles, [1.0, 2.0, 3.0]);
}
});
});
@@ -329,22 +333,23 @@ void main() {
expect(complexObject.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.aListOfInts, [1, 2, 3]);
expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.anObject.aString, 'Blah, blah, blah.');
expect(complexObject.anObject.anInt, 1);
expect(complexObject.anObject.aDouble, 1.0);
expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.anObject.aListOfInts, [1, 2, 3]);
expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects.length, 3);
expect(complexObject.anObject?.aString, 'Blah, blah, blah.');
expect(complexObject.anObject?.anInt, 1);
expect(complexObject.anObject?.aDouble, 1.0);
expect(complexObject.anObject?.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.anObject?.aListOfInts, [1, 2, 3]);
expect(complexObject.anObject?.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects?.length, 3);
for (var i = 0; i < 3; i++) {
expect(complexObject.aListOfObjects[i].aString, 'Blah, blah, blah.');
expect(complexObject.aListOfObjects[i].anInt, i + 1);
expect(complexObject.aListOfObjects[i].aDouble, 1.0);
expect(complexObject.aListOfObjects[i].aListOfStrings,
expect(complexObject.aListOfObjects?[i].aString, 'Blah, blah, blah.');
expect(complexObject.aListOfObjects?[i].anInt, i + 1);
expect(complexObject.aListOfObjects?[i].aDouble, 1.0);
expect(complexObject.aListOfObjects?[i].aListOfStrings,
['one', 'two', 'three']);
expect(complexObject.aListOfObjects[i].aListOfInts, [1, 2, 3]);
expect(complexObject.aListOfObjects[i].aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects?[i].aListOfInts, [1, 2, 3]);
expect(
complexObject.aListOfObjects?[i].aListOfDoubles, [1.0, 2.0, 3.0]);
}
});
@@ -372,21 +377,21 @@ void main() {
expect(complexObject.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.aListOfInts, [1, 2, 3]);
expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.anObject.aString, isNull);
expect(complexObject.anObject.anInt, isNull);
expect(complexObject.anObject.aDouble, isNull);
expect(complexObject.anObject.aListOfStrings, isNull);
expect(complexObject.anObject.aListOfInts, isNull);
expect(complexObject.anObject.aListOfDoubles, isNull);
expect(complexObject.aListOfObjects.length, 3);
expect(complexObject.anObject?.aString, isNull);
expect(complexObject.anObject?.anInt, isNull);
expect(complexObject.anObject?.aDouble, isNull);
expect(complexObject.anObject?.aListOfStrings, isNull);
expect(complexObject.anObject?.aListOfInts, isNull);
expect(complexObject.anObject?.aListOfDoubles, isNull);
expect(complexObject.aListOfObjects?.length, 3);
for (var i = 0; i < 3; i++) {
expect(complexObject.aListOfObjects[i].aString, isNull);
expect(complexObject.aListOfObjects[i].anInt, isNull);
expect(complexObject.aListOfObjects[i].aDouble, isNull);
expect(complexObject.aListOfObjects[i].aListOfStrings, isNull);
expect(complexObject.aListOfObjects[i].aListOfInts, isNull);
expect(complexObject.aListOfObjects[i].aListOfDoubles, isNull);
expect(complexObject.aListOfObjects?[i].aString, isNull);
expect(complexObject.aListOfObjects?[i].anInt, isNull);
expect(complexObject.aListOfObjects?[i].aDouble, isNull);
expect(complexObject.aListOfObjects?[i].aListOfStrings, isNull);
expect(complexObject.aListOfObjects?[i].aListOfInts, isNull);
expect(complexObject.aListOfObjects?[i].aListOfDoubles, isNull);
}
});
@@ -400,22 +405,23 @@ void main() {
expect(complexObject.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.aListOfInts, [1, 2, 3]);
expect(complexObject.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.anObject.aString, 'Blah, blah, blah.');
expect(complexObject.anObject.anInt, 1);
expect(complexObject.anObject.aDouble, 1.0);
expect(complexObject.anObject.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.anObject.aListOfInts, [1, 2, 3]);
expect(complexObject.anObject.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects.length, 3);
expect(complexObject.anObject?.aString, 'Blah, blah, blah.');
expect(complexObject.anObject?.anInt, 1);
expect(complexObject.anObject?.aDouble, 1.0);
expect(complexObject.anObject?.aListOfStrings, ['one', 'two', 'three']);
expect(complexObject.anObject?.aListOfInts, [1, 2, 3]);
expect(complexObject.anObject?.aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects?.length, 3);
for (var i = 0; i < 3; i++) {
expect(complexObject.aListOfObjects[i].aString, 'Blah, blah, blah.');
expect(complexObject.aListOfObjects[i].anInt, i + 1);
expect(complexObject.aListOfObjects[i].aDouble, 1.0);
expect(complexObject.aListOfObjects[i].aListOfStrings,
expect(complexObject.aListOfObjects?[i].aString, 'Blah, blah, blah.');
expect(complexObject.aListOfObjects?[i].anInt, i + 1);
expect(complexObject.aListOfObjects?[i].aDouble, 1.0);
expect(complexObject.aListOfObjects?[i].aListOfStrings,
['one', 'two', 'three']);
expect(complexObject.aListOfObjects[i].aListOfInts, [1, 2, 3]);
expect(complexObject.aListOfObjects[i].aListOfDoubles, [1.0, 2.0, 3.0]);
expect(complexObject.aListOfObjects?[i].aListOfInts, [1, 2, 3]);
expect(
complexObject.aListOfObjects?[i].aListOfDoubles, [1.0, 2.0, 3.0]);
}
});
});