We as an Application Developers, always arrive in a situation to cache user preference or access tokens for later usage in APIs. So, let’s take a look at Hive strategy.
It’s a very generous question as SharedPreferences is pretty simple and well-known but it doesn’t provide security as such and only works with primitive data types. With Hive, we’ve the ability to store any data within an encrypted box so the data is not accessible outside the app’s context. Also, Hive is written in Dart language purely, which removes the native platform dependency and hence can be used on any…
Modern applications often require search functionality especially when apps have more textual content which cannot be presented to user in a single screen. The motivation of this article mainly comes from implementing search feature when using Firestore. Firebase doesn’t support String.contains() queries which can search for substrings inside text. But,
We’re programmers, we solve problems.
What this article covers:
We will be creating mock classes for each of the firestore class. Remember, this article is to demonstrate how to create and use mocks in tests. If this seems very lengthy, you can always use predefined libraries for mocking. Let’s begin by adding dependencies for firestore and mockito packages. I’m assuming you’ve done that already.