build method
We wrap this ticket in a decoration (getTickerDecoration) The ticker expects a method to generate it's current string (buildTickerString(clockModel)) It also expects a builder function to generate the characters
Normally we add TickerCharacterWidget which draws 1 character On the last item, we draw the WeatherIcon (there should be blank spaces on the end of the string to make room for it)
We also need to place ValueKey's on the nodes to help the AnimatedSwitcher work with them internally
Implementation
@override
Widget build(BuildContext context) => Container(
decoration: getTickerDecoration(context),
height: height,
child: TickerWidget(
builder: () => buildTickerString(clockModel),
digitBuilder: (glyph, first, last) => last
? TickerWeatherIcon(
key: ValueKey(clockModel.weatherCondition),
clockModel: clockModel,
height: height)
: TickerCharacterWidget(
key: ValueKey(glyph), fontSize: fontSize, glyph: glyph),
),
);