mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-26 22:03:55 +03:00
Remove avatar-less mode for OATH
This commit is contained in:
parent
561abb30ed
commit
2de557324f
@ -78,9 +78,6 @@ class _AccountViewState extends ConsumerState<AccountView> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final hasFeature = ref.watch(featureProvider);
|
final hasFeature = ref.watch(featureProvider);
|
||||||
final helper = AccountHelper(context, ref, credential);
|
final helper = AccountHelper(context, ref, credential);
|
||||||
|
|
||||||
return LayoutBuilder(builder: (context, constraints) {
|
|
||||||
final showAvatar = constraints.maxWidth >= 340;
|
|
||||||
final subtitle = helper.subtitle;
|
final subtitle = helper.subtitle;
|
||||||
final circleAvatar = CircleAvatar(
|
final circleAvatar = CircleAvatar(
|
||||||
foregroundColor: Theme.of(context).colorScheme.background,
|
foregroundColor: Theme.of(context).colorScheme.background,
|
||||||
@ -97,10 +94,8 @@ class _AccountViewState extends ConsumerState<AccountView> {
|
|||||||
return AppListItem<OathCredential>(
|
return AppListItem<OathCredential>(
|
||||||
credential,
|
credential,
|
||||||
selected: widget.selected,
|
selected: widget.selected,
|
||||||
leading: showAvatar
|
leading:
|
||||||
? AccountIcon(
|
AccountIcon(issuer: credential.issuer, defaultWidget: circleAvatar),
|
||||||
issuer: credential.issuer, defaultWidget: circleAvatar)
|
|
||||||
: null,
|
|
||||||
title: helper.title,
|
title: helper.title,
|
||||||
subtitle: subtitle,
|
subtitle: subtitle,
|
||||||
semanticTitle: _a11yCredentialLabel(
|
semanticTitle: _a11yCredentialLabel(
|
||||||
@ -122,6 +117,5 @@ class _AccountViewState extends ConsumerState<AccountView> {
|
|||||||
: null,
|
: null,
|
||||||
buildPopupActions: (_) => helper.buildActions(),
|
buildPopupActions: (_) => helper.buildActions(),
|
||||||
);
|
);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user