add example file

This commit is contained in:
Diego Cardenas
2021-10-08 22:00:41 -05:00
parent 2a66744761
commit d7f2f2496d
3 changed files with 22 additions and 2 deletions

View File

@@ -1,3 +1,7 @@
## 0.1.1
- add example file
## 0.1.0
- Initial release of the annotation package.

16
example/README.md Normal file
View File

@@ -0,0 +1,16 @@
```dart
import 'package:json_config_annotation/json_config_annotation.dart';
import 'dart:convert';
import 'package:flutter/services.dart';
part 'config.g.dart'; //{dart file name}.g.dart
@Configuration(
environmentEnumName: 'Env',
environments:[
Environment(name:'dev', path:'assets/config/dev.json'),
Environment(name:'prd', path:'assets/config/prd.json'),
],
)
class $Config{}
```

View File

@@ -1,7 +1,7 @@
name: json_config_generator
description: Configuration generator from json files.
version: 0.1.0
homepage: https://dev.azure.com/fcorp-infraestructura-servicios-ti/Packages/_git/Flutter.ConfigGenerator
version: 0.1.1
homepage: https://github.com/deCardenas/json_config_generator
environment:
sdk: ">=2.12.0 <3.0.0"