envContent static method
Generates a .env template file with sensible defaults.
appName is written as the default value for APP_NAME.
withoutBroadcasting when true, omits the BROADCAST_CONNECTION
and REVERB_* environment variables.
Implementation
@Deprecated('Migrated to install.yaml publish:; will be removed in V2')
static String envContent({
required String appName,
bool withoutBroadcasting = false,
}) {
var content = StubLoader.replace(StubLoader.load('install/env'), {
'appName': appName,
});
if (!withoutBroadcasting) {
content +=
'\nBROADCAST_CONNECTION=null\n'
'REVERB_HOST=localhost\n'
'REVERB_PORT=8080\n'
'REVERB_SCHEME=ws\n'
'REVERB_APP_KEY=\n';
}
return content;
}