Image for post
Image for post
Photo by Jan Antonin Kolar on Unsplash

A persistent database is a really important factor in app development. Saving some data on the device, retrieving it when required, and working with it especially with limited network capabilities, privacy reasons make it more compelling.

SQL databases are one of the most used databases supported across a variety of platforms. When developing Flutter apps, you can use sqflite package for the same. It is easy to use, stable, and supports direct SQL commands as well as Maps as input while performing the requested operation.

In this article, I will show you how to instantiate the database and perform basic operations which include inserting, updating, querying, and deleting data. …


Image for post
Image for post
Photo by Aron Visuals on Unsplash

If you have just started working in Dart, you must have come across Future objects, or if not, you will. A lot of built-in dart methods & functions return or work with Future object. So, you might ask, what is this Future? Why does this X method returns a Future object? The answer to these questions is quite simple if you focus on the naming of the object itself.

A Future is something that will happen, it has not happened now, but it will happen and that’s inevitable. That’s what a Future object in dart implies. …


Understanding the Basics of SELinux & How-To Work with it on Android

Image for post
Image for post
Image Credits: Quinn Dombrowski via Flickr

Glossary:

  • AOSP: Short for Android Open Source Project.
  • AVC: Short for Access Vector Cache, the cache used by SELinux to store its decisions regarding access control.
  • comm: Short for Communication.
  • LSM: Short for Linux Security Modules, a framework which is part of Linux, allows supporting various security implementation.
  • MAC: Short for Mandatory Access Control, a type of access control via which an OS constrains the ability of the initiator to perform the action in question.
  • macros: A single instruction that expands into a set of instructions when called.
  • NSA: Short for National Security Agency of the United States of America.
  • regex: Short for Regular Expression. …


Image for post
Image for post

While programming, you might run into some sort of situation, where you need to work on a file stored at a specific location, maybe write something on it, read it or anything else. Dart supports working with files as well.

In order to start working, first of all we need to import dart’s inbuilt io (input output) library.

import 'dart:io';

This library gives us access to a large number of classes, methods and properties which we can use to perform various operations. …


Image for post
Image for post
Unix Terminal Logos to DollarAkshay

Taking a user’s input can be sometimes a crucial thing while writing scripts to automate a job. Just like all other programming languages, dart also supports taking user’s input. Here’s how you can do that:

First of all import dart’s io (input output) library.

import ‘dart:io’;

Once imported, this library allows us to access a lot of useful classes and methods. For taking a user’s input from CLI, we need to create an instance of stdin class and use readLineSync method on it.

var line = stdin.readLineSync();

This will store the input from the user into the line variable. However, one must note that the taken inputs are always are of type String. Hence, in case you need the input in a certain type, you need to manually convert it. …

About

Aayush Gupta

22 y.o. | Indian 🇮🇳 | FOSS Enthusiastic

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store