This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #165 from viniciusmelquiades/deprecated-field
Add deprecated annotations in fields
- Loading branch information
Showing
21 changed files
with
1,113 additions
and
84 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
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import 'package:artemis/generator/data/definition.dart'; | ||
import 'package:artemis/generator/data_printer.dart'; | ||
import 'package:meta/meta.dart'; | ||
import 'package:recase/recase.dart'; | ||
|
||
/// Enum value | ||
class EnumValueDefinition extends Definition with DataPrinter { | ||
@override | ||
final EnumValueName name; | ||
|
||
/// Some other custom annotation. | ||
final List<String> annotations; | ||
|
||
/// Instantiate an enum value | ||
EnumValueDefinition({ | ||
@required this.name, | ||
this.annotations = const [], | ||
}); | ||
|
||
@override | ||
Map<String, Object> get namedProps => { | ||
'name': name, | ||
'annotations': annotations, | ||
}; | ||
} | ||
|
||
/// Enum value name | ||
class EnumValueName extends Name with DataPrinter { | ||
/// Instantiate a enum value name definition. | ||
EnumValueName({@required String name}) : super(name: name); | ||
|
||
@override | ||
Map<String, Object> get namedProps => { | ||
'name': name, | ||
}; | ||
|
||
@override | ||
String normalize(String name) { | ||
return ReCase(super.normalize(name)).camelCase; | ||
} | ||
} |
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,5 +1,5 @@ | ||
name: artemis | ||
version: 6.4.4-beta.1 | ||
version: 6.5.0-beta.1 | ||
|
||
authors: | ||
- Igor Borges <igor@borges.dev> | ||
|
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
Oops, something went wrong.