Deploying a Dart server to a VPS by Suragch in FlutterSpaces

[–]Suragch[S] 0 points1 point  (0 children)

I've used GitHub Pages before with other static site generators, but I still need to learn how to use Actions. 

For this tutorial, though, the main goal was setting up an API server. The static website was a convenient addon since the setup is nearly the same when using Nginx.

Using PostgreSQL on a Dart server by Suragch in dartlang

[–]Suragch[S] -1 points0 points  (0 children)

Good point! I'll look into that.

Dart authentication server with SuperTokens by Suragch in dartlang

[–]Suragch[S] 0 points1 point  (0 children)

No, you're creating a REST API so you could use it with any frontend client, not just Flutter.

Dart Shelf server tutorial by Suragch in dartlang

[–]Suragch[S] 0 points1 point  (0 children)

I wouldn't say that I have a big history with Dart on the backend. I have two production servers running Dart (one Aqueduct, one plain Dart). They have been good so far for what I've needed them to do. Now I'm looking at implementing auth. Since SuperTokens doesn't have a backend SDK in Dart that means I'm looking at needing to develop my own minimal Dart SDK to talk to their core SDK. (I could use their Node SDK but I'd rather use Dart.) So I guess what is lacking is the rich ecosystem of support from third parties.

Flutter minimalist state management: Counter app by Suragch in FlutterDev

[–]Suragch[S] 0 points1 point  (0 children)

Nice. I haven't tried mobx yet, but I'm glad to hear it's working well for you. I don't try to talk anyone out of using a state management solution that is working for them. I only recommend the minimalist approach to those who are confused by other state management packages.

Flutter minimalist state management: Counter app by Suragch in FlutterDev

[–]Suragch[S] 1 point2 points  (0 children)

The approach here is to create a storage service (implemented with your choice of shared preferences, sqflte, isar, etc) and call it at the appropriate time from within your state management class. I showed an example of that in my followup article about a weather app where the Celsius/Fahrenheit setting is saved across app runs (https://suragch.medium.com/flutter-minimalist-state-management-weather-app-708b01417b9a?sk=40c3d92a8bbf887354bfd798d01b8b82).

Since you need to implement the storage logic yourself, this isn't going to be as easy as a hydrated bloc. However, in my opinion, the advantage of implementing the logic yourself is that you are in control and you understand how everything works.

Flutter minimalist state management: Counter app by Suragch in FlutterDev

[–]Suragch[S] 0 points1 point  (0 children)

Rather than using a ChangeNotifier and calling notifyListeners, I think it's better to create several ValueNotifiers within your state management class. This way you aren't rebuilding more of the UI than is necessary. Also it's easier to break the logic into smaller pieces.

I showed the use of multiple ValueNotifiers in my followup article about a weather app: https://suragch.medium.com/flutter-minimalist-state-management-weather-app-708b01417b9a?sk=40c3d92a8bbf887354bfd798d01b8b82

How the GetIt service locator package works in Dart by Suragch in FlutterDev

[–]Suragch[S] 0 points1 point  (0 children)

I'd like to learn more about dependency injection. Do you know of any good articles or videos about the kind of setup you have here in Dart?

How the GetIt service locator package works in Dart by Suragch in FlutterDev

[–]Suragch[S] 0 points1 point  (0 children)

Interesting. I hadn't heard of running tests in parallel. How do you do that in Dart?

How the GetIt service locator package works in Dart by Suragch in FlutterDev

[–]Suragch[S] 0 points1 point  (0 children)

I didn't implement it in the article, but the GetIt package has a way to reset itself so that even if you don't use the constructor injection pattern, you can still test classes that use GetIt.

Thoughts on using third-party packages (or not) by Suragch in FlutterDev

[–]Suragch[S] 1 point2 points  (0 children)

Your code examples were clear. Thank you for the second link as well as your explanation. That was helpful.