If redirect returns true, this widget redirects the app to the targetRoute, otherwise returns child
targetRoute
final bool Function() redirect;