Flutter

Access dart class paramters

I have started learning Dart and Flutter and wanted to understand one concept:
class Service:
String ask = ”;

void write (String receivedData){
ask = receivedData;
}

class WriteToService:
Service a = Service(…