|
|
|
|
@ -54,8 +54,12 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|
|
|
|
if (mySubscription!.id == 1) {
|
|
|
|
|
freeTrialName = mySubscription!.name ?? "";
|
|
|
|
|
} else {
|
|
|
|
|
startDate = (mySubscription!.dateStart != null && mySubscription!.dateStart!.isNotEmpty) ? DateHelper.formatAsDayMonthYear(DateHelper.parseStringToDate(DateHelper.formatDateT(mySubscription!.dateStart!))) : "";
|
|
|
|
|
endDate = (mySubscription!.dateEnd != null && mySubscription!.dateEnd!.isNotEmpty) ? DateHelper.formatAsDayMonthYear(DateHelper.parseStringToDate(DateHelper.formatDateT(mySubscription!.dateEnd!))) : "";
|
|
|
|
|
startDate = (mySubscription!.dateStart != null && mySubscription!.dateStart!.isNotEmpty)
|
|
|
|
|
? DateHelper.formatAsDayMonthYear(DateHelper.parseStringToDate(DateHelper.formatDateT(mySubscription!.dateStart!)))
|
|
|
|
|
: "";
|
|
|
|
|
endDate = (mySubscription!.dateEnd != null && mySubscription!.dateEnd!.isNotEmpty)
|
|
|
|
|
? DateHelper.formatAsDayMonthYear(DateHelper.parseStringToDate(DateHelper.formatDateT(mySubscription!.dateEnd!)))
|
|
|
|
|
: "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return Stack(
|
|
|
|
|
@ -101,13 +105,34 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|
|
|
|
child: ListView(
|
|
|
|
|
children: [
|
|
|
|
|
60.height,
|
|
|
|
|
"${AppState().getUser.data!.userInfo!.firstName} ${AppState().getUser.data!.userInfo!.lastName ?? ""}".toText(fontSize: 20).paddingOnly(left: 25),
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: [
|
|
|
|
|
"${AppState().getUser.data!.userInfo!.firstName} ${AppState().getUser.data!.userInfo!.lastName ?? ""}".toText(fontSize: 20).paddingOnly(left: 25),
|
|
|
|
|
Container(
|
|
|
|
|
height: 40,
|
|
|
|
|
width: 40,
|
|
|
|
|
padding: const EdgeInsets.all(8),
|
|
|
|
|
decoration: BoxDecoration(color: MyColors.white, shape: BoxShape.circle, border: Border.all(color: MyColors.darkTextColor, width: 0.1)),
|
|
|
|
|
child: MyAssets.icEdit.buildSvg(),
|
|
|
|
|
).onPress(
|
|
|
|
|
() async {
|
|
|
|
|
await model.updateUserImage(context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
).margin(left: 0, top: 0, right: 24, bottom: 0).onPress(() {
|
|
|
|
|
print("Change User Name Here");
|
|
|
|
|
}),
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
if (AppState().currentAppType == AppType.provider && mySubscription != null) ...[
|
|
|
|
|
CustomProfileOptionsTile(
|
|
|
|
|
titleText: LocaleKeys.mySubscription.tr(),
|
|
|
|
|
subtitleText: freeTrialName.isNotEmpty ? freeTrialName : "${startDate.isNotEmpty ? "${LocaleKeys.startDate.tr()}: $startDate" : ""} ${endDate.isNotEmpty ? "${LocaleKeys.expiresOn.tr()}: $endDate" : ""}",
|
|
|
|
|
subtitleText: freeTrialName.isNotEmpty
|
|
|
|
|
? freeTrialName
|
|
|
|
|
: "${startDate.isNotEmpty ? "${LocaleKeys.startDate.tr()}: $startDate" : ""} ${endDate.isNotEmpty ? "${LocaleKeys.expiresOn.tr()}: $endDate" : ""}",
|
|
|
|
|
needBorderBelow: true,
|
|
|
|
|
needEditButton: false,
|
|
|
|
|
onTap: () {},
|
|
|
|
|
@ -196,7 +221,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
|
|
|
|
decoration: BoxDecoration(color: MyColors.white, shape: BoxShape.circle, border: Border.all(color: MyColors.darkTextColor, width: 0.1)),
|
|
|
|
|
child: MyAssets.icEdit.buildSvg(),
|
|
|
|
|
).onPress(
|
|
|
|
|
() async {
|
|
|
|
|
() async {
|
|
|
|
|
await model.updateUserImage(context);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
|