Skip to content

Commit

Permalink
October (#2846)
Browse files Browse the repository at this point in the history
* fix: Update account name instantly #2667

* linter update

* feat: Add green color for card valid status #2764

* color adjustment

* fix: Avoid double scan to get and present #2668

* fix: Fetch uri for image but not working and indication of deleted message #2771

* feat: Add all type of VCs #2779

* feat: Support all types presentaton wth VCFormat auto #2779

* feat: Update credential request for draft 13 - jwt_vc_json and ldp_vc #2796

* version update: 2.9.8+477

* Revert "version update: 2.9.8+477"

This reverts commit 6e8265c.

* refactor: Update oidc4vc test

* refactor: Try to display image #2771

* fix: Fix image and add photo viewer #2771

* refactor: Optimise code to load image smoothly side by side #2771

* feat: Display advanced security option in enterprise #2584

* feat: Update error responses #2573

* refactor: Remove long error message for now #2573

* refactor: Display advanced security options #2584

* refactor: Bug fix and optimise code

* some update and package update

* feat: Some bug fix

* feat: Add some etherlink functionlities #2820

* version update: 2.10.4+486

* feat: Add empty etherlink when no tokens are available

* version update : 2.10.5+487

* feat: Add etherlink balance and transfer

* version update: 2.10.6+488

* refactor: Copy clipboard data correctly #2830

* refactor: Copy clipboard data correctly #2830

* refactor: Create crypto account VC for etherlink #2833

* feat: Set timeout of 10seconds for statulist http get #2824

* feat: Enable advanced settings for non-enterprise profile #2828

* refactor: Correct the backend provider url #2818

* feat: Display some vc based on crypto account did issuer #2680

* version update: 2.10.7+489

* fix: Advanced security option #2828

* feat: Fix wallet configuration failing issue #2835

* fix: Show crypto account for respective wallet address only #2833

* version update:  2.10.8+490

* fix: Solve deeplink issue #2836

* feat: Fix button of dialog #2816

* version update: 2.10.9+491

* feat: Change icon color for Add account section #2842

* feat: Improve screen design #2815

* feat: Dialog bug fix

* feat: Add cancel button in sd-jwt selection screen #2843

* feat: Hide disabled button when limited disclosure is required #2844

* feat: Change the issuer call for vertifiable ID for profile DIIP V3.0 in discover #2837

* version update: 2.10.11+493

* refactor: Remove unnecessary codes

* feat: Add empty tokens for etherlink #2840

* feat: Add empty tokens for tezos #2840

* feat: Add empty tokens for tezos #2840

* feat: Add empty tokens for evms #2840

* display nested json on one level - no display

---------

Co-authored-by: Bibash Shrestha <bibashshrestha@gmail.com>
  • Loading branch information
hawkbee1 and bibash28 authored Aug 21, 2024
1 parent 6fa1c5a commit ff2f74c
Show file tree
Hide file tree
Showing 40 changed files with 1,226 additions and 1,099 deletions.
Binary file modified assets/image/create-account-method.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/image/dummy_pid_card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/image/import-account-method.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions lib/app/shared/constants/image_strings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ class ImageStrings {

static const String dummyVerifiableIdCard =
'$imagePath/dummy_verifiable_id_card.png';
static const String dummyPIDCard = '$imagePath/dummy_pid_card.png';

static const String dummyPhonePassCard =
'$imagePath/dummy_phone_pass_card.png';
Expand Down
22 changes: 22 additions & 0 deletions lib/app/shared/enum/type/blockchain_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,26 @@ extension BlockchainTypeX on BlockchainType {

return false;
}

String get category {
switch (this) {
case BlockchainType.tezos:
return 'tezos-ecosystem';

case BlockchainType.ethereum:
return 'ethereum-ecosystem';

case BlockchainType.fantom:
return 'fantom-ecosystem';

case BlockchainType.polygon:
return 'polygon-ecosystem';

case BlockchainType.binance:
return 'binance-smart-chain';

case BlockchainType.etherlink:
return 'etherlink-ecosystem';
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -898,12 +898,18 @@ extension CredentialSubjectTypeExtension on CredentialSubjectType {
howToGetIt = ResponseString.RESPONSE_STRING_tezVoucherHowToGetIt;

case CredentialSubjectType.verifiableIdCard:
image = ImageStrings.dummyVerifiableIdCard;

var type = 'verifiableid';
image = ImageStrings.dummyVerifiableIdCard;

if (vcFormatType == VCFormatType.vcSdJWT) {
type = 'identitycredential';
final discoverCardsOptions = profileSetting.discoverCardsOptions;
if (discoverCardsOptions != null &&
discoverCardsOptions.displayVerifiableIdSdJwt) {
type = 'pid';
image = ImageStrings.dummyPIDCard;
} else {
type = 'identitycredential';
}
} else if (vcFormatType == VCFormatType.jwtVc) {
type = 'individualverifiableattestation';
}
Expand Down
5 changes: 2 additions & 3 deletions lib/app/shared/widget/button/my_elevated_button.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:altme/app/app.dart';
import 'package:flutter/material.dart';

class MyElevatedButton extends StatelessWidget {
Expand Down Expand Up @@ -53,7 +54,6 @@ class MyElevatedButton extends StatelessWidget {
),
onPressed: onPressed,
child: Text(
maxLines: 1,
text.toUpperCase(),
style: Theme.of(context).textTheme.titleLarge!.copyWith(
fontWeight: FontWeight.bold,
Expand All @@ -78,8 +78,7 @@ class MyElevatedButton extends StatelessWidget {
onPressed: onPressed,
),
onPressed: onPressed,
label: Text(
maxLines: 1,
label: MyText(
text.toUpperCase(),
style: Theme.of(context).textTheme.titleLarge!.copyWith(
fontWeight: FontWeight.bold,
Expand Down
15 changes: 11 additions & 4 deletions lib/app/shared/widget/custom_listtile_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,17 @@ class CustomListTileCard extends StatelessWidget {
style: Theme.of(context).textTheme.bodyMedium,
),
minVerticalPadding: 0,
trailing: Image.asset(
imageAssetPath,
width: Sizes.icon5x,
height: Sizes.icon5x,
trailing: Container(
height: 65,
width: 65,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Theme.of(context).colorScheme.secondary,
),
child: Image.asset(
imageAssetPath,
color: Theme.of(context).colorScheme.onSecondary,
),
),
);
}
Expand Down
63 changes: 33 additions & 30 deletions lib/app/shared/widget/default_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,40 @@ class DefaultDialog extends StatelessWidget {
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(25)),
),
content: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const DialogCloseButton(),
const SizedBox(height: Sizes.spaceSmall),
Text(
title,
style: Theme.of(context).textTheme.headlineMedium,
textAlign: TextAlign.center,
),
const SizedBox(height: Sizes.spaceSmall),
Text(
description,
style: Theme.of(context).textTheme.bodyMedium,
textAlign: TextAlign.center,
),
const SizedBox(height: Sizes.spaceSmall),
if (buttonLabel != null)
MyElevatedButton(
text: buttonLabel!,
verticalSpacing: 18,
fontSize: 18,
borderRadius: 20,
backgroundColor: Theme.of(context).colorScheme.primary,
onPressed: () {
Navigator.of(context).pop();
onButtonClick?.call();
},
content: SizedBox(
width: MediaQuery.of(context).size.shortestSide * 0.8,
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const DialogCloseButton(),
const SizedBox(height: Sizes.spaceSmall),
Text(
title,
style: Theme.of(context).textTheme.headlineMedium,
textAlign: TextAlign.center,
),
],
const SizedBox(height: Sizes.spaceSmall),
Text(
description,
style: Theme.of(context).textTheme.bodyMedium,
textAlign: TextAlign.center,
),
const SizedBox(height: Sizes.spaceSmall),
if (buttonLabel != null)
MyElevatedButton(
text: buttonLabel!,
verticalSpacing: 18,
fontSize: 18,
borderRadius: 20,
backgroundColor: Theme.of(context).colorScheme.primary,
onPressed: () {
Navigator.of(context).pop();
onButtonClick?.call();
},
),
],
),
),
),
);
Expand Down
97 changes: 50 additions & 47 deletions lib/app/shared/widget/dialog/confirm_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,68 +41,71 @@ class ConfirmDialog extends StatelessWidget {
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(25)),
),
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
Image.asset(
icon,
width: 50,
height: 50,
color: icon == IconStrings.cardReceive ? textColor : null,
fit: BoxFit.fill,
),
const SizedBox(height: 10),
Text(
title,
style: Theme.of(context)
.textTheme
.headlineMedium!
.copyWith(color: textColor),
textAlign: TextAlign.center,
),
const SizedBox(height: Sizes.spaceSmall),
if (subtitle != null) ...[
content: SizedBox(
width: MediaQuery.of(context).size.shortestSide * 0.8,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Image.asset(
icon,
width: 50,
height: 50,
color: icon == IconStrings.cardReceive ? textColor : null,
fit: BoxFit.fill,
),
const SizedBox(height: 10),
Text(
subtitle!,
title,
style: Theme.of(context)
.textTheme
.titleLarge!
.headlineMedium!
.copyWith(color: textColor),
textAlign: TextAlign.center,
),
],
const SizedBox(height: 24),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
if (showNoButton) ...[
const SizedBox(height: Sizes.spaceSmall),
if (subtitle != null) ...[
Text(
subtitle!,
style: Theme.of(context)
.textTheme
.titleLarge!
.copyWith(color: textColor),
textAlign: TextAlign.center,
),
],
const SizedBox(height: 24),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
if (showNoButton) ...[
Expanded(
child: MyOutlinedButton(
text: no ?? l10n.no,
verticalSpacing: 14,
fontSize: 15,
elevation: 0,
onPressed: () {
Navigator.of(context).pop(false);
},
),
),
const SizedBox(width: 16),
],
Expanded(
child: MyOutlinedButton(
text: no ?? l10n.no,
child: MyElevatedButton(
text: yes ?? l10n.yes,
verticalSpacing: 14,
fontSize: 15,
elevation: 0,
onPressed: () {
Navigator.of(context).pop(false);
Navigator.of(context).pop(true);
},
),
),
const SizedBox(width: 16),
],
Expanded(
child: MyElevatedButton(
text: yes ?? l10n.yes,
verticalSpacing: 14,
fontSize: 15,
elevation: 0,
onPressed: () {
Navigator.of(context).pop(true);
},
),
),
],
),
],
),
],
),
),
);
}
Expand Down
90 changes: 47 additions & 43 deletions lib/app/shared/widget/dialog/error_details_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,53 +34,57 @@ class ErrorDetailsDialog extends StatelessWidget {
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(25)),
),
content: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const SizedBox(height: 25),
if (erroDescription != null) ...[
Text(
erroDescription!,
style: Theme.of(context)
.textTheme
.titleLarge!
.copyWith(color: textColor),
textAlign: TextAlign.center,
),
],
if (erroUrl != null) ...[
const SizedBox(height: Sizes.spaceXSmall),
TransparentInkWell(
onTap: () async {
await LaunchUrl.launch(
erroUrl!,
launchMode: LaunchMode.inAppWebView,
);
},
child: Text(
l10n.moreDetails,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.primary,
decoration: TextDecoration.underline,
decorationColor: Theme.of(context).colorScheme.primary,
),
content: SizedBox(
width: MediaQuery.of(context).size.shortestSide * 0.8,
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const SizedBox(height: 25),
if (erroDescription != null) ...[
Text(
erroDescription!,
style: Theme.of(context)
.textTheme
.titleLarge!
.copyWith(color: textColor),
textAlign: TextAlign.center,
),
],
if (erroUrl != null) ...[
const SizedBox(height: Sizes.spaceXSmall),
TransparentInkWell(
onTap: () async {
await LaunchUrl.launch(
erroUrl!,
launchMode: LaunchMode.inAppWebView,
);
},
child: Text(
l10n.moreDetails,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.primary,
decoration: TextDecoration.underline,
decorationColor:
Theme.of(context).colorScheme.primary,
),
textAlign: TextAlign.center,
),
),
],
const SizedBox(height: 24),
MyElevatedButton(
text: l10n.ok,
verticalSpacing: 14,
fontSize: 15,
elevation: 0,
onPressed: () {
Navigator.of(context).pop(true);
},
),
const SizedBox(height: 15),
],
const SizedBox(height: 24),
MyElevatedButton(
text: l10n.ok,
verticalSpacing: 14,
fontSize: 15,
elevation: 0,
onPressed: () {
Navigator.of(context).pop(true);
},
),
const SizedBox(height: 15),
],
),
),
),
);
Expand Down
Loading

0 comments on commit ff2f74c

Please sign in to comment.