Skip to content

Instantly share code, notes, and snippets.

@Nikzed
Created December 27, 2023 07:27
Show Gist options
  • Save Nikzed/e864c76acbc520ee07791fea5aafa351 to your computer and use it in GitHub Desktop.
Save Nikzed/e864c76acbc520ee07791fea5aafa351 to your computer and use it in GitHub Desktop.
How many lines does your Flutter project have for Windows PowerShell
$totalLines = 0
Get-ChildItem -Recurse -Filter "*.dart" | Where-Object {!($_.Name -like "*.g.dart" -or $_.Name -like "*.freezed.dart" -or $_.Name -like "*.gr.dart" -or $_.Name -like "*.gen.dart")} | ForEach-Object {
$lineCount = (Get-Content $_.FullName | Measure-Object -Line).Lines
$totalLines += $lineCount
Write-Host "$($_.Name): $lineCount lines"
}
Write-Host "Total lines: $totalLines"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment