mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
Update jsonexample (#72)
- use latest dependencies - update build.yaml for removed option - rebuilt generated code
This commit is contained in:
@@ -14,13 +14,3 @@ targets:
|
|||||||
json_serializable|json_serializable:
|
json_serializable|json_serializable:
|
||||||
generate_for:
|
generate_for:
|
||||||
- lib/json_serializable/*.dart
|
- lib/json_serializable/*.dart
|
||||||
options:
|
|
||||||
header: |
|
|
||||||
// Copyright 2018 The Chromium Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style license that can be
|
|
||||||
// found in the LICENSE file.
|
|
||||||
|
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,18 +6,6 @@ part of 'built_complex_object.dart';
|
|||||||
// BuiltValueGenerator
|
// BuiltValueGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
// ignore_for_file: always_put_control_body_on_new_line
|
|
||||||
// ignore_for_file: annotate_overrides
|
|
||||||
// ignore_for_file: avoid_annotating_with_dynamic
|
|
||||||
// ignore_for_file: avoid_catches_without_on_clauses
|
|
||||||
// ignore_for_file: avoid_returning_this
|
|
||||||
// ignore_for_file: lines_longer_than_80_chars
|
|
||||||
// ignore_for_file: omit_local_variable_types
|
|
||||||
// ignore_for_file: prefer_expression_function_bodies
|
|
||||||
// ignore_for_file: sort_constructors_first
|
|
||||||
// ignore_for_file: unnecessary_const
|
|
||||||
// ignore_for_file: unnecessary_new
|
|
||||||
|
|
||||||
Serializer<BuiltComplexObject> _$builtComplexObjectSerializer =
|
Serializer<BuiltComplexObject> _$builtComplexObjectSerializer =
|
||||||
new _$BuiltComplexObjectSerializer();
|
new _$BuiltComplexObjectSerializer();
|
||||||
|
|
||||||
@@ -165,7 +153,8 @@ class _$BuiltComplexObject extends BuiltComplexObject {
|
|||||||
@override
|
@override
|
||||||
final BuiltList<BuiltSimpleObject> aListOfObjects;
|
final BuiltList<BuiltSimpleObject> aListOfObjects;
|
||||||
|
|
||||||
factory _$BuiltComplexObject([void updates(BuiltComplexObjectBuilder b)]) =>
|
factory _$BuiltComplexObject(
|
||||||
|
[void Function(BuiltComplexObjectBuilder) updates]) =>
|
||||||
(new BuiltComplexObjectBuilder()..update(updates)).build();
|
(new BuiltComplexObjectBuilder()..update(updates)).build();
|
||||||
|
|
||||||
_$BuiltComplexObject._(
|
_$BuiltComplexObject._(
|
||||||
@@ -180,7 +169,8 @@ class _$BuiltComplexObject extends BuiltComplexObject {
|
|||||||
: super._();
|
: super._();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
BuiltComplexObject rebuild(void updates(BuiltComplexObjectBuilder b)) =>
|
BuiltComplexObject rebuild(
|
||||||
|
void Function(BuiltComplexObjectBuilder) updates) =>
|
||||||
(toBuilder()..update(updates)).build();
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -297,12 +287,14 @@ class BuiltComplexObjectBuilder
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void replace(BuiltComplexObject other) {
|
void replace(BuiltComplexObject other) {
|
||||||
if (other == null) throw new ArgumentError.notNull('other');
|
if (other == null) {
|
||||||
|
throw new ArgumentError.notNull('other');
|
||||||
|
}
|
||||||
_$v = other as _$BuiltComplexObject;
|
_$v = other as _$BuiltComplexObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void update(void updates(BuiltComplexObjectBuilder b)) {
|
void update(void Function(BuiltComplexObjectBuilder) updates) {
|
||||||
if (updates != null) updates(this);
|
if (updates != null) updates(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,3 +335,5 @@ class BuiltComplexObjectBuilder
|
|||||||
return _$result;
|
return _$result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
|
||||||
|
|||||||
@@ -6,18 +6,6 @@ part of 'built_simple_object.dart';
|
|||||||
// BuiltValueGenerator
|
// BuiltValueGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
// ignore_for_file: always_put_control_body_on_new_line
|
|
||||||
// ignore_for_file: annotate_overrides
|
|
||||||
// ignore_for_file: avoid_annotating_with_dynamic
|
|
||||||
// ignore_for_file: avoid_catches_without_on_clauses
|
|
||||||
// ignore_for_file: avoid_returning_this
|
|
||||||
// ignore_for_file: lines_longer_than_80_chars
|
|
||||||
// ignore_for_file: omit_local_variable_types
|
|
||||||
// ignore_for_file: prefer_expression_function_bodies
|
|
||||||
// ignore_for_file: sort_constructors_first
|
|
||||||
// ignore_for_file: unnecessary_const
|
|
||||||
// ignore_for_file: unnecessary_new
|
|
||||||
|
|
||||||
Serializer<BuiltSimpleObject> _$builtSimpleObjectSerializer =
|
Serializer<BuiltSimpleObject> _$builtSimpleObjectSerializer =
|
||||||
new _$BuiltSimpleObjectSerializer();
|
new _$BuiltSimpleObjectSerializer();
|
||||||
|
|
||||||
@@ -137,7 +125,8 @@ class _$BuiltSimpleObject extends BuiltSimpleObject {
|
|||||||
@override
|
@override
|
||||||
final BuiltList<double> aListOfDoubles;
|
final BuiltList<double> aListOfDoubles;
|
||||||
|
|
||||||
factory _$BuiltSimpleObject([void updates(BuiltSimpleObjectBuilder b)]) =>
|
factory _$BuiltSimpleObject(
|
||||||
|
[void Function(BuiltSimpleObjectBuilder) updates]) =>
|
||||||
(new BuiltSimpleObjectBuilder()..update(updates)).build();
|
(new BuiltSimpleObjectBuilder()..update(updates)).build();
|
||||||
|
|
||||||
_$BuiltSimpleObject._(
|
_$BuiltSimpleObject._(
|
||||||
@@ -150,7 +139,7 @@ class _$BuiltSimpleObject extends BuiltSimpleObject {
|
|||||||
: super._();
|
: super._();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
BuiltSimpleObject rebuild(void updates(BuiltSimpleObjectBuilder b)) =>
|
BuiltSimpleObject rebuild(void Function(BuiltSimpleObjectBuilder) updates) =>
|
||||||
(toBuilder()..update(updates)).build();
|
(toBuilder()..update(updates)).build();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -245,12 +234,14 @@ class BuiltSimpleObjectBuilder
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void replace(BuiltSimpleObject other) {
|
void replace(BuiltSimpleObject other) {
|
||||||
if (other == null) throw new ArgumentError.notNull('other');
|
if (other == null) {
|
||||||
|
throw new ArgumentError.notNull('other');
|
||||||
|
}
|
||||||
_$v = other as _$BuiltSimpleObject;
|
_$v = other as _$BuiltSimpleObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void update(void updates(BuiltSimpleObjectBuilder b)) {
|
void update(void Function(BuiltSimpleObjectBuilder) updates) {
|
||||||
if (updates != null) updates(this);
|
if (updates != null) updates(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,3 +276,5 @@ class BuiltSimpleObjectBuilder
|
|||||||
return _$result;
|
return _$result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
|
||||||
|
|||||||
@@ -6,18 +6,6 @@ part of serializers;
|
|||||||
// BuiltValueGenerator
|
// BuiltValueGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
// ignore_for_file: always_put_control_body_on_new_line
|
|
||||||
// ignore_for_file: annotate_overrides
|
|
||||||
// ignore_for_file: avoid_annotating_with_dynamic
|
|
||||||
// ignore_for_file: avoid_catches_without_on_clauses
|
|
||||||
// ignore_for_file: avoid_returning_this
|
|
||||||
// ignore_for_file: lines_longer_than_80_chars
|
|
||||||
// ignore_for_file: omit_local_variable_types
|
|
||||||
// ignore_for_file: prefer_expression_function_bodies
|
|
||||||
// ignore_for_file: sort_constructors_first
|
|
||||||
// ignore_for_file: unnecessary_const
|
|
||||||
// ignore_for_file: unnecessary_new
|
|
||||||
|
|
||||||
Serializers _$serializers = (new Serializers().toBuilder()
|
Serializers _$serializers = (new Serializers().toBuilder()
|
||||||
..add(BuiltComplexObject.serializer)
|
..add(BuiltComplexObject.serializer)
|
||||||
..add(BuiltSimpleObject.serializer)
|
..add(BuiltSimpleObject.serializer)
|
||||||
@@ -43,3 +31,5 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
|||||||
const FullType(BuiltList, const [const FullType(BuiltSimpleObject)]),
|
const FullType(BuiltList, const [const FullType(BuiltSimpleObject)]),
|
||||||
() => new ListBuilder<BuiltSimpleObject>()))
|
() => new ListBuilder<BuiltSimpleObject>()))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
// ignore_for_file: always_put_control_body_on_new_line,always_specify_types,annotate_overrides,avoid_annotating_with_dynamic,avoid_as,avoid_catches_without_on_clauses,avoid_returning_this,lines_longer_than_80_chars,omit_local_variable_types,prefer_expression_function_bodies,sort_constructors_first,test_types_in_equals,unnecessary_const,unnecessary_new
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ packages:
|
|||||||
name: analyzer
|
name: analyzer
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.33.6+1"
|
version: "0.35.4"
|
||||||
analyzer_plugin:
|
analyzer_plugin:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: analyzer_plugin
|
name: analyzer_plugin
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.0.1-alpha.5"
|
version: "0.0.1-alpha.7"
|
||||||
args:
|
args:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -42,42 +42,42 @@ packages:
|
|||||||
name: build
|
name: build
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.4"
|
||||||
build_config:
|
build_config:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_config
|
name: build_config
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.1+4"
|
version: "0.3.2"
|
||||||
build_daemon:
|
build_daemon:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_daemon
|
name: build_daemon
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.3"
|
version: "0.5.0"
|
||||||
build_resolvers:
|
build_resolvers:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_resolvers
|
name: build_resolvers
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.3"
|
version: "1.0.4"
|
||||||
build_runner:
|
build_runner:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: build_runner
|
name: build_runner
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.3"
|
version: "1.3.3"
|
||||||
build_runner_core:
|
build_runner_core:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: build_runner_core
|
name: build_runner_core
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.1"
|
version: "3.0.3"
|
||||||
built_collection:
|
built_collection:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
@@ -91,14 +91,14 @@ packages:
|
|||||||
name: built_value
|
name: built_value
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.3.2"
|
version: "6.4.0"
|
||||||
built_value_generator:
|
built_value_generator:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: built_value_generator
|
name: built_value_generator
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.3.2"
|
version: "6.4.0"
|
||||||
charcode:
|
charcode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -140,14 +140,14 @@ packages:
|
|||||||
name: csslib
|
name: csslib
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.14.6"
|
version: "0.15.0"
|
||||||
dart_style:
|
dart_style:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: dart_style
|
name: dart_style
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.4"
|
||||||
fixnum:
|
fixnum:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -171,7 +171,7 @@ packages:
|
|||||||
name: front_end
|
name: front_end
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.6+9"
|
version: "0.1.14"
|
||||||
glob:
|
glob:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -192,7 +192,7 @@ packages:
|
|||||||
name: html
|
name: html
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.13.4+1"
|
version: "0.13.4+2"
|
||||||
http:
|
http:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -206,7 +206,7 @@ packages:
|
|||||||
name: http_multi_server
|
name: http_multi_server
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.5"
|
version: "2.0.6"
|
||||||
http_parser:
|
http_parser:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -234,21 +234,21 @@ packages:
|
|||||||
name: json_annotation
|
name: json_annotation
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "2.2.0"
|
||||||
json_serializable:
|
json_serializable:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description:
|
description:
|
||||||
name: json_serializable
|
name: json_serializable
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.5.1"
|
version: "2.2.1"
|
||||||
kernel:
|
kernel:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: kernel
|
name: kernel
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.6+9"
|
version: "0.3.14"
|
||||||
logging:
|
logging:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -305,13 +305,6 @@ packages:
|
|||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.4.0"
|
version: "1.4.0"
|
||||||
plugin:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: plugin
|
|
||||||
url: "https://pub.dartlang.org"
|
|
||||||
source: hosted
|
|
||||||
version: "0.2.0+3"
|
|
||||||
pool:
|
pool:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -353,7 +346,7 @@ packages:
|
|||||||
name: shelf_web_socket
|
name: shelf_web_socket
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.2.2+5"
|
version: "0.2.3"
|
||||||
sky_engine:
|
sky_engine:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description: flutter
|
description: flutter
|
||||||
@@ -365,7 +358,7 @@ packages:
|
|||||||
name: source_gen
|
name: source_gen
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.9.4+1"
|
version: "0.9.4+2"
|
||||||
source_span:
|
source_span:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
@@ -465,4 +458,4 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.15"
|
version: "2.1.15"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.1.0 <3.0.0"
|
dart: ">=2.1.1 <3.0.0"
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ name: jsonexample
|
|||||||
description: A demonstration of JSON parsing
|
description: A demonstration of JSON parsing
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.0.0-dev <3.0.0'
|
sdk: '>=2.1.0 <3.0.0'
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
json_annotation: ^1.0.0
|
json_annotation: ^2.0.0
|
||||||
built_collection: '>=2.0.0 <5.0.0'
|
built_collection: ^4.0.0
|
||||||
built_value: ^6.1.5
|
built_value: ^6.1.5
|
||||||
|
|
||||||
flutter:
|
flutter:
|
||||||
@@ -15,7 +15,7 @@ dependencies:
|
|||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
build_runner: ^1.0.0
|
build_runner: ^1.0.0
|
||||||
built_value_generator: ^6.1.5
|
built_value_generator: ^6.1.5
|
||||||
json_serializable: ^1.0.0
|
json_serializable: ^2.2.1
|
||||||
|
|
||||||
flutter_test:
|
flutter_test:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|||||||
Reference in New Issue
Block a user