<?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: GiftMogale</title>
    <description>The latest articles on DEV Community by GiftMogale (@giftmogale).</description>
    <link>https://dev.to/giftmogale</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%2F400733%2F991ecd8e-890d-4895-a9df-5f063a91670d.png</url>
      <title>DEV Community: GiftMogale</title>
      <link>https://dev.to/giftmogale</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/giftmogale"/>
    <language>en</language>
    <item>
      <title>textField and textEditControl ,Get user input on button click - Flutter</title>
      <dc:creator>GiftMogale</dc:creator>
      <pubDate>Tue, 22 Feb 2022 08:05:33 +0000</pubDate>
      <link>https://dev.to/giftmogale/textfield-and-texteditcontrol-get-user-input-on-button-click-flutter-4glj</link>
      <guid>https://dev.to/giftmogale/textfield-and-texteditcontrol-get-user-input-on-button-click-flutter-4glj</guid>
      <description>&lt;p&gt;I am building a chat screen and trying to get messages from textEditController instead of getting them from the message model.&lt;/p&gt;

&lt;p&gt;Code below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; TextEditingController _controller =
  new TextEditingController();

String _text = '';

...


IconButton(
        icon: Icon(Icons.send),
        iconSize: 25.0,
        color: Theme.of(context).primaryColor,
        onPressed: () async {
          DataModel? data = await submitData(_controller);
          _dataModel = data;
          setState(
            () {
              _text = _controller.text.toString();
            },
          );
        },
      ),

....

 child: TextField(
          controller: _controller, 
          textCapitalization: TextCapitalization.sentences,
          onChanged: (value) {},
          decoration: InputDecoration(hintText: 'Send a message...'),
        ),
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>How to pass data in flutter on Stateless Widget?</title>
      <dc:creator>GiftMogale</dc:creator>
      <pubDate>Thu, 10 Feb 2022 01:52:27 +0000</pubDate>
      <link>https://dev.to/giftmogale/how-to-pass-data-in-flutter-on-stateless-widget-2db2</link>
      <guid>https://dev.to/giftmogale/how-to-pass-data-in-flutter-on-stateless-widget-2db2</guid>
      <description>&lt;p&gt;I'm trying to do an assignment, and have run into difficulty with passing data into Stateless Widgets. I have the following classes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Page1(),
    );
  }
}




class Page1 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
          child: ElevatedButton(
        onPressed: () {
          Navigator.push(
              context, MaterialPageRoute(builder: (context) =&amp;gt; Page2(messageData: messageData)));
        },
        child: Text('Request Chat'),
      )),
    );
  }
}




class Page2 extends StatelessWidget {
  //Navigation
  static Route route(MessageData data) =&amp;gt; MaterialPageRoute(
        builder: (context) =&amp;gt; Page2(
          messageData: data,
        ),
      );

  const Page2({Key? key, required this.messageData}) : super(key: key);

  final MessageData messageData;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        iconTheme: Theme.of(context).iconTheme,
        centerTitle: false,
),
),
},


@immutable
class MessageData {
  const MessageData(
      {required this.senderName,
      required this.message,
      required this.messageDate,
      required this.dateMessage,
      required this.profilePicture});

  final String senderName;
  final String message;
  final DateTime messageDate;
  final String dateMessage;
  final String profilePicture;
}

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

&lt;/div&gt;



&lt;p&gt;There is my messageData above that I need to pass.&lt;/p&gt;

&lt;p&gt;Basically, I want to be able to Navigate to Page2() but I keep getting an error at Navigator.push() . Error details: &lt;code&gt;Type' can't be assigned to the parameter type 'MessageData'.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And when there are no arguments on Page2() the error message: &lt;code&gt;The named parameter 'messageData' is required, but there's no corresponding argument.&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Fork Me! FCC: Test Suite Template</title>
      <dc:creator>GiftMogale</dc:creator>
      <pubDate>Tue, 02 Jun 2020 23:53:50 +0000</pubDate>
      <link>https://dev.to/giftmogale/fork-me-fcc-test-suite-template-335k</link>
      <guid>https://dev.to/giftmogale/fork-me-fcc-test-suite-template-335k</guid>
      <description>&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/freeCodeCamp/embed/MJjpwO?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>codepen</category>
    </item>
  </channel>
</rss>
