flutter-test

Flutter Driver hangs at splash screen

只愿长相守 提交于 2021-02-11 12:26:35
问题 I am trying to setup Flutter Driver tests for my application and the app runs async so I found https://github.com/flutter/flutter/issues/41029 which says all you need to do is add await driver.waitUntilFirstFrameRasterized(); and it should work, while this does stop the test from failing it nos simply does not run. The app just hangs at the splash screen never even getting into the application itself. As far as I am understanding, this is all I would need to have setup in order for the test

Execution failed for task ':google_sign_in:verifyReleaseResources'

对着背影说爱祢 提交于 2021-02-10 05:37:15
问题 Ok so I have been building my flutter application , however, i can't figure you what to do in case of this error. I have been following this blog https://flutter.dev/docs/deployment/android , for the release build of my app .Everything worked fine , until i added flutter build apk --split-per-abi It gave me the following error, FAILURE: Build failed with an exception. ' Execution failed for task ':google_sign_in:verifyReleaseResources'. > java.util.concurrent.ExecutionException: com.android

Flutter: How to implement FlutterError.OnError correctly

≯℡__Kan透↙ 提交于 2021-02-07 12:22:27
问题 Can someone show me how to implement overriding flutter errors during widget test so I can check for my own custom errors. I have seen snippets online mentioning this but all of my implementations fail void main() { testWidgets('throws an error when scanning unknown term types', (WidgetTester tester) async { await tester.pumpWidget(injectTestWidget(new ItemScanScreen())); await tester.enterText(find.byKey(new Key('term')), ''); await tester.tap(find.byIcon(Icons.send)); await tester.pump();

Can we run automated tests using flutter_driver on Firebase Test Lab?

孤人 提交于 2021-01-29 16:04:51
问题 I am able to run automation tests on sample flutter application using flutter_driver on Android Emulator. I am looking for options of executing on Device Clouds. There are few threads which talk about executions on AWS Device Farm. However, I am interested in Firebase Test Lab. Similar to how we can execute automated scripts in SauceLabs, is there an option to run automated tests in Firebase Test Lab using flutter_driver? 回答1: It's currently not possible. Test Lab only supports testing

Flutter - PlatformException : error, Invalid document reference. Document references must have an even number of segments, but users has 1, null

旧巷老猫 提交于 2021-01-29 08:06:55
问题 I wanted to get my users data from cloud firestore. It worked first but now it is raising a error. "PlatformException (PlatformException(error, Invalid document reference. Document references must have an even number of segments, but users has 1, null))" String name = "", email = "", pnumber = "", imgUrl = "", bio = "", posted = "", applied = "", rating = "", saved = ""; String url; final formKey = new GlobalKey<FormState>(); final databaseReference = Firestore.instance; String uID; @override

Flutter - PlatformException : error, Invalid document reference. Document references must have an even number of segments, but users has 1, null

☆樱花仙子☆ 提交于 2021-01-29 08:06:46
问题 I wanted to get my users data from cloud firestore. It worked first but now it is raising a error. "PlatformException (PlatformException(error, Invalid document reference. Document references must have an even number of segments, but users has 1, null))" String name = "", email = "", pnumber = "", imgUrl = "", bio = "", posted = "", applied = "", rating = "", saved = ""; String url; final formKey = new GlobalKey<FormState>(); final databaseReference = Firestore.instance; String uID; @override

Flutter split and make specific word bold [closed]

蹲街弑〆低调 提交于 2021-01-28 19:09:44
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 10 months ago . Improve this question I have string which is like "Hi @username how are you" I want to change @username text to bold... just @username not whole sentence Example : " Hi @username how are you 回答1: This is a small function that would do that for you then returns a list of widgets. List<Text>

Unit test - How to mock parameters of third-party-library class Dio in flutter

浪尽此生 提交于 2021-01-28 06:30:23
问题 I am trying to test a simple repository class which make a network call using the Dio package that is a dependency injection. Requirement of the Http.post is to send a Map object to a URL with the headers of 'Content-Type': 'application/json . You can see this below: class AuthenticateUserRemoteDataSourceImpl implements AuthenticateUserRepository { final Dio httpClient; AuthenticateUserRemoteDataSourceImpl({@required this.httpClient}); @override Future<Either<Failure, AuthenticateUser>>

[Firebase Messaging]: Background Message Handler method not called when the app in background?

心已入冬 提交于 2021-01-21 07:39:39
问题 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), without click on the notification or re-open the app again, the notification not read in the app unless clicked. Any suggestions? This my NotificationHandler.dart import 'dart:async'; import 'dart:io'; import 'package:eshaar/model/message.dart'; import 'package:firebase_messaging/firebase_messaging

How to Create Copy to Clipboard Event on Flutter?

佐手、 提交于 2021-01-02 08:07:33
问题 Currently i want to make event for "Copy to Clipboard" on user device. When user click to "List view leading icon.content copy" then text should be store on his device clipboard. Please can anyone help me? Widget _buildListItem(BuildContext context, DocumentSnapshot data) { final record = Record.fromSnapshot(data); return Padding( key: ValueKey(record.name), padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), child: Container( decoration: BoxDecoration( border: Border.all