I am using `Provider`. I have got class. And I need to set value to `Provider` from field. But I do not have access to `context` here.

```
class _DateAndTimePickerDemoState extends State<DateAndTimePickerDemo> 
{
  DateTime _fromDate = DateTime.now();
  Provider.of<AppState>(context).selected_period = date; // here
}

```

How to set Provider value from class field?