The code is part of this class
class Category extends StatelessWidget {
final String name;
final ColorSwatch color;
final IconData iconLocation;
And the use of required is this:
const Category({
Key key,
@required this.name,
@required this.color,
@required this.iconLocation,
}) : assert(name != null),
assert(color != null),
assert(iconLocation != null),
super(key: key);
The use of Key key also confuses me.