custom_fl_timeline 1.0.0 copy "custom_fl_timeline: ^1.0.0" to clipboard
custom_fl_timeline: ^1.0.0 copied to clipboard

A Custom Timeline Flutter Package.

example/lib/main.dart

import 'package:example/pages/demo_curve_timeline.dart';
import 'package:example/pages/demo_custom_timeline.dart';
import 'package:example/pages/demo_straight_timeline.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Timeline Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Flutter Demo Timeline Page'),
      locale: Locale('ja', 'JP'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(
              onPressed: () {
                Navigator.of(context).push(
                  MaterialPageRoute<dynamic>(
                    builder: (_) => const DemoCurveTimeline(),
                  ),
                );
              },
              child: const Text('Curve Timeline'),
            ),
            ElevatedButton(
              onPressed: () {
                Navigator.of(context).push(
                  MaterialPageRoute<dynamic>(
                    builder: (_) => const DemoStraightTimeline(),
                  ),
                );
              },
              child: const Text('Straight Timeline'),
            ),
            ElevatedButton(
              onPressed: () {
                Navigator.of(context).push(
                  MaterialPageRoute<dynamic>(
                    builder: (_) => const DemoCustomTimeline(),
                  ),
                );
              },
              child: const Text('Custom Timeline'),
            ),
          ],
        ),
      ),
    );
  }
}
1
likes
150
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

A Custom Timeline Flutter Package.

Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter, intl

More

Packages that depend on custom_fl_timeline