growerp_models 1.12.2 copy "growerp_models: ^1.12.2" to clipboard
growerp_models: ^1.12.2 copied to clipboard

Freezed data models and a Retrofit REST client for the GrowERP Moqui backend, shared across all GrowERP Flutter packages.

example/main.dart

import 'package:growerp_models/growerp_models.dart';

/// Demonstrates decoding a GrowERP REST response into a typed model and
/// serializing it back to JSON, using the GL account model as an example.
void main() {
  final json = {
    'glAccount': {
      'glAccountId': '110000',
      'accountCode': '110000',
      'accountName': 'Cash',
      'isDebit': true,
    },
  };

  final account = GlAccount.fromJson(json);
  // ignore: avoid_print
  print('${account.accountCode}: ${account.accountName}');

  final backToJson = account.toJson();
  // ignore: avoid_print
  print(backToJson);
}
1
likes
150
points
296
downloads

Documentation

API reference

Publisher

verified publishergrowerp.com

Weekly Downloads

Freezed data models and a Retrofit REST client for the GrowERP Moqui backend, shared across all GrowERP Flutter packages.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

Apache-2.0 (license)

Dependencies

decimal, dio, equatable, fast_csv, freezed_annotation, json_annotation, logger, pretty_dio_logger, retrofit, universal_io

More

Packages that depend on growerp_models