Skip to content

Instantly share code, notes, and snippets.

@mileskrell
Last active January 14, 2020 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mileskrell/326de58ec49e1a79ae1c1073f36a2c63 to your computer and use it in GitHub Desktop.
Save mileskrell/326de58ec49e1a79ae1c1073f36a2c63 to your computer and use it in GitHub Desktop.
Patch to reproduce WeekView issue
Index: example/lib/main.dart
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- example/lib/main.dart (revision ef4044b05eef89e3fcc85b18e81e2e9d00bcc946)
+++ example/lib/main.dart (date 1579027083000)
@@ -141,37 +141,13 @@
DateTime now = DateTime.now();
DateTime date = DateTime(now.year, now.month, now.day);
return WeekView(
- dates: [date.subtract(Duration(days: 1)), date, date.add(Duration(days: 1))],
+ dates: [date.subtract(Duration(days: 1)), date, date.add(Duration(days: 1)), date.add(Duration(days: 2))],
events: [
- FlutterWeekViewEvent(
- title: 'An event 1',
- description: 'A description 1',
- start: date.subtract(Duration(hours: 1)),
- end: date.add(Duration(hours: 18, minutes: 30)),
- ),
- FlutterWeekViewEvent(
- title: 'An event 2',
- description: 'A description 2',
- start: date.add(Duration(hours: 19)),
- end: date.add(Duration(hours: 22)),
- ),
- FlutterWeekViewEvent(
- title: 'An event 3',
- description: 'A description 3',
- start: date.add(Duration(hours: 23, minutes: 30)),
- end: date.add(Duration(hours: 25, minutes: 30)),
- ),
- FlutterWeekViewEvent(
- title: 'An event 4',
- description: 'A description 4',
- start: date.add(Duration(hours: 20)),
- end: date.add(Duration(hours: 21)),
- ),
FlutterWeekViewEvent(
title: 'An event 5',
description: 'A description 5',
- start: date.add(Duration(hours: 20)),
- end: date.add(Duration(hours: 21)),
+ start: date.add(Duration(hours: 20+24)),
+ end: date.add(Duration(hours: 21+24)),
),
],
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment