Didn't work in newer versions of Dart

Please check if this change works for you. Thx