Closed MayurSMahajan closed 2 years ago
This is a snippet from Flutter official documentation: (https://api.flutter.dev/flutter/material/FlatButton-class.html)
FlatButton and RaisedButton have been replaced by TextButton and ElevatedButton respectively. ButtonTheme has been replaced by TextButtonTheme and ElevatedButtonTheme. The original classes will eventually be removed, please migrate code that uses them. There's a detailed migration guide for the new button and button theme classes in flutter.dev/go/material-button-migration-guide.
Currently in the main.dart, FlatButtons are used
FlatButton( child: const Text('CANCEL'), onPressed: () { Navigator.pop(context, DialogDemoAction.cancel); }), FlatButton( child: const Text('CONNECT'), onPressed: () { Navigator.pop(context, DialogDemoAction.connect); })
FlatButton( child: const Text('CANCEL'), onPressed: () { Navigator.pop(context, DialogDemoAction.cancel); }),
FlatButton( child: const Text('CONNECT'), onPressed: () { Navigator.pop(context, DialogDemoAction.connect); })
If not replaced from this project, they might produce an error.
Use TextButton instead of FlatButton
This is a snippet from Flutter official documentation: (https://api.flutter.dev/flutter/material/FlatButton-class.html)
Currently in the main.dart, FlatButtons are used
FlatButton( child: const Text('CANCEL'), onPressed: () { Navigator.pop(context, DialogDemoAction.cancel); }),
FlatButton( child: const Text('CONNECT'), onPressed: () { Navigator.pop(context, DialogDemoAction.connect); })
If not replaced from this project, they might produce an error.