-
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: add dummy cards and support pre-authorized code is jwt
- Loading branch information
Showing
13 changed files
with
143 additions
and
47 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
60 changes: 60 additions & 0 deletions
60
lib/dashboard/home/tab_bar/credentials/widgets/dummy_credential_image.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,60 @@ | ||
import 'package:altme/app/app.dart'; | ||
import 'package:altme/dashboard/dashboard.dart'; | ||
import 'package:altme/theme/theme.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
class DummyCredentialImage extends StatelessWidget { | ||
const DummyCredentialImage({ | ||
required this.discoverDummyCredential, | ||
this.aspectRatio = Sizes.credentialAspectRatio, | ||
super.key, | ||
}); | ||
|
||
final DiscoverDummyCredential discoverDummyCredential; | ||
final double aspectRatio; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
String? title; | ||
|
||
if (discoverDummyCredential.credentialSubjectType == | ||
CredentialSubjectType.employeeCredential) { | ||
title = discoverDummyCredential.credentialSubjectType.title; | ||
} | ||
|
||
return CredentialContainer( | ||
child: DecoratedBox( | ||
decoration: BoxDecoration( | ||
image: DecorationImage( | ||
fit: BoxFit.fill, | ||
image: AssetImage(discoverDummyCredential.image!), | ||
), | ||
), | ||
child: AspectRatio( | ||
aspectRatio: aspectRatio, | ||
child: CustomMultiChildLayout( | ||
delegate: CredentialBaseWidgetDelegate(position: Offset.zero), | ||
children: [ | ||
if (title != null) | ||
LayoutId( | ||
id: 'title', | ||
child: FractionallySizedBox( | ||
widthFactor: 0.7, | ||
heightFactor: 0.19, | ||
child: Container( | ||
alignment: Alignment.centerLeft, | ||
child: MyText( | ||
title, | ||
style: | ||
Theme.of(context).textTheme.identitiyBaseTitleText, | ||
), | ||
), | ||
), | ||
), | ||
], | ||
), | ||
), | ||
), | ||
); | ||
} | ||
} |
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