notecreate method

void notecreate()

Implementation

void notecreate() {
  var textcontroller = TextEditingController().obs;

  showGeneralDialog(
    context: Get.context!,
    barrierDismissible: true,
    barrierLabel: "Create Chat Note",
    pageBuilder: (context, animation, secondaryAnimation) {
      return Scaffold(
        backgroundColor: Get.theme.scaffoldBackgroundColor,
        body: SafeArea(
          child: Column(
            children: [
              Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  IconButton(
                    icon: const Icon(Icons.close),
                    onPressed: () {
                      Navigator.of(context).pop();
                    },
                  ),
                  Obx(
                    () => TextButton(
                      onPressed: textcontroller.value.text == ""
                          ? null
                          : () {
                              log("");
                            },
                      child: Text(
                        CommonKeys.share.tr,
                        style: TextStyle(
                          color: textcontroller.value.text == ""
                              ? Colors.grey
                              : Colors.blue,
                        ),
                      ),
                    ),
                  ),
                ],
              ),
              Expanded(
                child: Stack(
                  children: [
                    Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Stack(
                          children: [
                            Padding(
                              padding: const EdgeInsets.only(top: 60.0),
                              child: CircleAvatar(
                                radius: 50,
                                backgroundColor: Colors.transparent,
                                foregroundImage: CachedNetworkImageProvider(
                                  currentUserAccounts.value.user.value.avatar!
                                      .mediaURL.minURL.value,
                                ),
                              ),
                            ),
                            Stack(
                              clipBehavior: Clip.none,
                              children: [
                                Container(
                                  width: 100,
                                  decoration: BoxDecoration(
                                    color: Get.theme.cardColor,
                                    borderRadius: BorderRadius.circular(15),
                                  ),
                                  child: Padding(
                                    padding: const EdgeInsets.all(8.0),
                                    child: TextField(
                                      onChanged: (val) {
                                        textcontroller.refresh();
                                      },
                                      style: const TextStyle(fontSize: 12),
                                      textAlign: TextAlign.center,
                                      maxLines: 4,
                                      minLines: 1,
                                      controller: textcontroller.value,
                                      decoration: InputDecoration(
                                        hintText: ChatKeys.chatshareasong.tr,
                                        hintStyle: TextStyle(
                                          fontSize: 12,
                                          color: Get.theme.primaryColor
                                              .withValues(alpha: 0.5),
                                        ),

                                        border:
                                            InputBorder.none, // Kenarlık yok
                                        contentPadding:
                                            const EdgeInsets.symmetric(
                                          vertical: 0.0,
                                          horizontal: 0.0,
                                        ),
                                        // İçerik dolgusu
                                      ),
                                    ),
                                  ),
                                ),
                                Positioned(
                                  bottom: -10,
                                  left: 6,
                                  child: Container(
                                    height: 9,
                                    width: 10,
                                    decoration: BoxDecoration(
                                      color: Get.theme.cardColor,
                                      borderRadius: BorderRadius.circular(50),
                                    ),
                                  ),
                                ),
                                Positioned(
                                  bottom: -20,
                                  left: 12,
                                  child: Container(
                                    height: 8,
                                    width: 8,
                                    decoration: BoxDecoration(
                                        color: Get.theme.cardColor,
                                        borderRadius:
                                            BorderRadius.circular(10)),
                                  ),
                                ),
                              ],
                            ),
                          ],
                        ),
                        Row(
                          mainAxisAlignment: MainAxisAlignment.center,
                          children: [
                            IconButton(
                              style: ButtonStyle(
                                backgroundColor: WidgetStatePropertyAll(
                                  Get.theme.highlightColor,
                                ),
                              ),
                              onPressed: () {},
                              icon: const Icon(Icons.music_note_rounded),
                            ),
                            IconButton(
                              style: ButtonStyle(
                                backgroundColor: WidgetStatePropertyAll(
                                  Get.theme.highlightColor,
                                ),
                              ),
                              onPressed: () {},
                              icon:
                                  const Icon(Icons.question_answer_outlined),
                            ),
                            IconButton(
                              style: ButtonStyle(
                                backgroundColor: WidgetStatePropertyAll(
                                  Get.theme.highlightColor,
                                ),
                              ),
                              onPressed: () {},
                              icon: const Icon(Icons.camera_alt_rounded),
                            ),
                          ],
                        ),
                      ],
                    ),
                    Align(
                      alignment: Alignment.bottomCenter,
                      child: Padding(
                        padding: const EdgeInsets.all(8.0),
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.center,
                          children: [
                            const Icon(
                              Icons.supervised_user_circle_sharp,
                              size: 12,
                            ),
                            const SizedBox(width: 2),
                            Text(ChatKeys.chatTargetAudience.tr),
                            const SizedBox(width: 2),
                            Text(CommonKeys.everyone.tr),
                            Icon(
                              Icons.keyboard_arrow_down_rounded,
                              color: Get.theme.primaryColor
                                  .withValues(alpha: 0.8),
                            )
                          ],
                        ),
                      ),
                    )
                  ],
                ),
              ),
            ],
          ),
        ),
      );
    },
  );
}