title: what is the difference between required and @required in flutter. What is the difference between them and when do we need to use them?
body: <p>If I delete <code>required</code> from the named parameters, it gives me an error:</p>
  <blockquote>
  <p>The parameter 'color' // can't have a value of 'null' because of its
  type, but the implicit default value is 'null'.</p>
  </blockquote>
  <p>What is the difference between them and when do we need to use them?</p>
  <pre><code>class RoundedButton extends StatelessWidget {
    late final Color color;
    final String title;
    final VoidCallback? onPressedInput;
  
    RoundedButton(
        {required this.color,
        required this.title,
        @required this.onPressedInput});
  
    @override
    Widget build(BuildContext context) {
      return Padding(
        padding: EdgeInsets.symmetric(vertical: 16.0),
        child: Material(
          color: color,
          borderRadius: BorderRadius.circular(30.0),
          elevation: 5.0,
          child: MaterialButton(
            onPressed: onPressedInput,
            minWidth: 200.0,
            height: 42.0,
            child: Text(
              title,
            ),
          ),
        ),
      );
    }
  }
  </code></pre>