veilidchat/lib/veilid_support/config.dart
Christien Rioux 6e8725f569 lint work
2023-07-26 14:20:29 -04:00

20 lines
670 B
Dart

import 'package:veilid/veilid.dart';
Future<VeilidConfig> getVeilidChatConfig() async {
var config = await getDefaultVeilidConfig('VeilidChat');
if (const String.fromEnvironment('DELETE_TABLE_STORE') == '1') {
config =
config.copyWith(tableStore: config.tableStore.copyWith(delete: true));
}
if (const String.fromEnvironment('DELETE_PROTECTED_STORE') == '1') {
config = config.copyWith(
protectedStore: config.protectedStore.copyWith(delete: true));
}
if (const String.fromEnvironment('DELETE_BLOCK_STORE') == '1') {
config =
config.copyWith(blockStore: config.blockStore.copyWith(delete: true));
}
return config;
}