-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cat-voices): registration transaction summary (#921)
* feat(cat-voices): registration transaction summary * chore: cleanup localizations * refactor: apply bullet list
- Loading branch information
Showing
11 changed files
with
436 additions
and
33 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
147 changes: 138 additions & 9 deletions
147
catalyst_voices/lib/pages/registration/wallet_link/stage/rbac_transaction_panel.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import 'package:catalyst_voices_shared/catalyst_voices_shared.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
/// Displays a list of bulleted points. Similar to <ul><li></li></ul> in html. | ||
class BulletList extends StatelessWidget { | ||
/// The list of items without the bullet. | ||
final List<String> items; | ||
|
||
/// The text style applied to the bullet point and the [items]. | ||
/// | ||
/// Defaults to Theme.of(context).textTheme.bodySmall, | ||
final TextStyle? style; | ||
|
||
/// The amount of vertical space between the [items]. | ||
final double spacing; | ||
|
||
const BulletList({ | ||
super.key, | ||
required this.items, | ||
this.style, | ||
this.spacing = 4, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Column( | ||
children: <Widget>[ | ||
for (final item in items) | ||
_BulletItem( | ||
text: item, | ||
style: style ?? Theme.of(context).textTheme.bodySmall, | ||
), | ||
].separatedBy(SizedBox(height: spacing)).toList(), | ||
); | ||
} | ||
} | ||
|
||
class _BulletItem extends StatelessWidget { | ||
final String text; | ||
final TextStyle? style; | ||
|
||
const _BulletItem({ | ||
required this.text, | ||
this.style, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Row( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Text( | ||
'• ', | ||
style: style, | ||
), | ||
Flexible( | ||
child: Text( | ||
text, | ||
style: style, | ||
), | ||
), | ||
], | ||
); | ||
} | ||
} |
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
Oops, something went wrong.