popupPLAYEDGAMES method

Object popupPLAYEDGAMES(
  1. BuildContext context
)

Implementation

Object popupPLAYEDGAMES(BuildContext context) {
  return showDialog(
    context: context,
    builder: (BuildContext context) => AlertDialog(
      backgroundColor: Theme.of(context).colorScheme.tertiary,
      shape: const RoundedRectangleBorder(
        borderRadius: BorderRadius.all(Radius.circular(15)),
      ),
      contentPadding: EdgeInsets.all(defaultWidth * 0.05),
      content: SizedBox(
        width: defaultWidth * 0.85,
        height: defaultHeight * 0.85,
        child: Column(
          children: [
            Text(
              "Historial de partidas",
              style: TextStyle(
                fontSize: 22,
                fontWeight: FontWeight.bold,
                color: Theme.of(context).colorScheme.primary,
              ),
            ),
            SizedBox(height: defaultWidth * 0.05),
            Divider(
              color: Theme.of(context).colorScheme.primary,
              thickness: 1.25,
              indent: defaultWidth * 0.05,
              endIndent: defaultWidth * 0.05,
            ),
            SizedBox(height: defaultWidth * 0.05),
            Expanded(
              child: ListView(children: [
                for (GameData element in userData.playedGames)
                  gameBox(context, element),
              ]),
            ),
          ],
        ),
      ),
    ),
  );
}