In this blog, I’ll show you a new way to use assets in Flutter.

How this new new approach look like?

How to implement this?

Add the following dependencies first in dev_dependencies in pubspec.yaml.

dev_dependencies:
build_runner: ^2.1.11
flutter_gen_runner: ^4.3.0

Add your required assets in assets folder and mention it in pubspec.yaml.

flutter:
uses-material-design: true
assets:
- assets/

This is how I added

--

--

Embedding code in Medium can be done easily in 2 ways.

  1. Embed code directly in Medium

To embed code directly in medium, type in Command+ Option+6 (if you use mac)

If you use other OS, this is what you got to type:

  • Windows: Ctrl + Alt + 6
  • Linux: Ctrl + Alt + 6

When these keys were press, the box below will appear

<paste code here>

2. Embed using GitHub Gist

Goto “Your gists”

To do this, log in to your Github profile and go to ‘your gists’.

--

--