maybeOf

context

);

You also need to modify all instances of calling the API with nullOk =
false (often the default), to accept non-nullable return values, or remove any
! operators:

So either of:

MediaQueryData

data

MediaQuery

of

context

// nullOk false by default.

MediaQueryData

data

MediaQuery

of

context

);

// nullOk false by default.

both become:

MediaQueryData

data

MediaQuery

of

context

);

// No ! or ? operator here now.