baseLocation property
String
baseLocation
The current Base location. Example :
- if the current location is
'/page1'
baseLocation will be'/'
. - if the current location is
'/page1/'
baseLocation will be'/page1'
. - if the current location is
'/page1/page2'
baseLocation will be'/page1'
. - if the current location is
'/page1/page2/'
baseLocation will be'/page1/page2
'.
Notice that the ending slash changes the baseLocation.
Implementation
String get baseLocation =>
_pathEndsWithSlash ? _subLocation : _getBaseUrl(_subLocation, path);