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.