Skip to content

Commit

Permalink
Bump version 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
spideythewebhead committed Nov 1, 2023
1 parent a81360e commit 44f856b
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/file_generation_mode/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ packages:
path: "../../package"
relative: true
source: path
version: "1.1.0"
version: "1.2.0"
file:
dependency: transitive
description:
Expand Down
6 changes: 6 additions & 0 deletions package/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 1.2.0

- Bump tachyon version [(issue #353)](https://github.com/spideythewebhead/data_class_plugin/issues/353)
- Update READMEM
- Update example

## 1.1.0

- Bump dependencies versions [(issue #347)](https://github.com/spideythewebhead/data_class_plugin/issues/347)
Expand Down
50 changes: 50 additions & 0 deletions package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,63 @@ These `code actions` are similar to the ones provide by the language - e.g. `wra
1. Create a simple class, annotate it with `@DataClass()` and provide `abstract getter` fields for your model.

```dart
import 'package:data_class_plugin/data_class_plugin.dart';
@DataClass()
class User {
String get id;
String get username;
}
```

Generated code:

```dart
class _$UserImpl extends User {
_$UserImpl({
required this.id,
required this.username,
}) : super.ctor();
@override
final String id;
@override
final String username;
@override
bool operator ==(Object? other) {
return identical(this, other) ||
other is User &&
runtimeType == other.runtimeType &&
id == other.id &&
username == other.username;
}
@override
int get hashCode {
return Object.hashAll(<Object?>[
runtimeType,
id,
username,
]);
}
@override
String toString() {
String toStringOutput = 'User{<optimized out>}';
assert(() {
toStringOutput = 'User@<$hexIdentity>{id: $id, username: $username}';
return true;
}());
return toStringOutput;
}
@override
Type get runtimeType => User;
}
```

1. Run code actions on your IDE

VSCode
Expand Down
2 changes: 1 addition & 1 deletion package/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: data_class_plugin
version: 1.1.0
version: 1.2.0
description: A tool that uses Dart's Analyzer to generate code on-the-fly.

homepage: https://github.com/spideythewebhead/dart_data_class_plugin
Expand Down
2 changes: 1 addition & 1 deletion package/tools/analyzer_plugin/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ environment:
sdk: ">=3.1.0 <4.0.0"

dependencies:
data_class_plugin: ^1.1.0
data_class_plugin: ^1.2.0

0 comments on commit 44f856b

Please sign in to comment.