stack_wallet/lib/pages/paynym/subwidgets/paynym_bot.dart
2023-05-27 00:21:16 +03:00

43 lines
1.1 KiB
Dart

/*
* This file is part of Stack Wallet.
*
* Copyright (c) 2023 Cypher Stack
* All Rights Reserved.
* The code is distributed under GPLv3 license, see LICENSE file for details.
* Generated by Cypher Stack on 2023-05-26
*
*/
import 'package:flutter/material.dart';
import 'package:stackwallet/widgets/loading_indicator.dart';
class PayNymBot extends StatelessWidget {
const PayNymBot({
Key? key,
required this.paymentCodeString,
this.size = 60.0,
}) : super(key: key);
final String paymentCodeString;
final double size;
@override
Widget build(BuildContext context) {
return ClipRRect(
borderRadius: BorderRadius.circular(size / 2),
child: SizedBox(
width: size,
height: size,
child: Image.network(
"https://paynym.is/$paymentCodeString/avatar",
loadingBuilder: (context, child, loadingProgress) =>
loadingProgress == null
? child
: const Center(
child: LoadingIndicator(),
),
),
),
);
}
}