Orientação gerada a partir de informações públicas. Apenas para referência.
Basic_Utils é um pacote Dart que fornece classes de utilidade essenciais para tarefas comuns, como manipulação de strings, tratamento de datas, processamento de certificados X509 e PKCS e operações criptográficas. Ele melhora a eficiência do desenvolvimento ao oferecer funções reutilizáveis e bem testadas em múltiplas plataformas, incluindo Android, iOS, Web, macOS, Windows e Linux. O pacote é ideal para desenvolvedores que buscam soluções simples para desafios de programação cotidianos sem depender de dependências externas. Seu design leve o torna adequado para aplicações pequenas e grandes.
Casos de uso
Formatação e validação de strings
Manipulação de data e hora
Gerenciamento de certificados e chaves
Hashing criptográfico e codificação
Ferramentas de transformação de dados
Funções úteis para múltiplas plataformas
Principais recursos
Utilitários de string extensos
Auxiliares de data e hora
Suporte a X509 e PKCS
funções de criptografia embutidas
Leve e modular
Compatibilidade multiplataforma
Indicado para
Desenvolvedores Flutter que precisam de utilitários básicos
Projetos que exigem manipulação segura de dados
Aplicativos com operações frequentes de string ou data
Desenvolvedores evitam cadeias pesadas de dependências
Prototipagem e desenvolvimento rápido
Considerações
Limitado a funções básicas de utilidade
Nenhum tratamento de erro embutido em todos os métodos
Não projetado para sistemas criptográficos avançados
Depende das bibliotecas principais do Dart
Mais adequado para casos de uso simples a moderados
README original
Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.
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.