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