xxxxxxxxxx
@override
Widget build(BuildContext context) {
return new MaterialApp(
home: new Scaffold(
body: new Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
new Container(
height: 250.0,
child: new Stack(
children: <Widget>[
new Center(
child :
new Container(
child : new FloatingActionButton(
child : new Icon (Icons.location_on),
onPressed: ()
async {
SmsMessage message = new SmsMessage(_nirbinumber, '$loc1');
sender.sendSms(message);
message.addStateListener((state) {
if (state == SmsMessageState.Delivered) {
receiver.onSmsReceived.listen((SmsMessage msg) => _lastMessage = msg);
setState(() {
savegeoValue(); // function to extract GPS coordinate of the received sms and save it with "shared preference"
StreamSubscription<SmsMessage> _smsSubscription;
}
);
showMap(); // function to launch googlemap view
}
}
);
}
),
),
),
],
)
)
],
)
)
);