flutter-test Questions

1

Solved

I have a suite of integration tests for a Flutter app. I would like to run them using the VS Code Testing tab, so that I can easily see info about what tests passed/failed, etc. This worked fine b...

9

Solved

I have a Flutter widget which shows extra data depending on the screen size. Does anyone know a way of testing this widget on multiple different screen sizes? I've had a look through the widget_te...
Chloropicrin asked 10/12, 2018 at 13:20

5

Solved

For example, I may have one RichText in current widget tree, that looks like RichText( text: TextSpan( text: 'Hello ', style: DefaultTextStyle.of(context).style, children: <TextSpan>[ Te...
Erine asked 14/12, 2016 at 21:15

2

I developed an app in Flutter and I'm posting to Google Play, though, I would like to know how / where I can set the widget name information so that I can enter as login credentials on the Play Con...
Noyade asked 22/8, 2018 at 15:45

1

I want to test Riverpod StateNotifierProvider. I'm trying to follow a TDD approach for state notifier providers without implementing UI/Widgets. According to Riverpod documentation on testing, can ...
Driveway asked 27/8, 2021 at 19:42

4

Solved

flutter_local_notifications: ^11.0.0 I used this library but I can find IOSInitializationSettings please help me. I m trying to integrate push notifications into my flutter app.
Feodore asked 23/9, 2022 at 6:21

1

I am writing some tests for my app. Currently I am stuck on testing the drawer. On emulators of various sizes it runs without a problem (from 240x432 to 1440x2960) but when I try to run a simple te...
Valais asked 18/8, 2019 at 10:4

2

Solved

hey guys when I use onDidReceiveBackgroundNotificationResponse in flutter_local_notification I got an error can someone help me? here is error here is my code actually I want navigate to second pag...
Autoclave asked 1/2, 2023 at 8:35

9

Solved

Tests run with the Ahem font, which is too big, and sometimes it overflows, breaking tests. Some tests don't care about overflow anyway, so there should be a way to deactivate them. I have many te...
Sialagogue asked 14/8, 2019 at 17:5

2

Solved

I use flutter_driver to do my integration tests in Flutter. On some screens text on buttons gives overflow errors. I want to create a test which can show that overflow happened. So when I will run ...
Dibasic asked 27/4, 2019 at 5:42

4

Solved

I'm trying to do so using Mockito, this is my test: import 'package:http/http.dart' as http; import 'package:utgard/globals.dart' as globals; import 'package:flutter_driver/flutter_driver.dart'; i...
Pood asked 29/3, 2019 at 3:13

6

Solved

I can't fix this error RenderBox was not laid out: RenderPointerListener#2b92a relayoutBoundary=up9 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE 'package:flutter/src/rendering/box.dart': Failed asser...

2

I have encountered an error when trying to test my Flutter App. I have a custom widget that is at the bottom (out of the first viewport) of a CustomScrollView widget. In my test, I want to verify ...

5

Parse Issue (Xcode): Module 'fluttertoast' not found /Users/anand/StudioProjects/untitled/ios/Runner/GeneratedPluginRegistrant.m:11:8 Could not build the application for the simulator. Error launc...
Darlington asked 24/5, 2022 at 7:31

9

Solved

Being a total beginner I am trying out various flutter feature and I am stuck at running the main.dart due to errors in the widget_test.dart file. Please point out if the error is due to some othe...
Cording asked 8/6, 2019 at 10:7

2

I'm using socket_io_client v0.9.12 in my flutter app (still not using null safety). I am creating a socket connection with my back-end server when the app starts and allow child widgets to access i...
Anglice asked 1/7, 2021 at 18:25

4

Solved

On my Home widget, when user taps system back button, It shows by a WillPopScope a confirmation dialog widget. I want to test this dialog but I cant figure it out how to press the back button on a ...
Haroldson asked 10/12, 2020 at 17:43

2

While retrieving the image file from network http://10.0.2.2:8000 localhost I got the following error: Connection closed while receiving data. I have an error when I call data (images only) from th...

1

I am trying to run a basic flutter integration test to invoke my main app widget but it's failing. I have followed the approach as described in the official docs [https://docs.flutter.dev/testing/i...
Heavenly asked 18/1, 2022 at 8:28

7

I-am developing an app for pushing notifications using FCM, when the app in background or terminated and receiving new notification i need to save the data of this notification local in (SQLITE), w...
Threeply asked 12/12, 2019 at 6:27

12

Solved

My question is about flutter widget test, what is proper way to test existing widgets wrapped new Scaffold(...)? I have found MediaQuery.of but it accepts BuildContext instead of Widget. Details: ...
Donatus asked 29/1, 2018 at 10:8

2

So I'm trying to unit test a bloc My test is simple test("When loading patients, bloc should emmit [Loading], [OwnersLoaded]", (){ //arrange var owners = [Owner(id: "TestId")]; when (mockPati...
Uptotheminute asked 24/10, 2019 at 22:12

5

Solved

when I clicking on login button when my mobile number is wrong then open one error dialog box after that when I clicked okey on dialog box then i got this error. I got this message This widget has...

6

Solved

Let's say, I have a test for a screen in Flutter using WidgetTester. There is a button, which executes a navigation via Navigator. I would like to test behavior of that button. Widget/Screen cla...
Staples asked 5/6, 2018 at 16:13

2

I have updated the flutter version recently. after that flutter run is not working on iPhone. I am using android studio. run button on the android studio also not working for iPhone but simulators ...
Gathard asked 1/12, 2020 at 11:21

© 2022 - 2024 — McMap. All rights reserved.