size property

int size

int get size => _size; is a getter method that returns the value of the private _size variable. It allows other classes to access the value of _size without being able to modify it directly.

Implementation

int get size => _size;