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