LCOV - code coverage report
Current view: top level - profile/widgets - profile_avatar.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 0 9 0.0 %
Date: 2022-03-03 12:16:56 Functions: 0 0 -

          Line data    Source code
       1             : import 'package:flutter/material.dart';
       2             : 
       3             : import '../../../actions.dart';
       4             : import '../../../types.dart';
       5             : import '../../redux/extensions/build_context_extensions.dart';
       6             : import 'checked_circle_avatar.dart';
       7             : 
       8             : class ProfileAvatar<T extends RedFireState> extends StatelessWidget {
       9             :   final String? photoURL;
      10             :   final void Function()? onPressed;
      11           0 :   const ProfileAvatar(this.photoURL, {this.onPressed, Key? key})
      12           0 :       : super(key: key);
      13             : 
      14           0 :   @override
      15             :   Widget build(BuildContext context) {
      16           0 :     final localPhotoURL = photoURL; // gimme that flow analysis
      17           0 :     return RawMaterialButton(
      18           0 :       onPressed: onPressed ??
      19           0 :           () => context.dispatch<T>(const PushPageAction(ProfilePageData())),
      20             :       elevation: 0.0,
      21             :       fillColor: Colors.white,
      22             :       padding: const EdgeInsets.all(5.0),
      23             :       shape: const CircleBorder(),
      24           0 :       child: CircleAvatar(
      25             :         radius: 17,
      26             :         backgroundColor: const Color(0xffFDCF09),
      27             :         child: (localPhotoURL == null)
      28             :             ? const Icon(Icons.account_circle_outlined)
      29           0 :             : CheckedCircleAvatar(radius: 15, url: localPhotoURL),
      30             :       ),
      31             :     );
      32             :   }
      33             : }

Generated by: LCOV version 1.13