mirror of
https://github.com/wger-project/flutter.git
synced 2026-11-29 09:20:56 +01:00
This allows the user to use the system settings as well, and not always force light or dark mode in the app. Also move the logic to the UserProvider and do some light refactoring.
30 lines
985 B
Dart
30 lines
985 B
Dart
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
|
|
part of 'profile.dart';
|
|
|
|
// **************************************************************************
|
|
// JsonSerializableGenerator
|
|
// **************************************************************************
|
|
|
|
Profile _$ProfileFromJson(Map<String, dynamic> json) {
|
|
$checkKeys(
|
|
json,
|
|
requiredKeys: const ['username', 'email_verified', 'is_trustworthy', 'weight_unit', 'email'],
|
|
);
|
|
return Profile(
|
|
username: json['username'] as String,
|
|
emailVerified: json['email_verified'] as bool,
|
|
isTrustworthy: json['is_trustworthy'] as bool,
|
|
email: json['email'] as String,
|
|
weightUnitStr: json['weight_unit'] as String,
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> _$ProfileToJson(Profile instance) => <String, dynamic>{
|
|
'username': instance.username,
|
|
'email_verified': instance.emailVerified,
|
|
'is_trustworthy': instance.isTrustworthy,
|
|
'weight_unit': instance.weightUnitStr,
|
|
'email': instance.email,
|
|
};
|