We need to import a external package 'package:crypto/crypto.dart' and a dart built-in library 'dart:convert' . Now lets see the code for encrypting a text import…
First we have to initialize routes. Let’s check the code : void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); //…
We use where() method with collections (like list, set ..) to filter out that collection elements. A where() method returns a new iterable which satisfies…
Through SharedPreferences we can store and retrieve key value pair even after closing the app. The key-value pair stored through SharedPreferences are not deleted after…
replaceAll() is a string method. It is used to replace all occurrences of the specified substring inside a string with another substring. Syntax:actualString.replaceAll( oldSubstring, newSubstring…
The ‘late‘ keyword is used to declare non-nullable variables before their initialization. But that initialization will be done before that variable is accessed. Lets understand…
There are two ways to create nullable variable. 1) Using var keyword, Syntax : var variable_name;2) Using datatypeSyntax : int? variable_name; Nullable variable creation using…