diff --git a/CHANGELOG.md b/CHANGELOG.md index 41cc7d8..dbdbcca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ -## 0.0.1 +## [0.0.1] - 25 August 2022 -* TODO: Describe initial release. +* Initial Release diff --git a/README.md b/README.md new file mode 100644 index 0000000..582f805 --- /dev/null +++ b/README.md @@ -0,0 +1,24 @@ + +# timetable +A Flutter package for creating a timetable widget in which to display blocks of time with optional widgets in them. +The vertical time range is configurable and the widget is horizontally scrollable. The timetable has options to merge blocks below eachother when they are not overlapping or collapse items that are at the same time and have the same identifier. + +Supports all Flutter platforms. + +## Usage + +To use this package, add `timetable` as a [dependency in your pubspec.yaml file](https://flutter.dev/docs/development/platform-integration/platform-channels). + +### Example + +See [Example Code](example/lib/main.dart) for more info. + +### Issues & Feedback + +Please file an [issue](https://github.com/Iconica-Development/timetable/issues) to send feedback or report a bug, +If you want to ask a question or suggest an idea then you can [open an discussion](https://github.com/Iconica-Development/timetable/discussions). +Thank you! + +### Contributing + +Every pull request is welcome. \ No newline at end of file diff --git a/example/lib/main.dart b/example/lib/main.dart index b0255c8..5e9f6e3 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -16,53 +16,6 @@ class _TimetableDemoState extends State { bool _grouped = false; final ScrollController _scrollController = ScrollController(); final List blocks = [ - TimeBlock( - start: TimeOfDay(hour: 8, minute: 0), - end: TimeOfDay(hour: 9, minute: 0), - child: null, - ), - TimeBlock( - start: TimeOfDay(hour: 9, minute: 15), - end: TimeOfDay(hour: 10, minute: 0), - child: null, - ), - TimeBlock( - start: TimeOfDay(hour: 10, minute: 15), - end: TimeOfDay(hour: 11, minute: 0), - child: Container(color: Colors.purple, height: 300, width: 50), - ), - TimeBlock( - start: TimeOfDay(hour: 6, minute: 15), - end: TimeOfDay(hour: 7, minute: 0), - child: Container(color: Colors.blue, height: 300, width: 200), - ), - TimeBlock( - start: TimeOfDay(hour: 18, minute: 0), - end: TimeOfDay(hour: 18, minute: 15), - child: Text('High Tea'), - id: 10, - ), - TimeBlock( - start: TimeOfDay(hour: 18, minute: 0), - end: TimeOfDay(hour: 18, minute: 15), - child: Text('High Tea'), - id: 10, - ), - TimeBlock( - start: TimeOfDay(hour: 18, minute: 0), - end: TimeOfDay(hour: 18, minute: 15), - child: Text('High Tea'), - id: 10, - ), - TimeBlock( - start: TimeOfDay(hour: 18, minute: 0), - end: TimeOfDay(hour: 18, minute: 15), - child: Text('High Tea'), - id: 0, - ), - ]; - - final List groupedBlocks = [ TimeBlock( start: TimeOfDay(hour: 14, minute: 0), end: TimeOfDay(hour: 15, minute: 0), @@ -150,10 +103,11 @@ class _TimetableDemoState extends State { Timetable( startHour: 3, endHour: 22, - timeBlocks: groupedBlocks, + timeBlocks: blocks, scrollController: _scrollController, tablePaddingStart: 0, collapseBlocks: true, + mergeBlocks: false, ) ] else ...[ Timetable( diff --git a/pubspec.yaml b/pubspec.yaml index 1ae6038..91bff77 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,7 @@ name: timetable -description: Timetable Widget +description: Flutter package to create a Timetable Widget that display blocks of widgets inside a timetable. version: 0.0.1 +homepage: https://github.com/Iconica-Development/timetable environment: sdk: ">=2.17.6 <3.0.0" @@ -15,4 +16,4 @@ dev_dependencies: sdk: flutter flutter_lints: ^2.0.0 -flutter: \ No newline at end of file +flutter: diff --git a/test/timetable_test.dart b/test/timetable_test.dart deleted file mode 100644 index fe61a56..0000000 --- a/test/timetable_test.dart +++ /dev/null @@ -1,7 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; - -void main() { - test('test', () { - expect(true, true); - }); -}