Skip to content

Commit

Permalink
release version 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamalianpour committed Jun 25, 2022
1 parent 51ba688 commit 99f965b
Show file tree
Hide file tree
Showing 13 changed files with 161 additions and 89 deletions.
38 changes: 25 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
## [0.0.4]
* fix `daysDuration` when this is null
* fix 12 AM task bug
## [0.1.0]

## [0.0.3]
* add multi days task
* fix some issue in doc
- Add BorderRadius for tasks to style
- Add horizontal padding around each task in the time planner by [kashua14](https://github.com/kashua14) - [#7](https://github.com/Jamalianpour/time_planner/pull/7)
- Refactor code by [myConsciousness](https://github.com/myConsciousness) - [#5](https://github.com/Jamalianpour/time_planner/pull/5)
- Fix double `Scrollbar` for times

## [0.0.2]
* migrate to nullSafety
* add showScrollBar to [TimePlannerStyle]
## [0.0.4]

## [0.0.1+1]
* fix some issue in readme and pubspec.yaml
- fix `daysDuration` when this is null
- fix 12 AM task bug

## [0.0.1]
* first release
## [0.0.3]

- add multi days task
- fix some issue in doc

## [0.0.2]

- migrate to nullSafety
- add showScrollBar to [TimePlannerStyle]

## [0.0.1+1]

- fix some issue in readme and pubspec.yaml

## [0.0.1]

- first release
31 changes: 28 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You can see web demo here: [https://jamalianpour.github.io/time_planner_demo](ht

```yaml
dependencies:
time_planner: ^0.0.4
time_planner: ^0.1.0
```
##### 2. import time planner lib
Expand Down Expand Up @@ -89,7 +89,9 @@ TimePlanner(
tasks: tasks,
),
```

#### Multi days task

You can add multi days task with `daysDuration` minimum and default value for this argument is 1 and result look like this :

![MultiDay](screenshot/MultiDay.png)
Expand All @@ -107,17 +109,40 @@ style: TimePlannerStyle(
cellWidth: 60,
dividerColor: Colors.white,
showScrollBar: true,
horizontalTaskPadding: 5,
borderRadius: const BorderRadius.all(Radius.circular(8)),
),
```

when time planner widget loaded it will be scroll to current local hour and this futrue is true by default, you can turn this off like this:
when time planner widget loaded it will be scroll to current local hour and this option is true by default, you can turn this off like this:

```dart
currentTimeAnimation: false,
```

### Note

If you use desktop or web platform and want users to be able to move with the mouse in the time planner, add this code to the code:

```dart
class MyCustomScrollBehavior extends MaterialScrollBehavior {
// Override behavior methods and getters like dragDevices
@override
Set<PointerDeviceKind> get dragDevices => {
PointerDeviceKind.touch,
PointerDeviceKind.mouse,
};
}
// Set ScrollBehavior for an entire application.
MaterialApp(
scrollBehavior: MyCustomScrollBehavior(),
// ...
);
```

---

Fill free to fork this repository and send pull request 🏁👍

[Medium post](https://yaus.ir/4n7MeZ)
[Medium post](https://yaus.ir/4n7MeZ)
3 changes: 3 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release

# Windows
/windows/
21 changes: 16 additions & 5 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
import 'dart:math';

import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:time_planner/time_planner.dart';

void main() {
runApp(const MyApp());
}

class MyCustomScrollBehavior extends MaterialScrollBehavior {
// Override behavior methods and getters like dragDevices
@override
Set<PointerDeviceKind> get dragDevices => {
PointerDeviceKind.touch,
PointerDeviceKind.mouse,
};
}

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);

@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Time planner Demo',
scrollBehavior: MyCustomScrollBehavior(),
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
Expand Down Expand Up @@ -81,6 +92,11 @@ class _MyHomePageState extends State<MyHomePage> {
child: TimePlanner(
startHour: 6,
endHour: 23,
style: TimePlannerStyle(
// cellHeight: 60,
// cellWidth: 60,
showScrollBar: true,
),
headers: const [
TimePlannerTitle(
date: "3/10/2021",
Expand Down Expand Up @@ -168,11 +184,6 @@ class _MyHomePageState extends State<MyHomePage> {
),
],
tasks: tasks,
style: TimePlannerStyle(
// cellHeight: 60,
// cellWidth: 60,
showScrollBar: true,
),
),
),
floatingActionButton: FloatingActionButton(
Expand Down
36 changes: 18 additions & 18 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,14 @@ packages:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.16.0"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
version: "1.15.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
Expand All @@ -68,7 +61,7 @@ packages:
name: flutter_lints
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
version: "1.0.4"
flutter_test:
dependency: "direct dev"
description: flutter
Expand All @@ -80,7 +73,7 @@ packages:
name: lints
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "1.0.1"
matcher:
dependency: transitive
description:
Expand All @@ -94,7 +87,7 @@ packages:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4"
version: "0.1.3"
meta:
dependency: transitive
description:
Expand All @@ -108,7 +101,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.0"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -120,7 +113,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.2"
version: "1.8.1"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -155,21 +148,28 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.9"
version: "0.4.8"
time_planner:
dependency: "direct dev"
description:
path: ".."
relative: true
source: path
version: "0.0.4"
version: "0.1.0"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
version: "2.1.1"
sdks:
dart: ">=2.17.0-206.0.dev <3.0.0"
dart: ">=2.14.0 <3.0.0"
flutter: ">=1.17.0"
4 changes: 1 addition & 3 deletions example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ dependencies:
flutter:
sdk: flutter

cupertino_icons: ^1.0.5

dev_dependencies:
flutter_test:
sdk: flutter
time_planner:
path: ../
flutter_lints: ^2.0.1
flutter_lints: ^1.0.0

flutter:
uses-material-design: true
1 change: 0 additions & 1 deletion example/test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:time_planner_example/main.dart';


void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
Expand Down
5 changes: 4 additions & 1 deletion lib/src/config/global_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
library timeplanner.config;

import 'package:flutter/material.dart';

int? cellHeight;
int? cellWidth;
int? horizontalTaskPadding;
double? horizontalTaskPadding;
late double totalHours;
late int totalDays;
late int startHour;
BorderRadiusGeometry? borderRadius;
Loading

0 comments on commit 99f965b

Please sign in to comment.