LCOV - code coverage report
Current view: top level - lib/pages/profile/widgets - profile_picture.dart Coverage Total Hit
Test: lcov.info Lines: 0.0 % 20 0
Test Date: 2025-05-10 20:26:13 Functions: - 0 0

            Line data    Source code
       1              : import 'package:amadeus_proto/api/models/profile.dart';
       2              : // import 'package:amadeus_proto/utils/image_loader.dart';
       3              : import 'package:amadeus_proto/widget/padded_card.dart';
       4              : import 'package:flutter/material.dart';
       5              : import 'package:flutter_svg/svg.dart';
       6              : 
       7              : class ProfilePic extends StatelessWidget {
       8            0 :   const ProfilePic({
       9              :     super.key,
      10              :     required this.user,
      11              :     this.size = 170,
      12              :     this.isFriend = false,
      13              :   });
      14              : 
      15              :   final bool isFriend;
      16              :   final Profile user;
      17              :   final double size;
      18              : 
      19            0 :   @override
      20              :   Widget build(BuildContext context) {
      21            0 :     return Center(
      22            0 :       child: Column(
      23            0 :         children: [
      24            0 :           SizedBox.square(
      25            0 :             dimension: size + 20,
      26            0 :             child: Stack(children: [
      27            0 :               Center(
      28            0 :                 child: ClipOval(
      29              :                   // child: Image.network(
      30              :                   //   user.imageUrl,
      31              :                   //   height: size,
      32              :                   //   loadingBuilder: imageLoader,
      33            0 :                   child: Image.asset(   // Use local storage for demo
      34            0 :                     user.imageUrl ?? "assets/images/fake users/user.png",
      35            0 :                     height: size,
      36              :                   ),
      37              :                 ),
      38              :               ),
      39            0 :               if (!isFriend)
      40            0 :                 Align(
      41              :                   alignment: const Alignment(1, 0.8),
      42            0 :                   child: InkWell(
      43            0 :                     onTap: () {
      44            0 :                       print("Change profile image"); // TODO
      45              :                     },
      46            0 :                     child: PaddedCard(
      47            0 :                       child: SvgPicture.asset(
      48              :                         "assets/FigmaDesign/Asset/SVG/Camera 1.svg",
      49              :                         height: 30,
      50              :                       ),
      51              :                     ),
      52              :                   ),
      53              :                 ),
      54              :             ]),
      55              :           ),
      56              :         ],
      57              :       ),
      58              :     );
      59              :   }
      60              : }
        

Generated by: LCOV version 2.3-1