This commit is contained in:
Dain Nilsson 2024-04-10 10:05:15 +02:00
commit 46b4afe030
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8

View File

@ -146,49 +146,53 @@ class _DeviceContent extends ConsumerWidget {
final label = initialCustomization?.name; final label = initialCustomization?.name;
String displayName = label != null ? '$label ($name)' : name; String displayName = label != null ? '$label ($name)' : name;
return Row( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Flexible( Row(
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, Flexible(
children: [ child: Text(
Text(
displayName, displayName,
style: Theme.of(context).textTheme.titleLarge, style: Theme.of(context).textTheme.titleLarge,
), ),
const SizedBox( ),
height: 12, if (serial != null)
), Padding(
if (serial != null) padding: const EdgeInsets.only(left: 8.0),
Text( child: IconButton(
l10n.l_serial_number(serial), icon: const Icon(Symbols.edit),
style: Theme.of(context).textTheme.titleSmall?.apply( onPressed: () async {
color: Theme.of(context).colorScheme.onSurfaceVariant), await ref.read(withContextProvider)((context) async {
await _showManageLabelDialog(
initialCustomization ??
KeyCustomization(serial: serial),
context,
);
});
},
), ),
Text( )
l10n.l_firmware_version(version), ],
style: Theme.of(context).textTheme.titleSmall?.apply( ),
color: Theme.of(context).colorScheme.onSurfaceVariant), const SizedBox(
), height: 12,
],
),
), ),
if (serial != null) if (serial != null)
Padding( Text(
padding: const EdgeInsets.only(left: 8.0), l10n.l_serial_number(serial),
child: IconButton( style: Theme.of(context)
icon: const Icon(Symbols.edit), .textTheme
onPressed: () async { .titleSmall
await ref.read(withContextProvider)((context) async { ?.apply(color: Theme.of(context).colorScheme.onSurfaceVariant),
await _showManageLabelDialog( ),
initialCustomization ?? KeyCustomization(serial: serial), Text(
context, l10n.l_firmware_version(version),
); style: Theme.of(context)
}); .textTheme
}, .titleSmall
), ?.apply(color: Theme.of(context).colorScheme.onSurfaceVariant),
) ),
], ],
); );
} }