pageContent method

Widget pageContent()

Implementation

Widget pageContent() {
  return LayoutBuilder(
    builder: (context, constraints) {
      final isPhone = Get.width <= 960;
      return Padding(
        padding: EdgeInsets.fromLTRB(isPhone ? 20.dp : 32.dp, 17.dp, isPhone ? 4.dp : 16.dp, 17.dp),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            if (!isPhone) ...[
              Text(
                "My Profile",
                style: TextStyle(
                  fontSize: 16.dp,
                  fontWeight: FontWeight.w400,
                  color: ColorHelper.neutralLightText,
                ),
              ),
              11.dp.SpaceX,
            ],
            Text(
              "Manage Account",
              style: TextStyle(
                fontSize: 20.dp,
                fontWeight: FontWeight.w600,
                color: ColorHelper.black02,
              ),
            ),
            17.dp.SpaceX,
            Text(
              "Add Profile Picture",
              style: TextStyle(
                fontSize: 18.dp,
                fontWeight: FontWeight.w600,
                color: ColorHelper.neutralMediumText,
              ),
            ),
            12.dp.SpaceX,
            _profilePhoto(),
            32.dp.SpaceX,
            // Text(
            //   "General Settings",
            //   style: TextStyle(
            //     fontSize: 18.dp,
            //     fontWeight: FontWeight.w600,
            //     color: ColorHelper.neutralMediumText,
            //   ),
            // ),
            // _generalSettings(),
            // 26.dp.SpaceX,
            Obx(() {
              return Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Text(
                    "Profile Settings",
                    style: TextStyle(
                      fontSize: 18.dp,
                      fontWeight: FontWeight.w600,
                      color: ColorHelper.neutralMediumText,
                    ),
                  ),
                  _editButton(
                    controller.isEditingInformation,
                    () {
                      if (controller.isEditingInformation.value) {
                        controller.clearEditInformation();
                      }
                      controller.isEditingInformation.value =
                          !controller.isEditingInformation.value;
                    },
                  ),
                ],
              );
            }),
            _profileSettings(),
            13.dp.SpaceX,
            Obx(() {
              return _saveButton(
                isEditing: controller.isEditingInformation,
                onSave: controller.saveInformation,
              );
            }),
            13.dp.SpaceX,
            Obx(() {
              return Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  Text(
                    "Change Password",
                    style: TextStyle(
                      fontSize: 18.dp,
                      fontWeight: FontWeight.w600,
                      color: ColorHelper.neutralMediumText,
                    ),
                  ),
                  _editButton(controller.isEditingPassword,
                        () {
                      if (controller.isEditingPassword.value) {
                        controller.clearEditPassword();
                      }
                      controller.isEditingPassword.value =
                      !controller.isEditingPassword.value;
                    },
                  ),
                ],
              );
            }),

            4.dp.SpaceX,
            _changePassword(),
            13.dp.SpaceX,
            Obx(() {
              return _saveButton(
                isEditing: controller.isEditingPassword,
                onSave: controller.changePassword,
              );
            }),
            13.dp.SpaceX,
          ],
        ),
      );
    }
  );
}