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
1 answer

How to add (text or icon) to image when the users share the image?

PLease help me , i want to put watermark on the image and text when the user want share it ,I tried a lot but could not get a correct result. Found this example only my share image code is :: import 'dart:io'; import 'package:http/http.dart' as…
NoOoR
  • 37
  • 1
  • 9
0
votes
1 answer

i wanna fetch post data using bloc in a statefulWidget the data is ready i won't fetch it from api how can oi do it?

I am trying to fetch data i wanna fetch post data using bloc in a statefulWidget the data is ready i won't fetch it from api the data is ready in the list posts i just want to show it in a stateful widget using bloc how can i do it i'm a new to bloc…
0
votes
3 answers

Flutter: How can I access element from API in my UI

I successfully get data from API. I test it using the Print command and the element displayed successfully in the console. When I tried to access the same element in TEXT Widget it displays null. Here is the code: import…
Anas Shafi
  • 25
  • 1
  • 4
0
votes
1 answer

Flutter tool can not access file or directory even though it has permission

I am trying to open a flutter app in the android studio on macOS. It has no error in the code. Everything is fine and well tested. But when I run it fails to build the android .apk with the following error, which basically says error in permission…
0
votes
1 answer

How to pass List data one screen to another (StatefulWidget) in flutter

I have A Card data in one sceen and I save Card Text in a List.So I need to do when I press (onTap) My Card The Text data send to the anothe screen.In second screen I have some Text Field and Card value need to fill on thiss text field. Thsi is my…
Zenixo
  • 727
  • 1
  • 12
  • 36
0
votes
1 answer

type 'String' is not a subtype of type 'Map' in type cast

when I click on a button in my Flutter App I got an error anyone here has a solution?! The routes routes:{ '/':(context) => CategoriesScreen(), // the HomePage CategoryMealsScreen.routeName: (context) => CategoryMealsScreen(),} The…
Mohamed Hesham
  • 15
  • 1
  • 1
  • 5
0
votes
1 answer

How to tap text span in Flutter driver?

How can I tap on the second Text Span area even if it has rich text property? I am new to flutter driver and I found out rich text not supported... Padding( padding: const EdgeInsets.only(top: 16.0, bottom: 24.0), child: Text.rich( …
harusama
  • 1
  • 1
0
votes
1 answer

Null check operator used on a null value. Although I’m pretty sure it can’t be zero

I am about to log in a user anonymously. I use the following code: class ToDo1 extends StatefulWidget { @override _ToDo1State createState() => _ToDo1State(); } class _ToDo1State extends State { User? user; late DatabaseService…
0
votes
0 answers

Flutter App running on emulator but not installing on real device its going till installing but stuck there

FlutterApp running on emulator but not installing on real device its going till installing but stuck there. it is stuck here! Launching lib/main.dart on V2043 in debug mode... Running Gradle task 'assembleDebug'... ✓ Built…
0
votes
1 answer

Flutter: how to groupby of personality

I want groupBy of famousAs of this data. I got my data from api something like this Personality:[ 0: { "FullName":"Harry Potter", "DateOfBirth": "2020/02/16", "Department":"Branch Operation", "BirthDay":"Friday" …
Deepak
  • 1,664
  • 3
  • 19
  • 52
0
votes
0 answers

Check if mp4 file is broken or corrupted flutter

How to check programmatically that an mp4 file is broken or corrupted in flutter? Is there a way to check if a file(any file format) is corrupted or broken in flutter? I need to check this before I upload it to firebase or any other database or even…
0
votes
2 answers

LateInitializationError: Field 'database' has not been initialized

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…
Lars
  • 65
  • 1
  • 7
0
votes
1 answer

How to get android mobile IMEI number using Dart language in Flutter?

I need to get android mobile IMEI number using Dart language in Flutter. How to get this slot1 or slot2 IMEI number from Android mobiles.
0
votes
1 answer

flutter: Not load data on first click

I want to show weather name on dialog box ,But when i Click first time on button data is not loading only show dialog box after that when i click second time then my data is loading. I want to show weather name on dialog box ,But when i Click first…
Deepak
  • 1,664
  • 3
  • 19
  • 52