6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit f6e4bced
Changed files
.../lib/.generated/assets/assets.gen.dart | 13 +- .../cubit/choose_share_room_state.freezed.dart | 131 +++++++++- .../models/notification_permission.g.dart | 22 +- .../redeem_debug/bloc/redeem_cubit.freezed.dart | 271 --------------------- .../pregistration/pages/prereg_address_page.dart | 2 +- 5 files changed, 158 insertions(+), 281 deletions(-)
Diff
diff --git a/comwell_key_app/lib/.generated/assets/assets.gen.dart b/comwell_key_app/lib/.generated/assets/assets.gen.dart
index 6ee77802..7da7c51e 100644
--- a/comwell_key_app/lib/.generated/assets/assets.gen.dart
+++ b/comwell_key_app/lib/.generated/assets/assets.gen.dart
@@ -471,14 +471,17 @@ class $AssetsMsalGen {
class $AssetsTranslationsGen {
const $AssetsTranslationsGen();
- /// File path: assets/translations/da-DK.json
- String get daDK => 'assets/translations/da-DK.json';
+ /// File path: assets/translations/all_translations.csv
+ String get allTranslations => 'assets/translations/all_translations.csv';
- /// File path: assets/translations/en-US.json
- String get enUS => 'assets/translations/en-US.json';
+ /// File path: assets/translations/intl_da.arb
+ String get intlDa => 'assets/translations/intl_da.arb';
+
+ /// File path: assets/translations/intl_en.arb
+ String get intlEn => 'assets/translations/intl_en.arb';
/// List of all assets
- List<String> get values => [daDK, enUS];
+ List<String> get values => [allTranslations, intlDa, intlEn];
}
class Assets {
diff --git a/comwell_key_app/lib/.generated/choose_share_room/cubit/choose_share_room_state.freezed.dart b/comwell_key_app/lib/.generated/choose_share_room/cubit/choose_share_room_state.freezed.dart
index 320c8ec5..fc131b68 100644
--- a/comwell_key_app/lib/.generated/choose_share_room/cubit/choose_share_room_state.freezed.dart
+++ b/comwell_key_app/lib/.generated/choose_share_room/cubit/choose_share_room_state.freezed.dart
@@ -74,6 +74,135 @@ as List<Room>,
}
+/// Adds pattern-matching-related methods to [ChooseShareRoomState].
+extension ChooseShareRoomStatePatterns on ChooseShareRoomState {
+/// A variant of `map` that fallback to returning `orElse`.
+///
+/// It is equivalent to doing:
+/// ```dart
+/// switch (sealedClass) {
+/// case final Subclass value:
+/// return ...;
+/// case _:
+/// return orElse();
+/// }
+/// ```
+
+@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _ChooseShareRoomState value)? $default,{required TResult orElse(),}){
+final _that = this;
+switch (_that) {
+case _ChooseShareRoomState() when $default != null:
+return $default(_that);case _:
+ return orElse();
+
+}
+}
+/// A `switch`-like method, using callbacks.
+///
+/// Callbacks receives the raw object, upcasted.
+/// It is equivalent to doing:
+/// ```dart
+/// switch (sealedClass) {
+/// case final Subclass value:
+/// return ...;
+/// case final Subclass2 value:
+/// return ...;
+/// }
+/// ```
+
+@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _ChooseShareRoomState value) $default,){
+final _that = this;
+switch (_that) {
+case _ChooseShareRoomState():
+return $default(_that);case _:
+ throw StateError('Unexpected subclass');
+
+}
+}
+/// A variant of `map` that fallback to returning `null`.
+///
+/// It is equivalent to doing:
+/// ```dart
+/// switch (sealedClass) {
+/// case final Subclass value:
+/// return ...;
+/// case _:
+/// return null;
+/// }
+/// ```
+
+@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _ChooseShareRoomState value)? $default,){
+final _that = this;
+switch (_that) {
+case _ChooseShareRoomState() when $default != null:
+return $default(_that);case _:
+ return null;
+
+}
+}
+/// A variant of `when` that fallback to an `orElse` callback.
+///
+/// It is equivalent to doing:
+/// ```dart
+/// switch (sealedClass) {
+/// case Subclass(:final field):
+/// return ...;
+/// case _:
+/// return orElse();
+/// }
+/// ```
+
+@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isLoading, String errorMessage, List<Room> rooms)? $default,{required TResult orElse(),}) {final _that = this;
+switch (_that) {
+case _ChooseShareRoomState() when $default != null:
+return $default(_that.isLoading,_that.errorMessage,_that.rooms);case _:
+ return orElse();
+
+}
+}
+/// A `switch`-like method, using callbacks.
+///
+/// As opposed to `map`, this offers destructuring.
+/// It is equivalent to doing:
+/// ```dart
+/// switch (sealedClass) {
+/// case Subclass(:final field):
+/// return ...;
+/// case Subclass2(:final field2):
+/// return ...;
+/// }
+/// ```
+
+@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isLoading, String errorMessage, List<Room> rooms) $default,) {final _that = this;
+switch (_that) {
+case _ChooseShareRoomState():
+return $default(_that.isLoading,_that.errorMessage,_that.rooms);case _:
+ throw StateError('Unexpected subclass');
+
+}
+}
+/// A variant of `when` that fallback to returning `null`
+///
+/// It is equivalent to doing:
+/// ```dart
+/// switch (sealedClass) {
+/// case Subclass(:final field):
+/// return ...;
+/// case _:
+/// return null;
+/// }
+/// ```
+
+@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isLoading, String errorMessage, List<Room> rooms)? $default,) {final _that = this;
+switch (_that) {
+case _ChooseShareRoomState() when $default != null:
+return $default(_that.isLoading,_that.errorMessage,_that.rooms);case _:
+ return null;
+
+}
+}
+
+}
/// @nodoc
@@ -111,7 +240,7 @@ int get hashCode => Object.hash(runtimeType,isLoading,errorMessage,const DeepCol
@override
String toString() {
- return 'ChooseShareRoomState._(isLoading: $isLoading, errorMessage: $errorMessage, rooms: $rooms)';
+ return 'ChooseShareRoomState(isLoading: $isLoading, errorMessage: $errorMessage, rooms: $rooms)';
}
diff --git a/comwell_key_app/lib/.generated/notifications/models/notification_permission.g.dart b/comwell_key_app/lib/.generated/notifications/models/notification_permission.g.dart
index 2e67b24d..1f9baa7e 100644
--- a/comwell_key_app/lib/.generated/notifications/models/notification_permission.g.dart
+++ b/comwell_key_app/lib/.generated/notifications/models/notification_permission.g.dart
@@ -10,8 +10,10 @@ NotificationPermission _$NotificationPermissionFromJson(Map json) =>
NotificationPermission(
code: json['code'] as String,
displayName: json['displayName'] as String,
- notificationPermissionDescription:
- json['notificationPermissionDescription'] as String?,
+ notificationPermissionDescription: $enumDecodeNullable(
+ _$NotificationPermissionTypeEnumMap,
+ json['notificationPermissionDescription'],
+ ),
given: json['given'] as bool,
);
@@ -21,6 +23,20 @@ Map<String, dynamic> _$NotificationPermissionToJson(
'code': instance.code,
'displayName': instance.displayName,
'notificationPermissionDescription':
- instance.notificationPermissionDescription,
+ _$NotificationPermissionTypeEnumMap[instance
+ .notificationPermissionDescription],
'given': instance.given,
};
+
+const _$NotificationPermissionTypeEnumMap = {
+ NotificationPermissionType.b2bNewsletter: 'b2bNewsletter',
+ NotificationPermissionType.ccEmail: 'ccEmail',
+ NotificationPermissionType.ccDigital: 'ccDigital',
+ NotificationPermissionType.ccSms: 'ccSms',
+ NotificationPermissionType.b2bDigital: 'b2bDigital',
+ NotificationPermissionType.companyEmail: 'companyEmail',
+ NotificationPermissionType.companyNotifications: 'companyNotifications',
+ NotificationPermissionType.stayEmails: 'stayEmails',
+ NotificationPermissionType.appNotifications: 'appNotifications',
+ NotificationPermissionType.similarProducts: 'similarProducts',
+};
diff --git a/comwell_key_app/lib/.generated/redeem_debug/bloc/redeem_cubit.freezed.dart b/comwell_key_app/lib/.generated/redeem_debug/bloc/redeem_cubit.freezed.dart
deleted file mode 100644
index d7c44740..00000000
--- a/comwell_key_app/lib/.generated/redeem_debug/bloc/redeem_cubit.freezed.dart
+++ /dev/null
@@ -1,271 +0,0 @@
-// GENERATED CODE - DO NOT MODIFY BY HAND
-// coverage:ignore-file
-// ignore_for_file: type=lint
-// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
-
-part of '../../../redeem_debug/bloc/redeem_cubit.dart';
-
-// **************************************************************************
-// FreezedGenerator
-// **************************************************************************
-
-// dart format off
-T _$identity<T>(T value) => value;
-/// @nodoc
-mixin _$RedeemScreenState {
-
- bool get isLoading;
-/// Create a copy of RedeemScreenState
-/// with the given fields replaced by the non-null parameter values.
-@JsonKey(includeFromJson: false, includeToJson: false)
-@pragma('vm:prefer-inline')
-$RedeemScreenStateCopyWith<RedeemScreenState> get copyWith => _$RedeemScreenStateCopyWithImpl<RedeemScreenState>(this as RedeemScreenState, _$identity);
-
-
-
-@override
-bool operator ==(Object other) {
- return identical(this, other) || (other.runtimeType == runtimeType&&other is RedeemScreenState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading));
-}
-
-
-@override
-int get hashCode => Object.hash(runtimeType,isLoading);
-
-@override
-String toString() {
- return 'RedeemScreenState(isLoading: $isLoading)';
-}
-
-
-}
-
-/// @nodoc
-abstract mixin class $RedeemScreenStateCopyWith<$Res> {
- factory $RedeemScreenStateCopyWith(RedeemScreenState value, $Res Function(RedeemScreenState) _then) = _$RedeemScreenStateCopyWithImpl;
-@useResult
-$Res call({
- bool isLoading
-});
-
-
-
-
-}
-/// @nodoc
-class _$RedeemScreenStateCopyWithImpl<$Res>
- implements $RedeemScreenStateCopyWith<$Res> {
- _$RedeemScreenStateCopyWithImpl(this._self, this._then);
-
- final RedeemScreenState _self;
- final $Res Function(RedeemScreenState) _then;
-
-/// Create a copy of RedeemScreenState
-/// with the given fields replaced by the non-null parameter values.
-@pragma('vm:prefer-inline') @override $Res call({Object? isLoading = null,}) {
- return _then(_self.copyWith(
-isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
-as bool,
- ));
-}
-
-}
-
-
-/// Adds pattern-matching-related methods to [RedeemScreenState].
-extension RedeemScreenStatePatterns on RedeemScreenState {
-/// A variant of `map` that fallback to returning `orElse`.
-///
-/// It is equivalent to doing:
-/// ```dart
-/// switch (sealedClass) {
-/// case final Subclass value:
-/// return ...;
-/// case _:
-/// return orElse();
-/// }
-/// ```
-
-@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _RedeemScreenState value)? $default,{required TResult orElse(),}){
-final _that = this;
-switch (_that) {
-case _RedeemScreenState() when $default != null:
-return $default(_that);case _:
- return orElse();
-
-}
-}
-/// A `switch`-like method, using callbacks.
-///
-/// Callbacks receives the raw object, upcasted.
-/// It is equivalent to doing:
-/// ```dart
-/// switch (sealedClass) {
-/// case final Subclass value:
-/// return ...;
-/// case final Subclass2 value:
-/// return ...;
-/// }
-/// ```
-
-@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _RedeemScreenState value) $default,){
-final _that = this;
-switch (_that) {
-case _RedeemScreenState():
-return $default(_that);case _:
- throw StateError('Unexpected subclass');
-
-}
-}
-/// A variant of `map` that fallback to returning `null`.
-///
-/// It is equivalent to doing:
-/// ```dart
-/// switch (sealedClass) {
-/// case final Subclass value:
-/// return ...;
-/// case _:
-/// return null;
-/// }
-/// ```
-
-@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _RedeemScreenState value)? $default,){
-final _that = this;
-switch (_that) {
-case _RedeemScreenState() when $default != null:
-return $default(_that);case _:
- return null;
-
-}
-}
-/// A variant of `when` that fallback to an `orElse` callback.
-///
-/// It is equivalent to doing:
-/// ```dart
-/// switch (sealedClass) {
-/// case Subclass(:final field):
-/// return ...;
-/// case _:
-/// return orElse();
-/// }
-/// ```
-
-@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( bool isLoading)? $default,{required TResult orElse(),}) {final _that = this;
-switch (_that) {
-case _RedeemScreenState() when $default != null:
-return $default(_that.isLoading);case _:
- return orElse();
-
-}
-}
-/// A `switch`-like method, using callbacks.
-///
-/// As opposed to `map`, this offers destructuring.
-/// It is equivalent to doing:
-/// ```dart
-/// switch (sealedClass) {
-/// case Subclass(:final field):
-/// return ...;
-/// case Subclass2(:final field2):
-/// return ...;
-/// }
-/// ```
-
-@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( bool isLoading) $default,) {final _that = this;
-switch (_that) {
-case _RedeemScreenState():
-return $default(_that.isLoading);case _:
- throw StateError('Unexpected subclass');
-
-}
-}
-/// A variant of `when` that fallback to returning `null`
-///
-/// It is equivalent to doing:
-/// ```dart
-/// switch (sealedClass) {
-/// case Subclass(:final field):
-/// return ...;
-/// case _:
-/// return null;
-/// }
-/// ```
-
-@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( bool isLoading)? $default,) {final _that = this;
-switch (_that) {
-case _RedeemScreenState() when $default != null:
-return $default(_that.isLoading);case _:
- return null;
-
-}
-}
-
-}
-
-/// @nodoc
-
-
-class _RedeemScreenState implements RedeemScreenState {
- const _RedeemScreenState({this.isLoading = false});
-
-
-@override@JsonKey() final bool isLoading;
-
-/// Create a copy of RedeemScreenState
-/// with the given fields replaced by the non-null parameter values.
-@override @JsonKey(includeFromJson: false, includeToJson: false)
-@pragma('vm:prefer-inline')
-_$RedeemScreenStateCopyWith<_RedeemScreenState> get copyWith => __$RedeemScreenStateCopyWithImpl<_RedeemScreenState>(this, _$identity);
-
-
-
-@override
-bool operator ==(Object other) {
- return identical(this, other) || (other.runtimeType == runtimeType&&other is _RedeemScreenState&&(identical(other.isLoading, isLoading) || other.isLoading == isLoading));
-}
-
-
-@override
-int get hashCode => Object.hash(runtimeType,isLoading);
-
-@override
-String toString() {
- return 'RedeemScreenState(isLoading: $isLoading)';
-}
-
-
-}
-
-/// @nodoc
-abstract mixin class _$RedeemScreenStateCopyWith<$Res> implements $RedeemScreenStateCopyWith<$Res> {
- factory _$RedeemScreenStateCopyWith(_RedeemScreenState value, $Res Function(_RedeemScreenState) _then) = __$RedeemScreenStateCopyWithImpl;
-@override @useResult
-$Res call({
- bool isLoading
-});
-
-
-
-
-}
-/// @nodoc
-class __$RedeemScreenStateCopyWithImpl<$Res>
- implements _$RedeemScreenStateCopyWith<$Res> {
- __$RedeemScreenStateCopyWithImpl(this._self, this._then);
-
- final _RedeemScreenState _self;
- final $Res Function(_RedeemScreenState) _then;
-
-/// Create a copy of RedeemScreenState
-/// with the given fields replaced by the non-null parameter values.
-@override @pragma('vm:prefer-inline') $Res call({Object? isLoading = null,}) {
- return _then(_RedeemScreenState(
-isLoading: null == isLoading ? _self.isLoading : isLoading // ignore: cast_nullable_to_non_nullable
-as bool,
- ));
-}
-
-
-}
-
-// dart format on
diff --git a/comwell_key_app/lib/pregistration/pages/prereg_address_page.dart b/comwell_key_app/lib/pregistration/pages/prereg_address_page.dart
index 124459a0..64ad17a5 100644
--- a/comwell_key_app/lib/pregistration/pages/prereg_address_page.dart
+++ b/comwell_key_app/lib/pregistration/pages/prereg_address_page.dart
@@ -115,7 +115,7 @@ class PreregAddressPage extends StatelessWidget {
padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 12),
child: DropdownButtonFormField<String>(
hint: Text(context.strings.document_type),
- value: state.selectedDocumentType.isNotEmpty
+ initialValue: state.selectedDocumentType.isNotEmpty
? state.selectedDocumentType
: null,
style: Theme.of(context).textTheme.headlineSmall?.copyWith(color: Colors.black),