The affirmative sentence with "used to" for the provided information is: "I used to live in a flat when I was a child."
This sentence indicates a past habit or routine that was true in the past but is no longer true in the present. "Used to" is used to talk about past habits or states. In this case, it implies that living in a flat was a regular occurrence during the individual's childhood.