buildClientLogo static method

Widget buildClientLogo(
  1. int clientType, {
  2. double height = 48.0,
  3. double width = 100.0,
})

Implementation

static Widget buildClientLogo(int clientType, {
  double height = 48.0,
  double width = 100.0,
}) {
  final service = GetIt.I<ClientLogoService>();

  return Obx(() {
    final url = service.logoUrl.value;

    if (url.isEmpty) {
      return SizedBox(height: height, width: width);
    }

    return url.endsWith('.svg')
        ? AppSVGNetwork(url, height: height, width: width)
        : AppImageNetwork(url, height: height, width: width);
  });
}