I've just started learning AWS Amplify and followed the step given in
then I faced an error in this question The method 'Amplify' isn't defined for the type '_MyAppState'. -FlutterAmplify
then I do what it says but then a had a new error say
Amplify() The expression doesn’t evaluate a function, so it can’t be invoked.
I am following this video https://www.youtube.com/watch?v=x8xEkNCd3Vg
and this is my code lib/screens/entry.dart
import 'package:flutter/material.dart';
import 'package:amplify_flutter/amplify.dart';
import 'package:amplify_auth_cognito/amplify_auth_cognito.dart';
import 'package:amplify_analytics_pinpoint/amplify_analytics_pinpoint.dart';
class EntryScreen extends StatefulWidget {
@override
_EntryScreenState createState() => _EntryScreenState();
}
class _EntryScreenState extends State<EntryScreen> {
final amplify = Amplify();
@override
Widget build(BuildContext context) {
return Container();
}
}
and this is my pubspec.yaml
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
amplify_flutter: '<1.0.0'
amplify_datastore: '<0.2.0'
amplify_auth_cognito: '<1.0.0'
amplify_analytics_pinpoint : '<1.0.0'
flutter_login: '<1.0.14'
and i edited minSdkVersion 21 in the android/app/build.gradle