getBlockWidget method

Widget getBlockWidget(
  1. BuildContext context,
  2. BlockData data
)

Implementation

Widget getBlockWidget(BuildContext context, BlockData data) {
  final type = data.type;
  if (blockMap!.containsKey(type)) {
    return blockMap![type!]!.createWidget(context, data);
  } else {
    // fallback
    return Container(
      child: Center(
        child: Text("Block No Found"),
      ),
    );
  }
}