2023-01-09 22:50:34 -05:00
|
|
|
import 'package:veilid/veilid.dart';
|
|
|
|
|
|
|
|
Future<VeilidConfig> getVeilidChatConfig() async {
|
2023-07-26 14:20:29 -04:00
|
|
|
var config = await getDefaultVeilidConfig('VeilidChat');
|
2023-07-26 17:42:11 -04:00
|
|
|
// ignore: do_not_use_environment
|
2023-07-26 14:20:29 -04:00
|
|
|
if (const String.fromEnvironment('DELETE_TABLE_STORE') == '1') {
|
2023-07-26 10:06:54 -04:00
|
|
|
config =
|
|
|
|
config.copyWith(tableStore: config.tableStore.copyWith(delete: true));
|
|
|
|
}
|
2023-07-26 17:42:11 -04:00
|
|
|
// ignore: do_not_use_environment
|
2023-07-26 14:20:29 -04:00
|
|
|
if (const String.fromEnvironment('DELETE_PROTECTED_STORE') == '1') {
|
2023-07-26 10:06:54 -04:00
|
|
|
config = config.copyWith(
|
|
|
|
protectedStore: config.protectedStore.copyWith(delete: true));
|
|
|
|
}
|
2023-07-26 17:42:11 -04:00
|
|
|
// ignore: do_not_use_environment
|
2023-07-26 14:20:29 -04:00
|
|
|
if (const String.fromEnvironment('DELETE_BLOCK_STORE') == '1') {
|
2023-07-26 10:06:54 -04:00
|
|
|
config =
|
|
|
|
config.copyWith(blockStore: config.blockStore.copyWith(delete: true));
|
|
|
|
}
|
|
|
|
|
2023-01-09 22:50:34 -05:00
|
|
|
return config;
|
|
|
|
}
|