Skip to content

Commit 93c8a2c

Browse files
authored
README.md fixes (#8)
1 parent 6f14808 commit 93c8a2c

File tree

5 files changed

+19
-8
lines changed

5 files changed

+19
-8
lines changed

CHANGELOG.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# Changelog
22

3-
All notable changes to this project will be documented in this file.
4-
5-
## [Unreleased]
3+
## [0.1.1](https://github.com/coodoo-io/coo_extensions/releases/tag/0.1.1)
4+
### Added
5+
- Dokumentation of methods
6+
- Improved README.md file
67

7-
## [0.1.0] - 2024-04-23
8+
## [0.1.0](https://github.com/coodoo-io/coo_extensions/releases/tag/0.1.0)
89
### Added
910
- String extensions: `isNullOrEmpty`, `obscureText`, `obscureTextSegment`
1011
- DateTime extensions: `isToday`, `isYesterday`, `isSameYear`, `isAfterOrEqual`, `isBeforeOrEqual`, `isBetween`
1112
- BuildContext extensions: `isLightMode`, `isDarkMode`, `deviceWidth`, `deviceHeight`
1213
- Number extensions: `isBetween`
1314
- Form extensions: `isValid`
1415

15-
[Unreleased]: https://github.com/coodoo-io/coo_extensions/compare/v0.1.0...HEAD
16-
[0.1.0]: https://github.com/coodoo-io/coo_extensions/releases/tag/v0.1.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To use this package, add `coo_extensions` as a dependency in your `pubspec.yaml`
99

1010
```yaml
1111
dependencies:
12-
coo_extensions: ^0.1.0
12+
coo_extensions: ^0.1.1
1313
```
1414
1515
Then, run `flutter pub get` to install the package.

lib/coo_extensions.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/// The coo(l) extensions
12
library coo_extensions;
23

34
export 'extensions/build_context.extension.dart';

lib/extensions/date_time.extension.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,27 @@ extension DateTimeExtension on DateTime {
1919
return DateTime.now().year == year;
2020
}
2121

22+
/// Checks if the current DateTime instance is after or equal to the given [dateTime].
23+
/// Returns `true` if it is, `false` otherwise.
2224
bool isAfterOrEqual(DateTime dateTime) {
2325
final isAtSameMomentAs = dateTime.isAtSameMomentAs(this);
2426
return isAtSameMomentAs | isAfter(dateTime);
2527
}
2628

29+
/// Checks if the current DateTime instance is before or equal to the given [dateTime].
30+
/// Returns `true` if it is, `false` otherwise.
2731
bool isBeforeOrEqual(DateTime dateTime) {
2832
final isAtSameMomentAs = dateTime.isAtSameMomentAs(this);
2933
return isAtSameMomentAs | isBefore(dateTime);
3034
}
3135

36+
/// Checks if the current DateTime instance falls between the provided [fromDateTime] and [toDateTime].
37+
///
38+
/// Returns `true` if the current DateTime instance is after or equal to [fromDateTime]
39+
/// and before or equal to [toDateTime], otherwise returns `false`.
40+
///
41+
/// This method internally uses [isAfterOrEqual] and [isBeforeOrEqual] methods to determine
42+
/// if the current DateTime instance is within the specified range.
3243
bool isBetween(
3344
DateTime fromDateTime,
3445
DateTime toDateTime,

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: coo_extensions
22
description: "coo(l) extensions! A set of commonly used Dart/Flutter extension to ease development."
3-
version: 0.1.0
3+
version: 0.1.1
44
homepage: https://github.com/coodoo-io/coo_extensions
55

66
environment:

0 commit comments

Comments
 (0)