dart_pointers 0.1.1 copy "dart_pointers: ^0.1.1" to clipboard
dart_pointers: ^0.1.1 copied to clipboard

an object wrapper class called Pointer with C like pointer behavior for dart.

Example:

  var a = Pointer(121);
  var b = Pointer(547);
  a.swap(b);

  var c = Pointer();
  c.value = 'a';

  var d = malloc(10);
  d[5] = 'abc';
  d[8] = 148;
  d[7] = 5.1;
  d[1] = false;

  print(a);
  print(b);
  print(c);
  print(d);


  realloc(d, 15);
  d[12] = '12th';
  print(d);

  free(d);
  print(d);

Output:

547
121
a
[null, false, null, null, null, abc, null, 5.1, 148, null]
[null, false, null, null, null, abc, null, 5.1, 148, null, null, null, 12th, null, null]
null

Features and bugs #

Please file feature requests and bugs at the issue tracker.

3
likes
40
pub points
0%
popularity

Publisher

unverified uploader

an object wrapper class called Pointer with C like pointer behavior for dart.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

More

Packages that depend on dart_pointers