Untitled

 avatar
unknown
dart
2 years ago
4.3 kB
4
Indexable
Align(
                  alignment: Alignment.bottomCenter,
                  child: GestureDetector(
                    onTap: () {
                      if (controller.userStories.isEmpty) {
                        controller.profilePictureOnTap();
                      } else {
                        if (controller.userStories[0].storyId == '-1') {
                          controller.profilePictureOnTap();
                        } else {
                          controller.chooseOpenProfilePicOrShowStory(context);
                        }
                      }
                    },
                    child: Stack(
                      alignment: Alignment.center,
                      clipBehavior: Clip.none,
                      children: [
                        Container(
                          width: Get.width * 0.25,
                          height: Get.width * 0.25,
                          margin: EdgeInsets.only(bottom: Get.width * 0.038),
                          decoration: BoxDecoration(
                              shape: BoxShape.circle,
                              border: Border.all(
                                  width: 4.0,
                                  color: controller.userStories.isEmpty
                                      ? AppColors.red
                                      : controller.userStories
                                              .where((story) => story.seenStatus == false)
                                              .isEmpty
                                          ? QanatiColors.storySeenBorder
                                          : AppColors.primaryWithHighOpacity),
                              image: DecorationImage(
                                  image: CachedNetworkImageProvider(
                                    controller.otherUser.value.profilePictureUrl ?? EMPTY_USER_IMAGE,
                                  ),
                                  fit: BoxFit.cover)),
                        ),
                        Positioned(
                          right: 75,
                          bottom: 30,
                          child: Container(
                            padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2),
                            decoration: BoxDecoration(
                              color: AppColors.darkRed,
                              borderRadius: BorderRadius.circular(5),
                            ),
                            child: TranslationService().isLocaleArabic()
                                ? Row(
                                    children: [
                                      SvgPicture.asset('assets/svg/live2.svg'),
                                      const SizedBox(
                                        width: 4,
                                      ),
                                      Text(
                                        'Live Now'.tr,
                                        style: Get.textTheme.bodyText2?.copyWith(
                                          color: AppColors.white,
                                          fontWeight: FontWeight.bold,
                                        ),
                                      ),
                                    ],
                                  )
                                : Row(
                                    children: [
                                      Text(
                                        'Live Now'.tr,
                                        style: Get.textTheme.bodyText2?.copyWith(
                                          color: AppColors.white,
                                          fontWeight: FontWeight.bold,
                                        ),
                                      ),
                                      const SizedBox(
                                        width: 4,
                                      ),
                                      SvgPicture.asset('assets/svg/live2.svg'),
                                    ],
                                  ),
                          ),
                        ),
                      ],
                    ),
                  ),
                )
Editor is loading...