LegStyle class

Chú thích chặng (route 1.3, route.md 7.2 "Chặng và chú thích chặng"): huy hiệu tròn phương tiện trên tim đường (iconSizePx, viền, glyph glyphRatio × Ø) + thẻ chip chữ (chip*); vehicles = glyph + màu nền mặc định theo vehicleType. Token route.default.leg — theme riêng chưa khai (chưa biết route 1.3) hay khai thiếu khoá thì lấy số đo sharemap (fallback).

Constructors

LegStyle({required double iconSizePx, required String iconBorderColor, required double iconBorderWidthPx, required double glyphRatio, required String chipBg, required double chipBorderWidthPx, required double chipRadiusPx, required String chipTextColor, required double chipFontSizePx, required int chipFontWeight, required double chipHeightPx, required double chipPaddingXPx, required double chipMinWidthPx, required double chipGapPx, required String chipPlacement, required Map<String, ({String color, String glyph})> vehicles, Map<String, Map<String, dynamic>> vehicleDirect = const {}})
const
LegStyle.of(Object? raw)
Đọc route.default.leg của theme (đã giải biến); khoá thiếu → fallback.
factory

Properties

chipBg → String
final
chipBorderWidthPx → double
final
chipFontSizePx → double
final
chipFontWeight → int
final
chipGapPx → double
Khe từ mép icon tới mép chip.
final
chipHeightPx → double
final
chipMinWidthPx → double
final
chipPaddingXPx → double
final
chipPlacement → String
top · bottom — phía mặc định của chip so với icon.
final
chipRadiusPx → double
final
chipTextColor → String
final
glyphRatio → double
final
hashCode → int
The hash code for this object.
no setterinherited
iconBorderColor → String
final
iconBorderWidthPx → double
final
iconSizePx → double
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
vehicleDirect → Map<String, Map<String, dynamic>>
vehicleType → phần ghi đè nét direct của khúc direct-route có chặng khai phương tiện đó (route 1.5 — leg.vehicles.<loại>.direct). Phương tiện đường bộ không có.
final
vehicles → Map<String, ({String color, String glyph})>
vehicleType → (glyph, color).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Dạng JSON của route.default.leg (số nguyên giữ dạng nguyên).
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

fallback → const LegStyle
Số đo sharemap (spec route 1.3 mục 5).