First of all you shouldn't post fragments, but whole sentences. We are talking about grammar here, and grammar is the science of joining words together to build sentences, not fragments. So, I try it with these sentences:
- Meiner Meinung dazu ist, dass die Wohnung sehr klein ist.
- Meiner Meinung nach ist die Wohnung sehr klein.
Now note, that sentence 1 is wrong! The bold marked part of speech is the subject, and the subject always must be in nominative case. So, your assumption about dative case is just wrong for sentence 1.
This is correct:
Meine Meinung dazu ist, dass die Wohnung sehr klein ist.
My opinion on this is that the apartment is very small.
The word "dazu" is a pronominal adverb. It consists of the adverb "da" and the preposition "zu". In this sentence it works like a prepositional object and it can be replaced by one:
Meine Meinung zu dieser Sache ist, dass die Wohnung sehr klein ist.
My opinion on this matter is that the apartment is very small.
So, in sentence 1 the word "dazu" is a distinct part of speech, that does not directly belong to "meine Meinung" and even can be omitted completely:
Meine Meinung ist, dass die Wohnung sehr klein ist.
My opinion is that the apartment is very small.
The sentence 2 is correct, but note, that the word nach is an adposition, that most often appears as a preposition, but here is a postposition. And, even more important, it is not a distinct part of speech. It is part of
meiner Meinung nach
according to my opinion (in my opinion)
which is a postpositional object. Postpositional objects work exactly like prepositional objects, the only difference is the place on the adposition inside this object. You also can convert the postpositional object into a prepositional object:
Nach meiner Meinung ist die Wohnung sehr klein.
According to my opinion (in my opinion) the apartment is very small.
But the phrase "meiner Meinung nach" is much more common than "nach meiner Meinung", but both of them are correct and they mean the same.
The point is, that each adposition wants to have the rest of the adpositional object to be in some specific grammatical case. And "nach" wants dative case. And this is the reason why "meiner Meinung" in "meiner Meinung nach" has to be in dative case.