Flutter:"pr.dismiss" cannot defined in progress dialog - flutter

I run my application, but show this error. Before this i can run it. But now, It says "pr.dismiss is not defined in progress dialog." I have install package,and my code in flutter is not red colour but run it that got error in debug.
So how i can solves this problem?
I RUN THIS GOT PROBLEM

as per your source code you use https://pub.dev/packages/progress_dialog package for display progress dialog. so as per this package for dismiss dialog you need to use the below method.
pr.hide().then((isHidden) {
print(isHidden);
});
// or
await pr.hide();
So replace pr.dismiss() with the above method.

Related

Flutter can't find "telephony" in release mode,but foreground is normal in release mode,I added a decorator on background func,it's still not working

I am using Telephony plugin to develop a SMS app, and according to the similar solution, I added a decorator on the top of the background handler at the top level, then run it in release mode,
after running, debug mode is normal, and foreground is also normal in release mode,only both "background" and "terminated" are incorrect
#pragma('vm:entry-point')
Future<void> onBackgroundMessage(SmsMessage message) async {
debugPrint("onBackgroundMessage called");
............
}
after adding, it's still not working and appeared the same Dart error message:
"Dart Error: Dart_LookupLibrary: library 'package:telephony/telephony.dart' not found."
I have already added the decorator #pragma('vm:entry-point'), still doesn't work.
I solved the problem,just need to change or add a git link in pubspec.yaml,
telephony:
git:
url: https://github.com/definev/Telephony.git
ref: develop

How to update react testing library?

i want to use waitForElementToBeRemoved method for react-testing library and it says cannot find name "waitForElementToBeRemoved".
Below is my code,
waitForElementToBeRemoved(getByTestId('test-id'));
After clicking a button i will have to wait for domchange so i tried
await waitForDomChange(getByTestid('test-id'));
this gave timeout error for domchange.
i think i will have to update react testing library. how can i update it???
thanks.
import { waitForElementToBeRemoved } from "#testing-library/react";

Flutter/dart Update

I'm working on a flutter project with VS Code and I ended up upgrading flutter. After upgrading, when i run my project i get a 'parameter format not correct' error:
I also get this:
After my app starts whenever I press something or try to type something or even scrolling the screen it looks like it's trying to cache something:
How can I solve this issue?

Running the google places modal popup in flutter

Looking at the flutter code it seems like I should be able to run the google places modal dialog since it does a full screen thing and doesn't try and overlay on top of flutter.
However I am having an issue where the modal shows up and then disappears again immediately. I am not entirely sure how to solve this...
I am activating it with:
call.method == "openPlacesDialogModal" -> {
val code = GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(activity)
if (GoogleApiAvailability.getInstance().showErrorDialogFragment(activity, code, REQUEST_GOOGLE_PLAY_SERVICES)) {
return
}
//val intent = Intent(activity, PlacesActivity::class.java)
//activity.startActivity(intent)
var intentBuilder = PlacePicker.IntentBuilder()
activity.startActivityForResult(intentBuilder.build(activity), PLACE_PICKER_REQUEST)
placeResult = result
return
}
In the logs I get:
I/FlutterActivityDelegate(18184): onResume setting current activity to this
I/flutter (18184): Opening picker
I/FlutterActivityDelegate(18184): onResume setting current activity to this
I think it is the onResume getting back to the ActivityDelegate that is the issue.
I put this on top of a completely different activity too, which kind of works. It shows the dialog for longer. I made sure I have all the right permissions, I have the fine location, internet permissions. Do I need to setup anything else?
Thanks,
David.
Error here was that I was not setting up the google api correctly and it was erroring immediately. Had to put in some checks to look for this error so I could respond correctly to the app that an error occurred.

Fancybox Conflict issue

I have quick view pop up which uses jquery.fancybox.pack.js and a slider with image gallery popup which uses a jquery.fancybox.js
There is a script error in console as "TypeError: $.fancybox.getInstance is not a function" and also there is an issue with slider image gallery poopup(opening first image only on every image click)
I tried to solve the script error by removing jquery.fancybox.js file initialized in local.xml file. Now the script error is solved. But my slider with image gallery popup will not work.
When I initialized both jquery file in local.xml, got an error as "Error: fancyBox already initialized".
What could be the reason for this. How can I solve the issue with slider image gallery pop up.
Are these files(jquery.fancybox.pack.js and jquery.fancybox.js) same?
Please help.
Sounds like you are mixing different versions of fancyBox.
jquery.fancybox.pack.js is packed version of jquery.fancybox.js and it was shipped with v1 and v2.
V3 now has minified version (jquery.fancybox.min.js) and only v3 contains getInstance method.