Skip to content

Commit 823211d

Browse files
committed
Fixed Issues & Optimization
Fixed hasSize and other related issues to improve package stability and performance. Minor improvements to documentation for clearer usage instructions. Package has been simplified.
1 parent a2dc019 commit 823211d

13 files changed

+673
-759
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@
2020

2121
## 1.0.0
2222

23-
* Stable version - fixed issues & added new features (about scrollbars).
23+
* Stable version - fixed issues & added new features (about scrollbars).
24+
25+
## 1.0.1
26+
27+
* Fixed hasSize and other related issues to improve package stability and performance. Minor improvements to documentation for clearer usage instructions. Package has been simplified.

README.md

+41-53
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
A time scheduler for Android & IOS where you can create events by clicking on cells, edit (update) and delete the events you have created. You can assign colours to events and if the name of the event is too long, you can see the full name and description by long pressing on the event.
1+
A time table for Android & IOS where you can create events by clicking on cells, edit (update) and delete the events you have created. You can assign colours to events and if the name of the event is too long, you can see the full name and description by long pressing on the event.
22

33
## Features
44

@@ -20,52 +20,49 @@ flutter pub add time_scheduler_table
2020
```
2121

2222
## Usage
23-
Define a TextEditingController for event add and event update alerts:
24-
```dart
25-
TextEditingController textController = TextEditingController();
26-
```
27-
Create a list of event models with title, column index, row index and color. <br> The row and column index, specify the index of the elements in the column and row titles (Mon, Tue or 08:00, 09:00). They starts from 0:
23+
24+
Create a list of event models with title, column index, row index and color. <br> The row and column index, specify the index of the elements in the column and row labels (Mon, Tue or 08:00, 09:00). They starts from 0:
2825
```dart
29-
List<EventModel> eventList = [
30-
EventModel(
31-
title: "Math",
32-
columnIndex: 0, // columnIndex is columnTitle's index (Monday : 0 or Day 1 : 0)
33-
rowIndex: 2, // rowIndex is rowTitle's index (08:00 : 0 or Time 1 : 0)
34-
color: Colors.orange,
35-
),
36-
EventModel(
37-
title: "History",
38-
columnIndex: 1,
39-
rowIndex: 5,
40-
color: Colors.pink,
41-
),
42-
EventModel(
43-
title: "Guitar & Piano Course",
44-
columnIndex: 4,
45-
rowIndex: 8,
46-
color: Colors.green,
47-
),
48-
EventModel(
49-
title: "Meeting",
50-
columnIndex: 3,
51-
rowIndex: 1,
52-
color: Colors.deepPurple,
53-
),
54-
EventModel(
55-
title: "Guitar and Piano Course",
56-
columnIndex: 2,
57-
rowIndex: 9,
58-
color: Colors.blue,
59-
)
60-
];
26+
List<Event> eventList = [
27+
Event(
28+
title: "Flutter Project",
29+
columnIndex: 0, //columnLabel's index (Monday)
30+
rowIndex: 3, //rowLabel's index (08:00)
31+
color: Colors.orange,
32+
),
33+
Event(
34+
title: "Deep Learning Course",
35+
columnIndex: 1,
36+
rowIndex: 6,
37+
color: Colors.pink,
38+
),
39+
Event(
40+
title: "Violin & Piano Course",
41+
columnIndex: 4,
42+
rowIndex: 8,
43+
color: Colors.green,
44+
),
45+
Event(
46+
title: "Sport",
47+
columnIndex: 3,
48+
rowIndex: 1,
49+
color: Colors.deepPurpleAccent,
50+
),
51+
Event(
52+
title: "Algorithm and Data Structures",
53+
columnIndex: 2,
54+
rowIndex: 11,
55+
color: Colors.blue,
56+
)
57+
];
6158
```
6259
Create your Time Scheduler Widget: <br>
6360

6461
```dart
6562
TimeSchedulerTable(
6663
cellHeight: 64,
6764
cellWidth: 72,
68-
columnTitles: const [ // You can assign any value to columnTitles. For Example : ['Column 1','Column 2','Column 3', ...]
65+
columnLabels: const [ // You can assign any value to columnLabels. For Example : ['Column 1','Column 2','Column 3', ...]
6966
"Mon",
7067
"Tue",
7168
"Wed",
@@ -75,7 +72,7 @@ TimeSchedulerTable(
7572
"Sun"
7673
],
7774
currentColumnTitleIndex: DateTime.now().weekday - 1,
78-
rowTitles: const [ // You can assign any value to rowTitles. For Example : ['Row 1','Row 2','Row 3', ...]
75+
rowLabels: const [ // You can assign any value to rowLabels. For Example : ['Row 1','Row 2','Row 3', ...]
7976
'08:00 - 09:00',
8077
'09:00 - 10:00',
8178
'10:00 - 11:00',
@@ -90,17 +87,8 @@ TimeSchedulerTable(
9087
'19:00 - 20:00',
9188
'20:00 - 21:00',
9289
],
93-
title: "Event Schedule",
94-
titleStyle: const TextStyle(
95-
fontSize: 18, fontWeight: FontWeight.bold, color: Colors.black),
96-
eventTitleStyle: const TextStyle(color: Colors.white, fontSize: 8),
97-
isBack: false, // back button
9890
eventList: eventList,
9991
eventAlert: EventAlert(
100-
alertTextController: textController,
101-
borderRadius: const BorderRadius.all(
102-
Radius.circular(12.0),
103-
),
10492
addAlertTitle: "Add Event",
10593
editAlertTitle: "Edit",
10694
addButtonTitle: "ADD",
@@ -120,18 +108,18 @@ TimeSchedulerTable(
120108
),
121109
),
122110
```
123-
`columnTitles` contain days or values that you define. It is not required. <br> The default value is :
111+
`columnLabels` contain days or values that you define. It is not required. <br> The default value is :
124112
```dart
125113
["Mon", "Tue", "Wed", "Thur", "Fri", "Sat", "Sun"]
126114
```
127115
You can define it as you want. For Example: <br>
128116
```dart
129-
columnTitles: const ["Column 1", "Column 2", "Column 3", ...],
117+
columnLabels: const ["Column 1", "Column 2", "Column 3", ...],
130118
currentColumnTitleIndex: 2,
131119
```
132120
If you define like this, selected column is 3 if `currentColumnTitleIndex` is 2.
133121

134-
`rowTitles` contain times or values that you define. It is not required. <br> The default value is :
122+
`rowLabels` contain times or values that you define. It is not required. <br> The default value is :
135123
```dart
136124
[
137125
'06:00 - 07:00',
@@ -156,7 +144,7 @@ If you define like this, selected column is 3 if `currentColumnTitleIndex` is 2.
156144
```
157145
You can define it as you want. For Example: <br>
158146
```dart
159-
rowTitles: const ["Row 1", "Row 2", "Row 3", ...],
147+
rowLabels: const ["Row 1", "Row 2", "Row 3", ...],
160148
```
161149
<br> <br> <br> <br>
162150

Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
package io.flutter.plugins;
22

3-
import io.flutter.plugin.common.PluginRegistry;
3+
import androidx.annotation.Keep;
4+
import androidx.annotation.NonNull;
5+
import io.flutter.Log;
6+
7+
import io.flutter.embedding.engine.FlutterEngine;
48

59
/**
610
* Generated file. Do not edit.
11+
* This file is generated by the Flutter tool based on the
12+
* plugins that support the Android platform.
713
*/
14+
@Keep
815
public final class GeneratedPluginRegistrant {
9-
public static void registerWith(PluginRegistry registry) {
10-
if (alreadyRegisteredWith(registry)) {
11-
return;
12-
}
13-
}
14-
15-
private static boolean alreadyRegisteredWith(PluginRegistry registry) {
16-
final String key = GeneratedPluginRegistrant.class.getCanonicalName();
17-
if (registry.hasPlugin(key)) {
18-
return true;
19-
}
20-
registry.registrarFor(key);
21-
return false;
16+
private static final String TAG = "GeneratedPluginRegistrant";
17+
public static void registerWith(@NonNull FlutterEngine flutterEngine) {
2218
}
2319
}

android/local.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
sdk.dir=C:\\Users\\sedat\\AppData\\Local\\Android\\sdk
2-
flutter.sdk=C:\\src\\flutter
1+
sdk.dir=/Users/teklif_bilisim/Library/Android/sdk
2+
flutter.sdk=/Users/teklif_bilisim/development/flutter

example/README.md

-15
Original file line numberDiff line numberDiff line change
@@ -1,16 +1 @@
11
# example
2-
3-
A new Flutter project.
4-
5-
## Getting Started
6-
7-
This project is a starting point for a Flutter application.
8-
9-
A few resources to get you started if this is your first Flutter project:
10-
11-
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12-
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13-
14-
For help getting started with Flutter development, view the
15-
[online documentation](https://docs.flutter.dev/), which offers tutorials,
16-
samples, guidance on mobile development, and a full API reference.

0 commit comments

Comments
 (0)