const Color(0xFF0E3311).withOpacity(0.5) its good, but 'withOpacity' is deprecated and shouldn't be used. Use .withValues() to avoid precision loss. (Documentation)
const Color(0xFF0E3311).withOpacity(0.5)