Widget.flex constructor Null safety

const Widget.flex(
  1. {Key? key,
  2. required Axis direction,
  3. @Default(MainAxisAlignment.start) MainAxisAlignment mainAxisAlignment,
  4. @Default(MainAxisSize.max) MainAxisSize mainAxisSize,
  5. @Default(CrossAxisAlignment.center) CrossAxisAlignment crossAxisAlignment,
  6. TextDirection? textDirection,
  7. @Default(VerticalDirection.down) VerticalDirection verticalDirection,
  8. TextBaseline? textBaseline,
  9. @Default(Clip.none) Clip clipBehavior,
  10. @Default([]) List<Widget> children}
)

Implementation

const factory Widget.flex({
  Key? key,
  required Axis direction,
  @Default(MainAxisAlignment.start) MainAxisAlignment mainAxisAlignment,
  @Default(MainAxisSize.max) MainAxisSize mainAxisSize,
  @Default(CrossAxisAlignment.center) CrossAxisAlignment crossAxisAlignment,
  TextDirection? textDirection,
  @Default(VerticalDirection.down) VerticalDirection verticalDirection,
  TextBaseline? textBaseline,
  @Default(Clip.none) Clip clipBehavior,
  @Default([]) List<Widget> children,
}) = Flex;