upgrade to new Dart API