register method
Widget
register(
- BuildContext context,
- dynamic resolverOrList, {
- Widget? child,
- Key? key,
override
Implementation
@override
Widget register(BuildContext context, resolverOrList,
{Widget? child, Key? key}) {
Iterable<Inst> extract(final input) {
if (input is Iterable) {
return input.expand((e) => extract(e));
} else if (input is Inst) {
return [input];
} else {
return [Inst.instance(input)];
}
}
final items = extract(resolverOrList).toList();
return registerAll(context, items, child: child, key: key)!;
}