I am using the builder function of my MaterialApp to wrap my routes with a widget. But I only want to show the wrapper on specific routes. Any idea how to achieve this?
Actually I am using GetX and GetMaterialApp, but I don't think that it makes any difference.
@override
Widget build(BuildContext context) {
return GetMaterialApp(
home: HomeScreen(),
builder: (context, child) {
//Only show GlobalPlayerWrapper on specific routes
return GlobalPlayerWrapper(child: child!);
},
title: 'Aschaffenburg',
);
}