You have to go back into Brooklyn history. Until the early 1800’s, Kings County consisted of the Cities of Brooklyn and Williamsburg and the Towns of Flatbush, Bushwick, New Lots, Flatlands and New Utrecht. Williamsburg was absorbed by Brooklyn in 1855 and the rest by 1898.
Midwood is within, but not synonymous with Flatbush. The original Flatbush Town Hall, which still exists, is on Snyder Avenue between Flatbush and Bedford Avenues.