weekly_timetable 0.2.2 copy "weekly_timetable: ^0.2.2" to clipboard
weekly_timetable: ^0.2.2 copied to clipboard

Timetable widget for flutter

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

Type Name Description
Color cellColor cell color when not selected (default: Colors.white)
Color cellSelectedColor set color when cell selected (default: Colors.black)
Color borderColor grid line color (default: Colors.grey)
ValueChanged<Map<int, List onValueChanged trigger onValueChanged every user click.
String locale optional. en by default, ko, de, ja
bool draggable TBD
Map<int, List initialSchedule TBD

TBD #

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

Contributors #

8
likes
20
pub points
0%
popularity

Publisher

unverified uploader

Timetable widget for flutter

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on weekly_timetable