messageName property

String get messageName

The part of the fully qualified name that comes after the package prefix.

For nested messages this will include the names of the parents.

For example:

package foo;

message Container {
  message Nested {
    int32 int32_value = 1;
  }
}

The nested message will have a fullName of 'foo.Container.Nested', and a messageName of 'Container.Nested'.

Implementation

String get messageName =>
    fullName.substring(package.isEmpty ? 0 : package.length + 1);