To initialize the Amplify API category you call `Amplify.addPlugin()` method. To complete initialization call `Amplify.configure()`.

Your code should look like this:

```dart
import 'package:amplify_flutter/amplify_flutter.dart';
import 'package:amplify_api/amplify_api.dart';
import 'package:amplify_example_application/models/ModelProvider.dart';


import 'amplifyconfiguration.dart';

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
    @override
    void initState() {
      super.initState();
      _configureAmplify();
    }

    Future<void> _configureAmplify() async {
      final api = AmplifyAPI(modelProvider: ModelProvider.instance);
      await Amplify.addPlugin(api);

      try {
        await Amplify.configure(amplifyconfig);
      } on AmplifyAlreadyConfiguredException {
        safePrint(
            'Tried to reconfigure Amplify; this can occur when your app restarts on Android.');
      }
    }
}
```
