Flutter error: GooglePayButton is imported from both 'flutter_stripe' and a 'pay' packages - flutter

I'm learning how to install GooglePay into a Flutter app. Several tutorials have said to import two packages:
import 'package:my_app/flutter_stripe.dart';
import 'package:pay/pay.dart';
But both packages have a GooglePayButton. Calling this method results in this conflict:
Error: 'GooglePayButton' is imported from both 'package:flutter_stripe/src/widgets/google_pay_button.dart' and 'package:pay/pay.dart'.
The flutter_stripe documentation says
flutter_stripe fully supports the Pay plugin from the Google Pay team.
Does that mean we should import both packages? I'm using Pay 1.08 and flutter_stripe 2.1.1.

Make One Like This:
import 'package:my_app/flutter_stripe.dart' as Stripe;
import 'package:pay/pay.dart';
Now you can call it as Stripe So it wont conflict

Related

Flutter import dart:ffi not found

I am trying to use flutter_js in order to run a javascript on web-browser (desktop, not mobile). When I run the app i get /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_js-0.6.0/lib/javascript_runtime.dart:3:8: Error: Not found: 'dart:ffi' import 'dart:ffi';
Is there something that I do wrong or is it from the library?
If i run it on windows app, it works.
I think you're using dart:ffi somewhere. But this library is used to access native code and it won't fork on web. I'd suggest you to search for the place when you're importing dart:ffi and handle this with a conditional import.
UPD:
Maybe you have dart:ffi package somewhere in a project recources. That can be a reason of error also.

How to use makeStyles in latest material-ui version 5 in React

I am using Material Ui version 5.2.7. When I import makeStyles from #mui/materials/styles, I am getting following error -
Uncaught Error: MUI: makeStyles is not longer exported from #mui/material/styles. You have to import it from #mui/styles. See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.
At also says that #mui/styles is deprecated in mui version 5. So I am confused how I can import makeStyles. Anyone have any idea on this?
I am using Material Ui version 5.2.7. When I import makeStyles from #mui/materials/styles, I am getting following error -
Uncaught Error: MUI: makeStyles is not longer exported from #mui/material/styles. You have to import it from #mui/styles. See https://mui.com/r/migration-v4/#material-ui-core-styles for more details.
At also says that #mui/styles is deprecated in mui version 5. So I am confused how I can import makeStyles. Anyone have any idea on this?
As Error says
install
npm install #mui/material #mui/styles
or
yarn add #mui/material #mui/styles
import
import { makeStyles } from '#mui/styles';

SwiftUI: No such Module 'FirebaseAuth'

I've run into a strange issue when trying to setup Firebase sign in with Apple functionality in my app.
It is required to import FirebaseAuth for OAuth functionality. When I try importing it I get the error : "No such Module 'FirebaseAuth'". I have added the package dependencies with package manager and FirebaseAuth is there... but it still gives the error. See screenshot below.
Simply importing Firebase does not give an import error, however I still get errors when trying to use the Authentication functionality. See screenshot below
I've looked for solutions elsewhere but others who have had the same issue as me used Cocoapods to install the packages so their solutions don't apply here.
I am using Xcode 13.0
I fixed the issue by adding FirebaseAuth dependency in build phases:

cannot import path_provider package

I'm building new flutter app, I've downloaded the last version of path_provider package, but when I try to import it using the import statement form the docs
import 'package:path_provider/path_provider.dart';
It didn't work, it says this package doesn't exist, instead I can import things like
import 'package:path_provider_linux/path_provider_linux.dart';
which doens't have the functionality I want.
Can you build the application?
Are you deploying to mobile or MacOS?
Try to run a fresh release configuration, and if it works, then reboot your IDE.
Then run the command that Confidence Yobo suggested, to redownload the packages via yaml.
Also make sure that your yaml file is formatted correctly. Once a pubspec GET command has finished running and the lock is released, normally if there is an error it will show up on your output window.
Also make sure to get the latest package: path_provider: ^1.6.18

ag-Grid: toolPanel is only available in ag-Grid Enterprise

I am using Angular2 version.I am getting below error, when I am trying to upgrade to ag-grid-enterprise version. Written below code for setting up license key.
import { LicenseManager } from 'ag-grid-enterprise';
LicenseManager.setLicenseKey(xxx);
But I am getting the below error, when ever I am trying to use "ToolPanel" (enterprise) functionality,
'ag-Grid: toolPanel is only available in ag-Grid Enterprise.
Need your help on this, I have searched entire web and tried restarting the system and other measures suggested in the forum, but every time I am getting the above error.
Appreciate your help on this.
Follow the steps below for Enterprise ag-grid
npm install --save ag-grid-enterprise ag-grid-angular
Add import { AgGridModule } from 'ag-grid-angular'; import
'ag-grid-enterprise'; to app.module.ts