skip to Main Content

I need to show Popup Dialog after the ending call like true caller for save the contact number in the database, So is it possible in flutter for android? My Code have in kotlin Language. So if you have any Solution, Please Let me know.

I am a fresher in the development field, so if you have any suggestions please let me know.

Thank you.

.

2

Answers


  1. if you are using future code to do calls then use .then() after your future once it is done then ".then()" callback will work automatically

    Login or Signup to reply.
  2. You can use FutureBuilder or StreamBuilder due to deal with Flutter async Programming.

    futurebuilder is using the place that single api call ex) POST of Restful Api. Or they have one and only one response

    Streambuilder can be assimilated to a value that can change over time but same usage in Futurebuilder

    FutureBuilder(
                future: _future(),
                builder: (BuildContext context, AsyncSnapshot snapshot) {
                  if (snapshot.hasData == false) {
                    return CircularProgressIndicator();
                  }
                  else if (snapshot.hasError) {
                    return Padding(
                      padding: const EdgeInsets.all(8.0),
                      
                      child: Text(
                        'Error: ${snapshot.error}',
                        style: TextStyle(fontSize: 15),
                      ),
                    );
                  }
    
                  else {
                    return Padding(
                      padding: const EdgeInsets.all(8.0),
    
                      child: Text(
                        snapshot.data.toString(),
                        style: TextStyle(fontSize: 15),
                      ),
                    );
                  }
                })
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search