Question: [The argument type 'String?' can't be assigned to the parameter type 'String](https://i.stack.imgur.com/dLh9s.png)

code is here.kindly please solve my problem sir

```
 class IconContent extends StatelessWidget {
      IconContent({this.icon,this.label});
      final IconData? icon;
       final String? label;
      @override
      Widget build(BuildContext context) {
        return Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Icon(
              icon,
              size: 80.0,
            ),
            SizedBox(
             height: 15.0,
            ),
            Text(
              label,
              style: TextStyle(
                fontSize: 18.0,
                color: Color(0xFFB2B58E),
              ),
            )
          ],
        );
      }
    }

```

Answer: 
`String?` is a `nullable String` which is not equal to `String`

More about `null-safety`: <https://dart.dev/null-safety>

Change,

```dart
IconContent({this.icon,this.label});
      final IconData? icon;
       final String? label;

```

To,

```dart
IconContent({this.icon, required this.label});
      final IconData? icon;
       final String label;

```

Or,

Change,

```dart
Text(
              label,
              style: TextStyle(
                fontSize: 18.0,
                color: Color(0xFFB2B58E),
              ),
            )

```

To,

```dart
if(label != null)
    Text(
        label!,
        style: TextStyle(
            fontSize: 18.0,
            color: Color(0xFFB2B58E),
        ),
    )

```

`!` indicates the `label` is not null. Make sure the `label` is never null if you use `!`

Or,

```dart
Text(
              label ?? 'default label incase label is null',
              style: TextStyle(
                fontSize: 18.0,
                color: Color(0xFFB2B58E),
              ),
            )

```
This is because your variable is `nullable`, you need to convert `String?` to `String` using **toString()**

```
class IconContent extends StatelessWidget {
      IconContent({this.icon,this.label});
      final IconData? icon;
       final String? label;
      @override
      Widget build(BuildContext context) {
        return Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Icon(
              icon,
              size: 80.0,
            ),
            SizedBox(
             height: 15.0,
            ),
            Text(
              label.toString(),
              style: TextStyle(
                fontSize: 18.0,
                color: Color(0xFFB2B58E),
              ),
            )
          ],
        );
      }
    }

```

if you use label!
[![enter image description here](https://i.stack.imgur.com/1L4Pa.png)](https://i.stack.imgur.com/1L4Pa.png)

if you use toString()
[![enter image description here](https://i.stack.imgur.com/MDG8s.png)](https://i.stack.imgur.com/MDG8s.png)