A new Flutter package for interacting with boltiot cloud . To use this package in your flutter project, add boltiot: as a dependency in your pubspec.yaml file and import the package by typing import 'package:boltiot/boltiot.dart';
You can use this package just like the boltiot's python package.
Bolt myBolt ;
myBolt = new Bolt('API_KEY','DEVICE_ID');
If a passing an parameter to a Bolt function, always pass a String. Every function returns a Future<http.Response>
var response = await myBolt.isOnline();
var response = await myBolt.digitalWrite('PIN','STATE');
http.Response response = await myBolt.isOnline();
print(response.body);
OUTPUT:- {"value":"Device is offline","success":0}
Sms sms;
sms = new Sms('account_sid','auth_token','to_number','from_number');
sms.sendSms(message:'This is an alert message');
Email email;
email = new Email('api_key','mailgun_domain_name','from_email','to_email');
email.sendEmail(subject:'This is subject of the Email',body:'This is body of the Email');