If using flutter_map, I think you would have to probably add your own text box input. When you have done that, you would need to query an API like Mapbox route API, or Googles API (I'm not sure if Google allow you to use its API for routing without using Google Maps, you may need to check this and see if it returns latlongs), and then convert to a polyline.
Flutter_map doesn't contain the features like end points and routing in itself, it's more of a tile mapping app, but you can overlay things like polylines and polygons you have created from other info.
Ian