This repository has been archived by the owner on Oct 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented feature:
@ToStringMixin()
(#42)
* Implemented feature: `@ToStringMixin()` * Updated package description * Updated documentation for`@ToStringMixin()` and fixed some minor typos * Updated all to version 1.1.0
- Loading branch information
Showing
18 changed files
with
177 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export 'src/bike.dart'; | ||
export 'src/car.dart'; |
This file contains 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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import 'src/bike.dart'; | ||
import 'src/car.dart'; | ||
|
||
main() { | ||
print(Bike()); | ||
print(EBike()); | ||
print(Car()); | ||
} |
This file contains 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,17 @@ | ||
import 'package:to_string_helper/to_string_helper.dart'; | ||
|
||
import 'vehicle.dart'; | ||
|
||
part 'car.g.dart'; | ||
|
||
@ToStringMixin( | ||
globalInclude: Include(static: true, nullValue: false), | ||
unnamedValue: true, | ||
) | ||
class Car extends Vehicle with _$CarToString { | ||
static String name = 'Car'; | ||
@ToStringField(includeNullValue: true, unnamedValue: false) | ||
String _engine; | ||
String color; | ||
final wheels = 4; | ||
} |
This file contains 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: to_string_helper_example_with_generator | ||
version: 1.0.3 | ||
version: 1.1.0 | ||
|
||
environment: | ||
sdk: ">=2.0.0 <3.0.0" | ||
|
This file contains 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 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 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 |
---|---|---|
@@ -1 +1,5 @@ | ||
# 1.1.0 | ||
* Generate code for annotation `@ToStringMixin`. | ||
|
||
# 1.0.3 | ||
* Generate code for annotations: `@ToString` and `@ToStringField`. |
This file contains 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 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 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 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 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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# 1.1.0 | ||
* Added annotation `@ToStringMixin`. | ||
|
||
# 1.0.5 | ||
* Improved documentation. | ||
|
||
|
This file contains 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 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 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,19 @@ | ||
import 'include.dart'; | ||
import 'to_string.dart'; | ||
|
||
class ToStringMixin extends ToString { | ||
const ToStringMixin({ | ||
Include globalInclude, | ||
Map<Type, Include> inclusion, | ||
String nullString = 'null', | ||
String separator = ', ', | ||
int truncate = 0, | ||
bool unnamedValue = false, | ||
}) : super( | ||
globalInclude: globalInclude, | ||
inclusion: inclusion, | ||
nullString: nullString, | ||
separator: separator, | ||
truncate: truncate, | ||
unnamedValue: unnamedValue); | ||
} |
This file contains 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export 'src/annotations/include.dart'; | ||
export 'src/annotations/to_string.dart'; | ||
export 'src/annotations/to_string_field.dart'; | ||
export 'src/annotations/to_string_mixin.dart'; | ||
export 'src/to_string_helper.dart'; |
This file contains 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