"Dim" is the base form which can softly mutate to "Ddim". It will always be "Dim" when nothing comes before it. Otherwise the most time it will be "ddim" in in negative constructions e.g "Dw i ddim" etc.
Ah, okay. Thank you! I got a bit confused as I just started learning the "I don't like..." construction and encountered 'Dw i ddim eisiau coffi.' So this happens whenever a vowel comes before 'dim' or whenever any word comes before 'dim'?