Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

We can type `stless` and `stful` and we get Autocomplete Suggestion to generate Stateless Flutter Widget or Stateful Flutter Widget Respectively.

![statful](assets/01stlesstful.gif)


<img src="assets/01stlesstful.gif" height ="600" width = "850">

## #Day2 `If Null` Operator (`??`)

Expand All @@ -16,33 +18,41 @@ It also has shorthand assignment when it's null.

`abc??=5 //assigns 5 to abc if it's null`

![null](assets/02ifnull.png)


<img src="assets/02ifnull.png" height = "900">

## #Day3 Inner Function

We can define a function inside another function.

This is to encapsulate the inner function from everything else outside the outer function.

![functions](assets/03functions.png)

<img src="assets/03functions.png" height = "500">

## #Day4 ..Cascade..Chaining..Fluent API

We can chain method/member calls without returning `this` from **method(), getter() and setter()** using cascade operator (..)

try in [Dartpad](https://dartpad.dartlang.org/290e17306b745ed83b9242653ca55041)

![cascade](assets/04cascadebefore.png)

<img src="assets/04cascadebefore.png" height = "900">

Can be replaced with

![cascadeafter](assets/04cascadeafter.png)


<img src="assets/04cascadeafter.png" height = "600">

## #Day5 Dart `data class`

Dart does not support data class by default, but with plugins, we can simply generate data class (`copyWith()`,`fromMap()`, `toMap()`, `Named Constructor`, `toString()`,`hashCode()` & `equals()` methods implemented by the tool).

### `🚨❗️Caution❗️🚨` : **Your cursor should be inside the class that you want to generate data class.**
### `🚨❗️Caution❗️🚨`

**Your cursor should be inside the class that you want to generate data class.**

![dataclass](assets/05dataclass.gif)

Expand Down