remove extra parameter from peer tile

Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
This commit is contained in:
Sahil Yeole 2023-10-15 04:59:03 +05:30
parent 8127ce18a3
commit 2d6322f799

View File

@ -322,7 +322,7 @@ class _ConnectionPageState extends State<ConnectionPage>
),
child: ListView(
children: options
.map((peer) => _buildPeerTile(context, peer, null))
.map((peer) => _buildPeerTile(context, peer))
.toList()
),
),
@ -359,7 +359,7 @@ class _ConnectionPageState extends State<ConnectionPage>
}
Widget _buildPeerTile(
BuildContext context, Peer peer, Rx<BoxDecoration?>? deco) {
BuildContext context, Peer peer) {
final double _tileRadius = 5;
final name =
'${peer.username}${peer.username.isNotEmpty && peer.hostname.isNotEmpty ? '@' : ''}${peer.hostname}';
@ -444,14 +444,7 @@ class _ConnectionPageState extends State<ConnectionPage>
? '${translate('Tags')}: ${peer.tags.join(', ')}'
: '',
child: Stack(children: [
deco == null
? child
: Obx(
() => Container(
foregroundDecoration: deco.value,
child: child,
),
),
child,
if (colors.isNotEmpty)
Positioned(
top: 5,