commit for release
parent
5b8a67131f
commit
c4fd2d9bd8
|
@ -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: 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),
|
||||
),
|
||||
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,
|
||||
|
||||
),
|
||||
child: SvgPicture.asset(
|
||||
'assets/svgs/male.svg',
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue