I have a strange error in Symfony 4

files are "inspired" by symfony documentation.

Here is my service file

```
<?php
namespace App\Services;

class MessageGenerator
{
    public function getHappyMessage()
    {
        $messages = [
    'You did it! You updated the system! Amazing!',
    'That was one of the coolest updates I\'ve seen all day!',
    'Great work! Keep going!',
];

    $index = array_rand($messages);

    return $messages[$index];
}
}

```

Here is my controller

```
<?php

namespace App\Controller;

use Symfony\Component\HttpFoundation\Response;
use App\Services\MessageGenerator;

class DefaultController
{
private $message;

public function __construct(MessageGenerator $messageGenerator)
{

    $message = $messageGenerator->getHappyMessage();
    $this->addFlash('success',$message);
    // ...
}

public function getMessage(){
    return $this->message;
}

public function index()
{
    return new Response("<p>Hello !</p> ");
}
}

```

When I run this code, I get an error : 
Attempted to call an undefined method named "addFlash" of class "App\Controller\DefaultController".

Any idea?