r/FlutterDev • • Oct 06 '20

Example I've implemented design from dribble

109 Upvotes

19 comments sorted by

5

u/Doroc0 Oct 06 '20

Very good. This is incredible.

Also, how do you manage to find this design?

Some feedback: In humidty_screen.dart line17 to 24 use a multiprovider https://pub.dev/documentation/provider/latest/provider/MultiProvider-class.html

2

u/kherel Oct 06 '20

It was on instagram few weeks ago https://www.instagram.com/web.inspirations/. After that I googled it, and found out that originally it was posted on dribbble.com more than a year ago.

Thanks for your feedback. I've updated the project after your advise.

4

u/pickleback11 Oct 06 '20

while I can't give you props for the overall design, the implementation is cool and impressive in flutter. good work!

1

u/kherel Oct 06 '20

Thanks. I'm glad you liked it.

2

u/jrheisler Oct 06 '20

Very cool!

2

u/A_DarkMind Oct 06 '20

Wow. Just wow.

2

u/foaly100 Oct 06 '20

Looks awesome

2

u/[deleted] Oct 07 '20

Thanks for sharing, this is awesome stuff!

0

u/erwinodyssey Oct 06 '20

Let's say when i found out u did it in flutter i got horny... no homo :) great work keep it up

-8

u/[deleted] Oct 06 '20

I'm always torn when seeing excellent execution in code like this, but somehow people manage to mess up spelling even with today's IDEs (built-in spellcheck) & even simply reusing words:

"_SliderCliper extends CustomClipper<Path>" and many more - how does one get good at coding without at least not butchering stuff *this obvious*?

This isn't supposed to disrespect the level of people's second or n-th language, but it makes my brain trip when reading such code and frequently causes me to lose time/focus when working with other's code :-/

5

u/kherel Oct 06 '20

Sorry. I've change the name of CustomClipper to _MovingCurvedCliper, is it more clear?

Feel free to rename and make a pull request, when you have free time.

3

u/CuriousCursor Oct 06 '20

Some people just care more about implementing stuff than spellings, especially when it's just a proof of concept.

0

u/[deleted] Oct 06 '20

[deleted]

2

u/kherel Oct 06 '20

I'm doing the same thing: I've made a screenshot of the video, add screenshot in Figma and measure sizes.

When I need to do it more responsible of the size of the screen, I'm using LayoutBuilder and set sizes in percentage of the widget size.

0

u/[deleted] Oct 06 '20

[deleted]

1

u/kherel Oct 06 '20

Make sure that the size of the screenshot in Figma is the same size of design mock. For example here they used iPhone X in design. I know that the size of screen for iPhone X is 812pt. So if I sized the screenshot to 812 px. I could easily get to know which font size they used.

0

u/[deleted] Oct 06 '20

[deleted]

2

u/kherel Oct 06 '20

Another method that I used. Is to add the screenshot as background image, to check if there are any mistakes in sizes.

3

u/[deleted] Oct 07 '20

[removed] — view removed comment

4

u/kherel Oct 07 '20 edited Oct 08 '20

How I got these numbers.

Part I.

  1. I put a screenshot of the design in Figma

  2. Drawn a curved line , added a width.

  3. Converted the line to path(outline stroke).

  4. Set height for 100px.

  5. Copied as svg, took path from svg.

Part II.

  1. Added path_parsing package.

  2. Create my own PathPrinter, you can find example of PathPrinter in example of the package (https://pub.dev/packages/path_parsing/example)

  3. Print the lines in terminal.

  4. Manually added it in the getPath method.

  5. Because I know that the maximum height is 100px, I used size.height/100 as a basic step.

  6. Because I know know that PathPrinter used cubicTo method to describe curved lined, and only cureved lines are moving in my widget, I added deltaY to all cubicTo Y points.

2

u/kherel Oct 07 '20

I’ve edited my answer. I’m new to reddit, not sure if you’ve got a notification