Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class _MyAppState extends State<MyApp> {
controller: _controller,
padding: const EdgeInsets.all(20),
children: <Widget>[
RaisedButton(
ElevatedButton(
child: Text("Create Source"),
onPressed: () {
StripePayment.createSourceWithParams(SourceParams(
Expand All @@ -103,7 +103,7 @@ class _MyAppState extends State<MyApp> {
},
),
Divider(),
RaisedButton(
ElevatedButton(
child: Text("Create Token with Card Form"),
onPressed: () {
StripePayment.paymentRequestWithCardForm(
Expand All @@ -117,7 +117,7 @@ class _MyAppState extends State<MyApp> {
}).catchError(setError);
},
),
RaisedButton(
ElevatedButton(
child: Text("Create Token with Card"),
onPressed: () {
StripePayment.createTokenWithCard(
Expand All @@ -132,7 +132,7 @@ class _MyAppState extends State<MyApp> {
},
),
Divider(),
RaisedButton(
ElevatedButton(
child: Text("Create Payment Method with Card"),
onPressed: () {
StripePayment.createPaymentMethod(
Expand All @@ -148,7 +148,7 @@ class _MyAppState extends State<MyApp> {
}).catchError(setError);
},
),
RaisedButton(
ElevatedButton(
child: Text("Create Payment Method with existing token"),
onPressed: _paymentToken == null
? null
Expand All @@ -169,7 +169,7 @@ class _MyAppState extends State<MyApp> {
},
),
Divider(),
RaisedButton(
ElevatedButton(
child: Text("Confirm Payment Intent"),
onPressed:
_paymentMethod == null || _paymentIntentClientSecret == null
Expand All @@ -190,7 +190,7 @@ class _MyAppState extends State<MyApp> {
}).catchError(setError);
},
),
RaisedButton(
ElevatedButton(
child: Text(
"Confirm Payment Intent with saving payment method",
textAlign: TextAlign.center,
Expand All @@ -215,7 +215,7 @@ class _MyAppState extends State<MyApp> {
}).catchError(setError);
},
),
RaisedButton(
ElevatedButton(
child: Text("Authenticate Payment Intent"),
onPressed: _paymentIntentClientSecret == null
? null
Expand All @@ -233,7 +233,7 @@ class _MyAppState extends State<MyApp> {
},
),
Divider(),
RaisedButton(
ElevatedButton(
child: Text("Native payment"),
onPressed: () {
if (Platform.isIOS) {
Expand Down Expand Up @@ -263,7 +263,7 @@ class _MyAppState extends State<MyApp> {
}).catchError(setError);
},
),
RaisedButton(
ElevatedButton(
child: Text("Complete Native Payment"),
onPressed: () {
StripePayment.completeNativePayRequest().then((_) {
Expand Down