diff --git a/CHANGELOG.md b/CHANGELOG.md index 89e117d..d9c5f4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ +## 1.0.3+2 + +- Added an example project + ## 1.0.3+1 - Updated documentation diff --git a/example/lib/main.dart b/example/lib/main.dart new file mode 100644 index 0000000..1a9e4dc --- /dev/null +++ b/example/lib/main.dart @@ -0,0 +1,31 @@ +import "package:arcane_helper_utils/arcane_helper_utils.dart"; +import "package:flutter/foundation.dart"; + +void main() { + // DateTime + final DateTime dateTime = DateTime(2019, 1, 1, 13, 45); + debugPrint(dateTime.toIso8601String()); // 2019-01-01T13:45:00.0 + debugPrint(dateTime.startOfHour.toIso8601String()); // 2019-01-01T13:00:00.0 + + final bool today = DateTime.now().isToday; + final bool notToday = DateTime(2001, 12, 31).isToday; + debugPrint("$today"); // true + debugPrint("$notToday"); // false + + // Strings + const String? nullString = null; + const String emptyString = " "; + const String nonEmptyString = "Hello World!"; + + debugPrint("${nullString.isNullOrEmpty}"); // true + debugPrint("${emptyString.isNullOrEmpty}"); // true + debugPrint("${nonEmptyString.isNullOrEmpty}"); // false + + const String text = "DartLang"; + final List result = text.splitByLength(3); + debugPrint("$result"); // ["Dar", "tLa", "ng"] + + const String lowercase = "hello"; + final String capitalized = lowercase.capitalize; + debugPrint(capitalized); // "Hello" +} diff --git a/pubspec.yaml b/pubspec.yaml index bb0c6ff..126cad6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: arcane_helper_utils description: Provides a variety of helpful utilities and extensions for Flutter and Dart. -version: 1.0.3+1 +version: 1.0.3+2 repository: https://github.com/hanskokx/arcane_helper_utils issue_tracker: https://github.com/hanskokx/arcane_helper_utils/issues