-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Use scope instead of authoriztion_details based on switch #2066
- Loading branch information
Showing
13 changed files
with
142 additions
and
4 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
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
70 changes: 70 additions & 0 deletions
70
lib/dashboard/drawer/ssi/advanced_settings2/oidc4vc_settngs/widget/scope_parameter.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,70 @@ | ||
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 ScopeParameterWidget extends StatelessWidget { | ||
const ScopeParameterWidget({super.key}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
final l10n = context.l10n; | ||
return 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.drawerSurface, | ||
borderRadius: const BorderRadius.all( | ||
Radius.circular(Sizes.largeRadius), | ||
), | ||
), | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
const SizedBox(height: 10), | ||
Padding( | ||
padding: const EdgeInsets.symmetric(horizontal: 10), | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Text( | ||
l10n.scopeParameters, | ||
style: Theme.of(context).textTheme.drawerItemTitle, | ||
), | ||
const SizedBox(height: 10), | ||
Text( | ||
l10n.scopeParametersSubtitle, | ||
style: Theme.of(context).textTheme.drawerItemSubtitle, | ||
), | ||
], | ||
), | ||
), | ||
const SizedBox(height: 10), | ||
Switch( | ||
onChanged: (value) async { | ||
await context | ||
.read<ProfileCubit>() | ||
.updateScopeParameterStatus( | ||
enabled: value, | ||
); | ||
}, | ||
value: state.model.enableScopeParameter, | ||
activeColor: Theme.of(context).colorScheme.primary, | ||
), | ||
], | ||
), | ||
), | ||
], | ||
); | ||
}, | ||
); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
lib/dashboard/drawer/ssi/advanced_settings2/oidc4vc_settngs/widget/widget.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,5 +1,6 @@ | ||
export 'cryptograhic_holder_binding.dart'; | ||
export 'did_key_type_widget.dart'; | ||
export 'scope_parameter.dart'; | ||
export 'security_level_widget.dart'; | ||
export 'six_or_four_pin_widget.dart'; | ||
export 'subject_syntax_type_widget.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
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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
String listToString(List<dynamic> inputList) { | ||
final resultList = <dynamic>[]; | ||
|
||
for (var i = 0; i < inputList.length; i++) { | ||
resultList.add(inputList[i]); | ||
|
||
if (i < inputList.length - 1) { | ||
resultList.add(' '); | ||
} | ||
} | ||
|
||
return resultList.join(); | ||
} |
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