zenled / calendar_views Goto Github PK
View Code? Open in Web Editor NEWCollection of customisable calendar related widgets for Flutter.
Home Page: https://pub.dartlang.org/packages/calendar_views
License: MIT License
Collection of customisable calendar related widgets for Flutter.
Home Page: https://pub.dartlang.org/packages/calendar_views
License: MIT License
Option for MonthView to always have 6 rows.
If only 5 rows is needed to display all days of month, the last row is filled with days of next month.
@zenled Is there any plans to migrate this library to Null-safety, since this library hasn't been updated in years? Thank you in advance.
I want to customize and display specific widgets in certain pages. I want to use the index of the list
final List<DateTime> days;
. I tried to convert it to a Map
in the following code :
`
@OverRide
Widget build(BuildContext context) {
SystemChrome.setEnabledSystemUIOverlays([]);
super.build(context);
return new Row(
children: widget.days.asMap().map((index, day) => MapEntry(index, Container(
constraints: new BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 1.00,
maxWidth: MediaQuery.of(context).size.width * 1.00
),
child: ListTile(subtitle: Starting_screen(_makeTextString(day)), //this screen just displays different widgets
title:Text((index.toString())),)
),
)
).values.toList()
);
}`
When i tried this method, the index of the map seems to be mapping to all the pages and hence stays the same. Could i get some suggestion on how to properly access the index of this list?
also a side question: in the below code, is day
the index of the list days
? (this is the original code which i modified to display a different screen)
` @OverRide
Widget build(BuildContext context) {
SystemChrome.setEnabledSystemUIOverlays([]);
super.build(context);
return new Row(
children: widget.days.map((day) => Container(
constraints: new BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 1.00,
maxWidth: MediaQuery.of(context).size.width * 1.00
),
child: Starting_screen(_makeTextString(day)), //this screen just displays different widgets
),
).toList()
);
}
I essentially want the app to display only one day per page. I tried to mess around in the days_page_view_example.dart file but it doesnt seem to work; when i hard code the number of days to 1, the app just gets a white screen without an error. Could you please implement this option.
day view while rendering positioned widgets doesn't enable vertical scroll. Entire view from 00:00 hrs to 23:59 hrs should be visible and vertically scrollable.
Cloned repo, opened sample project in Android studio. Tried to run it... fails...
Launching lib/main.dart on iPhone 11 in debug mode...
Removing obsolete reference to flutter_assets from Runner.xcodeproj
Upgrading project.pbxproj
Project base configurations detected, removing.
Compiler message:
lib/days_page_view_example.dart:164:16: Error: 'Page' is imported from both 'package:flutter/src/widgets/navigator.dart' and 'package:calendar_views_example/utils/page.dart'.
return new Page.forDays(
^^^^
lib/month_page_view_example.dart:142:16: Error: 'Page' is imported from both 'package:flutter/src/widgets/navigator.dart' and 'package:calendar_views_example/utils/page.dart'.
return new Page.forMonth(
^^^^
Running Xcode build...
Xcode build done. 20.9s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
Compiler message:
lib/days_page_view_example.dart:164:16: Error: 'Page' is imported from both 'package:flutter/src/widgets/navigator.dart' and 'package:calendar_views_example/utils/page.dart'.
return new Page.forDays(
^^^^
lib/month_page_view_example.dart:142:16: Error: 'Page' is imported from both 'package:flutter/src/widgets/navigator.dart' and 'package:calendar_views_example/utils/page.dart'.
return new Page.forMonth(
^^^^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11.
Flutter doctor:
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 1.18.0-13.0.pre, on Mac OS X 10.15.4 19E287, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
[✓] Android Studio (version 3.6)
[✓] Connected device (2 available)
• No issues found!
In addition to the main gray *:00 hour lines, I want to have a bit more faded lines showing at *:30 and maybe even lines with different styles shown at *:15 and *:45
a thicker line at 09:00, 12:00, 15:00, 18:00 to denote long pomodoro breaks
It would be useful if there is a callback when you click on any time slot, so as to add event, etc.
For my application, i am using this PageView
and i need to get the date which is displayed in the current page in the format of DateTime
. Could someone suggest me a way of adding this value in DaysPageController
class.
In my application, I have implemented the daysPageView. I added a showDatePicker
widget and i wanted the displayed page to jump to the page which the user selects in the showDatepicker
. The widget showDatePicker
returns a DateTime
variable. But when i tried to call _dayspagecontroller.jumpToDay()
, i get this error : The method 'jumpToDay' was called on null.
. Could you please help out in modifying the jumpToDay
function so that when a DateTime
value is returned, The method will jump the page to the selected date in showDatePicker
?
The impmentation of jumpToDay
in my app :
`
_selectDate() async {
final DateTime picker =await showDatePicker(
context: context,
initialDate: DateTime.now(),
firstDate: DateTime(2010),
lastDate: DateTime(2040));
if (picker != null) {
setState(() {
selectedDate = picker;
});
Navigator.pop(context);
print(selectedDate);
// await runJump(selectedDate);
return selectedDate;
}
}
`
`
new FlatButton(onPressed: () => _daysPageController.jumpToDay(_selectDate()),
child: Text("change date"),
),
`
when you scroll to the end of the day, it will continue scrolling into the next day and so forth
events with start times in Day+0 and end times in DAY+1 will show up as single events when scrolling past midnight
my calendar data is sitting in a sqlite database and as you know in dart, it runs async. i am trying to use your calendar wrapped with a FutureBuilder().
is there a way to do it with your calendar?
i am trying to have the day view in the UI show starting 8am. the calendar by default goes to midnight since that's the beginning of the day view.
below the main clock time would be shown another timezone
I know it's not technically an issue, but the documentation is so thin that the only way to understand how to use the package is by reading the example code. And still, that example code doesn't have a single line of comment...
Looking into how best to do dragging of events.
Is this something you would be open to take as a PR ?
I want to use an API for storing a bit of data and i want to display certain bits of data on specific days inside the DaysPageViewExample
. For this i need access to the function which is incrementing and decrementing the days in the DaysPageViewExample
. i have tried to go through the documentation but i was unable to find the exact function. Could you point out where the function is located in the Plugin files? Thanks in advance
some Events can be marked as background:
this feature can be used to generate a background for each day that shows the location of the sun in the sky using the events width (sun intensity is useful in some regions to plan out ones day). the app using this can generate these by making lots of 15..60min events with different widths
this feature can be used to color different parts of the day with different color to denote timebox/timebudget/timeblock preference for the user. this also should not collide with real events
the amount of rain can also be shown the same way as sun position
I think instead of making the with of each day squeeze in the full screen, why not make the it scrollable horizontally, like data tabale do, so you can scroll to the end if you can't see them all?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.