-
Notifications
You must be signed in to change notification settings - Fork 16
/
example.dart
30 lines (25 loc) · 847 Bytes
/
example.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import "package:flutter/material.dart";
import 'package:timeline/model/timeline_model.dart';
import 'package:timeline/timeline.dart';
class TimelineExample extends StatelessWidget {
final List<TimelineModel> list = [
TimelineModel(
id: "1",
description: "Test 1",
title: "Test 1"),
TimelineModel(
id: "2",
description: "Test 2",
title: "Test 2")
];
@override
Widget build(BuildContext context) {
return new TimelineComponent(
timelineList: list,
// lineColor: Colors.red[200], // Defaults to accent color if not provided
// backgroundColor: Colors.black87, // Defaults to white if not provided
// headingColor: Colors.black, // Defaults to black if not provided
// descriptionColor: Colors.grey, // Defaults to grey if not provided
);
}
}