update
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:cloud_firestore/cloud_firestore.dart';
|
||||
|
||||
class SettingModel {
|
||||
final bool domicilios;
|
||||
final bool google;
|
||||
final bool tarifas;
|
||||
final String titulo;
|
||||
final String parrafo;
|
||||
@@ -15,6 +16,7 @@ class SettingModel {
|
||||
|
||||
SettingModel(
|
||||
this.domicilios,
|
||||
this.google,
|
||||
this.tarifas,
|
||||
this.titulo,
|
||||
this.parrafo,
|
||||
@@ -30,10 +32,12 @@ class SettingModel {
|
||||
static Future<SettingModel> fromJson(Map<String, dynamic> json) async {
|
||||
try {
|
||||
if (json == null)
|
||||
return SettingModel(false, false, '', '', '', '', '', '', '', '', '');
|
||||
return SettingModel(
|
||||
false, false, false, '', '', '', '', '', '', '', '', '');
|
||||
|
||||
return SettingModel(
|
||||
json['domicilio'],
|
||||
json['google'],
|
||||
json['tarifa'],
|
||||
json['titulo_soporte'],
|
||||
json['parrafo_soporte'],
|
||||
@@ -47,7 +51,8 @@ class SettingModel {
|
||||
);
|
||||
} catch (e) {
|
||||
print('Error settings: $e');
|
||||
return SettingModel(false, false, '', '', '', '', '', '', '', '', '');
|
||||
return SettingModel(
|
||||
false, false, false, '', '', '', '', '', '', '', '', '');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,13 +69,14 @@ class SettingModel {
|
||||
return fromJson(data!);
|
||||
} catch (e) {
|
||||
print('Error getting settings: $e');
|
||||
return SettingModel(false, false, '', '', '', '', '', '', '', '', '');
|
||||
return SettingModel(
|
||||
false, false, false, '', '', '', '', '', '', '', '', '');
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'SettingModel { domicilios: $domicilios, tarifas: $tarifas, '
|
||||
return 'SettingModel { domicilios: $domicilios,google: $google, tarifas: $tarifas, '
|
||||
'titulo: $titulo, parrafo: $parrafo, numero: $numero, '
|
||||
'email: $email, dias: $dias, horas: $horas, '
|
||||
'version: $version, politicasPrivacidad: $proliticasPrivacidad, '
|
||||
|
||||
Reference in New Issue
Block a user