getWidget method

dynamic getWidget(
  1. BuildContext context
)

Implementation

getWidget(BuildContext context) {
  if (type == "PLAY_SESSION") {
    return Padding(
      padding: EdgeInsets.only(
        top: topPadding,
        right: 40,
      ),
      child: Container(
        decoration: getBackground(settingsBackground),
        padding: EdgeInsets.all(4),
        child: Text(
          moveLeft == null ? "" : '$moveLeft',
          style: TextStyle(
            color: fontColor,
            fontSize: 32,
            fontWeight: FontWeight.w800,
            fontFamily: fontFamily,
          ),
        ),
      ),
    );
  } else if (type == "LEVEL_SESSION") {
    return InkResponse(
      onTap: () {
        onTap("SETTING");
      },
      child: Padding(
        padding: EdgeInsets.only(
          top: topPadding,
          right: 30,
        ),
        child: Container(
          padding: EdgeInsets.all(4),
          decoration: getBackground(settingsBackground),
          child: Icon(
            Icons.settings,
            color: fontColor,
            size: 42,
          ),
        ),
      ),
    );
  } else {
    return Container(
      padding: EdgeInsets.only(
        top: topPadding,
        right: 30,
      ),
      child: Icon(
        Icons.settings,
        color: Colors.transparent,
        size: 42,
      ),
    );
  }
}