Dart: refactored generate actions