mirror of
https://github.com/Iconica-Development/flutter_agenda.git
synced 2025-05-18 21:03:45 +02:00
Improved README, fixed dependencies, added GIF, added dependabot
This commit is contained in:
parent
eaf55a9349
commit
7a5f65f009
8 changed files with 163 additions and 75 deletions
10
.github/dependabot.yaml
vendored
Normal file
10
.github/dependabot.yaml
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
- package-ecosystem: "pub"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
32
.github/workflows/flutter.yml
vendored
Normal file
32
.github/workflows/flutter.yml
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- feature/*
|
||||
- bugfix/*
|
||||
- hotfix/*
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/wrapper
|
||||
/opt/hostedtoolcache/flutter
|
||||
key: ${{ runner.OS }}-flutter-install-cache
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
- name: Flutter pub get
|
||||
run: flutter pub get
|
||||
- name: Flutter format
|
||||
run: flutter format -o none --set-exit-if-changed .
|
||||
- name: Flutter analyze
|
||||
run: flutter analyze
|
12
README.md
12
README.md
|
@ -1,20 +1,20 @@
|
|||
[](https://github.com/Iconica-Development) [](URL TO GITHUB ACTIONS) [](https://github.com/tenhobi/effective_dart)
|
||||
[](https://github.com/Iconica-Development) [](https://github.com/Iconica-Development/agenda/actions/new) [](https://github.com/tenhobi/effective_dart)
|
||||
|
||||
# Agenda
|
||||
A Flutter package for creating an agenda that displays events per day with an included calendar for picking the date. Multiple events at the same time are alongside each other. There is also the option to stack multiple items at the same time.
|
||||
The underlying datepicker widget supports marking dates and disabling dates.
|
||||
|
||||
|
||||

|
||||
|
||||
Supports all Flutter platforms.
|
||||
|
||||
## Usage
|
||||
|
||||
To use this package, add `agenda` as a [dependency in your pubspec.yaml file](https://flutter.dev/docs/development/platform-integration/platform-channels).
|
||||
To use this package, add `agenda` as a dependency in your pubspec.yaml file.
|
||||
|
||||
### Example
|
||||
## How to Use
|
||||
|
||||
See [Example Code](example/lib/main.dart) for more info.
|
||||
See the [Example Code](example/lib/main.dart) for an example on how to use this package.
|
||||
|
||||
## Issues
|
||||
|
||||
|
@ -26,4 +26,4 @@ If you would like to contribute to the plugin (e.g. by improving the documentati
|
|||
|
||||
## Author
|
||||
|
||||
This agenda for Flutter is developed by [Iconica](https://iconica.nl). You can contact us at <support@iconica.nl>
|
||||
This `agenda` for Flutter is developed by [Iconica](https://iconica.nl). You can contact us at <support@iconica.nl>
|
BIN
agenda.gif
Normal file
BIN
agenda.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.6 MiB |
|
@ -6,7 +6,11 @@ import 'package:agenda/agenda.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
void main() {
|
||||
runApp(const MaterialApp(home: AgendaDemo()));
|
||||
runApp(
|
||||
const MaterialApp(
|
||||
home: AgendaDemo(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
class AgendaDemo extends StatelessWidget {
|
||||
|
@ -15,64 +19,109 @@ class AgendaDemo extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: SafeArea(
|
||||
child: AgendaWidget(
|
||||
header: Text('Agenda', style: Theme.of(context).textTheme.headline6),
|
||||
appBar: AppBar(),
|
||||
body: AgendaWidget(
|
||||
header: Text(
|
||||
'Agenda',
|
||||
style: Theme.of(context).textTheme.headline6,
|
||||
),
|
||||
blockWidth: 50,
|
||||
highlightToday: false,
|
||||
blocks: [
|
||||
AgendaEvent(
|
||||
start: DateTime.now().subtract(const Duration(hours: 3)),
|
||||
end: DateTime.now().add(const Duration(hours: 2)),
|
||||
start: DateTime.now().subtract(
|
||||
const Duration(hours: 3),
|
||||
),
|
||||
end: DateTime.now().add(
|
||||
const Duration(hours: 2),
|
||||
),
|
||||
),
|
||||
AgendaEvent(
|
||||
start: DateTime.now().subtract(const Duration(hours: 2)),
|
||||
end: DateTime.now().add(const Duration(hours: 1)),
|
||||
start: DateTime.now().subtract(
|
||||
const Duration(hours: 2),
|
||||
),
|
||||
end: DateTime.now().add(
|
||||
const Duration(hours: 1),
|
||||
),
|
||||
),
|
||||
AgendaEvent(
|
||||
start: DateTime.now().subtract(const Duration(hours: 1)),
|
||||
end: DateTime.now().add(const Duration(hours: 1)),
|
||||
start: DateTime.now().subtract(
|
||||
const Duration(hours: 1),
|
||||
),
|
||||
end: DateTime.now().add(
|
||||
const Duration(hours: 1),
|
||||
),
|
||||
),
|
||||
AgendaEvent(
|
||||
start: DateTime.now().add(const Duration(hours: 3)),
|
||||
end: DateTime.now().add(const Duration(hours: 4)),
|
||||
start: DateTime.now().add(
|
||||
const Duration(hours: 3),
|
||||
),
|
||||
end: DateTime.now().add(
|
||||
const Duration(hours: 4),
|
||||
),
|
||||
id: 4,
|
||||
content: const Text('event 4'),
|
||||
),
|
||||
AgendaEvent(
|
||||
start: DateTime.now().add(const Duration(hours: 3)),
|
||||
end: DateTime.now().add(const Duration(hours: 4)),
|
||||
start: DateTime.now().add(
|
||||
const Duration(hours: 3),
|
||||
),
|
||||
end: DateTime.now().add(
|
||||
const Duration(hours: 4),
|
||||
),
|
||||
id: 4,
|
||||
content: const Text('event 5'),
|
||||
),
|
||||
AgendaEvent(
|
||||
start: DateTime.now().add(const Duration(hours: 3)),
|
||||
end: DateTime.now().add(const Duration(hours: 4)),
|
||||
start: DateTime.now().add(
|
||||
const Duration(hours: 3),
|
||||
),
|
||||
end: DateTime.now().add(
|
||||
const Duration(hours: 4),
|
||||
),
|
||||
id: 4,
|
||||
content: const Text('event 6'),
|
||||
),
|
||||
AgendaEvent(
|
||||
start: DateTime.now().add(const Duration(days: 1)),
|
||||
start: DateTime.now().add(
|
||||
const Duration(days: 1),
|
||||
),
|
||||
end: DateTime.now()
|
||||
.add(const Duration(days: 1))
|
||||
.add(const Duration(hours: 2)),
|
||||
.add(
|
||||
const Duration(days: 1),
|
||||
)
|
||||
.add(
|
||||
const Duration(hours: 2),
|
||||
),
|
||||
),
|
||||
AgendaEvent(
|
||||
start: DateTime.now().subtract(const Duration(hours: 2)),
|
||||
end: DateTime.now().add(const Duration(hours: 1)),
|
||||
start: DateTime.now().subtract(
|
||||
const Duration(hours: 2),
|
||||
),
|
||||
end: DateTime.now().add(
|
||||
const Duration(hours: 1),
|
||||
),
|
||||
),
|
||||
AgendaEvent(
|
||||
start: DateTime.now().add(const Duration(days: 2)),
|
||||
end: DateTime.now().add(const Duration(days: 3)),
|
||||
start: DateTime.now().add(
|
||||
const Duration(days: 2),
|
||||
),
|
||||
end: DateTime.now().add(
|
||||
const Duration(days: 3),
|
||||
),
|
||||
),
|
||||
],
|
||||
disabledDates: [
|
||||
// yesterday
|
||||
DateTime.now().subtract(const Duration(days: 1)),
|
||||
DateTime.now().subtract(
|
||||
const Duration(days: 1),
|
||||
),
|
||||
],
|
||||
highlightedDates: [
|
||||
// tomorrow
|
||||
DateTime.now().add(const Duration(days: 1)),
|
||||
DateTime.now().add(
|
||||
const Duration(days: 1),
|
||||
),
|
||||
],
|
||||
theme: const AgendaTheme(
|
||||
tableTheme: TableTheme(
|
||||
|
@ -80,7 +129,6 @@ class AgendaDemo extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,11 +66,11 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
path: "."
|
||||
ref: stable
|
||||
resolved-ref: "6b3f1f5d12c1762bc208a1f1a4b9384dcb3369d4"
|
||||
url: "git@github.com:Iconica-Development/flutter_date_time_picker.git"
|
||||
ref: "2.2.1"
|
||||
resolved-ref: "6c78d4d73fa61ac4e2b103c821edf474421f81b4"
|
||||
url: "https://github.com/Iconica-Development/flutter_date_time_picker"
|
||||
source: git
|
||||
version: "0.0.1"
|
||||
version: "2.2.1"
|
||||
flutter_lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
@ -176,11 +176,11 @@ packages:
|
|||
dependency: transitive
|
||||
description:
|
||||
path: "."
|
||||
ref: "v0.0.2"
|
||||
resolved-ref: "62fdaa443818bd646058b536a12304725d1619fd"
|
||||
url: "git@github.com:Iconica-Development/timetable.git"
|
||||
ref: "1.0.0"
|
||||
resolved-ref: dada4ea9a440bcfe58a235dfd93798e4d5ce857a
|
||||
url: "https://github.com/Iconica-Development/flutter_timetable"
|
||||
source: git
|
||||
version: "0.0.1"
|
||||
version: "0.0.2"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -93,7 +93,7 @@ class _AgendaWidgetState extends State<AgendaWidget> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var events = _filterEventsOnDay(widget.blocks, _selectedDate);
|
||||
return DateTimePicker(
|
||||
return DragDownDateTimePicker(
|
||||
initialDate: _selectedDate,
|
||||
pickTime: false,
|
||||
highlightToday: widget.highlightToday,
|
||||
|
@ -110,8 +110,6 @@ class _AgendaWidgetState extends State<AgendaWidget> {
|
|||
scrollPhysics: widget.scrollPhysics,
|
||||
scrollController: widget.scrollController,
|
||||
blockColor: widget.blockColor,
|
||||
blockWidth: widget.blockWidth,
|
||||
hourHeight: widget.hourHeight,
|
||||
startHour: widget.startHour,
|
||||
endHour: widget.endHour,
|
||||
timeBlocks: events,
|
||||
|
|
|
@ -14,12 +14,12 @@ dependencies:
|
|||
sdk: flutter
|
||||
flutter_date_time_picker:
|
||||
git:
|
||||
url: git@github.com:Iconica-Development/flutter_date_time_picker.git
|
||||
ref: stable
|
||||
url: https://github.com/Iconica-Development/flutter_date_time_picker
|
||||
ref: 2.2.1
|
||||
timetable:
|
||||
git:
|
||||
url: git@github.com:Iconica-Development/timetable.git
|
||||
ref: v0.0.2
|
||||
url: https://github.com/Iconica-Development/flutter_timetable
|
||||
ref: 1.0.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
|
Loading…
Reference in a new issue