flutter check current route code example Example: How to get the current route name in flutter ModalRoute.of(context).settings.name