[auth] Show notes on bottom action bar
This commit is contained in:
@@ -28,10 +28,14 @@ class Code {
|
||||
bool get isPinned => display.pinned;
|
||||
|
||||
bool get isTrashed => display.trashed;
|
||||
String get note => display.note;
|
||||
|
||||
final Object? err;
|
||||
bool get hasError => err != null;
|
||||
|
||||
String get issuerAccount =>
|
||||
account.isNotEmpty ? '$issuer ($account)' : issuer;
|
||||
|
||||
Code(
|
||||
this.account,
|
||||
this.issuer,
|
||||
|
||||
@@ -24,34 +24,49 @@ class _ActionBarWidgetState extends State<ActionBarWidget> {
|
||||
return SizedBox(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.fromLTRB(20, 8, 20, 8),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
child: Column(
|
||||
// left align the text
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Flexible(
|
||||
flex: 1,
|
||||
child: Text(
|
||||
widget.code.issuer,
|
||||
if (widget.code.note.isNotEmpty)
|
||||
Text(
|
||||
widget.code.note,
|
||||
style: textTheme.miniMuted,
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
flex: 1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
widget.onCancel?.call();
|
||||
},
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
context.l10n.cancel,
|
||||
style: textTheme.mini,
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Flexible(
|
||||
flex: 1,
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
widget.code.issuerAccount,
|
||||
style: textTheme.miniMuted,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
flex: 1,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
widget.onCancel?.call();
|
||||
},
|
||||
child: Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Text(
|
||||
context.l10n.cancel,
|
||||
style: textTheme.mini,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user