Questions tagged [flutter-test]

Flutter-Test contains tests related to Flutter app including Unit tests, Widget test and end-to-end integration tests using Flutter-Driver.

Flutter officially highlights 3 different types of testing as mentioned here: https://flutter.dev/docs/testing

Unit tests: A unit test tests a single function, method, or class.

Widget tests: A widget test (in other UI frameworks referred to as component test) tests a single widget.

Integration tests: An integration test tests a complete app or a large part of an app.

1961 questions
0
votes
0 answers

My app crashes when I call this widget and returns Lost connection to device

I’m building an app, so far everything works. Until I click on a button that calls this Staful Widget: class ToDo1 extends StatefulWidget { @override _ToDo1State createState() => _ToDo1State(); } class _ToDo1State extends State { var…
0
votes
1 answer

My StreamBuilder contains two for me unsolvable errors

I’m trying to build a to-do app. (To learn flutter) This is the part of the code where the two errors are: class ToDo1 extends StatefulWidget { @override _ToDo1State createState() => _ToDo1State(); } class _ToDo1State extends State { …
Lars
  • 65
  • 1
  • 7
0
votes
1 answer

how to find a specific record Map value in flutter sembast?

I'm using sembast in a flutter app, I have a getAll() function that looks like the following: Future getFavorites() async { List favSnapshot = await _favFolder.find(await _db); if (favSnapshot.length > 0) { return favSnapshot; …
0
votes
2 answers

Error in flutter: Widgets.test is giving error due to flutter_test not recognizing

Here widgets.test is not recognizing the flutter_test library or the library not exist If you know the solution please Inform Me.
Zilaid
  • 464
  • 6
  • 22
0
votes
1 answer

Class to Class Access Data

I have a problem with classes. I keep the user data in user_info_screen with Google auth. How can I pull this user data in a class that has this data on another page? class UserInfoScreen extends StatefulWidget { UserInfoScreen({Key key, User…
0
votes
1 answer

Dropdown resets all fields in Flutter

I am currently working on a tasks app. Whenever I select the priority from the drop down or the date the values in the text fields above get resets to null, and also the selected date and priority are set back to default. Would really like some help…
0
votes
1 answer

Is there anyway to move the bottom navigation bar, to the top of the screen instead of the bottom?

I am currently developing in flutter and I am trying to move my navigation bar to the top of my screen rather than the bottom which is the default. I am using a flutter plugin called salomon_bottom_bar: ^3.1.0 and here is the following code for it. …
0
votes
1 answer

How to handle 2 phone permissions for getting IMEI number and mobile number of the device in flutter?

In my application I am getting my phone number through mobile number: ^1.0.4 library and also I am getting IMEI number through device information: ^0.0.4. For getting both I need to use the handle 2 permissions for phone but it shows only read phone…
0
votes
0 answers

how print the call log when onpressed in flutter?

1.I'm try to making a flutter Dialer like calling app 2.How to show the call log in Listview 3.But i tried several ways i known an via the online tutorials it doesn't work 4.How to make call logs flutter 5.It print in Debug Console 6.I want to shows…
user10993979
0
votes
1 answer

how to use method in Widgets in call log in flutter?

How to make call logs flutter I tried several ways call this method in text widget in Listview.builder() But it print in Debug Console I try to shown in Listview() I'm using call_log: ^3.0.3 void _callLogs() async { Iterable
user10993979
0
votes
0 answers

Flutter app is not installing on physical device`

I'm using my vivo s1(Android 11) for android app development. before the update when I run apps via USB cable, its works well but after the update when I run the app it just shows a blank white screen (as shown in the picture below). I think…
Usama Ali
  • 1
  • 2
0
votes
2 answers

Error: Cannot run with sound null safety, because the following dependencies don't support null safety

HOPE YOU GO VERY WELL !! I'm currently working on a control pad pannel for a robot control i'm working for the flutter mobile part so than i'm facing this error : Error: Cannot run with sound null safety, because the following dependencies don't…
Hazem soussi
  • 1
  • 1
  • 2
0
votes
0 answers

Flutter app run on emulator but not on my physical device

My Project runs on emulator without any error but when i run it on my physical device it stuck while installing the apk. It does not show any error just stuck on installation.
Usama Ali
  • 1
  • 2
0
votes
2 answers

app doesn't work because of &/ Unhandled Exception: type 'String' is not a subtype of type 'FutureOr>'

flutter newbie trying to do a sign-up and sign-in screens ^_^" No code errors but sign-up doesn't work to push to sign-in screens: No problems flagged in UI and controller dart files but testing the app returns "< asynchronous suspension>" and…
dstacklurker
  • 252
  • 2
  • 12
0
votes
4 answers

How to get JSON response after onPresseed button in Flutter // Dart

I don't get any issues to get JSON data the button is pressed to get JSON response.body is printed successfully but the JSON response is executed before I give _addressController value the if condition executed so the exception is shown on the print…
1 2 3
99
100