The property 'settings' can't be unconditionally accessed because the receiver can be 'null',
what to do my code :
class DressDetailsScreen extends StatelessWidget {
static const routeName = '/DressDetailsScreen';
@override
Widget build(BuildContext context) {
final routeArgs = ModalRoute.of(context).settings.arguments ;
return Scaffold(
appBar: AppBar(
title: Text('details'),
),
);
}
}`
this how it shows & my code