<?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: Hosain Mohamed</title>
    <description>The latest articles on DEV Community by Hosain Mohamed (@hosainmohamed).</description>
    <link>https://dev.to/hosainmohamed</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%2F598265%2F4d7cc582-2475-49a9-8954-0451f42e7f08.jpeg</url>
      <title>DEV Community: Hosain Mohamed</title>
      <link>https://dev.to/hosainmohamed</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hosainmohamed"/>
    <language>en</language>
    <item>
      <title>The main 3 point of Null safety in Flutter</title>
      <dc:creator>Hosain Mohamed</dc:creator>
      <pubDate>Tue, 05 Oct 2021 05:58:24 +0000</pubDate>
      <link>https://dev.to/hosainmohamed/the-main-3-point-of-null-safety-in-flutter-1ikg</link>
      <guid>https://dev.to/hosainmohamed/the-main-3-point-of-null-safety-in-flutter-1ikg</guid>
      <description>&lt;p&gt;This is would be a quick summary of null safety, explained in 3 points.&lt;/p&gt;

&lt;p&gt;1- Question mark  (?)&lt;/p&gt;

&lt;p&gt;2- Exclamation mark (!)&lt;/p&gt;

&lt;p&gt;3- late keyword &lt;/p&gt;

&lt;p&gt;1 - Question mark (?) = Nullable&lt;br&gt;
This can be used to tell compiler that this variable can be null.&lt;/p&gt;

&lt;p&gt;String? name ;&lt;/p&gt;

&lt;p&gt;If (?) is removed there would be a compiler error. as this variable could be null.&lt;/p&gt;

&lt;p&gt;2 - exclamation mark (!) = Non Nullable&lt;br&gt;
 When converting from String ? (nullable string) to String &lt;br&gt;
 there would be no error as (nullable string) can contain a &lt;br&gt;
 value or can be null.&lt;/p&gt;

&lt;p&gt;String name = "ahmed"; (Non nullable)&lt;br&gt;
 String? newName = name; 👌👌&lt;/p&gt;

&lt;p&gt;The problem when converting from String to String ? (nullable &lt;br&gt;
 string) as String cannot contain a null value.&lt;/p&gt;

&lt;p&gt;String? name ; (Nullable)&lt;br&gt;
 String newName = name; 🤦‍♂️🤦‍♂️ (Compiler error )&lt;/p&gt;

&lt;p&gt;And this can be solved in 3 ways : &lt;br&gt;
 1 -&lt;br&gt;&lt;br&gt;
 String? name ;&lt;br&gt;
 if( name!=null ){&lt;br&gt;
 String newName = name;&lt;br&gt;
 }&lt;/p&gt;

&lt;p&gt;2- &lt;br&gt;
 String? name ;&lt;br&gt;
 String newName = name ?? "ahmed";&lt;/p&gt;

&lt;p&gt;3- &lt;br&gt;
 String? name ;&lt;br&gt;
 String newName = name !;&lt;/p&gt;

&lt;p&gt;last solution is using (!) when we tell the compiler that &lt;br&gt;
 name cannot be null and you should be sure of that and this &lt;br&gt;
 is preferred to be used under restricted condition otherwise &lt;br&gt;
 there would be a runtime error if name is null.  &lt;/p&gt;

&lt;p&gt;3- late keyword&lt;br&gt;
This is simply can be used when you assign a value to a variable but later on like when you do in initState() function.&lt;/p&gt;

&lt;p&gt;late String name ;&lt;br&gt;
void initState() {&lt;br&gt;
   name = "ahmed"&lt;br&gt;&lt;br&gt;
   super.initState();&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;Hope this was a helpful review on Null safety principles in Flutter.&lt;br&gt;
Thank you for reading.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
    </item>
    <item>
      <title>Open source Chat application with flutter and firebase</title>
      <dc:creator>Hosain Mohamed</dc:creator>
      <pubDate>Thu, 18 Mar 2021 12:25:47 +0000</pubDate>
      <link>https://dev.to/hosainmohamed/open-source-chat-application-with-flutter-and-firebase-pg2</link>
      <guid>https://dev.to/hosainmohamed/open-source-chat-application-with-flutter-and-firebase-pg2</guid>
      <description>&lt;p&gt;Hello Every one I build an open source chat application using Flutter framework and firebase as a backend.&lt;/p&gt;

&lt;p&gt;Features :&lt;/p&gt;

&lt;p&gt;Sign in - SignUp - logout .&lt;br&gt;
linking with Firebase Authentication system.&lt;br&gt;
client and backend validation during logging and register.&lt;br&gt;
search by name of users.&lt;br&gt;
real-time send and receive messages using stream and linking with Firebaes Firestore database.&lt;br&gt;
viewing profile page and able to edit info and upload images.&lt;br&gt;
use pagination for showing the messages and also for friends list.&lt;br&gt;
nice looking UI and user-friendly animation with a splash screen at the beginning.&lt;br&gt;
using Bloc for state management.&lt;br&gt;
using Get-it as a Service Locator for dependency injection.&lt;/p&gt;

&lt;p&gt;This project is a starting point for a Flutter application.&lt;/p&gt;

&lt;p&gt;This is the Github link&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/hosain-mohamed/Flutter-chat-App"&gt;https://github.com/hosain-mohamed/Flutter-chat-App&lt;/a&gt;&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
    </item>
    <item>
      <title>New Package Curved Splash screen</title>
      <dc:creator>Hosain Mohamed</dc:creator>
      <pubDate>Wed, 17 Mar 2021 20:37:39 +0000</pubDate>
      <link>https://dev.to/hosainmohamed/new-package-curved-splash-screen-50l3</link>
      <guid>https://dev.to/hosainmohamed/new-package-curved-splash-screen-50l3</guid>
      <description>&lt;p&gt;Hello everyone, I made a new package called curved_splash_screen&lt;/p&gt;

&lt;p&gt;&lt;a href="https://pub.dev/packages/curved_splash_screen"&gt;https://pub.dev/packages/curved_splash_screen&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/hosain-mohamed/curved_splash_screen"&gt;https://github.com/hosain-mohamed/curved_splash_screen&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is splash screen with curved custom bottom sheet and dots indicator within it.&lt;br&gt;
You can add your custom splash screens according to it's index.&lt;br&gt;
You can change any color of the items of the bottom sheet.&lt;br&gt;
You can specify the text of back and skip button and their color.&lt;br&gt;
All items in the bottom sheet is responsive to the screen size.&lt;/p&gt;

&lt;p&gt;Don't forget to like it. If you have any modifications let me know.&lt;/p&gt;

&lt;p&gt;Thanks &amp;amp; regards&lt;/p&gt;

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