mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-18 07:22:12 +03:00
27 lines
653 B
Dart
Executable File
27 lines
653 B
Dart
Executable File
import 'package:flutter/material.dart';
|
|
|
|
import '../models.dart';
|
|
import 'device_images.dart';
|
|
|
|
class DeviceAvatar extends StatelessWidget {
|
|
final DeviceNode device;
|
|
final bool selected;
|
|
|
|
const DeviceAvatar(this.device, {this.selected = false, Key? key})
|
|
: super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return CircleAvatar(
|
|
child: CircleAvatar(
|
|
child: getProductImage(device),
|
|
backgroundColor: Theme.of(context).colorScheme.background,
|
|
),
|
|
radius: 22,
|
|
backgroundColor: selected
|
|
? Theme.of(context).colorScheme.secondary
|
|
: Colors.transparent,
|
|
);
|
|
}
|
|
}
|