mirror of
https://github.com/Iconica-Development/flutter_timetable.git
synced 2025-05-18 19:43:43 +02:00
feat: add project README
This commit is contained in:
parent
19187e921c
commit
68c09fe8eb
5 changed files with 31 additions and 59 deletions
|
@ -1,3 +1,3 @@
|
|||
## 0.0.1
|
||||
## [0.0.1] - 25 August 2022
|
||||
|
||||
* TODO: Describe initial release.
|
||||
* Initial Release
|
||||
|
|
24
README.md
Normal file
24
README.md
Normal file
|
@ -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.
|
|
@ -16,53 +16,6 @@ class _TimetableDemoState extends State<TimetableDemo> {
|
|||
bool _grouped = false;
|
||||
final ScrollController _scrollController = ScrollController();
|
||||
final List<TimeBlock> 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<TimeBlock> groupedBlocks = [
|
||||
TimeBlock(
|
||||
start: TimeOfDay(hour: 14, minute: 0),
|
||||
end: TimeOfDay(hour: 15, minute: 0),
|
||||
|
@ -150,10 +103,11 @@ class _TimetableDemoState extends State<TimetableDemo> {
|
|||
Timetable(
|
||||
startHour: 3,
|
||||
endHour: 22,
|
||||
timeBlocks: groupedBlocks,
|
||||
timeBlocks: blocks,
|
||||
scrollController: _scrollController,
|
||||
tablePaddingStart: 0,
|
||||
collapseBlocks: true,
|
||||
mergeBlocks: false,
|
||||
)
|
||||
] else ...[
|
||||
Timetable(
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
test('test', () {
|
||||
expect(true, true);
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue