From 830764996278bae5782c85e723a7c665cf693d77 Mon Sep 17 00:00:00 2001 From: Rubens de Melo Date: Thu, 24 Sep 2026 11:50:52 +0300 Subject: [PATCH] docs: remove example command from main readme --- README.md | 2 +- example/.gitignore | 6 - example/CHANGELOG.md | 3 - example/README.md | 15 +- example/analysis_options.yaml | 30 -- example/brasil_datetime_example.dart | 42 +++ example/lib/example.dart | 39 --- example/pubspec.lock | 412 --------------------------- example/pubspec.yaml | 16 -- 9 files changed, 56 insertions(+), 509 deletions(-) delete mode 100644 example/.gitignore delete mode 100644 example/CHANGELOG.md delete mode 100644 example/analysis_options.yaml create mode 100644 example/brasil_datetime_example.dart delete mode 100644 example/lib/example.dart delete mode 100644 example/pubspec.lock delete mode 100644 example/pubspec.yaml diff --git a/README.md b/README.md index b38ea0a..33797cb 100644 --- a/README.md +++ b/README.md @@ -75,4 +75,4 @@ Agradecemos a todos que contribuíram para este projeto! -Feito com [contrib.rocks](https://contrib.rocks). \ No newline at end of file +Feito com [contrib.rocks](https://contrib.rocks). diff --git a/example/.gitignore b/example/.gitignore deleted file mode 100644 index 3c8a157..0000000 --- a/example/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Files and directories created by pub. -.dart_tool/ -.packages - -# Conventional directory for build output. -build/ diff --git a/example/CHANGELOG.md b/example/CHANGELOG.md deleted file mode 100644 index effe43c..0000000 --- a/example/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.0 - -- Initial version. diff --git a/example/README.md b/example/README.md index 3816eca..c546dd8 100644 --- a/example/README.md +++ b/example/README.md @@ -1,2 +1,13 @@ -A sample command-line application with an entrypoint in `bin/`, library code -in `lib/`, and example unit test in `test/`. +# Exemplo + +Este diretório contém um exemplo executável que demonstra todos os formatos +disponíveis no pacote. + +Na raiz do projeto, execute: + +```sh +dart run example/brasil_datetime_example.dart +``` + +Como o `brasil_datetime` é um pacote Dart sem interface gráfica, não é +necessário criar um aplicativo Flutter separado para experimentar a API. diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml deleted file mode 100644 index dee8927..0000000 --- a/example/analysis_options.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# This file configures the static analysis results for your project (errors, -# warnings, and lints). -# -# This enables the 'recommended' set of lints from `package:lints`. -# This set helps identify many issues that may lead to problems when running -# or consuming Dart code, and enforces writing Dart using a single, idiomatic -# style and format. -# -# If you want a smaller set of lints you can change this to specify -# 'package:lints/core.yaml'. These are just the most critical lints -# (the recommended set includes the core lints). -# The core lints are also what is used by pub.dev for scoring packages. - -include: package:lints/recommended.yaml - -# Uncomment the following section to specify additional rules. - -# linter: -# rules: -# - camel_case_types - -# analyzer: -# exclude: -# - path/to/excluded/files/** - -# For more information about the core and recommended set of lints, see -# https://dart.dev/go/core-lints - -# For additional information about configuring this file, see -# https://dart.dev/guides/language/analysis-options diff --git a/example/brasil_datetime_example.dart b/example/brasil_datetime_example.dart new file mode 100644 index 0000000..74bbbff --- /dev/null +++ b/example/brasil_datetime_example.dart @@ -0,0 +1,42 @@ +import 'dart:io'; + +import 'package:brasil_datetime/brasil_datetime.dart'; + +void main() { + final data = DateTime(1987, 4, 22, 23, 37, 06); + + stdout + ..writeln(data.dia()) // 22 + ..writeln(data.diaSemana()) // quarta-feira + ..writeln(data.diaSemanaAbrev()) // qua. + ..writeln(data.mes()) // abril + ..writeln(data.mesAbrev()) // abr. + ..writeln(data.mesNoAno()) // 4 + ..writeln(data.diaMes()) // 22/04 + ..writeln(data.diaSemanaEMes()) // qua., 22/04 + ..writeln(data.diaMesAbrev()) // 22 de abr. + ..writeln(data.diaSemanaMesAbrev()) // qua., 22 de abr. + ..writeln(data.diaMesExt()) // 22 de abril + ..writeln(data.diaSemanaMesExt()) // quarta-feira, 22 de abril + ..writeln(data.trimestreAbrev()) // T2 + ..writeln(data.trimestre()) // 2º trimestre + ..writeln(data.ano()) // 1987 + ..writeln(data.anoMes()) // 04/1987 + ..writeln(data.diaMesAno()) // 22/04/1987 + ..writeln(data.diaMesAnoHoraMinuto()) // 22/04/1987 23:37 + ..writeln(data.semanaDiaMesAnoAbrev()) // qua., 22/04/1987 + ..writeln(data.mesAnoAbrev()) // abr. de 1987 + ..writeln(data.diaMesAnoAbrev()) // 22 de abr. de 1987 + ..writeln(data.semanaDiaMesAnoExtAbrev()) // qua., 22 de abr. de 1987 + ..writeln(data.mesAnoExt()) // abril de 1987 + ..writeln(data.diaMesAnoExt()) // 22 de abril de 1987 + ..writeln(data.semanaDiaMesAnoExt()) // quarta-feira, 22 de abril de 1987 + ..writeln(data.trimestreAnoAbrev()) // T2 de 1987 + ..writeln(data.trimestreAnoExt()) // 2º trimestre de 1987 + ..writeln(data.hora()) // 23 + ..writeln(data.horaMinuto()) // 23:37 + ..writeln(data.horaMinutoSegundo()) // 23:37:06 + ..writeln(data.minuto()) // 37 + ..writeln(data.segundo()) // 6 + ..writeln(data.minutoSegundo()); // 37:06 +} diff --git a/example/lib/example.dart b/example/lib/example.dart deleted file mode 100644 index 742e266..0000000 --- a/example/lib/example.dart +++ /dev/null @@ -1,39 +0,0 @@ -import 'package:brasil_datetime/brasil_datetime.dart'; - -void main() { - final data = DateTime(1987, 4, 22, 23, 37, 06); - - print(data.dia()); // 22 - print(data.diaSemana()); // quarta-feira - print(data.diaSemanaAbrev()); // qua. - print(data.mes()); // abril - print(data.mesAbrev()); // abr. - print(data.mesNoAno()); // 4 - print(data.diaMes()); // 22/04 - print(data.diaSemanaEMes()); // qua., 22/04 - print(data.diaMesAbrev()); // 22 de abr. - print(data.diaSemanaMesAbrev()); // qua., 22 de abr. - print(data.diaMesExt()); // 22 de abril - print(data.diaSemanaMesExt()); // quarta-feira, 22 de abril - print(data.trimestreAbrev()); // T2 - print(data.trimestre()); // 2º trimestre - print(data.ano()); // 1987 - print(data.anoMes()); // 04/1987 - print(data.diaMesAno()); // 22/04/1987 - print(data.diaMesAnoHoraMinuto()); // 22/04/1987 23:37 - print(data.semanaDiaMesAnoAbrev()); // qua., 22/04/1987 - print(data.mesAnoAbrev()); // abr. de 1987 - print(data.diaMesAnoAbrev()); // 22 de abr. de 1987 - print(data.semanaDiaMesAnoExtAbrev()); // qua., 22 de abr. de 1987 - print(data.mesAnoExt()); // abril de 1987 - print(data.diaMesAnoExt()); // 22 de abril de 1987 - print(data.semanaDiaMesAnoExt()); // quarta-feira, 22 de abril de 1987 - print(data.trimestreAnoAbrev()); // T2 de 1987 - print(data.trimestreAnoExt()); // 2º trimestre de 1987 - print(data.hora()); // 23 - print(data.horaMinuto()); // 23:37 - print(data.horaMinutoSegundo()); // 23:37:06 - print(data.minuto()); // 37 - print(data.segundo()); // 6 - print(data.minutoSegundo()); // 37:06 -} diff --git a/example/pubspec.lock b/example/pubspec.lock deleted file mode 100644 index 22f1e61..0000000 --- a/example/pubspec.lock +++ /dev/null @@ -1,412 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - _fe_analyzer_shared: - dependency: transitive - description: - name: _fe_analyzer_shared - sha256: "8d718c5c58904f9937290fd5dbf2d6a0e02456867706bfb6cd7b81d394e738d5" - url: "https://pub.dev" - source: hosted - version: "98.0.0" - analyzer: - dependency: transitive - description: - name: analyzer - sha256: "6141ad5d092d1e1d13929c0504658bbeccc1703505830d7c26e859908f5efc88" - url: "https://pub.dev" - source: hosted - version: "12.0.0" - args: - dependency: transitive - description: - name: args - sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 - url: "https://pub.dev" - source: hosted - version: "2.7.0" - async: - dependency: transitive - description: - name: async - sha256: e2eb0491ba5ddb6177742d2da23904574082139b07c1e33b8503b9f46f3e1a37 - url: "https://pub.dev" - source: hosted - version: "2.13.1" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - brasil_datetime: - dependency: "direct main" - description: - path: ".." - relative: true - source: path - version: "0.4.0" - cli_config: - dependency: transitive - description: - name: cli_config - sha256: ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec - url: "https://pub.dev" - source: hosted - version: "0.2.0" - clock: - dependency: transitive - description: - name: clock - sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b - url: "https://pub.dev" - source: hosted - version: "1.1.2" - collection: - dependency: transitive - description: - name: collection - sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" - url: "https://pub.dev" - source: hosted - version: "1.19.1" - convert: - dependency: transitive - description: - name: convert - sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 - url: "https://pub.dev" - source: hosted - version: "3.1.2" - coverage: - dependency: transitive - description: - name: coverage - sha256: "5da775aa218eaf2151c721b16c01c7676fbfdd99cebba2bf64e8b807a28ff94d" - url: "https://pub.dev" - source: hosted - version: "1.15.0" - crypto: - dependency: transitive - description: - name: crypto - sha256: c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf - url: "https://pub.dev" - source: hosted - version: "3.0.7" - file: - dependency: transitive - description: - name: file - sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 - url: "https://pub.dev" - source: hosted - version: "7.0.1" - frontend_server_client: - dependency: transitive - description: - name: frontend_server_client - sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 - url: "https://pub.dev" - source: hosted - version: "4.0.0" - glob: - dependency: transitive - description: - name: glob - sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de - url: "https://pub.dev" - source: hosted - version: "2.1.3" - http_multi_server: - dependency: transitive - description: - name: http_multi_server - sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 - url: "https://pub.dev" - source: hosted - version: "3.2.2" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" - url: "https://pub.dev" - source: hosted - version: "4.1.2" - intl: - dependency: transitive - description: - name: intl - sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" - url: "https://pub.dev" - source: hosted - version: "0.20.2" - io: - dependency: transitive - description: - name: io - sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b - url: "https://pub.dev" - source: hosted - version: "1.0.5" - lints: - dependency: "direct dev" - description: - name: lints - sha256: "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df" - url: "https://pub.dev" - source: hosted - version: "6.1.0" - logging: - dependency: transitive - description: - name: logging - sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 - url: "https://pub.dev" - source: hosted - version: "1.3.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861 - url: "https://pub.dev" - source: hosted - version: "0.12.19" - meta: - dependency: transitive - description: - name: meta - sha256: df0c643f44ad098eb37988027a8e2b2b5a031fd3977f06bbfd3a76637e8df739 - url: "https://pub.dev" - source: hosted - version: "1.18.2" - mime: - dependency: transitive - description: - name: mime - sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" - url: "https://pub.dev" - source: hosted - version: "2.0.0" - node_preamble: - dependency: transitive - description: - name: node_preamble - sha256: "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db" - url: "https://pub.dev" - source: hosted - version: "2.0.2" - package_config: - dependency: transitive - description: - name: package_config - sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc - url: "https://pub.dev" - source: hosted - version: "2.2.0" - path: - dependency: transitive - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - pool: - dependency: transitive - description: - name: pool - sha256: "978783255c543aa3586a1b3c21f6e9d720eb315376a915872c61ef8b5c20177d" - url: "https://pub.dev" - source: hosted - version: "1.5.2" - pub_semver: - dependency: transitive - description: - name: pub_semver - sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" - url: "https://pub.dev" - source: hosted - version: "2.2.0" - shelf: - dependency: transitive - description: - name: shelf - sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 - url: "https://pub.dev" - source: hosted - version: "1.4.2" - shelf_packages_handler: - dependency: transitive - description: - name: shelf_packages_handler - sha256: "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - shelf_static: - dependency: transitive - description: - name: shelf_static - sha256: c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3 - url: "https://pub.dev" - source: hosted - version: "1.1.3" - shelf_web_socket: - dependency: transitive - description: - name: shelf_web_socket - sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925" - url: "https://pub.dev" - source: hosted - version: "3.0.0" - source_map_stack_trace: - dependency: transitive - description: - name: source_map_stack_trace - sha256: c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b - url: "https://pub.dev" - source: hosted - version: "2.1.2" - source_maps: - dependency: transitive - description: - name: source_maps - sha256: "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812" - url: "https://pub.dev" - source: hosted - version: "0.10.13" - source_span: - dependency: transitive - description: - name: source_span - sha256: "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab" - url: "https://pub.dev" - source: hosted - version: "1.10.2" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" - source: hosted - version: "1.12.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" - url: "https://pub.dev" - source: hosted - version: "1.4.1" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" - url: "https://pub.dev" - source: hosted - version: "1.2.2" - test: - dependency: "direct dev" - description: - name: test - sha256: "8d9ceddbab833f180fbefed08afa76d7c03513dfdba87ffcec2718b02bbcbf20" - url: "https://pub.dev" - source: hosted - version: "1.31.0" - test_api: - dependency: transitive - description: - name: test_api - sha256: "949a932224383300f01be9221c39180316445ecb8e7547f70a41a35bf421fb9e" - url: "https://pub.dev" - source: hosted - version: "0.7.11" - test_core: - dependency: transitive - description: - name: test_core - sha256: "1991d4cfe85d5043241acac92962c3977c8d2f2add1ee73130c7b286417d1d34" - url: "https://pub.dev" - source: hosted - version: "0.6.17" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" - url: "https://pub.dev" - source: hosted - version: "15.0.2" - watcher: - dependency: transitive - description: - name: watcher - sha256: "1398c9f081a753f9226febe8900fce8f7d0a67163334e1c94a2438339d79d635" - url: "https://pub.dev" - source: hosted - version: "1.2.1" - web: - dependency: transitive - description: - name: web - sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - web_socket: - dependency: transitive - description: - name: web_socket - sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c" - url: "https://pub.dev" - source: hosted - version: "1.0.1" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 - url: "https://pub.dev" - source: hosted - version: "3.0.3" - webkit_inspection_protocol: - dependency: transitive - description: - name: webkit_inspection_protocol - sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572" - url: "https://pub.dev" - source: hosted - version: "1.2.1" - yaml: - dependency: transitive - description: - name: yaml - sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce - url: "https://pub.dev" - source: hosted - version: "3.1.3" -sdks: - dart: ">=3.9.0 <4.0.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml deleted file mode 100644 index fd5b953..0000000 --- a/example/pubspec.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: example -description: Exemplo de como utilizar o package brasil_datetime -version: 1.0.0 -homepage: https://github.com/flutterbootcamp/brasil_datetime -publish_to: 'none' - -environment: - sdk: '>=3.0.0 <4.0.0' - -dependencies: - brasil_datetime: - path: ../ - -dev_dependencies: - lints: ^6.1.0 - test: ^1.30.0