-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Adding shrine. #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
1fe9609
Adding shrine.
RedBrogdon b89969c
Cleaning up IDE files.
RedBrogdon a39a51f
Addressing comments.
RedBrogdon d17f968
Adding Travis config for jsonexample. (#4)
RedBrogdon d83f650
Adding Travis badge.
RedBrogdon 166c797
Updating contributor guidelines.
RedBrogdon af463b8
Addressing comments.
RedBrogdon 357d172
Adding tests, tweaking built_value code. (#5)
RedBrogdon 90237a4
Adding shrine.
RedBrogdon a9971d4
Cleaning up IDE files.
RedBrogdon 0bb8eee
Addressing comments.
RedBrogdon 0944168
Addressing comments.
RedBrogdon a758fb5
Merged changes from MDC codelab 104.
RedBrogdon 513514d
Merging.
RedBrogdon 241c956
Updating README and .gitignore
RedBrogdon 70a1e5a
Tweaking app state model.
RedBrogdon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
os: | ||
- linux | ||
sudo: false | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- libstdc++6 | ||
- fonts-droid | ||
git: | ||
depth: 3 | ||
env: | ||
- FLUTTER_VERSION=beta | ||
- FLUTTER_VERSION=dev | ||
matrix: | ||
allow_failures: | ||
- env: FLUTTER_VERSION=dev | ||
before_script: | ||
- git clone https://github.com/flutter/flutter.git -b $FLUTTER_VERSION | ||
- ./flutter/bin/flutter doctor | ||
- chmod +x travis_script.sh | ||
script: | ||
- ./travis_script.sh | ||
cache: | ||
directories: | ||
- $HOME/shared/.pub-cache |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
part of 'built_complex_object.dart'; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Who generates this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's from the |
||
// ************************************************************************** | ||
// Generator: BuiltValueGenerator | ||
// BuiltValueGenerator | ||
// ************************************************************************** | ||
|
||
// ignore_for_file: always_put_control_body_on_new_line | ||
|
@@ -31,27 +31,7 @@ class _$BuiltComplexObjectSerializer | |
@override | ||
Iterable serialize(Serializers serializers, BuiltComplexObject object, | ||
{FullType specifiedType: FullType.unspecified}) { | ||
final result = <Object>[ | ||
'anObject', | ||
serializers.serialize(object.anObject, | ||
specifiedType: const FullType(BuiltSimpleObject)), | ||
'aListOfStrings', | ||
serializers.serialize(object.aListOfStrings, | ||
specifiedType: | ||
const FullType(BuiltList, const [const FullType(String)])), | ||
'aListOfInts', | ||
serializers.serialize(object.aListOfInts, | ||
specifiedType: | ||
const FullType(BuiltList, const [const FullType(int)])), | ||
'aListOfDoubles', | ||
serializers.serialize(object.aListOfDoubles, | ||
specifiedType: | ||
const FullType(BuiltList, const [const FullType(double)])), | ||
'aListOfObjects', | ||
serializers.serialize(object.aListOfObjects, | ||
specifiedType: const FullType( | ||
BuiltList, const [const FullType(BuiltSimpleObject)])), | ||
]; | ||
final result = <Object>[]; | ||
if (object.aString != null) { | ||
result | ||
..add('aString') | ||
|
@@ -70,6 +50,40 @@ class _$BuiltComplexObjectSerializer | |
..add(serializers.serialize(object.aDouble, | ||
specifiedType: const FullType(double))); | ||
} | ||
if (object.anObject != null) { | ||
result | ||
..add('anObject') | ||
..add(serializers.serialize(object.anObject, | ||
specifiedType: const FullType(BuiltSimpleObject))); | ||
} | ||
if (object.aListOfStrings != null) { | ||
result | ||
..add('aListOfStrings') | ||
..add(serializers.serialize(object.aListOfStrings, | ||
specifiedType: | ||
const FullType(BuiltList, const [const FullType(String)]))); | ||
} | ||
if (object.aListOfInts != null) { | ||
result | ||
..add('aListOfInts') | ||
..add(serializers.serialize(object.aListOfInts, | ||
specifiedType: | ||
const FullType(BuiltList, const [const FullType(int)]))); | ||
} | ||
if (object.aListOfDoubles != null) { | ||
result | ||
..add('aListOfDoubles') | ||
..add(serializers.serialize(object.aListOfDoubles, | ||
specifiedType: | ||
const FullType(BuiltList, const [const FullType(double)]))); | ||
} | ||
if (object.aListOfObjects != null) { | ||
result | ||
..add('aListOfObjects') | ||
..add(serializers.serialize(object.aListOfObjects, | ||
specifiedType: const FullType( | ||
BuiltList, const [const FullType(BuiltSimpleObject)]))); | ||
} | ||
|
||
return result; | ||
} | ||
|
@@ -163,21 +177,7 @@ class _$BuiltComplexObject extends BuiltComplexObject { | |
this.aListOfInts, | ||
this.aListOfDoubles, | ||
this.aListOfObjects}) | ||
: super._() { | ||
if (anObject == null) | ||
throw new BuiltValueNullFieldError('BuiltComplexObject', 'anObject'); | ||
if (aListOfStrings == null) | ||
throw new BuiltValueNullFieldError( | ||
'BuiltComplexObject', 'aListOfStrings'); | ||
if (aListOfInts == null) | ||
throw new BuiltValueNullFieldError('BuiltComplexObject', 'aListOfInts'); | ||
if (aListOfDoubles == null) | ||
throw new BuiltValueNullFieldError( | ||
'BuiltComplexObject', 'aListOfDoubles'); | ||
if (aListOfObjects == null) | ||
throw new BuiltValueNullFieldError( | ||
'BuiltComplexObject', 'aListOfObjects'); | ||
} | ||
: super._(); | ||
|
||
@override | ||
BuiltComplexObject rebuild(void updates(BuiltComplexObjectBuilder b)) => | ||
|
@@ -315,24 +315,24 @@ class BuiltComplexObjectBuilder | |
aString: aString, | ||
anInt: anInt, | ||
aDouble: aDouble, | ||
anObject: anObject.build(), | ||
aListOfStrings: aListOfStrings.build(), | ||
aListOfInts: aListOfInts.build(), | ||
aListOfDoubles: aListOfDoubles.build(), | ||
aListOfObjects: aListOfObjects.build()); | ||
anObject: _anObject?.build(), | ||
aListOfStrings: _aListOfStrings?.build(), | ||
aListOfInts: _aListOfInts?.build(), | ||
aListOfDoubles: _aListOfDoubles?.build(), | ||
aListOfObjects: _aListOfObjects?.build()); | ||
} catch (_) { | ||
String _$failedField; | ||
try { | ||
_$failedField = 'anObject'; | ||
anObject.build(); | ||
_anObject?.build(); | ||
_$failedField = 'aListOfStrings'; | ||
aListOfStrings.build(); | ||
_aListOfStrings?.build(); | ||
_$failedField = 'aListOfInts'; | ||
aListOfInts.build(); | ||
_aListOfInts?.build(); | ||
_$failedField = 'aListOfDoubles'; | ||
aListOfDoubles.build(); | ||
_aListOfDoubles?.build(); | ||
_$failedField = 'aListOfObjects'; | ||
aListOfObjects.build(); | ||
_aListOfObjects?.build(); | ||
} catch (e) { | ||
throw new BuiltValueNestedFieldError( | ||
'BuiltComplexObject', _$failedField, e.toString()); | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I've literally never noticed this annotation before!