ex_map 0.10.2 copy "ex_map: ^0.10.2" to clipboard
ex_map: ^0.10.2 copied to clipboard

Dart 1 only

A library for writing pretty simple object class with Map interface.

example/example.dart

library example;

import 'dart:html';
import 'package:ex_map/ex_map.dart';

@ExMap
class ExampleMap extends ExtendedMap {
  @ExKey()
  int id;

  @ExKey(protected: true, type: int)
  int integerField = 1;

  @ExKey(type: String)
  var testField = 'test';
}

main() {
  ExampleMap exampleMap = new ExampleMap();
  exampleMap['id'] = 1;
  querySelector('body')
    ..appendText('keys: ${exampleMap.keys.toString()}')
    ..append(new Element.br())
    ..appendText('id: ${exampleMap.id}')
    ..append(new Element.br())
    ..appendText('integerField: ${exampleMap.integerField}')
    ..append(new Element.br())
    ..appendText('testField: ${exampleMap["testField"]}');
}
0
likes
35
pub points
0%
popularity

Publisher

unverified uploader

A library for writing pretty simple object class with Map interface.

Repository (GitHub)
View/report issues

License

BSD-2-Clause (LICENSE)

Dependencies

barback

More

Packages that depend on ex_map