Ventacademy
  • Socials
  • Business Fundamentals
    • Investments
  • High Income Skills
  • Programming
  • Software Review
  • Website Development
    • WordPress
    • Search Engine Optimization
    • Free Templates and Plugins
      • Support
  • Finance
No Result
View All Result
Knowledge base
No Result
View All Result
Home Programming Free download

A scrollable time chart in Flutter

admin by admin
April 8, 2021
Share on FacebookShare on Twitter


An amazing time chart in Flutter.

Ads

Chart Types

Getting Started

1 – Depend on it

Add it to your package’s pubspec.yaml file

dependencies:
  time_chart: ^0.1.0-nullsafety.1

2 – Install it

Install packages from the command line

flutter packages get

3 – Usage

Just input your DateTimeRange list to data: argument. The list must be sorted. First data is latest, last data is oldest. And set the ViewMode.

Example

import 'package:flutter/material.dart';
import 'package:time_chart/time_chart.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {

  // Data must be sorted.
  final data = [
    DateTimeRange(
      start: DateTime(2021,2,24,23,15),
      end: DateTime(2021,2,25,7,30),
    ),
    DateTimeRange(
      start: DateTime(2021,2,22,1,55),
      end: DateTime(2021,2,22,9,12),
    ),
    DateTimeRange(
      start: DateTime(2021,2,20,0,25),
      end: DateTime(2021,2,20,7,34),
    ),
    DateTimeRange(
      start: DateTime(2021,2,17,21,23),
      end: DateTime(2021,2,18,4,52),
    ),
    DateTimeRange(
      start: DateTime(2021,2,13,6,32),
      end: DateTime(2021,2,13,13,12),
    ),
    DateTimeRange(
      start: DateTime(2021,2,1,9,32),
      end: DateTime(2021,2,1,15,22),
    ),
    DateTimeRange(
      start: DateTime(2021,1,22,12,10),
      end: DateTime(2021,1,22,16,20),
    ),
  ];

  @override
  Widget build(BuildContext context) {
    final sizedBox = const SizedBox(height: 16);

    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Time chart example app')),
        body: SingleChildScrollView(
          child: Padding(
            padding: const EdgeInsets.all(16.0),
            child: Column(
              children: [
                const Text('Weekly time chart'),
                TimeChart(
                  data: data,
                  viewMode: ViewMode.weekly,
                ),
                sizedBox,
                const Text('Monthly time chart'),
                TimeChart(
                  data: data,
                  viewMode: ViewMode.monthly,
                ),
                sizedBox,
                const Text('Weekly amount chart'),
                TimeChart(
                  data: data,
                  chartType: ChartType.amount,
                  viewMode: ViewMode.weekly,
                  barColor: Colors.deepPurple,
                ),
                sizedBox,
                const Text('Monthly amount chart'),
                TimeChart(
                  data: data,
                  chartType: ChartType.amount,
                  viewMode: ViewMode.monthly,
                  barColor: Colors.deepPurple,
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

Supported languages

You can also use korean language by Internationalizing Flutter apps.

Download Flutter time chart app source code on GitHub

https://github.com/jja08111/time_chart

Check out the guide how to use Time chart package in your app on pub.dev

https://pub.dev/packages/time_chart

Provides the list of the opensource Flutter apps collection with GitHub repository.

admin

admin

Related Posts

An open-source public transport app

April 20, 2021

An open-source pubic transport app

April 20, 2021

Flutter Firebase Chat Core – Download source code on GitHub

April 19, 2021

Food Delivery App made by Flutter and Bloc

April 19, 2021
Next Post

FG explains why it revoked 4 Addax Petroleum Oil Mining Licenses

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended.

Buhari orders MDAs to grant FIRS access to their systems

January 21, 2021

Wizkid’s Riverside House, Yacht And Studio In Ghana (Video) – Celebrities

February 27, 2021

Subscribe.

Trending.

No Content Available

About Us

Knowledge base

We bring you the best technology news, Finance news and lots more. you can download premium themes, plugins scripts, courses and lots more here.

Follow Us

Categories

  • All
  • Books
  • Business Fundamentals
  • Finance
  • Free Course
  • Free download
  • Free Templates and Plugins
  • Health
  • High Income Skills
  • Investments
  • NSFW
  • Photography
  • Search Engine Optimization
  • Software Review
  • Support
  • Technical Analysis
  • Website Development
  • Wordpress
  • World

Activity

FREEDOWNLOAD

Oxygen 5.9 – WooCommerce WordPress Theme

Preston 1.2.1 – Real Estate WordPress Theme

Support Board 3.2.4 – WordPress Chat Plugin

YITH WooCommerce Customize My Account Page 3.1.1 Nulled

YITH Cost of Goods for WooCommerce 1.2.13 Nulled

BoomBox 2.7.7 Nulled – Viral Magazine WordPress Theme

Calendarista 13.3 – Premium WordPress Booking Plugin

Starto 1.7.2 Nulled – Saas Software Startup WordPress

BioLinks 7.0.0 Nulled – Instagram & TikTok Bio Links & URL Shortener

WizeStore 1.14.5 Nulled – Multipurpose WooCommerce Shop

Midone 3.0.4 – Laravel 8 Admin Dashboard Template + HTML Version + XD Design File

Mosto 4.0.1 – App Landing Page

An open-source public transport app

Infix LMS 2.0.1 Nulled – Learning Management System

An open-source pubic transport app

  • Socials
  • About
  • Advertise
  • Privacy & Policy
  • Contact

© 2020 Ventacademy

No Result
View All Result
  • Socials
  • Business Fundamentals
    • Investments
  • High Income Skills
  • Programming
  • Software Review
  • Website Development
    • WordPress
    • Search Engine Optimization
    • Free Templates and Plugins
      • Support

© 2020 Ventacademy