title: Flutter GetX pass data to another page
body: <p>I have a flutter app whereby I capture data using a textformfield in a screen. I have a second screen where I would like to display the data that I have captured from the text form field in the first screen.</p>
  <p>But first I want to print it to the terminal, from the Second Screen controller, and see what has been passed. I have tried using using GetX naviagtion and passing but I get this error</p>
  <pre><code>The method '[]' was called on null.
  Receiver: null
  Tried calling: [](0)
  </code></pre>
  <p>This is the text form field I use to get data as input</p>
  <pre><code>TextFormField(
                        controller: controller._phoneNumberController,
                        keyboardType: TextInputType.text,
                        validator: (value) =&gt; validatePhoneNumber(value!),
                        style: TextStyle(
                          color: accentColor,
                          fontSize: 15,
                          fontFamily: 'PoppinsRegular',
                        ),
                        decoration: InputDecoration(
                          hintText: &quot;Phone Number&quot;,
                          hintStyle: TextStyle(
                              fontSize: 14,
                              color: Colors.black45,
                              fontWeight: FontWeight.w500),
                          fillColor: Color(0xffEBEDF4),
                          filled: true,
                          border: InputBorder.none,
                          focusedBorder: OutlineInputBorder(
                            borderRadius: BorderRadius.circular(8.0),
                            borderSide: BorderSide(
                              color: Color(0xff1D275C),
                            ),
                          ),
                          enabledBorder: OutlineInputBorder(
                            borderRadius: BorderRadius.circular(8.0),
                            borderSide: BorderSide(
                              color: formFieldColor,
                              width: 2.0,
                            ),
                          ),
                        ),
                      ),
  </code></pre>
  <p>This is the method I use to send data to the next page</p>
  <pre><code>GestureDetector(
                                onTap: () {
                                  Get.to(SecondPage(), arguments: [
                                    controller._phoneNumberController.text
                                  ]);
                                },
                                child: Container(
                                  height: 40,
                                  width: double.infinity,
                                  decoration: BoxDecoration(
                                    color: Color(0xffEF5E41),
                                  ),
                                  child: Center(
                                    child: Row(
                                      mainAxisAlignment: MainAxisAlignment.end,
                                      children: [
                                        Padding(
                                          padding:
                                              const EdgeInsets.only(right: 130),
                                          child: Text(
                                            &quot;Proceed&quot;,
                                            style: TextStyle(
                                              color: Color(0xffFCFCFC),
                                              fontSize: 14,
                                              fontWeight: FontWeight.w500,
                                            ),
                                          ),
                                        ),
                                        Padding(
                                          padding:
                                              const EdgeInsets.only(right: 16),
                                          child: Icon(
                                            Icons.arrow_forward_ios,
                                            color: Color(0xffFCFCFC),
                                          ),
                                        )
                                      ],
                                    ),
                                  ),
                                ),
                              ),
  </code></pre>
  <p>This is where I try to print the data sent from the first page</p>
  <pre><code>  dynamic argumentData = Get.arguments;
  
    @override
    void onInit() {
      print(argumentData[0]);
      super.onInit();
    }
  </code></pre>
  <p>How can I fix this</p>