It's not Kansas! A lot depends on your definition, but if you're looking for the flattest state, you probably want to consider the whole state, not just certain areas. Kansas actually is very hilly, so it's not exactly "flat" in the traditional sense. The Midwest is generally flatter, but a lot has to do with people's expectations and assumptions which can often be wrong. A common myth is that Kansas is "flatter than a pancake" which was popularized by the mainstream media. But mathematically, you can measure the actual flatness, which local researchers from Kansas University did using geomorphometric analysis. Here are the results:
#1 flattest state: Florida
#2 flattest state: Illinois
#3 flattest state: North Dakota
#4 flattest state: Louisiana
#5 flattest state: Minnesota
#6 flattest state: Delaware
#7 flattest state: Kansas
#8 flattest state: Texas
#9 flattest state: Nevada
#10 flattest state: Indiana
Side note, if you're looking for the opposite answer, the most mountainous states often contain huge areas of flat valleys and plains, so again if you measure the entire state, it's not really Alaska, California, or Colorado. In fact, the state that has the most elevation variation throughout is West Virginia.
Now that you have some interesting stats on flatness, you can explore actual routes throughout each state to find the flattest route through every state in the United States of America. Here are some examples: