AdaptiveBuilder constructor

const AdaptiveBuilder({
  1. Key? key,
  2. WidgetBuilder? rlBuilder,
  3. WidgetBuilder? glBuilder,
  4. WidgetBuilder? xlBuilder,
  5. WidgetBuilder? lgBuilder,
  6. WidgetBuilder? mdBuilder,
  7. WidgetBuilder? smBuilder,
  8. WidgetBuilder? xsBuilder,
  9. required WidgetBuilder builder,
})

AdaptiveBuilder

This widget will render base on context size width

Example:

Scaffold(
  appBar: AppBar(
    title: const Text("using adaptive builder"),
  ),
  body: Center(
    child: AdaptiveBuilder(
      xlBuilder: (_) => const Text("xlBuilder"),
      lgBuilder: (_) => const Text("lgBuilder"),
      mdBuilder: (_) => const Text("mdBuilder"),
      smBuilder: (_) => const Text("smBuilder"),
      // xsBuilder: (_) => const Text("xsBuilder"),
      builder: (_) => const Text("xsBuilder"),
    ),
  ),
)

Implementation

const AdaptiveBuilder({
  Key? key,
  this.rlBuilder,
  this.glBuilder,
  this.xlBuilder,
  this.lgBuilder,
  this.mdBuilder,
  this.smBuilder,
  this.xsBuilder,
  required this.builder,
}) : super(key: key);