content: import 'package:flutter/material.dart';
  import 'package:flutter/services.dart';
  import 'package:get/get.dart';
  import 'package:notes_app/constants/colors.dart';
  
  import '../controller/note_controller.dart';
  
  class EditNotePage extends StatelessWidget {
    final NoteController controller = Get.find();
  
    @override
    Widget build(BuildContext context) {
      final int i = ModalRoute.of(context)?.settings.arguments as int;
      controller.titleController.text = controller.notes[i].title!;
      controller.contentController.text = controller.notes[i].content!;
      return Scaffold(
        appBar: AppBar(
          backgroundColor: Colors.white,
          iconTheme: const IconThemeData(
            color: Colors.black,
          ),
          title: const Text(
            "Edit Note",
            style: TextStyle(
              color: Colors.black,
            ),
          ),
          systemOverlayStyle: SystemUiOverlayStyle.dark,
        ),
        body: SingleChildScrollView(
          child: Container(
            padding: const EdgeInsets.only(
              top: 15,
              left: 15,
              right: 15,
            ),
            child: Column(
              children: [
                TextField(
                  controller: controller.titleController,
                  style: const TextStyle(
                    fontSize: 27,
                    fontWeight: FontWeight.bold,
                  ),
                  cursorColor: Colors.black,
                  enableInteractiveSelection: false,
                  decoration: InputDecoration(
                    hintText: "Title",
                    hintStyle: TextStyle(
                      fontSize: 27,
                      fontWeight: FontWeight.bold,
                      color: Colors.grey[600],
                      letterSpacing: 1,
                    ),
                    border: InputBorder.none,
                  ),
                ),
                TextField(
                  style: const TextStyle(
                    fontSize: 22,
                  ),
                  cursorColor: Colors.black,
                  enableInteractiveSelection: false,
                  controller: controller.contentController,
                  decoration: const InputDecoration(
                    hintText: "Content",
                    hintStyle: TextStyle(
                      fontSize: 17,
                    ),
                    border: InputBorder.none,
                  ),
                  keyboardType: TextInputType.multiline,
                  maxLines: null,
                  autofocus: true,
                ),
              ],
            ),
          ),
        ),
        floatingActionButton: FloatingActionButton.extended(
          onPressed: () {
            controller.updateNote(
                controller.notes[i].id!, controller.notes[i].dateTimeCreated!);
          },
          label: const Text(
            "Save Note",
            textAlign: TextAlign.center,
            style: TextStyle(
                fontSize: 16,
                fontFamily: 'Poppins',
                fontWeight: FontWeight.w500,
                color: Colors.white),
          ),
          icon: const Icon(
            Icons.save,
          ),
          backgroundColor: AppColor.buttonColor,
        ),
      );
    }
  }
  