blocks method

Widget blocks(
  1. dynamic digit
)

Implementation

Widget blocks(digit) {
  int x = int.parse(digit);
  List kaza = _numberBlocks(x);

  return Padding(
    padding: const EdgeInsets.all(8.0),
    child: Container(
      width: 190,
      height: 400,
      decoration: BoxDecoration(
        boxShadow: [
          BoxShadow(color: Colors.black12, blurRadius: 10, spreadRadius: 4),
          BoxShadow(
            color: Colors.black12,
            blurRadius: 10,
            spreadRadius: 10,
            offset: Offset(30, 0),
          )
        ],
      ),
      child: GridView(
        children: [
          for (var index = 0; index < 15; index++)
            AnimatedContainer(
              duration: Duration(milliseconds: index * 140),
              clipBehavior: Clip.antiAlias,
              decoration: BoxDecoration(
                color: kaza.contains(index) ? Colors.black : _color,
                boxShadow: [
                  BoxShadow(
                    blurRadius: 2,
                    spreadRadius: 1,
                    color: Colors.black,
                  ),
                ],
                border: Border.all(
                  color: kaza.contains(index) ? _color! : Colors.black,
                  width: 0.3,
                  style: BorderStyle.solid,
                ),
              ),
            )
        ],
        addAutomaticKeepAlives: false,
        gridDelegate:
            SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3),
      ),
    ),
  );
}