currentRouteName property

String? get currentRouteName

Implementation

static String? get currentRouteName => ModalRoute.of(context)?.settings.name;