change language options and fix command
This commit is contained in:
@@ -23,7 +23,11 @@ class LanguageScreen extends ConsumerWidget {
|
|||||||
|
|
||||||
const Map<String, String> languageOptions = <String, String>{
|
const Map<String, String> languageOptions = <String, String>{
|
||||||
'es': 'español',
|
'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 languageCodes = languageOptions.keys.toList(growable: false);
|
||||||
final languageLabels = languageOptions.values.toList(growable: false);
|
final languageLabels = languageOptions.values.toList(growable: false);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ class CommandsRemoteDatasourceImpl implements CommandsRemoteDatasource {
|
|||||||
required SendCommandRequestModel request
|
required SendCommandRequestModel request
|
||||||
}) async {
|
}) async {
|
||||||
try{
|
try{
|
||||||
|
print(request.toJson());
|
||||||
final response = await safeCall(
|
final response = await safeCall(
|
||||||
() => _repository.post<Map<String, dynamic>>(
|
() => _repository.post<Map<String, dynamic>>(
|
||||||
'/commands',
|
'/commands',
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ const _$DeviceCommandEnumMap = {
|
|||||||
DeviceCommand.findDevice: 'FIND_DEVICE',
|
DeviceCommand.findDevice: 'FIND_DEVICE',
|
||||||
DeviceCommand.restart: 'RESTART',
|
DeviceCommand.restart: 'RESTART',
|
||||||
DeviceCommand.rewards: 'REWARDS',
|
DeviceCommand.rewards: 'REWARDS',
|
||||||
|
DeviceCommand.setLanguage: 'SET_LANGUAGE',
|
||||||
DeviceCommand.shutdown: 'SHUTDOWN',
|
DeviceCommand.shutdown: 'SHUTDOWN',
|
||||||
DeviceCommand.sound: 'SOUND',
|
DeviceCommand.sound: 'SOUND',
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user