I want to add exit button to my project , i tried using
import 'dart:io';
.
.
.
RaisedButton(
child: Text("exit"),
onPressed: () {
exit(0);
},
)
and
import 'package:flutter/services.dart';
.
.
.
RaisedButton(
child: Text("exit"),
onPressed: () {
SystemNavigator.pop();
},
)
but in both cases app still running in background on Android platform , is there any other solution ? Thanks in advance