I have an own class for my app-colors:
import 'package:flutter/material.dart';
@immutable
class AppColors {
final objectRow=const Color(0xFFFFFFFF).withOpacity(0.5);
const AppColors();
}
If I don't use .withOpacity
the constructor can be const but if I use it I have to delete the const
. I don't understand why... Please explain to me why the opacity can't be known at compile-time