easy_date_timeline 2.0.6 easy_date_timeline: ^2.0.6 copied to clipboard
The "easy_date_timeline" package is a customizable Flutter library that displays a timeline of dates in a horizontal view.
import 'package:flutter/material.dart';
import 'package:easy_date_timeline/easy_date_timeline.dart';
import 'examples/simple_use_date_picker.dart';
import 'examples/theming_example.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Easy Date Timeline',
theme: ThemeData(
scaffoldBackgroundColor: Colors.white,
colorScheme: ColorScheme.fromSeed(seedColor: Colors.indigo),
datePickerTheme: const DatePickerThemeData(
backgroundColor: Colors.white,
surfaceTintColor: Colors.white,
),
useMaterial3: true,
),
localizationsDelegates: const [
EasyDateTimelineLocalizations.delegate,
],
home: const MyHomePage(title: 'Easy Date Timeline 😊'),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
centerTitle: true,
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(title),
),
body: SingleChildScrollView(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
SimpleUseExample(),
ThemingExample(),
],
),
),
);
}
}