diff --git a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus-class-sidebar.html b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus-class-sidebar.html index 6a998c18f..65039e26e 100644 --- a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus-class-sidebar.html +++ b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus-class-sidebar.html @@ -10,12 +10,16 @@ Properties
  • cookie
  • +
  • country
  • hashCode
  • +
  • isAdmin
  • +
  • isModerator
  • +
  • preferredLanguage
  • runtimeType
  • status
  • statusVerbose
  • successful
  • -
  • userEmail
  • +
  • userEmail
  • userId
  • userName
  • diff --git a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus-class.html b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus-class.html index d44a50444..28946b03d 100644 --- a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus-class.html +++ b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus-class.html @@ -76,9 +76,13 @@

    LoginStatus class "status_verbose":"user signed-in", "user_id":"gqwbgsvvod", "user":{ -"email":"blababla@gmail.com", - "name":"Mr. John Doe" - } +"name":"Mr. John Doe", +"preferred_language":"fr", +"cc":"be", +"country":"en:belgium", +"admin":0, +"moderator":1 +} } @@ -91,7 +95,7 @@

    Constructors

    - LoginStatus({required int status, required String statusVerbose, String? userEmail, String? userName, String? userId, String? cookie}) + LoginStatus({required int status, required String statusVerbose, String? userEmail, String? userName, String? userId, OpenFoodFactsLanguage? preferredLanguage, OpenFoodFactsCountry? country, bool? isModerator, bool? isAdmin, String? cookie})
    @@ -122,6 +126,18 @@

    Properties

    authenticated user.
    final
    +
    + +
    + country + OpenFoodFactsCountry? + + +
    +
    + +
    final
    +
    @@ -134,6 +150,42 @@

    Properties

    The hash code for this object.
    no setterinherited
    + + +
    + isAdmin + bool? + + +
    +
    + +
    final
    + +
    + +
    + isModerator + bool? + + +
    +
    + +
    final
    + +
    + +
    + preferredLanguage + OpenFoodFactsLanguage? + + +
    +
    + +
    final
    +
    @@ -185,7 +237,7 @@

    Properties

    - userEmail + userEmail String? diff --git a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/LoginStatus.fromJson.html b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/LoginStatus.fromJson.html index 16a10afe3..4377d95a9 100644 --- a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/LoginStatus.fromJson.html +++ b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/LoginStatus.fromJson.html @@ -74,15 +74,21 @@

    LoginStatus.fromJson constructor

    Implementation

    factory LoginStatus.fromJson(Map<String, dynamic> json,
    -        [Map<String, String>? headers]) =>
    -    LoginStatus(
    -      status: JsonObject.parseInt(json['status'])!,
    -      statusVerbose: json['status_verbose'] as String,
    -      userId: json['user_id'] as String?,
    -      userEmail: json['user']?['email'] as String?,
    -      userName: json['user']?['name'] as String?,
    -      cookie: headers?['set-cookie'],
    -    );
    + [Map<String, String>? headers]) { + final details = json['user']; + return LoginStatus( + status: JsonObject.parseInt(json['status'])!, + statusVerbose: json['status_verbose'] as String, + userId: json['user_id'] as String?, + userName: details?['name'] as String?, + preferredLanguage: + OpenFoodFactsLanguage.fromOffTag(details?['preferred_language']), + country: OpenFoodFactsCountry.fromOffTag(details?['cc']), + isModerator: JsonHelper.boolFromJSON(details?['moderator']), + isAdmin: JsonHelper.boolFromJSON(details?['admin']), + cookie: headers?['set-cookie'], + ); +}
    diff --git a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/LoginStatus.html b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/LoginStatus.html index 81c198843..a39a98150 100644 --- a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/LoginStatus.html +++ b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/LoginStatus.html @@ -67,6 +67,10 @@

    LoginStatus constructor
  • String? userEmail,
  • String? userName,
  • String? userId,
  • +
  • OpenFoodFactsLanguage? preferredLanguage,
  • +
  • OpenFoodFactsCountry? country,
  • +
  • bool? isModerator,
  • +
  • bool? isAdmin,
  • String? cookie}
  • ) @@ -80,9 +84,13 @@

    Implementation

    LoginStatus({
       required this.status,
       required this.statusVerbose,
    -  this.userEmail,
    +  String? userEmail,
       this.userName,
       this.userId,
    +  this.preferredLanguage,
    +  this.country,
    +  this.isModerator,
    +  this.isAdmin,
       this.cookie,
     });
    diff --git a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/country.html b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/country.html new file mode 100644 index 000000000..14aedc74d --- /dev/null +++ b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/country.html @@ -0,0 +1,125 @@ + + + + + + + + country property - LoginStatus class - login_status library - Dart API + + + + + + + + + + + + + + + + + +
    + +
    + menu + +
    country
    + +
    + +
    +
    +
    + +
    +
    +

    country property +

    + +
    + + OpenFoodFactsCountry? + country +
    final
    + +
    + + + +
    +

    Implementation

    +
    final OpenFoodFactsCountry? country;
    +
    + + +
    + + + + + +
    + +
    + + openfoodfacts + 3.12.0 + + + +
    + + + + + + + + + + + + diff --git a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/isAdmin.html b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/isAdmin.html new file mode 100644 index 000000000..055872363 --- /dev/null +++ b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/isAdmin.html @@ -0,0 +1,125 @@ + + + + + + + + isAdmin property - LoginStatus class - login_status library - Dart API + + + + + + + + + + + + + + + + + +
    + +
    + menu + +
    isAdmin
    + +
    + +
    +
    +
    + +
    +
    +

    isAdmin property +

    + +
    + + bool? + isAdmin +
    final
    + +
    + + + +
    +

    Implementation

    +
    final bool? isAdmin;
    +
    + + +
    + + + + + +
    + +
    + + openfoodfacts + 3.12.0 + + + +
    + + + + + + + + + + + + diff --git a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/isModerator.html b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/isModerator.html new file mode 100644 index 000000000..d5b378c43 --- /dev/null +++ b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/isModerator.html @@ -0,0 +1,125 @@ + + + + + + + + isModerator property - LoginStatus class - login_status library - Dart API + + + + + + + + + + + + + + + + + +
    + +
    + menu + +
    isModerator
    + +
    + +
    +
    +
    + +
    +
    +

    isModerator property +

    + +
    + + bool? + isModerator +
    final
    + +
    + + + +
    +

    Implementation

    +
    final bool? isModerator;
    +
    + + +
    + + + + + +
    + +
    + + openfoodfacts + 3.12.0 + + + +
    + + + + + + + + + + + + diff --git a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/preferredLanguage.html b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/preferredLanguage.html new file mode 100644 index 000000000..8817720e5 --- /dev/null +++ b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/preferredLanguage.html @@ -0,0 +1,125 @@ + + + + + + + + preferredLanguage property - LoginStatus class - login_status library - Dart API + + + + + + + + + + + + + + + + + +
    + +
    + menu + +
    preferredLanguage
    + +
    + +
    +
    +
    + +
    +
    +

    preferredLanguage property +

    + +
    + + OpenFoodFactsLanguage? + preferredLanguage +
    final
    + +
    + + + +
    +

    Implementation

    +
    final OpenFoodFactsLanguage? preferredLanguage;
    +
    + + +
    + + + + + +
    + +
    + + openfoodfacts + 3.12.0 + + + +
    + + + + + + + + + + + + diff --git a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/toString.html b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/toString.html index 2862f3f46..547431a69 100644 --- a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/toString.html +++ b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/toString.html @@ -97,8 +97,11 @@

    Implementation

    'status:$status' ',statusVerbose:$statusVerbose' '${userId == null ? '' : ',userId:$userId'}' - '${userEmail == null ? '' : ',userEmail:$userEmail'}' '${userName == null ? '' : ',userName:$userName'}' + '${preferredLanguage == null ? '' : ',preferredLanguage:$preferredLanguage'}' + '${country == null ? '' : ',country:$country'}' + '${isAdmin == null ? '' : ',isAdmin:$isAdmin'}' + '${isModerator == null ? '' : ',isModerator:$isModerator'}' '${cookie == null ? '' : ',cookie:$cookie'}' ')'; diff --git a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/userEmail.html b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/userEmail.html index 74e4b5a37..f549e7065 100644 --- a/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/userEmail.html +++ b/file-___home_runner_work_openfoodfacts-dart_openfoodfacts-dart_lib_src_model_login_status/LoginStatus/userEmail.html @@ -31,7 +31,7 @@
  • openfoodfacts
  • src/model/login_status.dart
  • LoginStatus
  • -
  • userEmail property
  • +
  • userEmail property
  • userEmail