You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mohemm-flutter-app/lib/ui/profile/widgets/profile_panel.dart

60 lines
1.9 KiB
Dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:mohem_flutter_app/classes/utils.dart';
import 'package:mohem_flutter_app/models/member_information_list_model.dart';
import 'package:mohem_flutter_app/ui/profile/widgets/profile_info.dart';
class ProfilePanel extends StatelessWidget {
ProfilePanel(this.memberInformationList);
late MemberInformationListModel memberInformationList;
@override
Widget build(BuildContext context) {
return SizedBox(
height: MediaQuery.of(context).size.height,
child: Stack(
children: [
Container(
margin: const EdgeInsets.only(top: 32),
padding: const EdgeInsets.only(top: 37),
decoration: BoxDecoration(
color: Colors.white,
// border: Border.all(color: MyColors.lightGreyEFColor, width: 1),
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(25),
topRight: Radius.circular(25),
),
boxShadow: [
BoxShadow(
color: const Color(0xff000000).withOpacity(.1),
blurRadius: 26,
offset: const Offset(0, -3),
),
],
),
child: ProfileInFo(memberInformationList),
),
Container(height: 68, alignment: Alignment.center, child: profileImage())
],
),
);
}
Widget profileImage() => memberInformationList.eMPLOYEEIMAGE == null
? SvgPicture.asset(
"assets/images/user.svg",
height: 68,
width: 68,
)
: ClipOval(
child: Image.memory(
Utils.dataFromBase64String(memberInformationList.eMPLOYEEIMAGE!),
width: 75,
height: 75,
fit: BoxFit.fill,
),
);
}