<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Deenan Djigbenou</title>
    <description>The latest articles on DEV Community by Deenan Djigbenou (@deenan_djigbenou_ba0ce10e).</description>
    <link>https://dev.to/deenan_djigbenou_ba0ce10e</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2122958%2Fb6d0aec0-6297-450b-8ece-25b00b2b1c98.png</url>
      <title>DEV Community: Deenan Djigbenou</title>
      <link>https://dev.to/deenan_djigbenou_ba0ce10e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/deenan_djigbenou_ba0ce10e"/>
    <language>en</language>
    <item>
      <title>how to send variables from a page to another flutter/dart</title>
      <dc:creator>Deenan Djigbenou</dc:creator>
      <pubDate>Wed, 25 Sep 2024 06:09:23 +0000</pubDate>
      <link>https://dev.to/deenan_djigbenou_ba0ce10e/how-to-send-variables-from-a-page-to-another-flutterdart-10n6</link>
      <guid>https://dev.to/deenan_djigbenou_ba0ce10e/how-to-send-variables-from-a-page-to-another-flutterdart-10n6</guid>
      <description>&lt;p&gt;Hello I am currently trying to pass variable entries by the user during the connection step to the main page of my application, but I encounter an error and I do not know what is causing it, in my page main (gamepage) in the child of the boy I want to display the address of the controller but flutter tells me that this variable is not defined!!!!&lt;br&gt;
You are my only hope&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter/widgets.dart';
import 'package:http/http.dart' as http;
import 'package:tentative_formulaire_konamicash/stfgamepage.dart';

class register extends StatefulWidget {
  const register({super.key});

  @override
  State&amp;lt;register&amp;gt; createState() =&amp;gt; _registerState();
}

class _registerState extends State&amp;lt;register&amp;gt; {
  final _formKey = GlobalKey&amp;lt;FormState&amp;gt;();
  final controllermail = TextEditingController();
  final controllerpassword = TextEditingController();

  Future&amp;lt;void&amp;gt; login(String mail, String password) async {
    try {
      var url = Uri.parse('https://konamicash.com/authentification_app');
      var response = await http.post(
        url,
        headers: {
          "Accept": "application/json",
          "Access-Control-Allow-Origin": "*"
        },
        body: {
          "the_mail": mail,
          "the_pasword": password,
        },
      );
      if (response.statusCode == 200) {
        var data = jsonDecode(response.body);
        print('OK: $data');
        if (data['authentification'] == 0) {
        } else {
          Navigator.push(
              context,
              PageRouteBuilder(
                pageBuilder: (context, animation, secondaryAnimation) =&amp;gt; Gaming(
                  formKey: GlobalKey&amp;lt;FormState&amp;gt;(),
                  controlleradressemail:TextEditingController(),
                  controllermotdepasse : TextEditingController(),
                ),
              ));
        }
      }
    } catch (e) {
      print('An error occurred: $e');
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('nami'),
      ),
      body: Form(
        key: _formKey,
        child: Column(
          children: [
            Container(
              child: TextFormField(
                decoration: const InputDecoration(labelText: 'mail'),
                controller: controllermail,
              ),
            ),
            Container(
              child: TextFormField(
                decoration: const InputDecoration(labelText: 'password'),
                controller: controllerpassword,
              ),
            ),
            SizedBox(
              width: double.infinity,
              height: 50,
              child: ElevatedButton(
                onPressed: () {
                  final mail = controllermail.text;

                  final password = controllerpassword.text;

                  login(mail, password);
                },
                child: const Text('Connexion'),
              ),
            ),
          ],
        ),
      ),
    );
  }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>flutter</category>
      <category>dart</category>
      <category>php</category>
    </item>
  </channel>
</rss>
