When used at the end of sentences, だって often expresses something that has been heard by the speaker. This particular use of だって will always be paired with ん or なん.
As だって is a grouping of the 助動詞(じょどうし) (auxiliary verb)
だ, and the 副助詞(ふくじょし) (adverbial particle) って, なんだって primarily expresses the following:
なん - Presents an explanation.
だ - Determines something to be true.
って - An abbreviation of と言(い)って ‘is said’ or と思(おも)って ‘is thought’.
In this way, it translates quite similarly to ‘it is that (A) was said/thought’. Realistically though, it is used in the same way as ‘I heard that (A)’, or ‘it’s thought that (A)’.
-
サクラちゃん来年(らいねん)結婚(けっこん)するんだって。うらやましいね。
I heard that Sakura-chan is going to get married next year. I am jealous, aren't you?
タケル君(くん)が新(あたら)しいおもちゃが欲(ほし)しいんだって。どうしよう?買(か)ってあげる?
I heard that Takeru-kun is wanting a new toy. What should we do? Should we buy it for him?
あの博士(はかせ)は凄(すご)い事(こと)言(い)っているように聞こえるけど、実(じつ)は言(い)っていること全部(ぜんぶ)適当(てきとう)なんだって。
It sounds like that scientist is saying some amazing stuff, but I heard that everything he says is hot air.
タクミさんはレスラーみたいな体(からだ)しているけど、好(す)きなスポーツはフィギュアスケートなんだって。
Takumi-san has a body like a wrestler, but I heard that his favorite sport is figure skating.
なんだって usually comes across as being quite casual, so is best used in conversations with friends.