commit for release

feature/passo/PASSO-#1-Sync-data-from-device-to-postgre-and-vice-versa
PGAN-MIS 2023-09-06 08:54:53 +08:00
parent 5b8a67131f
commit c4fd2d9bd8
1 changed files with 34 additions and 18 deletions

View File

@ -31,9 +31,9 @@ class BasicInfo extends StatelessWidget {
child: ProgressHUD(
child: BlocBuilder<UserBloc, UserState>(
builder: (context, state) {
if (state is UserLoggedIn) {
String fileUrl = '${Url.instance.prefixHost()}://${Url.instance.host()}/media/${ state.userData!.employeeInfo!.profile!.photoPath!}';
String fileUrl =
'${Url.instance.prefixHost()}://${Url.instance.host()}/media/${state.userData?.employeeInfo?.profile?.photoPath}';
state.userData!.employeeInfo!.profile!.sex!.toUpperCase();
return SafeArea(
child: Scaffold(
@ -51,22 +51,38 @@ class BasicInfo extends StatelessWidget {
child: Stack(
alignment: Alignment.center,
children: [
CachedNetworkImage(
imageUrl: fileUrl,
imageBuilder: (context, imageProvider) =>
Container(
width: 160,
height: 160,
decoration: BoxDecoration(
border:
Border.all(color: Colors.black26, width: 3),
shape: BoxShape.circle,
image: DecorationImage(
image: imageProvider,
fit: BoxFit.cover),
),
),
placeholder: (context, url) =>
const CircularProgressIndicator(),
errorWidget: (context, url, error) =>
Container(
width: 160,
height: 160,
decoration: BoxDecoration(
border:
Border.all(color: Colors.white, width: 3),
shape: BoxShape.circle,
CachedNetworkImage(
imageUrl: fileUrl,
imageBuilder: (context, imageProvider) => Container(
width: 160,
height: 160,
decoration: BoxDecoration(
border: Border.all(color: third,width: 3),
shape: BoxShape.circle,
image: DecorationImage(
image: imageProvider, fit: BoxFit.cover),
),
),
placeholder: (context, url) => const CircularProgressIndicator(),
errorWidget: (context, url, error) =>const Icon(Icons.error),
),
),
child: SvgPicture.asset(
'assets/svgs/male.svg',
),
),
),
],
),
),