Uncategorized

Here you get your complete json file for ticket app

dart concepts

When deciding whether to use an external package like http in tests or to mock HTTP requests yourself, several factors come into play: Alternative Approach: Mock Server for Real HTTP Requests Creating a mock server that the http package communicates… Continue Reading…

Dart code

Here is our updated uidata.dart

database

While Firebase is commonly used for real-time database and authentication services in Flutter apps, you can indeed use Postgres SQL as an alternative backend solution. Integrating Postgres SQL involves setting up a server to host the database and establishing connections… Continue Reading…

Uncategorized

When writing unit tests, you may find that the test code tends to become complicated when writing with various test cases. For example, you can write tests in various cases, such as when testing a method that returns a certain… Continue Reading…

Dart null

If you ever work with Dart and wanna convert null to String? How does it work? Actually it’a bad idea. Don’t convert your null to String. You will get unexpected behavior. Your app might not crush. Here I got json… Continue Reading…

Dart completer

What is a completer? How to generate Future objects and complete them later using values ​​or errors When to use them? When it is necessary to create a Future from scratch(for example, when converting a callback-based API to a Future-based… Continue Reading…

Uncategorized

FutureOr contains Future. It’s like Future is subset of FutureOr. To me it sounds like better to use FutureOr on await/async operation, since it can handle both Future or non-Future types. Dart’s Flutter framework’s Riverpod package uses the FutureOr a… Continue Reading…

Uncategorized

As we all know, Dart is a single-threaded language. We can put some tasks that need to be waited into asynchronous operations, but asynchronous tasks must be executed when the thread is idle, which cannot meet the needs of some… Continue Reading…

Uncategorized

Before we go ahead learn about Futures take a look at below function Let’s take a look at a simple classical function The above function, get’s called from main() function and prints a value immediately. but when you create a… Continue Reading…