This week in Flutter #13

Get this newsletter directly in your inbox.

We have many resources about testing and some about Firebase Realtime Database. It is almost like content creators agree on the subject of the content they publish.

I give a lot of space to other developers…


This content originally appeared on DEV Community and was authored by Michele Volpato

Get this newsletter directly in your inbox.

We have many resources about testing and some about Firebase Realtime Database. It is almost like content creators agree on the subject of the content they publish.

I give a lot of space to other developers in this newsletter so I think I deserve to share some of my achievements: this week I joined the Flutter team at raywenderlich.com as a tech editor ?.

We're happy to welcome @_mvolpato
as the new Tech Editor on our Flutter team!

— raywenderlich.com (@rwenderlich) July 23, 2021

The content available at raywenderlich.com is always of high quality, so I am honored to be part of the team.

- Michele Volpato

?‍? Development

Better Bloc and Cubit Unit Testing

Did you ever have problems creating unit tests while using the BLoC pattern?

I surely did. This was one of the reasons why I am not using it anymore in the new apps I work on. Daniel Cardona Rojas comes to the rescue with this article, explaining his solution to the problem...

Generating Fake Data in Flutter using the Factory Pattern for Unit Testing

... and after you learn how to write tests, you might need to create fake data for such tests. Carlo Miguel Dy shows you how in this article.

Unit testing DateTime.now() with the help of Dart extensions

Using DateTime.now() in your code makes unit testing more difficult. You do not know how much time passed between the call to DateTime.now() and the moment you test its value, so you cannot compare timestamps. Reme Le Hane proposes a solution based on extending DateTime. I wonder if you can separate the two static methods into two different extensions, so that you can declare the setter only for testing, to avoid accidentally use it in your production code.

Another solution is to have a World service that you can inject into other classes. This service will provide values like DateTime.now() in production, or the real value for some sensors, or GPS location. While during testing it can be fully mocked.

Cat and Mice – Part 4: Implementing the AI

Bart van Wezel is continuing the implementation of his game with some artificial intelligence. He also implements some UI. The game is taking shape.

? Backend

The Firebase Realtime Database and Flutter - Firecasts

Watch Todd Kerpelman in a new video about using Realtime Database with Flutter, finally clarifying (to me) when to use Realtime Database and when to use Firestore.

Firebase Realtime Database Tutorial for Flutter

Two good resources about Realtime Database and Flutter in the same week. Is this a coincidence? Yes, it is. If you prefer to read rather than watch the Firebase video, you can follow this tutorial by Vincenzo Guzzi.

?‍? Design

Flutter for Single-Page Scrollable Websites with Navigator 2.0

In this series of articles, Cagatay Ulusoy shows different ways to create a single-page website using Flutter. You might think this is an easy topic, but a lot is going on and there are some choices you will need to make even before starting to code.

[...]

Read the rest on ishouldgotosleep.com

Get this newsletter directly in your inbox.


This content originally appeared on DEV Community and was authored by Michele Volpato


Print Share Comment Cite Upload Translate Updates
APA

Michele Volpato | Sciencx (2021-07-24T13:46:13+00:00) This week in Flutter #13. Retrieved from https://www.scien.cx/2021/07/24/this-week-in-flutter-13/

MLA
" » This week in Flutter #13." Michele Volpato | Sciencx - Saturday July 24, 2021, https://www.scien.cx/2021/07/24/this-week-in-flutter-13/
HARVARD
Michele Volpato | Sciencx Saturday July 24, 2021 » This week in Flutter #13., viewed ,<https://www.scien.cx/2021/07/24/this-week-in-flutter-13/>
VANCOUVER
Michele Volpato | Sciencx - » This week in Flutter #13. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/07/24/this-week-in-flutter-13/
CHICAGO
" » This week in Flutter #13." Michele Volpato | Sciencx - Accessed . https://www.scien.cx/2021/07/24/this-week-in-flutter-13/
IEEE
" » This week in Flutter #13." Michele Volpato | Sciencx [Online]. Available: https://www.scien.cx/2021/07/24/this-week-in-flutter-13/. [Accessed: ]
rf:citation
» This week in Flutter #13 | Michele Volpato | Sciencx | https://www.scien.cx/2021/07/24/this-week-in-flutter-13/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.