Allow nullable cmpCustImage and minor UI/text tweaks

Make cmpCustImage nullable in LoginResponseModel and stop requiring it in the constructor so missing images from the API are accepted. Handle potential nulls in OTPScreenController by coalescing to an empty string when assigning to UserProfileController.cmpCustImage. Update login screen logo asset path/size and remove the BoxFit, and simplify the sign-up first name hint/label from "User First Name" to "First Name". (pubspec.lock was also updated.)
image_issue_sawara
Sawara Rehman 5 hours ago
parent b84e4b4a1c
commit c4869fa97e

@ -12,7 +12,7 @@ class LoginResponseModel {
final String userRole; final String userRole;
final String jwtToken; final String jwtToken;
final String refreshToken; final String refreshToken;
final String cmpCustImage; final String? cmpCustImage;
final bool isKycVerified; final bool isKycVerified;
final bool isTranPinSet; final bool isTranPinSet;
@ -24,7 +24,7 @@ class LoginResponseModel {
required this.userRole, required this.userRole,
required this.jwtToken, required this.jwtToken,
required this.refreshToken, required this.refreshToken,
required this.cmpCustImage, this.cmpCustImage,
required this.isKycVerified, required this.isKycVerified,
required this.isTranPinSet, required this.isTranPinSet,
}); });

@ -113,7 +113,7 @@ class LoginScreenView extends GetView<LoginScreenController> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Center( Center(
child: Image.asset(AppAssets.uc_logo, height: 56, width: 130, fit: BoxFit.cover), child: Image.asset("assets/uco/logo/ic_launcher.png", height: 90, width: 130,/* fit: BoxFit.cover*/),
), ),
const SizedBox(height: 20), const SizedBox(height: 20),
controller.userNameInputField = InputField( controller.userNameInputField = InputField(

@ -75,7 +75,7 @@ class OTPScreenController extends GetxController {
SessionCache.instance.userInfo.pctCstycode = RequestConstants.pctCstycode; SessionCache.instance.userInfo.pctCstycode = RequestConstants.pctCstycode;
SessionCache.instance.userInfo.isKycVerified = model.isKycVerified; SessionCache.instance.userInfo.isKycVerified = model.isKycVerified;
SessionCache.instance.userInfo.isTranPinSet = model.isTranPinSet; SessionCache.instance.userInfo.isTranPinSet = model.isTranPinSet;
UserProfileController.cmpCustImage.value = model.cmpCustImage; UserProfileController.cmpCustImage.value = model.cmpCustImage??"";
if (!SessionCache.instance.userInfo.isTranPinSet) { if (!SessionCache.instance.userInfo.isTranPinSet) {
Get.offAndToNamed(Routes.CREATE_TRANSACTION_PIN); Get.offAndToNamed(Routes.CREATE_TRANSACTION_PIN);

@ -67,8 +67,8 @@ class SignUpScreenStep1View extends GetView<SignUpScreenStep1Controller> {
enableInteractiveSelection: false, enableInteractiveSelection: false,
refKey: FormFieldConstants.instance().getFormKey("${className}firstNameField"), refKey: FormFieldConstants.instance().getFormKey("${className}firstNameField"),
controller: FormFieldConstants.instance().getController("${className}firstNameField"), controller: FormFieldConstants.instance().getController("${className}firstNameField"),
hintText: "User First Name", hintText: "First Name",
labelText: TranslationKeys.makeTranslation("User First Name"), labelText: TranslationKeys.makeTranslation("First Name"),
inputFormatters: [LengthLimitingTextInputFormatter(FieldUtils.userNameFieldLength)], inputFormatters: [LengthLimitingTextInputFormatter(FieldUtils.userNameFieldLength)],
) )
), ),

@ -193,6 +193,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.12.0" version: "0.12.0"
cli_util:
dependency: transitive
description:
name: cli_util
sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c
url: "https://pub.dev"
source: hosted
version: "0.4.2"
clock: clock:
dependency: transitive dependency: transitive
description: description:
@ -417,6 +425,38 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "7.0.1" version: "7.0.1"
file_selector_linux:
dependency: transitive
description:
name: file_selector_linux
sha256: "2567f398e06ac72dcf2e98a0c95df2a9edd03c2c2e0cacd4780f20cdf56263a0"
url: "https://pub.dev"
source: hosted
version: "0.9.4"
file_selector_macos:
dependency: transitive
description:
name: file_selector_macos
sha256: "5e0bbe9c312416f1787a68259ea1505b52f258c587f12920422671807c4d618a"
url: "https://pub.dev"
source: hosted
version: "0.9.5"
file_selector_platform_interface:
dependency: transitive
description:
name: file_selector_platform_interface
sha256: "35e0bd61ebcdb91a3505813b055b09b79dfdc7d0aee9c09a7ba59ae4bb13dc85"
url: "https://pub.dev"
source: hosted
version: "2.7.0"
file_selector_windows:
dependency: transitive
description:
name: file_selector_windows
sha256: "62197474ae75893a62df75939c777763d39c2bc5f73ce5b88497208bc269abfd"
url: "https://pub.dev"
source: hosted
version: "0.9.3+5"
fixnum: fixnum:
dependency: transitive dependency: transitive
description: description:
@ -518,6 +558,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.0" version: "1.0.0"
flutter_launcher_icons:
dependency: "direct dev"
description:
name: flutter_launcher_icons
sha256: "10f13781741a2e3972126fae08393d3c4e01fa4cd7473326b94b72cf594195e7"
url: "https://pub.dev"
source: hosted
version: "0.14.4"
flutter_lints: flutter_lints:
dependency: "direct dev" dependency: "direct dev"
description: description:
@ -744,6 +792,78 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.3.0" version: "4.3.0"
image_gallery_saver_plus:
dependency: "direct main"
description:
name: image_gallery_saver_plus
sha256: "199b9e24f8d85e98f11e3d35571ab68ae50626ad40e2bb85c84383f69a6950ad"
url: "https://pub.dev"
source: hosted
version: "4.0.1"
image_picker:
dependency: "direct main"
description:
name: image_picker
sha256: "91c025426c2881c551100bce834e201c835a170151545f58d17da5180ca7d9ac"
url: "https://pub.dev"
source: hosted
version: "1.2.2"
image_picker_android:
dependency: transitive
description:
name: image_picker_android
sha256: d5b3e1774af29c9ab00103afb0d4614070f924d2e0057ac867ec98800114793f
url: "https://pub.dev"
source: hosted
version: "0.8.13+17"
image_picker_for_web:
dependency: transitive
description:
name: image_picker_for_web
sha256: "66257a3191ab360d23a55c8241c91a6e329d31e94efa7be9cf7a212e65850214"
url: "https://pub.dev"
source: hosted
version: "3.1.1"
image_picker_ios:
dependency: transitive
description:
name: image_picker_ios
sha256: b9c4a438a9ff4f60808c9cf0039b93a42bb6c2211ef6ebb647394b2b3fa84588
url: "https://pub.dev"
source: hosted
version: "0.8.13+6"
image_picker_linux:
dependency: transitive
description:
name: image_picker_linux
sha256: "1f81c5f2046b9ab724f85523e4af65be1d47b038160a8c8deed909762c308ed4"
url: "https://pub.dev"
source: hosted
version: "0.2.2"
image_picker_macos:
dependency: transitive
description:
name: image_picker_macos
sha256: "86f0f15a309de7e1a552c12df9ce5b59fe927e71385329355aec4776c6a8ec91"
url: "https://pub.dev"
source: hosted
version: "0.2.2+1"
image_picker_platform_interface:
dependency: transitive
description:
name: image_picker_platform_interface
sha256: "567e056716333a1647c64bb6bd873cff7622233a5c3f694be28a583d4715690c"
url: "https://pub.dev"
source: hosted
version: "2.11.1"
image_picker_windows:
dependency: transitive
description:
name: image_picker_windows
sha256: d248c86554a72b5495a31c56f060cf73a41c7ff541689327b1a7dbccc33adfae
url: "https://pub.dev"
source: hosted
version: "0.2.2"
ini: ini:
dependency: transitive dependency: transitive
description: description:
@ -788,18 +908,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: json_annotation name: json_annotation
sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.8.1" version: "4.9.0"
json_serializable: json_serializable:
dependency: "direct main" dependency: "direct main"
description: description:
name: json_serializable name: json_serializable
sha256: aa1f5a8912615733e0fdc7a02af03308933c93235bdc8d50d0b0c8a8ccb0b969 sha256: ea1432d167339ea9b5bb153f0571d0039607a873d6e04e0117af043f14a1fd4b
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "6.7.1" version: "6.8.0"
leak_tracker: leak_tracker:
dependency: transitive dependency: transitive
description: description:

Loading…
Cancel
Save