You don't have to look hard to find examples of dialect anywhere in Twain's The Adventures of Tom Sawyer. Here's a passage from Chapter XXVII: Doubts to be Settled - the Young Detectives, between Tom and Huck. Here, Tom has gone to seek his pal in order to determine whether the "treasure" they had discovered and lost had been real or, as he feared, just a dream.
Dialect here is natural to the conversation between the two boys. How odd it would sound if they were to speak "properly"! Dialect creates verisimilitude and keeps the reader engaged with both character and story.
"Tom, if we'd 'a' left the blame tools at the dead tree, we'd 'a' got the money. Oh, ain't it awful!”
“'Tain't a dream, then, 'tain't a dream! Somehow I most wish it was. Dog'd if I don't, Huck.”
“What ain't a dream?”
“Oh, that thing yesterday. I been half thinking it was.”
“Dream! If them stairs hadn't broke down you'd 'a' seen how much dream it was! I've had dreams enough all night—with that patch-eyed Spanish devil going for me all through 'em—rot him!”
“No, not rot him. find him! Track the money!”
“Tom, we'll never find him. A feller don't have only one chance for such a pile—and that one's lost. I'd feel mighty shaky if I was to see him, anyway.”
“Well, so'd I; but I'd like to see him, anyway—and track him out—to his Number Two.”
“Number Two—yes, that's it. I been thinking 'bout that. But I can't make nothing out of it. What do you reckon it is?”
Just FYI... we have the entire novel in eText here at eNotes if you need to look for other passages. I've linked to my example here below and to the entire novel as well.