type 'int' is not a subtype of type 'String' in type cast when sending a post request

To fix your issue you just have to encode the data before sending.

 import 'dart:convert';
 ...

 final http.Response response =
    await http.post(Uri.encodeFull(url), body: json.encode(activityData));

If your API doesn't support JSON, then you just have to pass all your data as String.

    final Map<String, dynamic> activityData = {
      "user_id": "1",
      "name": activityName.text,
      "description": activityDescription.text,
      "startAt": activityStartAt.text,
      "endsAt": activityEndAt.text,
      "lat": "$_latitude",
      "long": "$_longitude",
      "category": "2",
      "status": "pending"
    };

     final http.Response response =
    await http.post(Uri.encodeFull(url), body: activityData);