change language options and fix command

This commit is contained in:
2026-03-20 10:41:03 +01:00
parent cacc2460f1
commit e526dce2c9
3 changed files with 7 additions and 1 deletions

View File

@@ -23,7 +23,11 @@ class LanguageScreen extends ConsumerWidget {
const Map<String, String> languageOptions = <String, String>{
'es': 'español',
'en': 'english',
'en': 'English',
'pt': 'português',
'it': 'italiano',
'fr': 'français',
'de': 'Deutsch',
};
final languageCodes = languageOptions.keys.toList(growable: false);
final languageLabels = languageOptions.values.toList(growable: false);

View File

@@ -14,6 +14,7 @@ class CommandsRemoteDatasourceImpl implements CommandsRemoteDatasource {
required SendCommandRequestModel request
}) async {
try{
print(request.toJson());
final response = await safeCall(
() => _repository.post<Map<String, dynamic>>(
'/commands',

View File

@@ -27,6 +27,7 @@ const _$DeviceCommandEnumMap = {
DeviceCommand.findDevice: 'FIND_DEVICE',
DeviceCommand.restart: 'RESTART',
DeviceCommand.rewards: 'REWARDS',
DeviceCommand.setLanguage: 'SET_LANGUAGE',
DeviceCommand.shutdown: 'SHUTDOWN',
DeviceCommand.sound: 'SOUND',
};