-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added profile page for oidc4vc profiles #1744
- Loading branch information
Showing
11 changed files
with
145 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
lib/dashboard/drawer/ssi/manage_issuers_registry/widgets/widgets.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export 'grouped_section.dart'; | ||
export 'issuer_verifier_selector.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export 'view/oidc4vc_profile_page.dart'; |
97 changes: 97 additions & 0 deletions
97
lib/dashboard/drawer/ssi/oidc4vc_profile/view/oidc4vc_profile_page.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
import 'package:altme/app/app.dart'; | ||
import 'package:altme/dashboard/profile/profile.dart'; | ||
import 'package:altme/l10n/l10n.dart'; | ||
import 'package:altme/theme/theme.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_bloc/flutter_bloc.dart'; | ||
|
||
class OIDC4VCProfilePage extends StatelessWidget { | ||
const OIDC4VCProfilePage({super.key}); | ||
|
||
static Route<dynamic> route() { | ||
return MaterialPageRoute<void>( | ||
builder: (_) => const OIDC4VCProfilePage(), | ||
settings: const RouteSettings(name: '/OIDC4VCProfilePage'), | ||
); | ||
} | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final l10n = context.l10n; | ||
return BasePage( | ||
title: l10n.oidc4vcProfile, | ||
useSafeArea: true, | ||
scrollView: false, | ||
titleAlignment: Alignment.topCenter, | ||
padding: const EdgeInsets.symmetric(horizontal: Sizes.spaceSmall), | ||
titleLeading: const BackLeadingButton(), | ||
body: BlocBuilder<ProfileCubit, ProfileState>( | ||
builder: (context, state) { | ||
return Column( | ||
crossAxisAlignment: CrossAxisAlignment.stretch, | ||
mainAxisSize: MainAxisSize.max, | ||
children: <Widget>[ | ||
Container( | ||
padding: const EdgeInsets.all(Sizes.spaceSmall), | ||
margin: const EdgeInsets.all(Sizes.spaceXSmall), | ||
decoration: BoxDecoration( | ||
color: Theme.of(context).colorScheme.cardHighlighted, | ||
borderRadius: const BorderRadius.all( | ||
Radius.circular(Sizes.largeRadius), | ||
), | ||
), | ||
child: ListView.builder( | ||
itemCount: OIDC4VCTye.values.length, | ||
shrinkWrap: true, | ||
physics: const ScrollPhysics(), | ||
itemBuilder: (context, index) { | ||
return Column( | ||
children: [ | ||
ListTile( | ||
onTap: () { | ||
context | ||
.read<ProfileCubit>() | ||
.updateOIDC4VCType(OIDC4VCTye.values[index]); | ||
}, | ||
shape: const RoundedRectangleBorder( | ||
side: BorderSide( | ||
color: Color(0xFFDDDDEE), width: 0.5), | ||
), | ||
title: Text( | ||
OIDC4VCTye.values[index].name, | ||
style: Theme.of(context) | ||
.listTileTheme | ||
.titleTextStyle | ||
?.copyWith(color: const Color(0xFF080F33)), | ||
), | ||
trailing: Icon( | ||
state.model.oidc4vcType == | ||
OIDC4VCTye.values[index].toString() | ||
? Icons.radio_button_checked | ||
: Icons.radio_button_unchecked, | ||
size: Sizes.icon2x, | ||
), | ||
), | ||
if (index < OIDC4VCTye.values.length - 1) | ||
Padding( | ||
padding: const EdgeInsets.symmetric( | ||
horizontal: Sizes.spaceSmall, | ||
vertical: Sizes.spaceXSmall, | ||
), | ||
child: Divider( | ||
height: 0, | ||
color: Theme.of(context).colorScheme.borderColor, | ||
), | ||
), | ||
], | ||
); | ||
}, | ||
), | ||
), | ||
], | ||
); | ||
}, | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -924,5 +924,6 @@ | |
"placeholders": { | ||
"networkType": {} | ||
} | ||
} | ||
}, | ||
"oidc4vcProfile": "OIDC4VC Profile" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters