I have a problem while working with pat\_provider.

**Error:**
`Unhandled Exception: Null check operator used on a null value`

**Code:**

```
void main() async {
  final appDocumentDirectory =
      await path_provider.getApplicationDocumentsDirectory();
  Hive.init(appDocumentDirectory.path);
  runApp(MyApp());
}

```

For more, I am using the `non-nullsafety` app, Right now I want to take the path to hive. what would you advise in such a case. Or should I downgrade the path\_provider version?