ios – SwiftUI change EditButton Text Color – Code Utility

[

I am using Toolbar edit button to make the list edit, Below is the code I am using, I want to change the text color of EditButton(), there is no straight forward approach I found, Kindly help

    List {
            ForEach(viewModel.datas) { data in
                Text(data)
             }
            .onDelete { offset in
                self.indexSetToDelete = offset
            }
        }
        .toolbar {
            EditButton() 
           // I want to set the edit button color
        }

,

It is not possible to use accentColor if you Edit button in List, you have to set a navigation trail button and need to use environment editmode

@State private var editMode: EditMode = .inactive
var body: some View {
      List {
        ForEach(viewModel.datas) { data in
            Text(data)
         }
        .onDelete { offset in
            self.indexSetToDelete = offset
        }
    }.environment(\.editMode, $editMode)
        .navigationBarItems(trailing: editButton) }

private var editButton: some View {
    return Button {
        if editMode == .inactive {
            editMode = .active
        } else {
            editMode = .inactive
        }
    } label: {
        Text(editMode == .inactive ? "Edit" : "Done")
            .body(color: Color.red)
    }
}

,

Use func .accentColor(Color)

EditButton()
  .accentColor(.red)

]