'Invalid constant value. on _isElevated

boxShadow:_isElevated ?[ BoxShadow( color: Colors.grey, spreadRadius: 1, blurRadius: 15, offset: Offset(4, 4) ), ]:null,



Solution 1:[1]

you have a const on something you didn't put in the question. Since the boxShadow is conditional, shouldn't have a const.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 jbryanh