AdaptiveBuilder constructor
const
AdaptiveBuilder({
- Key? key,
- WidgetBuilder? rlBuilder,
- WidgetBuilder? glBuilder,
- WidgetBuilder? xlBuilder,
- WidgetBuilder? lgBuilder,
- WidgetBuilder? mdBuilder,
- WidgetBuilder? smBuilder,
- WidgetBuilder? xsBuilder,
- 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);