The method 'appBuilder' isn't defined for the type 'DevicePreview'. Try correcting the name to the name of an existing method, or defining a method named 'appBuilder'.

Widget build(BuildContext context) {
return ScreenUtilInit(
  designSize: Size(411.4, 683.4),
  builder: (BuildContext context, child) => MaterialApp.router(
    locale: DevicePreview.locale(context),
    builder: (context, child) {
      child = DevicePreview.appBuilder(context, child);
      child = botToastBuilder(context, child);
      return child;
    },
    debugShowCheckedModeBanner: false,
    title: 'Beyond',
    theme: ThemeData(
        fontFamily: 'OpenSans',
        primarySwatch: Colors.blue,
        canvasColor: Colors.transparent),
    routeInformationParser: Modular.routeInformationParser,
    routerDelegate: Modular.routerDelegate,
  ),

);
}

I updated flutter modular and devicePreview package

  device_preview: ^0.8.0
  flutter_modular: ^5.0.3