loginResponse function Null safety

Future<Response> loginResponse(
  1. String username,
  2. String password
)

Implementation

Future<http.Response> loginResponse(String username, String password) async {
  var unencodedPath = '/auth/login';
  var response = await http.post(Uri.https(authority, unencodedPath),
      headers: {'content-type': 'application/json'},
      body: jsonEncode({'username': '$username', 'password': '$password'}));

  return response;
}