dynamic_timeline 0.1.2 dynamic_timeline: ^0.1.2 copied to clipboard
A widget to create daily timelines, timetables, gantt charts* and more.
import 'package:dynamic_timeline_example/pages/pages.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const HomePage(),
);
}
}
class HomePage extends StatelessWidget {
const HomePage({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const SizedBox(height: 20),
ElevatedButton(
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (_) => const DailyTimeline(),
),
),
child: const Text('Daily timeline'),
),
const SizedBox(height: 20),
ElevatedButton(
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (_) => const WeeklyTimetable(),
),
),
child: const Text('Weekly timeline'),
),
const SizedBox(height: 20),
ElevatedButton(
onPressed: () => Navigator.push(
context,
MaterialPageRoute(
builder: (_) => const GanttChart(),
),
),
child: const Text('Gantt chart'),
),
],
),
),
);
}
}