我想问一下“格式化文档”功能,为什么在VScode中使用“文档格式”功能时,表格变得不规则,就像我下面附上的代码一样。
我尝试将“编辑器:选项卡大小”设置为 2,但是当我使用“格式文档”时,我的代码变得不规则。
@override
Widget build(BuildContext context) {
````return new Container(
````````child: new Column(
``````children: <Widget>[
````````new Row(
``````````children: <Widget>[
````````````//slideshow
````````````new Expanded(
````````````````child: new CarouselSlider(
``````````````height: 150.0,
Run Code Online (Sandbox Code Playgroud)
我期望这样的代码:
@override
``Widget build(BuildContext context) {
````return new Container(
``````child: new Column(
````````children: <Widget>[
``````````new Row(
````````````children: <Widget>[
``````````````//slideshow
``````````````new Expanded(
````````````````child: new CarouselSlider(
````````````````height: 150.0,
Run Code Online (Sandbox Code Playgroud) 我想在 web flutter 上使用 Stripe 库。但不幸的是,直到现在仍然没有可用于 web flutter 的条带库。因此,我尝试在 web flutter 上运行 javascript,它将调用 stripe-js 库(https://stripe.com/docs/js/payment_intents/confirm_card_payment)。
我想问一下,首先是如何在web flutter上使用javascript库?像这样 :
<script src = "https://js.stripe.com/v3/"> </script>
其次,如何在web flutter上调用javascript函数?像这样 :
stripe
.confirmCardPayment ('{PAYMENT_INTENT_CLIENT_SECRET}', {
payment_method: {
card: cardElement,
billing_details: {
name: 'Jenny Rosen',
},
},
})
.then (function (result) {
// Handle result.error or result.paymentIntent
});
Run Code Online (Sandbox Code Playgroud)
条纹-js 文档:https : //stripe.com/docs/js
谢谢