Salim Lachdhaf
Salim Lachdhaf

Reputation: 1082

create folder under test folder Flutter

I'm new in Flutter, i started creating unit tests and UI interface tests, if i put the tests classes under test directory everything works fine, but when i decided to separate UI and unitTest in separate folders under test folder

test/unitTest/test1.dart

test/ui/widget1.dart

I got an error

Error: Not found: 'dart:ui'

is it possible to create folders under test folder ?

Upvotes: 1

Views: 1301

Answers (1)

Salim Lachdhaf
Salim Lachdhaf

Reputation: 1082

Finally i found the solution

OK so I actually found a solution for this.

In Android studio in the run dropdown you select Edit Configurations Then you press the + button and select Flutter test Make sure the Test scope is All in file and point it at your test file. You can now run the individual test file and also debug it in android studio by selecting >this configuration in the run drop-down.

chose Flutter test > click + > Flutter test > click Test File > select the test file from your project.

Origin solution from here

1enter image description here

Upvotes: 2

Related Questions