<?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: kururu</title>
    <description>The latest articles on DEV Community by kururu (@kururu95).</description>
    <link>https://dev.to/kururu95</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%2F329308%2F1a493698-6fba-4292-b3c5-5e4be026dd60.jpeg</url>
      <title>DEV Community: kururu</title>
      <link>https://dev.to/kururu95</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kururu95"/>
    <language>en</language>
    <item>
      <title>Dart basics - part 3</title>
      <dc:creator>kururu</dc:creator>
      <pubDate>Sun, 13 Mar 2022 10:31:12 +0000</pubDate>
      <link>https://dev.to/kururu95/dart-basics-part-3-3nng</link>
      <guid>https://dev.to/kururu95/dart-basics-part-3-3nng</guid>
      <description>&lt;p&gt;in the &lt;a href="https://dev.to/kururu95/dart-basics-part-2-27ag"&gt;previous&lt;/a&gt; topic we learn how to create  and invoke a function.&lt;/p&gt;

&lt;p&gt;in this topic we are going to learn some advance functions.&lt;/p&gt;

&lt;p&gt;**  Callback Function**&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Callback is basically a function or a method that we pass as an argument into another function or a method to perform an action&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Imagine&lt;/strong&gt; you have a function that return a future value&lt;br&gt;
 and you try to invoke it in non-future function   then you have to use callback syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Future getMyName()async {
  await Future.delayed(Duration(seconds:5));

  return "Kururu is Beast";
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you can invoke this function using callbacks way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;getMyName().then((value){
    print(value);
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;after 5 seconds will print&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Kururu is Beast&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;also the callback function can be use with &lt;strong&gt;extension&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
class Name{
   String name;
  Name(this.name);



}



extension capitalizeName on Name{

  String capitalize(){
      return this.name.toUpperCase();
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to invoke the function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  var myName = Name('Kururu');
  var r =myName.capitalize();


      print(r);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Higher Order Functions&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;higher-order function that can be passed as a parameter .&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;i find another definition in &lt;a href="https://dev.to/aninarafath6/higher-order-functions-3b8b"&gt;this&lt;/a&gt;  post&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In dart programming language can accept a function as an argument, this type of functions is called higher order functions.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; String getUser()=&amp;gt; "Kururu";

void printUser(String Function() getUser)
{
    // getting user maybe it's from api like etc.
    String user = getUser();

   // and print the user.
    print(user);
  }

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

&lt;/div&gt;



&lt;p&gt;to invoke &lt;strong&gt;printUser&lt;/strong&gt; you have to pass a function that return a string and not accept any parameter  which is &lt;strong&gt;getUser&lt;/strong&gt; in our example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; printUser(getUser);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And there are many higher-order functions related to List and String  , etc.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Lambda Expression *&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;lambda expression is a function without name&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;to create a lambda function use &lt;strong&gt;Function&lt;/strong&gt; keyword&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Function printMyName = (String name) =&amp;gt;name;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;to execute this anonymous function:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;print(printMyName("Kururu For life"));&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;it is not clear , right:)&lt;/p&gt;

&lt;p&gt;thanks for reading:)&lt;/p&gt;

</description>
      <category>dart</category>
      <category>flutter</category>
      <category>basics</category>
      <category>functions</category>
    </item>
    <item>
      <title>Dart basics - part 2</title>
      <dc:creator>kururu</dc:creator>
      <pubDate>Mon, 28 Feb 2022 11:35:47 +0000</pubDate>
      <link>https://dev.to/kururu95/dart-basics-part-2-27ag</link>
      <guid>https://dev.to/kururu95/dart-basics-part-2-27ag</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ETVTYg5_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xqg0y5khtpn7yyquzteo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ETVTYg5_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xqg0y5khtpn7yyquzteo.png" alt="Image description" width="300" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;in the &lt;a href="https://dev.to/kururu95/dart-basics-part-1-238l"&gt;first&lt;/a&gt; post we covered some basics like variable and control structure&lt;br&gt;
 in to days lesson we are going to focus on &lt;strong&gt;Functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Functions in Dart&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;generally ,  there are two type of functions in dart like other languages: &lt;br&gt;
     - function return a value&lt;br&gt;
     - function not return any value(  void )&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;function form:&lt;br&gt;
    [type]  function_name(  [variables] ) {&lt;br&gt;
    [return    ]&lt;br&gt;
}&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;for example ,  function  accepts two params and show the sum of them:&lt;/p&gt;

&lt;p&gt;`&lt;br&gt;
void sumTwoValues(int x, int y){&lt;br&gt;
   var sum =  x+y;&lt;br&gt;
print(sum);&lt;/p&gt;

&lt;p&gt;}`&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;note&lt;/strong&gt;: the return type is optional as dart can inferred the type:)&lt;/p&gt;

&lt;p&gt;an example of the function with return  type , let's create a function the accept a text and return a length of that text&lt;/p&gt;

&lt;p&gt;`int   textLngthGenerator(Stirng txt){&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return txt.length;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}`&lt;/p&gt;

&lt;p&gt;to invoke this function:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
   var text= 'i love Sudan';&lt;br&gt;
  var textLength = textLngthGenerator(text);&lt;br&gt;
print(textLength);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;You&lt;/strong&gt; noticed that you can use single quotes to represent a string &lt;/p&gt;

&lt;p&gt;we stop here  , and in the next post will discuss some topics related to functions like:&lt;br&gt;
    - higher-order functions&lt;br&gt;
    - callback functions&lt;br&gt;
    -  extension functions&lt;/p&gt;

&lt;p&gt;thanks for reading :)&lt;/p&gt;

</description>
      <category>dart</category>
      <category>basics</category>
      <category>flutter</category>
      <category>functions</category>
    </item>
    <item>
      <title>Jetpack Compose Lifecycle</title>
      <dc:creator>kururu</dc:creator>
      <pubDate>Thu, 24 Feb 2022 12:03:52 +0000</pubDate>
      <link>https://dev.to/kururu95/jetpack-compose-lifecycle-3e4n</link>
      <guid>https://dev.to/kururu95/jetpack-compose-lifecycle-3e4n</guid>
      <description>&lt;p&gt;&lt;strong&gt;composable&lt;/strong&gt; function is the replacement for xml files . &lt;br&gt;
 in classic way you use to handle many activity or fragment lifecycle.&lt;/p&gt;

&lt;p&gt;so we focus on &lt;strong&gt;View&lt;/strong&gt; lifecycle because there are many components in android that have their own lifecycle&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.android.com/jetpack/compose/lifecycle" rel="noopener noreferrer"&gt;&amp;gt; The lifecycle of a composable is defined by the following events: entering the Composition, getting recomposed 0 or more times, and leaving the Composition.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuc0qj1bvle0rd7951vzo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuc0qj1bvle0rd7951vzo.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;so here we  treat something called &lt;strong&gt;Composition&lt;/strong&gt; :)&lt;/p&gt;

&lt;p&gt;so composable function has three lifecycle:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; -  enter composition
 -  recomposition n times
 -   leave composition
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;to observe your composable function's  lifecycle you have to  use class called &lt;strong&gt;State&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.android.com/jetpack/compose/lifecycle" rel="noopener noreferrer"&gt;&amp;gt; Recomposition is typically triggered by a change to a State object. Compose tracks these and runs all composables in the Composition that read that particular State, and any composables that they call that cannot be skipped.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;to understand lifecycle   also we need to know about Side-Effects methods in compose&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.android.com/jetpack/compose/side-effects" rel="noopener noreferrer"&gt;&amp;gt; A side-effect is a change to the state of the app that happens outside the scope of a composable function.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.android.com/jetpack/compose/side-effects" rel="noopener noreferrer"&gt;&amp;gt; An effect is a composable function that doesn't emit UI and causes side effects to run when a composition completes.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;there are many side-Effect function in compose &lt;br&gt;
1)&lt;br&gt;&lt;br&gt;
&lt;a href="https://developer.android.com/jetpack/compose/side-effects#launchedeffect" rel="noopener noreferrer"&gt;&lt;strong&gt;LaunchedEffect&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;run suspend functions in the scope of a composable&lt;br&gt;
`&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;@Composable&lt;br&gt;
fun MyScreen(&lt;br&gt;
    state: UiState&amp;gt;,&lt;br&gt;
    scaffoldState: ScaffoldState = rememberScaffoldState()&lt;br&gt;
) {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// If the UI state contains an error, show snackbar
if (state.hasError) {

    // `LaunchedEffect` will cancel and re-launch if
    // `scaffoldState.snackbarHostState` changes
    LaunchedEffect(scaffoldState.snackbarHostState) {
        // Show snackbar using a coroutine, when the coroutine is cancelled the
        // snackbar will automatically dismiss. This coroutine will cancel whenever
        // `state.hasError` is false, and only start when `state.hasError` is true
        // (due to the above if-check), or if `scaffoldState.snackbarHostState` changes.
        scaffoldState.snackbarHostState.showSnackbar(
            message = "Error message",
            actionLabel = "Retry message"
        )
    }
}

Scaffold(scaffoldState = scaffoldState) {
    /* ... */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}`&lt;/p&gt;

&lt;p&gt;2) &lt;br&gt;
&lt;strong&gt;&lt;a href="https://developer.android.com/jetpack/compose/side-effects#remembercoroutinescope" rel="noopener noreferrer"&gt;rememberCoroutineScope&lt;/a&gt;&lt;/strong&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;obtain a composition-aware scope to launch a coroutine `outside a composable&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;@Composable&lt;br&gt;
fun MoviesScreen(scaffoldState: ScaffoldState = rememberScaffoldState()) {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Creates a CoroutineScope bound to the MoviesScreen's lifecycle
val scope = rememberCoroutineScope()

Scaffold(scaffoldState = scaffoldState) {
    Column {
        /* ... */
        Button(
            onClick = {
                // Create a new coroutine in the event handler to show a snackbar
                scope.launch {
                    scaffoldState.snackbarHostState.showSnackbar("Something happened!")
                }
            }
        ) {
            Text("Press me")
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}`&lt;/p&gt;

&lt;p&gt;3)&lt;br&gt;
&lt;strong&gt;&lt;a href="https://developer.android.com/jetpack/compose/side-effects#rememberupdatedstate" rel="noopener noreferrer"&gt;rememberUpdatedState&lt;/a&gt;&lt;/strong&gt;: &lt;/p&gt;

&lt;p&gt;`&amp;gt; reference a value in an effect that shouldn't restart if the value changes&lt;/p&gt;

&lt;p&gt;@Composable&lt;br&gt;
fun LandingScreen(onTimeout: () -&amp;gt; Unit) {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// This will always refer to the latest onTimeout function that
// LandingScreen was recomposed with
val currentOnTimeout by rememberUpdatedState(onTimeout)

// Create an effect that matches the lifecycle of LandingScreen.
// If LandingScreen recomposes, the delay shouldn't start again.
LaunchedEffect(true) {
    delay(SplashWaitTimeMillis)
    currentOnTimeout()
}

/* Landing screen content */
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;4)&lt;br&gt;
&lt;strong&gt;&lt;a href="https://developer.android.com/jetpack/compose/side-effects#disposableeffect" rel="noopener noreferrer"&gt;DisposableEffect&lt;/a&gt;&lt;/strong&gt;:&lt;br&gt;
 effects that require cleanup&lt;/p&gt;

&lt;p&gt;when composable function leaves the &lt;strong&gt;Composition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;`&lt;/p&gt;

&lt;p&gt;@Composable&lt;br&gt;
fun HomeScreen(&lt;br&gt;
    lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current,&lt;br&gt;
    onStart: () -&amp;gt; Unit, // Send the 'started' analytics event&lt;br&gt;
    onStop: () -&amp;gt; Unit // Send the 'stopped' analytics event&lt;br&gt;
) {&lt;br&gt;
    // Safely update the current lambdas when a new one is provided&lt;br&gt;
    val currentOnStart by rememberUpdatedState(onStart)&lt;br&gt;
    val currentOnStop by rememberUpdatedState(onStop)&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// If `lifecycleOwner` changes, dispose and reset the effect
DisposableEffect(lifecycleOwner) {
    // Create an observer that triggers our remembered callbacks
    // for sending analytics events
    val observer = LifecycleEventObserver { _, event -&amp;gt;
        if (event == Lifecycle.Event.ON_START) {
            currentOnStart()
        } else if (event == Lifecycle.Event.ON_STOP) {
            currentOnStop()
        }
    }

    // Add the observer to the lifecycle
    lifecycleOwner.lifecycle.addObserver(observer)

    // When the effect leaves the Composition, remove the observer
    onDispose {
        lifecycleOwner.lifecycle.removeObserver(observer)
    }
}

/* Home screen content */
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;i hope you enjoying it:)&lt;/p&gt;

</description>
      <category>jetpackcompose</category>
      <category>lifecycle</category>
      <category>android</category>
      <category>kotlin</category>
    </item>
    <item>
      <title>Dart basics - part 1</title>
      <dc:creator>kururu</dc:creator>
      <pubDate>Wed, 23 Feb 2022 20:19:21 +0000</pubDate>
      <link>https://dev.to/kururu95/dart-basics-part-1-238l</link>
      <guid>https://dev.to/kururu95/dart-basics-part-1-238l</guid>
      <description>&lt;p&gt;&lt;strong&gt;Dart&lt;/strong&gt; is an open-source general-purpose programming language. It is originally developed by Google and later approved as a standard by ECMA. Dart is a new programming language meant for the server as well as the browser. Introduced by Google, the Dart SDK ships with its compiler.&lt;/p&gt;

&lt;p&gt;dart has many similarities to other languages&lt;/p&gt;

&lt;p&gt;in this topics we are going to focus in some basics of this new languages  so can help you in your journey especially for those who want to try &lt;strong&gt;flutter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Variables&lt;/strong&gt; :&lt;/p&gt;

&lt;p&gt;in dart you van create variable use &lt;strong&gt;var&lt;/strong&gt;   keywords , or instead you specify the variable type&lt;/p&gt;

&lt;p&gt;` var x=   'abdo';&lt;/p&gt;

&lt;p&gt;//  or&lt;/p&gt;

&lt;p&gt;String y ='ahmed';`&lt;/p&gt;

&lt;p&gt;using &lt;strong&gt;var&lt;/strong&gt;   is what they called it inferred type&lt;br&gt;
 so the type of the variable is detected by it's value&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;br&gt;
when using var keyword to initialize variable with a value which from specific type  you cannot update the variable with value of different type&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
   var x=   'abdo';&lt;br&gt;
  x=90;  //  show an error&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Control Structure:&lt;/code&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;we mean the conditional  and iteration statements including:


-  if elese   
-  switch case
- for loop
- etc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;**&lt;br&gt;
IF ELSE**&lt;/p&gt;

&lt;p&gt;`int x =9;&lt;br&gt;
  if(x&amp;gt;8){&lt;br&gt;
    print("x  is bigger than 8");&lt;br&gt;
  } else {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print("x is less or equal  to 8");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}`&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Loop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;for(int c=0;c&amp;lt;9;c++){&lt;br&gt;
     print(c);&lt;br&gt;
   }&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;same to for loop in other languages like &lt;strong&gt;java&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;there is special loop come with list type like an array&lt;br&gt;
called &lt;strong&gt;foreEach&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;it is a callback for the array ,  it iterates through all elements of the given array&lt;/p&gt;

&lt;p&gt;&lt;code&gt;List numbers =[2,232,23,89];&lt;br&gt;
    numbers.forEach((n){&lt;br&gt;
      print(n);&lt;br&gt;
    });&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;SWITCH CASE *&lt;/em&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; same as switch case in java and many languages
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;`  var name ='ali';&lt;/p&gt;

&lt;p&gt;switch(name){&lt;br&gt;
    case 'ahmed':&lt;br&gt;
      print('it is ahmed');&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  break;
case 'ali':
  print('it is ali');

  break;

default:
   print('none of above');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;br&gt;
  `&lt;/p&gt;

&lt;p&gt;continued...&lt;/p&gt;

</description>
      <category>dart</category>
      <category>flutter</category>
      <category>basics</category>
    </item>
    <item>
      <title>Messaging Queue system with Nodjes</title>
      <dc:creator>kururu</dc:creator>
      <pubDate>Wed, 23 Feb 2022 19:47:01 +0000</pubDate>
      <link>https://dev.to/kururu95/messaging-queue-system-with-nodjes-401g</link>
      <guid>https://dev.to/kururu95/messaging-queue-system-with-nodjes-401g</guid>
      <description>&lt;p&gt;i will create a chat system  using socket io  , rabbitMQ and database .&lt;/p&gt;

&lt;p&gt;with rabbitmq you can send a message to queue when user is offline and after he connect  , he will consume all messages in  his  queue.&lt;/p&gt;

&lt;p&gt;any ideas? :)&lt;/p&gt;

</description>
      <category>node</category>
      <category>beginners</category>
      <category>queue</category>
      <category>rabbitmq</category>
    </item>
  </channel>
</rss>
