Skip to content

Commit 46bb362

Browse files
committed
v6.28.5
1 parent d219149 commit 46bb362

21 files changed

+2058
-49
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## [6.28.5] - 2025-05-23
22

33
* Fix: `getEnv` helper to return an empty string if a variable is set like this `APP_WEBSITE=""`
4+
* Add Dart Console to project
45
* Update pubspec.yaml
56

67
## [6.28.4] - 2025-05-13

analysis_options.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
# The following line activates a set of recommended lints for Flutter apps,
99
# packages, and plugins designed to encourage good coding practices.
10+
analyzer:
11+
errors:
12+
non_constant_identifier_names: ignore ignore ignore
13+
camel_case_types: ignore ignore
1014
include: package:flutter_lints/flutter.yaml
1115

1216
linter:

example/pubspec.lock

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ packages:
2929
dependency: transitive
3030
description:
3131
name: async
32-
sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63
32+
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
3333
url: "https://pub.dev"
3434
source: hosted
35-
version: "2.12.0"
35+
version: "2.13.0"
3636
base58check:
3737
dependency: transitive
3838
description:
@@ -149,18 +149,18 @@ packages:
149149
dependency: transitive
150150
description:
151151
name: fake_async
152-
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
152+
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
153153
url: "https://pub.dev"
154154
source: hosted
155-
version: "1.3.2"
155+
version: "1.3.3"
156156
ffi:
157157
dependency: transitive
158158
description:
159159
name: ffi
160-
sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6"
160+
sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418"
161161
url: "https://pub.dev"
162162
source: hosted
163-
version: "2.1.3"
163+
version: "2.1.4"
164164
file:
165165
dependency: transitive
166166
description:
@@ -194,10 +194,10 @@ packages:
194194
dependency: transitive
195195
description:
196196
name: flutter_local_notifications
197-
sha256: ebc86e2ff6a9ca5bc1943e675fef02b5ddaa1a99b4ef980cac576fcfc65959aa
197+
sha256: b94a50aabbe56ef254f95f3be75640f99120429f0a153b2dc30143cffc9bfdf3
198198
url: "https://pub.dev"
199199
source: hosted
200-
version: "19.2.0"
200+
version: "19.2.1"
201201
flutter_local_notifications_linux:
202202
dependency: transitive
203203
description:
@@ -308,10 +308,10 @@ packages:
308308
dependency: transitive
309309
description:
310310
name: flutter_timezone
311-
sha256: bc286cecb0366d88e6c4644e3962ebd1ce1d233abc658eb1e0cd803389f84b64
311+
sha256: "13b2109ad75651faced4831bf262e32559e44aa549426eab8a597610d385d934"
312312
url: "https://pub.dev"
313313
source: hosted
314-
version: "4.1.0"
314+
version: "4.1.1"
315315
flutter_web_plugins:
316316
dependency: transitive
317317
description: flutter
@@ -345,10 +345,10 @@ packages:
345345
dependency: transitive
346346
description:
347347
name: intl
348-
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
348+
sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5"
349349
url: "https://pub.dev"
350350
source: hosted
351-
version: "0.19.0"
351+
version: "0.20.2"
352352
js:
353353
dependency: transitive
354354
description:
@@ -361,10 +361,10 @@ packages:
361361
dependency: transitive
362362
description:
363363
name: leak_tracker
364-
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
364+
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
365365
url: "https://pub.dev"
366366
source: hosted
367-
version: "10.0.8"
367+
version: "10.0.9"
368368
leak_tracker_flutter_testing:
369369
dependency: transitive
370370
description:
@@ -419,7 +419,7 @@ packages:
419419
path: ".."
420420
relative: true
421421
source: path
422-
version: "6.28.4"
422+
version: "6.28.5"
423423
path:
424424
dependency: transitive
425425
description:
@@ -592,10 +592,10 @@ packages:
592592
dependency: transitive
593593
description:
594594
name: skeletonizer
595-
sha256: "0dcacc51c144af4edaf37672072156f49e47036becbc394d7c51850c5c1e884b"
595+
sha256: a9ddf63900947f4c0648372b6e9987bc2b028db9db843376db6767224d166c31
596596
url: "https://pub.dev"
597597
source: hosted
598-
version: "1.4.3"
598+
version: "2.0.1"
599599
sky_engine:
600600
dependency: transitive
601601
description: flutter
@@ -773,10 +773,10 @@ packages:
773773
dependency: transitive
774774
description:
775775
name: vm_service
776-
sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14"
776+
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
777777
url: "https://pub.dev"
778778
source: hosted
779-
version: "14.3.1"
779+
version: "15.0.0"
780780
web:
781781
dependency: transitive
782782
description:
@@ -789,10 +789,10 @@ packages:
789789
dependency: transitive
790790
description:
791791
name: win32
792-
sha256: "8b338d4486ab3fbc0ba0db9f9b4f5239b6697fcee427939a40e720cbb9ee0a69"
792+
sha256: "329edf97fdd893e0f1e3b9e88d6a0e627128cc17cc316a8d67fda8f1451178ba"
793793
url: "https://pub.dev"
794794
source: hosted
795-
version: "5.9.0"
795+
version: "5.13.0"
796796
xdg_directories:
797797
dependency: transitive
798798
description:
@@ -810,5 +810,5 @@ packages:
810810
source: hosted
811811
version: "6.5.0"
812812
sdks:
813-
dart: ">=3.7.0-0 <4.0.0"
814-
flutter: ">=3.24.0"
813+
dart: ">=3.7.0 <4.0.0"
814+
flutter: ">=3.31.0-0.0.pre"

lib/dart_console/dart_console.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export 'src/calendar.dart';
2+
export 'src/console.dart';
3+
export 'src/consolecolor.dart';
4+
export 'src/key.dart';
5+
export 'src/progressbar.dart';
6+
export 'src/scrollbackbuffer.dart';
7+
export 'src/string_utils.dart';
8+
export 'src/table.dart';
9+
export 'src/textalignment.dart';

lib/dart_console/src/ansi.dart

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
const ansiDeviceStatusReportCursorPosition = '\x1b[6n';
2+
const ansiEraseInDisplayAll = '\x1b[2J';
3+
const ansiEraseInLineAll = '\x1b[2K';
4+
const ansiEraseCursorToEnd = '\x1b[K';
5+
6+
const ansiHideCursor = '\x1b[?25l';
7+
const ansiShowCursor = '\x1b[?25h';
8+
9+
const ansiCursorLeft = '\x1b[D';
10+
const ansiCursorRight = '\x1b[C';
11+
const ansiCursorUp = '\x1b[A';
12+
const ansiCursorDown = '\x1b[B';
13+
14+
const ansiResetCursorPosition = '\x1b[H';
15+
const ansiMoveCursorToScreenEdge = '\x1b[999C\x1b[999B';
16+
String ansiCursorPosition(int row, int col) => '\x1b[$row;${col}H';
17+
18+
String ansiSetColor(int color) => '\x1b[${color}m';
19+
String ansiSetExtendedForegroundColor(int color) => '\x1b[38;5;${color}m';
20+
String ansiSetExtendedBackgroundColor(int color) => '\x1b[48;5;${color}m';
21+
const ansiResetColor = '\x1b[m';
22+
23+
String ansiSetTextStyles(
24+
{bool bold = false,
25+
bool faint = false,
26+
bool italic = false,
27+
bool underscore = false,
28+
bool blink = false,
29+
bool inverted = false,
30+
bool invisible = false,
31+
bool strikethru = false}) {
32+
final styles = <int>[];
33+
if (bold) styles.add(1);
34+
if (faint) styles.add(2);
35+
if (italic) styles.add(3);
36+
if (underscore) styles.add(4);
37+
if (blink) styles.add(5);
38+
if (inverted) styles.add(7);
39+
if (invisible) styles.add(8);
40+
if (strikethru) styles.add(9);
41+
return '\x1b[${styles.join(";")}m';
42+
}

lib/dart_console/src/calendar.dart

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import 'package:intl/intl.dart';
2+
3+
import 'ansi.dart';
4+
import 'consolecolor.dart';
5+
import 'table.dart';
6+
import 'textalignment.dart';
7+
8+
class Calendar extends Table {
9+
final DateTime calendarDate;
10+
bool highlightTodaysDate = true;
11+
12+
List<String> dayLabels = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
13+
14+
Calendar(DateTime dateTime)
15+
: calendarDate = dateTime.subtract(Duration(days: dateTime.day - 1)) {
16+
for (final day in dayLabels) {
17+
insertColumn(header: day, alignment: TextAlignment.right);
18+
}
19+
20+
// ISO format has 1..7 for Mon..Sun, so we adjust this to match the array
21+
final startDate = calendarDate.weekday == 7 ? 0 : calendarDate.weekday;
22+
23+
final todayColor = ConsoleColor.brightYellow.ansiSetForegroundColorSequence;
24+
25+
final calendarDates = <String>[
26+
for (int i = 0; i < startDate; i++) '',
27+
for (int i = 1; i <= 31; i++)
28+
if (calendarDate.add(Duration(days: i - 1)).month == calendarDate.month)
29+
if (calendarDate.year == DateTime.now().year &&
30+
calendarDate.month == DateTime.now().month &&
31+
i == DateTime.now().day)
32+
'$todayColor$i$ansiResetColor'
33+
else
34+
'$i',
35+
];
36+
37+
while (true) {
38+
insertRow(calendarDates.take(7).toList());
39+
if (calendarDates.length > 7) {
40+
calendarDates.removeRange(0, 7);
41+
} else {
42+
break;
43+
}
44+
}
45+
46+
title = DateFormat('MMMM yyyy').format(calendarDate);
47+
}
48+
49+
factory Calendar.now() => Calendar(DateTime.now());
50+
}

0 commit comments

Comments
 (0)