setLabel method
Set the label text for route.
The label supports embedding up to two icons using the placeholder syntax %<index>%. For example:
'Header %%0%%\n%%1%% Footer' where 0 and 1 are indices into the labelIcons list previously
attached to the route.
Parameters
route: the route whose label will be updated.text: label text to set. Use icon placeholders to embed icons.
Also see:
- hideLabel — Hide the label for a route.
Implementation
void setLabel(final Route route, final String text) {
objectMethod(
pointerId,
'MapViewRouteCollection',
'setLabel',
args: <String, dynamic>{'route': route.pointerId, 'label': text},
dependencyId: mapPointerId,
);
}