Updated to work with newest Dart version.