body method
Defines the actual body code. path is passed relative to lib, baseName is the filename, and className is the filename converted to Pascal case.
実際の本体コードを定義します。pathにlibからの相対パス、baseNameにファイル名が渡され、classNameにファイル名をパスカルケースに変換した値が渡されます。
Implementation
@override
String body(String path, String baseName, String className) {
return """
/// App Model.
///
/// By replacing this with another adapter, the data storage location can be changed.
// TODO: Change the database.
final modelAdapter = runtimeModelAdapter;
final runtimeModelAdapter = RuntimeModelAdapter();
/// App Auth.
///
/// Changing to another adapter allows you to change to another authentication mechanism.
// TODO: Change the authentication.
final authAdapter = runtimeAuthAdapter;
final runtimeAuthAdapter = RuntimeAuthAdapter();
/// App Storage.
///
/// Changing to another adapter allows you to change to another storage mechanism.
// TODO: Change the storage.
final storageAdapter = runtimeStorageAdapter;
final runtimeStorageAdapter = LocalStorageAdapter();
/// App Functions.
///
/// Changing to another adapter allows you to change to another functions mechanism.
// TODO: Change the functions.
final functionsAdapter = runtimeFunctionsAdapter;
final runtimeFunctionsAdapter = RuntimeFunctionsAdapter();
/// Logger adapter list.
///
/// Adapters for logging can be defined here.
// TODO: Change the loggers.
final loggerAdapters = runtimeLoggerAdapters;
final runtimeLoggerAdapters = <LoggerAdapter>[
const ConsoleLoggerAdapter(),
];
/// Masamune adapter.
///
/// The Masamune framework plugin functions can be defined together.
// TODO: Add the adapters.
final masamuneAdapters = runtimeMasamuneAdapters;
final runtimeMasamuneAdapters <MasamuneAdapter>[
const UniversalMasamuneAdapter(),
${module != null ? "appModule," : ""}
];
""";
}