build method

  1. @protected
Widget build(
  1. BuildContext context
)

Implementation

@protected
Widget build(BuildContext context) {
  screen.context = context;
  Widget? widget;
  if (alwaysUseBuilder) {
    widget = builder();
    if (widget != null) return widget;
  }
  if (screen.isDesktop) {
    widget = desktop() ?? widget;
    if (widget != null) return widget;
  }
  if (screen.isTablet) {
    widget = tablet() ?? desktop();
    if (widget != null) return widget;
  }
  if (screen.isPhone) {
    widget = phone() ?? tablet() ?? desktop();
    if (widget != null) return widget;
  }
  return watch() ?? phone() ?? tablet() ?? desktop() ?? builder()!;
}