Card widget gives error when I use fluter_stripe payment method in same page - flutter

I am using flutter_stripe lib for integrating the Stripe payment method but it gives an error when I use Card widget with this lib.
My error is given as:
"The name 'Card' is defined in the libraries 'package:flutter/src/material/card.dart (via package:flutter/material.dart)' and 'package:stripe_platform_interface/src/models/payment_methods.dart'.\nTry using 'as prefix' for one of the import directives, or hiding the name from all but one of the imports.",

I found its answer by modifying the flutter_stripe import as
import 'package:flutter_stripe/flutter_stripe.dart' hide Card;

Related

Couldn't perform click, button not found in: 'click on "OBFormFieldSelectInputRequired"'

Recently, I registered with Testrigor and am using its Free version. We need to test dynamic web applications in Testrigor, then we write scripts for the same. In our Application 3 field use same class selector ,so when i used class in script for enter value in that class but that time Test rigor entered value in another field because of same class,i was try to resolve issue using Name And id Locator but Issue not Solved.
I am getting the following error in one field .
Couldn't perform click, button not found in: 'click on "OBFormFieldSelectInputRequired"'.
Please check attached screenshot.
I'm Tried with Name And Id locator

How to use react admin AutoCompleteInput with remote data?

I'm using react admin to develop a new panel for my client. I want to use AutoCompleteInput. But all the examples I find in the docs and online are showing a simple static data that is defined in the same component.
I want to use AutoCompleteInput for a list of items that is retrieved from my API.
How can I do that?
You can use the AutocompleteInput inside a ReferenceInput as explained in the documentation: https://marmelab.com/react-admin/Inputs.html#autocompleteinput
import { AutocompleteInput, ReferenceInput } from 'react-admin';
<ReferenceInput label="Post" source="post_id" reference="posts">
<AutocompleteInput optionText="title" />
</ReferenceInput>
It means you have to declare the referenced resource using a Resource component in your admin.
If you want to fetch data directly from a remote source, then I suggest you use the Autocomplete from material-ui instead. React-Admin is not a UI library.

Flutter deep link there is no corresponding route in your app

I have followed this link https://oemampedia.medium.com/how-to-do-deeplink-in-flutter-b0c9a7e1aa9d to use deep link in flutter.
My aim is to make the user click a link sent to his email address, and open this link through the flutter app, so that the user can confirm his email account. Nonetheless, the first time I click the link, it generates this error:
======== Exception caught by Flutter framework =====================================================
The following message was thrown:
Could not navigate to initial route.
The requested route name was: "/api/v1/confirm_my_account?email=a.b#domain.com&Token=blahblahblah"
There was no corresponding route in the app, and therefore the initial route specified will be ignored and "/" will be used instead.
Apparently, after debugging, the line of code generating this error is
stream.receiveBroadcastStream().listen((d) => _onRedirected(d));
Can someone give me a clue on how to proceed?
This "/api/v1/confirm_my_account?email=a.b#domain.com&Token=blahblahblah" is definitely not a name of any route in your app. You are parsing the dynamic link wrong, and it's capturing all of it and assigning it as a route name.
You need to parse the part which has something like /home_screen or the name of any route in your app where you define them in main.

Where do I have to import a page on Ionic 3?

I don't very understand, when I create a simple page with Ionic 3 with the following command ionic g page contact, where exactly have I to link the files and the page?
Only on src/app/app.module.ts with this line?
import { ContactPage } from '../pages/contact/contact';
Why do I need to push it on providers and declarations then? I have to do this for all the page my app will have?
And if I want create a link to this page, I have to import it too on the homepage's typescript file?
Thanks
when you create a page using
ionic g page testpage
first we need to import it in app.module.ts file
import { TestpagePage } from '../pages/testpage/testpage';
and in declarations array and entryComponents array
declarations: [
MyApp,
HomePage,
ListPage,
TestpagePage
],
entryComponents: [
MyApp,
HomePage,
ListPage,
TestpagePage
],
We no need to push it into providers array. and for example, if you want to navigate to this page from homepage, then
-> import testpage in home.ts file
import { TestpagePage } from '../testpage/testpage';
and on button click event,
this.navCtrl.push(TestpagePage);
declarations :
In the declarations section we need to include all components and directives we create.If we don't include them here, we'll get an error when we try to use them because Angular won't be able to recognise them in our code.
entryComponents:
In the entryComponents section we define any component that is only loaded by its type. This is the case for all Page components since these are all
loaded through the Navigation Controller.
Components that are loaded declaratively (i.e. are referenced in another component's template) don't need to be included in the entryComponents array.
So as you can see we have some duplication where we have to define our Page components in both the declarations and the entryComponents sections.
The reason for having this separate entryComponents section is so that Angular can compile a bundle for the app that will only include the components
that are actually used within the app.
providers:
In the providers section we can register services for dependency injection. When you register a service in the App Module, it can be used in all the
components in your app.
However, we don't need to include all our services here, we can also decide to register a service only for a specific component in its #Component
decorator.
source: check this URL
We don't need to import a page to app.module.ts every time we create a page, that's anti DRY, boring and app.module.ts becomes fat
With the new ionic cli, we can generate a page like as:
ionic generate page pagename
This will generate the page as well as the corresponding module pagename.module.ts . Then you can refer it from any other page by name in STRING. For e.g.:
this.navCtrl.push("pagename");

opencart 1.5.1.3 encrypt() paypal pro iframe

I'm using Opencart 1.5.1 and trying to implement pay pal pro through iframe. I got a module but it doesn't work. In logs I found:
Fatal error: Call to a member function encrypt() on a non-object in .../controller/payment/pp_standard.php on line
When I try to add
$registry->set('encryption', new Encryption($config->get('config_encryption')));
to index.php I got blank homepage and the checkout stops at the moment of choosing payment method (it's not visible). Any ideas how to reslove thios without upgrading OC ( got many changes to template files which fails to work after upgrade).
Kind regards,
Arek
also set your error reporting to on so you can see errors and not just blank pages.