PlatformMenuBar constructor Null safety

const PlatformMenuBar(
  1. {Key? key,
  2. required List<MenuItem> menus,
  3. Widget? child,
  4. @Deprecated('Use the child attribute instead. ' 'This feature was deprecated after v3.1.0-0.0.pre.') Widget? body}
)

Creates a const PlatformMenuBar.

The child and menus attributes are required.

Implementation

const PlatformMenuBar({
  super.key,
  required this.menus,
  this.child,
  @Deprecated(
    'Use the child attribute instead. '
    'This feature was deprecated after v3.1.0-0.0.pre.'
  )
  this.body,
}) : assert(body == null || child == null,
            'The body argument is deprecated, and only one of body or child may be used.');