weekly_timetable

Customizable Weekly TimeTable widget for flutter. Compatible with Android & iOS.

Getting Started

Add dependency to pubspec.yaml

weekly_timetable:

Usage

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter TimeTable Plugin Example'),
      debugShowCheckedModeBanner: false
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  Map<int, List<int>> initialSchedule = {
    0: [],
    1: [],
    2: [],
    3: [],
    4: [],
    5: [],
    6: [],
  };

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: WeeklyTimeTable(initialSchedule),
    );
  }
}

Please see refer example.

Options

WeeklyTimeTable has some options for Cell colors and initial schedule

TypeNameDescription
ColorcellColorcell color when not selected (default: Colors.white)
ColorcellSelectedColorset color when cell selected (default: Colors.black)
ColorborderColorgrid line color (default: Colors.grey)
ValueChanged<Map<int, List>>onValueChangedtrigger onValueChanged every user click.
Stringlocaleoptional. en by default, ko, de, ja
booldraggableTBD
Map<int, List>initialScheduleTBD

TBD

  • Horizontal Drag for select
  • Vertical Drag for select
  • Support Time Cell disable
  • Support Day disable

Contributors

Libraries

weekly_timetable