build static method

Widget? build(
  1. String type,
  2. Map<String, dynamic> params, {
  3. void onAction(
    1. String url
    )?,
})

Build a widget for the given type and params. Returns null if the type is not registered.

Implementation

static Widget? build(
  String type,
  Map<String, dynamic> params, {
  void Function(String url)? onAction,
}) {
  final builder = _builders[type];
  if (builder == null) return null;
  return builder(params, onAction: onAction);
}