tom_basics_console
Standalone-platform extension of `tom_basics`: platform detection, Markdown-formatted console output, and an IO-based HTTP client for command-line and desktop Dart applications.
Overview
`tom_basics_console` extends the utility floor for standalone Dart programs that run outside the browser. It adds platform detection across desktop, mobile, web, and individual operating systems, Markdown-rendered console output, and an IO-based HTTP client. It re-exports all of `tom_basics`, so a console or desktop tool can depend on this single package and get both the base utilities and the standalone-only capabilities together.
What it enables
Enables Platform detection, Markdown console output, Standalone HTTP requests.
Relationships
Standalone — no declared relationships.
tom_basics_console
Console and standalone platform utilities for Tom applications — platform detection, console-formatted output, and HTTP client support.
Features
- **Platform Detection** — `TomStandalonePlatformUtils` with detection for desktop, mobile, web, and individual OS platforms.
- **Console Output** — Markdown-formatted console output via `console_markdown`.
- **HTTP Client** — IO-based HTTP client for standalone Dart applications.
- Re-exports all of `tom_basics` for convenience.
Getting Started
dependencies:
tom_basics_console: ^1.0.0
Usage
import 'package:tom_basics_console/tom_basics_console.dart';
final platform = TomStandalonePlatformUtils();
print('Is desktop: ${platform.isDesktop()}');
print('Is macOS: ${platform.isMacOs()}');
// Console-formatted output
platform.out('**Bold** and _italic_ text');
License
BSD-3-Clause — see [LICENSE](LICENSE) for details.
License
BSD 3-Clause License Copyright (c) 2024-2026, Peter Nicolai Alexis Kyaw Find me on LinkedIn under Alexis Kyaw All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.