title: Context: Not a constant expression, error on dart
body: <p>I was following a udemy course but I got stuck I got this error which I don't know why it ocurres</p>
  <pre><code>import 'package:flutter/material.dart';
  
  class Answer extends StatelessWidget {
    VoidCallback selectHandler;
  
    Answer(this.selectHandler);
  
    @override
    Widget build(BuildContext context) {
      return Container(
        width: double.infinity,
        child: const RaisedButton(
          color: Colors.blue,
          child: Text('Answer 1'),
          onPressed: selectHandler,
        ),
      );
    }
  }
  </code></pre>
  <p><code>onPressed: selectHandler,</code> this line it the problematic one.
  I tried removing random keyword but i really don't know what to do.</p>
  <p>that's the error log</p>
  <pre><code>lib/answer.dart:15:20: Error: Not a constant expression.
          onPressed: selectHandler,
                     ^^^^^^^^^^^^^
  lib/answer.dart:12:20: Error: Constant evaluation error:
        child: const RaisedButton(
                     ^
  lib/answer.dart:15:20: Context: Not a constant expression.
          onPressed: selectHandler,
  </code></pre>