I have implemented a class in a file user_service.dart:
class UserService { 
    Future<User> createUser(...)
 ....
}
I have tried referencing the createUser method in another class
I import the User Service class
  import 'user_service.dart';
and try
  UserService userService;
  print(userService.toString());
  UserService.createUser(....);
It compiles fine.
A am getting an error: NoSuchMethodError: The method 'createUser' was called on null.
Any ideas?
Help appreciated.
 
    