Package selection guidance compiled from public package information, community data, and project usage.
Basic_Utils is a Dart package providing essential utility classes for common tasks such as string manipulation, date handling, X509 and PKCS certificate processing, and cryptographic operations. It enhances development efficiency by offering reusable, well-tested functions across multiple platforms including Android, iOS, Web, macOS, Windows, and Linux. The package is ideal for developers seeking straightforward solutions to everyday programming challenges without relying on external dependencies. Its lightweight design makes it suitable for both small and large-scale applications.
Use cases
String formatting and validation
Date and time manipulation
Certificate and key management
Cryptographic hashing and encoding
Data transformation utilities
Cross-platform utility functions
Key features
Extensive string utilities
Date and time helpers
X509 and PKCS support
Built-in cryptography functions
Lightweight and modular
Multi-platform compatibility
Suitable for
Flutter developers needing basic utilities
Projects requiring secure data handling
Apps with frequent string or date operations
Developers avoiding heavy dependency chains
Prototyping and rapid development
Considerations
Limited to basic utility functions
No built-in error handling in all methods
Not designed for advanced cryptographic systems
Depends on Dart's core libraries
Best suited for simple to moderate use cases
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Basic Utils
A dart package for many helper methods fitting different situations.
As this package is written in pure Dart, it can be used on all platforms on which dart is currently running. This includes the use of frameworks like Flutter, Angular Dart and many more. This package can also be used for command line tools or rest services compiled with dart2native.
Note: Feel free to contribute by creating pull requests or file an issue for bugs, questions and feature requests.
Install
pubspec.yaml
Update pubspec.yaml and add the following line to your dependencies.
dependencies:basic_utils:^5.8.2
Import
Import the package with :
import'package:basic_utils/basic_utils.dart';
Util Classes
The package contains different classes. Each class contains methods that provide a solution for certain problems.
T randomItem<T>(Iterable<T> iterable);
boolisNullOrEmpty(Iterable? iterable);
boolisNotNullOrEmpty(Iterable? iterable);
List<List<T>> chunk<T>(List<T> list, int size);
swap(List<dynamic> input, int a, int b);
List<List<dynamic>> permutate(List<dynamic> data);
CryptoUtils
Helper class for cryptographic operations. This is some kind of high level api for pointycastle and asn1lib.
For a detailed changelog, see the CHANGELOG.md file
Real Live Examples
SSL Toolkit
All-in-one crossplatform (Android/iOS/macOS/Windows) toolkit for SSL, including SSL install check, TLS check, PEM parser, CSR generator and certificate transparency log check.
Copyright and license
MIT License
Copyright (c) 2024 Ephenodrom
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.