Simple console dart brick
This brick creates a very simple structure for a dart console application. Your dart sdk version detected automatically. After the structure is created, added dependency for analyzer and brick independently run dart pub get
Arguments
--name
> project name in pubspec.yaml, default isdraft_app
--linter_suppression
> removes some annoying linters, default isYes
Folder structure & files
├── {{name}}/
╰── ├── pubspec.yaml
├── analysis_options.yaml
╰── lib/
╰── main.dart
{{name}} mean the name you enter when ‘make’ the brick
Getting brick
- Get mason
- Run in console
mason add -g simple_console_dart --git-url https://github.com/cocahonka/simple_console_dart.git
Usage
Run in console mason make simple_console_dart
Additionally (not mandatory)
To shorten the command, you can create command alias guide for windows. Checked in powershell v.7:
cd C:/Users/USERNAME/
mkdir .config/powershell
code .config/powershell/user_profile.ps1
- Write in opened file and save:
# Alias
Set-Alias dartfast CreateSimpleDartConsoleApp
function CreateSimpleDartConsoleApp()
{
mason make simple_console_dart
}
code $PROFILE.CurrentUserCurrentHost
- Write in opened file and save:
. $env:USERPROFILE/.config/powershell/user_profile.ps1
- Restart shell and now you can use
dartfast
instead ofmason make simple_console_dart