i have the issue on flutter_stripe_payment i am getting this error MissingPluginException (MissingPluginException(No implementation found for method setPublishableKey on channel stripe_payment))
import 'package:app/UiHelper/AppBarHelper.dart';
import 'package:app/UiHelper/ColorHelper.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:stripe_payment/stripe_payment.dart';
class MenuBookingScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return DrawWidget();
}
}
class _ViewState extends State<DrawWidget> {
@override
void initState() {
super.initState();
initAction();
// this part throw error while hot reload
StripeSource.setPublishableKey("mykey");
}
initAction() async {}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBarHelper().appBarGenerator(context),
backgroundColor: ColorHelper().appBackground,
body: Material(
color: ColorHelper().appBody, child: uIDomElement(context)));
}
Widget uIDomElement(BuildContext context) {
var _size = MediaQuery.of(context).size;
return Container(
width: _size.width,
child: RaisedButton(
color: Colors.indigo,
textColor: Colors.white,
disabledColor: Colors.grey,
disabledTextColor: Colors.black,
padding: EdgeInsets.all(13),
splashColor: Colors.blueAccent,
shape: RoundedRectangleBorder(borderRadius:BorderRadius.circular(5.0)),
onPressed: () {
// Add Card
},
child: Row(
children: <Widget>[
Icon(Icons.credit_card),
SizedBox(
width: 15,
),
Text("Add Card")
],
),
),
);
}
}
class DrawWidget extends StatefulWidget {
@override
_ViewState createState() => _ViewState();
}
Probably too late, but in case someone else bumps into this problem. 'flutter clean' did the trick for me..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With