2 years ago
#286658

Jake B.
Flutter - Which identifier do I use to call classes?
There is an identifier that is needed to be passed for this to work but I am not sure what identifier has to be called. Can someone help?
I am needing to make it so when I press the button, it goes through all those working functions, and then takes the user to the next page page_ApiBox().
I am getting an "Expected Identifier, but got ," Error on the Navigator.of(context)... line.
I see that an identifier needs to be called inside of page_ApiBox(apibox: ))); but I am not sure what identifier is supposed to be called. Null does not work.
floatingActionButton: FloatingActionButton(backgroundColor: Color(0xFF7E57C2),
            onPressed: () {
            final api_key_input = _apiKeyController.text;
            print('User API: $api_key_input');
            getApi();
              //var post = json.decode(response.body);                                      *UNCOMMENT LATER*
              // INSERT HERE: Store API Key Value in Encrypted Box.
              //   MOCK API RESPONSE-----------------                                       *DELETE LATER*
              print('Verification Successful');
              addApi(api_key_input);
              Navigator.of(context).push(MaterialPageRoute(builder: (context)=>page_ApiBox(apibox: ,)));
            label: Text('Verify'); floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat;},
class page_ApiBox extends StatefulWidget {
    const page_ApiBox({Key? key, required this.apibox,}) : super(key: key);
    final apiBox apibox;
    @override
    State<page_ApiBox> createState() => _page_ApiBoxState();
  }
  class _page_ApiBoxState extends State<page_ApiBox> {
    @override
    Widget build(BuildContext context) {
      return Scaffold(
          body: buildApiBox(context, widget.apibox)
      );
    }
  }
flutter
dart
identifier
flutter-hive
0 Answers
Your Answer