function method
Finds the external or public function defined by the contract that has the
provided name.
If no, or more than one function matches that description, this method will throw.
Implementation
ContractFunction function(String name) =>
functions.singleWhere((f) => f.name == name);