tomodels 1.0.0+2 tomodels: ^1.0.0+2 copied to clipboard
A simple json to dart models generator
Use this package as an executable
Install it
You can install the package from the command line:
dart pub global activate tomodels
Use it
The package has the following executables:
$ tomodels
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add tomodels
With Flutter:
$ flutter pub add tomodels
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get
):
dependencies:
tomodels: ^1.0.0+2
Alternatively, your editor might support dart pub get
or flutter pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:tomodels/javiercbk/helpers.dart';
import 'package:tomodels/javiercbk/json_to_dart.dart';
import 'package:tomodels/javiercbk/model_generator.dart';
import 'package:tomodels/javiercbk/syntax.dart';
import 'package:tomodels/javiercbk/warning.dart';
import 'package:tomodels/json_to_models.dart';