getNormalCard function

Widget getNormalCard(
  1. UXPProps uxpProps,
  2. BuildContext context
)

Implementation

Widget getNormalCard(UXPProps uxpProps, BuildContext context) {
  LMCardTextConfig? title =
      LMCardTextConfig.fromJson(uxpProps.uiProps?['title'] ?? {});

  return Container(
    decoration: BoxDecoration(
      borderRadius: BorderRadius.circular(0),
      color: getColorFromString(
              uxpProps.uiProps?['headerContainer']?['background']?['color']) ??
          Theme.of(context).primaryColor,
    ),
    child: Center(
      child: Text(
        (title.text ?? (uxpProps.name ?? "WIDGET")),
        style: TextStyle(
          fontSize: title.size ?? 16,
          color: title.color ?? Colors.white,
          fontWeight: FontWeight.bold,
        ),
      ),
    ),
  );
}