Sign in

How to get the image in the pdf is sometimes getting hard to achieve. So i summarize the code in an easy way. There are two ways to show a pdf via share the pdf with other apps and open into a print view. …

You will find out the solution of a list of objects getting from api, transfer it to the google map in form of polyline.

Do the process of adding your app into google map console. You have to enable “DirectionAPI”, “Maps SDK for Android”, for ios “Maps SDK for IOS”.

You can alter your already created table.
Add a new column in table.

Future<dynamic> alterTable(String TableName, String ColumneName) async {
var dbClient = await db;
var count = await dbClient.execute("ALTER TABLE $TableName ADD "
"COLUMN
$ColumneName TEXT;");
print(await dbClient.query(TABLE_CUSTOMER));
return count;
}

Call the function as:

alterTable(TABLE_CUSTOMER, Country);

How to get key of the list and save into the database.

If your data have simple key value structure.

var data = {
"key1": "value1",
"key2": "value2",
"key3": "value3",
};

var myMap = Map<String, dynamic>.from(data);
print(myMap);
print("Key:" + myMap.keys.toList().toString());

Response from api and convert into map:

var map1 = Map.fromIterable(responseJson['result'] as List);
print(map1);
List<dynamic> keysList = map1.keys.toList();
var myMap = Map<String, dynamic>.from(keysList[0]);
print("Keys: " + myMap.keys.toList().toString());

Simple way to create database for your flutter app and test it online.

  1. First of all add libraries and create a class to perform all database queries.
  2. Create an instance of database object where you want to perform action.
  3. Call the defined functions from database to your widget file.

1.)Add…

List of Users from api show in dialog and pass the selected item to your page.

Here is the code

First file is add_user_page.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class AddUserPage extends StatefulWidget {
@override
_AddUserPageState createState() => _AddUserPageState();
}

class ListItem {
int value;
String name;

ListItem(this.value, this.name);
}

class Users…

Shriya

Android & Flutter Programmer.

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