First preview version of the rewrite for better performance and:
- Header for tracks
- custom icons and Huge thanks to @argorain and @ritheshSalyan
- Fix too much logs (Issue 5)
- You can now provide your custom time widget (Request 3):
TimelineEditor(
timeWidgetExtent: 100,
timeWidgetBuilder: (d, t) => Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Text(
'${d.inSeconds}/${t.inSeconds}',
overflow: TextOverflow.ellipsis,
),
),
- Fix scroll will overflow sometimes
- Added helper to go from seconds double to Duration:
Duration durationFromSeconds(double seconds)
double durationToSeconds(Duration duration)
- Added possibility to customize timeline text theme and separator color:
class TimelineEditor extends StatefulWidget {
...
/// Timeline time text theme. By default we use Theme.of(context).textTheme.bodyText1
final TextTheme timelineTextStyle;
/// Color used by the time separator in the timeline.
/// By default we use Theme.of(context).brightness == Brightness.dark ? Colors.white60 : Colors.black87
final Color separatorColor;
...
}
- We now use duration instead of seconds (Issue 1)
- better time indicators
- height of track is not customizable
- fix scaling
Performance optimization
- position now takes a stream to rebuild as little as possible
- layout builder replaced by a cached version to avoid rebuilding too often
- you can now react to user clicking a time on the timeline ruler
- First release