Dialogue, YES. Dialect, NO.
“Wellya dun lit up dat barn wit ya stoopidutee.”
Trying to write using phonetic spellings in order to show a speaker’s dialect causes more problems than it’s worth.
Even though Mark Twain used it in The Adventures of Huckleberry Finn, it creates a lot of work for both you and your reader and you should avoid it, with very few exceptions. Such as? If a person uses “ain’t” or “y’all” all the time, you may weave that into their dialogue to help illustrate some of their character traits. These two words are easy to read and pronounce because they are common. (Have you ever listened to a country song?) That is using familiar vernacular, not a writer’s effort to create a new spelling of some word that is pronounced differently by the speaker than is instructed by the dictionary.
Phrasing or vocabulary is effective to illustrate that a person may speak with an accent or have an ethnicity different from other speakers in your story. My British neighbor in Florida says “boot” for car trunk, “pram” for baby carriage, and “quid” for a small amount of money. When writing dialogue, you would want to have the Brit use words that reveal they are British. This is different than attempting phonetic spelling.
If you must have your Bostonian character say “pahk” instead of “park,” do so, but use alternative spelling sparingly, puh-LEEEEZE.