Skip to content

Commit

Permalink
Cleanup dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
passsy committed Nov 7, 2024
1 parent 8501650 commit d5a596a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 2 additions & 4 deletions lib/src/timeline/html/print_html.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
import 'dart:convert';
import 'dart:io';

import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
import 'package:path/path.dart' as path;
import 'package:spot/src/screenshot/screenshot.dart';
import 'package:spot/src/timeline/html/script.js.dart';
import 'package:spot/src/timeline/html/styles.css.dart';
Expand Down Expand Up @@ -53,7 +51,7 @@ extension HtmlTimelinePrinter on Timeline {
return 'timeline-$name.html';
}();

final htmlFile = File(path.join(spotTempDir.path, nameForHtml));
final htmlFile = File('${spotTempDir.path}/$nameForHtml');
final content = _timelineAsHTML(timeLineEvents: events);
htmlFile.writeAsStringSync(content);
//ignore: avoid_print
Expand Down Expand Up @@ -120,7 +118,7 @@ String _timelineAsHTML({required List<TimelineEvent> timeLineEvents}) {
String? projectDir;

while (dir != null) {
final ideaDir = Directory(path.join(dir.path, '.idea'));
final ideaDir = Directory('${dir.path}/.idea');
if (ideaDir.existsSync()) {
// Update to the current directory path
projectDir = dir.path;
Expand Down
5 changes: 2 additions & 3 deletions lib/src/timeline/timeline.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import 'dart:io';

import 'package:ci/ci.dart';
import 'package:clock/clock.dart';
import 'package:collection/collection.dart';
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:spot/src/screenshot/screenshot.dart';
Expand Down Expand Up @@ -294,10 +293,10 @@ Frame? mostRelevantCaller({Trace? trace, Frame? fallback}) {
final frames = (trace ?? Trace.current()).frames;

final nonPackageFrames = frames.where((frame) => frame.package == null);
final testFileCaller = nonPackageFrames.lastWhereOrNull((frame) {
final testFileCaller = nonPackageFrames.where((frame) {
final lib = frame.library;
return lib.startsWith('test/') && lib.endsWith('_test.dart');
});
}).lastOrNull;

final preferredFrame =
testFileCaller ?? nonPackageFrames.lastOrNull ?? fallback;
Expand Down
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ environment:
dependencies:
checks: ^0.3.0
ci: ^0.1.0
clock: ^1.1.0
dartx: ^1.1.0
flutter:
sdk: flutter
Expand All @@ -21,6 +22,7 @@ dependencies:
meta: ^1.8.0
nanoid2: ^2.0.0
stack_trace: ^1.11.0
test_api: '>=0.5.0 <0.8.0'

dev_dependencies:
image: ^4.0.0
Expand Down

0 comments on commit d5a596a

Please sign in to comment.