-
Notifications
You must be signed in to change notification settings - Fork 253
Making images more responsive #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 17 commits
210a631
1b18915
8545650
656a969
5ba9e73
e363e17
3606828
78c68d2
1ac4002
b3b38e7
33fbf4d
0d250fe
94ddd44
e4dd489
505f504
7ae4f82
3621892
5e3d3c5
6f96618
f591836
afbcfc6
0e95532
fbfbb10
09c9c2c
bb5e998
b9f4f9d
ea1a655
acb1021
47bffc9
6a289fd
b7971f5
0d068b6
ede64e9
5f298b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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. | ||
|
|
||
|  | ||
|
|
||
|
|
||
| <img src="assets/01stlesstful.gif" height ="600" width = "850"> | ||
|
|
||
| ## #Day2 `If Null` Operator (`??`) | ||
|
|
||
|
|
@@ -16,33 +18,39 @@ It also has shorthand assignment when it's null. | |
|
|
||
| `abc??=5 //assigns 5 to abc if it's null` | ||
|
|
||
|  | ||
| <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. | ||
|
|
||
|  | ||
|
|
||
|
||
| <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) | ||
|
|
||
|  | ||
|
|
||
|
||
| <img src="assets/04cascadebefore.png" height = "900"> | ||
|
|
||
| Can be replaced with | ||
|
|
||
|  | ||
|
|
||
|
||
|
|
||
| <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.** | ||
|
|
||
Tamir198 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|  | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,9 @@ but, Flexible uses `fit :FlexFit.loose` by default. | |
|
|
||
| **flex** = The factor of space taken from parent. Mostly not fully used if `flex: FlexFit.loose` used i.e. `Flexible`. | ||
|
|
||
|  | ||
|
|
||
|
||
| <img src="assets/15flexibleexpanded.png" height ="800"> | ||
|
|
||
|
|
||
| If you fully read the following image, you will fully understand the difference between `Flexible` and `Expanded` | ||
|  | ||
|
|
@@ -51,7 +53,9 @@ You can play with values of snap, floating, pinned etc to get desired effect | |
|
|
||
| ## #Day18 What the Key | ||
|
|
||
|  | ||
|
|
||
|
|
||
|
||
| <img src="assets/18keys.gif" height ="600"> | ||
|
|
||
| Ever wondered why we need GlobalKey(children : GlobalObjectKey, LabeledGlobalKey), LocalKey(children: ObjectKey, ValueKey & UniqueKey) right? | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,7 +58,7 @@ Ever wanted rectangular/stadium Fab with Notch? | |
|
|
||
| [try this code on your editor](https://gist.github.com/erluxman/fd442639bcaf84e14b31f70b00c48fe9) | ||
|
|
||
|  | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the way I like it, perfect 👍🏻 |
||
| <img src="assets/24rectangularnotch.png" height ="600"> | ||
|
|
||
| ## #Day25 Google Fonts in flutter | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,8 +15,11 @@ Use Wrap like you use Column or Row just give it's direction (either vertical or | |
| spacing: 20, //space between previous and next item | ||
| runSpacing: 20, //space between new row or column | ||
| ); | ||
|
|
||
| [try in codepen](https://codepen.io/erluxman/pen/YzyENpR) | ||
|  | ||
|
|
||
| <img src="assets/29wrap.gif" height ="600"> | ||
|
|
||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2 Empty line below |
||
|
|
||
| ## #Day30 Blur a Widget in Flutter | ||
|
|
||
|
|
@@ -40,7 +43,9 @@ To blur a widget, put it below a BackdropFilter widget in stack. | |
|
|
||
| You will a blur like this. | ||
| [play in codepen](https://codepen.io/erluxman/pen/xxwPJrY) | ||
|  | ||
|
|
||
| <img src="assets/30blur.png" height ="600"> | ||
|
|
||
|
|
||
| ## #Day31 Changing Theme Dynamically | ||
|
|
||
|
|
@@ -197,10 +202,14 @@ VSCode: typing Open Dev Tools in command Pallet. | |
|
|
||
| Learining to use Dart Dev tool is very 🚨important skill🚨 to have as a Flutter/dart developer. | ||
|
|
||
|  | ||
|
|
||
|
||
| <img src="assets/35as.png" height ="400"> | ||
|
|
||
| _Opening in Android Stuido_ | ||
|
|
||
|  | ||
|
|
||
|
||
| <img src="assets/35vscode.png" height ="400"> | ||
|
|
||
| _Opening in VSCode_ | ||
|
|
||
|  | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,7 +68,7 @@ Then, Flutter will handle the rest. | |
| ) | ||
| [try in codepen](https://codepen.io/erluxman/pen/xxwJRBQ) | ||
|
|
||
|  | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is perfect |
||
| <img src="assets/37animatedswitcher.gif" height ="750"> | ||
|
|
||
| ## #Day38 GestureDetector widget | ||
|
|
||
|
|
@@ -103,7 +103,9 @@ All those callbacks behave like `onClick(){}` on Button. | |
|
|
||
| [try on codepen](https://codepen.io/erluxman/pen/wvKxVrE) | ||
|
|
||
|  | ||
|
|
||
|
|
||
|
||
| <img src="assets/38gesture.gif" height ="750"> | ||
|
|
||
| ## #Day39 Package Animated Text Kit | ||
|
|
||
|
|
@@ -124,7 +126,11 @@ animated_text_kit provides some cool ways to animate text appearences. | |
|
|
||
| [animated_text_kit package](https://pub.dev/packages/animated_text_kit#-installing-tab-) | ||
|
|
||
|  | ||
|
|
||
|
|
||
|
||
|
|
||
|
|
||
| <img src="assets/39animatetext.gif" height ="750"> | ||
|
|
||
| ## #Day40 5 Steps of AnimatedIcon | ||
|
|
||
|
|
@@ -138,7 +144,9 @@ We can use AnimatedIcon in 5 simple steps. | |
|
|
||
| [play on codepen](https://codepen.io/erluxman/pen/PoPyNrM) | ||
|
|
||
|  | ||
|
|
||
|
||
|
|
||
| <img src="assets/40animatedicon.gif" height ="750"> | ||
|
|
||
| ## #Day41 Path Provider( `path_provider package`) (common file locations in iOS and Android) | ||
|
|
||
|
|
@@ -189,8 +197,12 @@ We can use ShapeBorder to give outline to widgets or Clip them on it's shape. Th | |
|
|
||
| [try in codepen](https://codepen.io/erluxman/pen/vYNQLPx) | ||
|
|
||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 4 empty lines here, 3 extra |
||
|  | ||
|  | ||
|
|
||
|
|
||
| <img src="assets/41shapeborder1.png" height ="750"> | ||
|
|
||
| <img src="assets/41shapeborder2.png" height ="750"> | ||
|
|
||
|
|
||
| [___`Tips 1-7`___](README.md) | ||
| [__`Tips 08-14`__](week02.md) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -105,7 +105,9 @@ From dart 2.3 onwards, we can use `collection if` and `collection for` operators | |
|
|
||
| [try on codepen](https://codepen.io/erluxman/pen/yLYGbdy) | ||
|
|
||
|  | ||
|
|
||
|
|
||
| <img src="assets/44collectioniffor.png" height ="800"> | ||
|
|
||
| ## #Day45 tear-off vs lambda vs function call | ||
|
|
||
|
|
@@ -118,6 +120,8 @@ From dart 2.3 onwards, we can use `collection if` and `collection for` operators | |
| 2. ___`A lambda.`___ | ||
|
|
||
|  | ||
|
|
||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. May be it should be changed as well?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you referring to the image size?
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah..
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I meant extra empty lines |
||
|
|
||
|
|
||
| ## #Day46 ColorFiltered Widget | ||
|
|
||
|
|
@@ -134,7 +138,9 @@ ColorFiltered works with any widgets as child not just Image. | |
|
|
||
| [get the code](https://gist.github.com/erluxman/7b5c1dfec4461b147d9b00a86d080bb5) | ||
|
|
||
|  | ||
|
|
||
|
||
|
|
||
| <img src="assets/46colorfiltered.gif" height ="650"> | ||
|
|
||
| ## #Day47 ShaderMask Widget | ||
|
|
||
|
|
@@ -161,7 +167,9 @@ Gradients can be easily converted to Shader with createShader() method. | |
| ) | ||
| [get the code](https://gist.github.com/erluxman/b6f1166ac19b7b2654ee2102c58a8837) | ||
|
|
||
|  | ||
|
|
||
|
|
||
|
||
| <img src="assets/47mask.png" height ="650"> | ||
|
|
||
| ## #Day48 `synchronized` in dart | ||
|
|
||
|
|
@@ -231,7 +239,8 @@ ___`Widget/Image()`___ -Inside-> ___`ClipRRect()`___ -Inside-> ___`Container()`_ | |
| ), | ||
|
|
||
| [try in codepen](https://codepen.io/erluxman/pen/abvxvOz) | ||
|  | ||
|
|
||
| <img src="assets/49circularImage.png" height ="650"> | ||
|
|
||
| [___`Tips 1-7`___](README.md) | ||
| [__`Tips 08-14`__](week02.md) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,6 +44,9 @@ __`To setup lint in Flutter :`__ | |
| 2. Add `analysis_options.yaml` in project root directory. | ||
|  | ||
|
|
||
|
|
||
|
||
|
|
||
|
|
||
| 3. Include `package:lint/analysis_options.yaml` inside `analysis_options.yaml` and add your custom rules. | ||
|
|
||
| include: package:lint/analysis_options.yaml | ||
|
|
@@ -180,7 +183,9 @@ Just give the animation `duration` & the updated `TextStyle`. `AnimatedDefaultTe | |
|
|
||
| [try in codepen](https://codepen.io/erluxman/pen/XWXKBJP) | ||
|
|
||
|  | ||
|
|
||
|
|
||
| <img src="assets/70textanim.gif" height ="650"> | ||
|
|
||
| [___`Tips 1-7`___](README.md) | ||
| [__`Tips 08-14`__](week02.md) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty lines here