bug fixed
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
import '../Pay/PayPromptPay.dart';
|
||||
import '../PinCodeVadidate.dart';
|
||||
import '../api/api.dart';
|
||||
import '../utils/color_custom.dart';
|
||||
import 'TransferCathayPayDialog.dart';
|
||||
|
||||
TextEditingController _phone = TextEditingController();
|
||||
class TransferCathayPay extends StatefulWidget {
|
||||
const TransferCathayPay({Key? key}) : super(key: key);
|
||||
|
||||
@@ -16,7 +20,7 @@ class TransferCathayPay extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _TransferCathayPayState extends State<TransferCathayPay> {
|
||||
TextEditingController _phone = TextEditingController();
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -118,6 +122,31 @@ class TransferCathayPayDetail extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
|
||||
@override
|
||||
void initState() {
|
||||
initPromptPay(context);
|
||||
super.initState();
|
||||
}
|
||||
TextEditingController _price = TextEditingController();
|
||||
String name ="";
|
||||
initPromptPay(BuildContext context) {
|
||||
_phone.text = '${_phone.text .substring(0, 3)}-${_phone.text .substring(3, 6)}-${_phone.text .substring(6)}';
|
||||
var param = jsonEncode(<dynamic, dynamic>{"idCardOrMobileDeviceNo": _phone.text, "amount": 0});
|
||||
Api.post(context, Api.transferedPromptPayInitial, param).then((value) => {
|
||||
if (value != null)
|
||||
{
|
||||
name = value["prompPayname"].toString()
|
||||
// refresh()
|
||||
}
|
||||
else
|
||||
{}
|
||||
|
||||
});
|
||||
refresh();
|
||||
}
|
||||
refresh() {
|
||||
setState(() {});
|
||||
}
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@@ -178,7 +207,7 @@ class _TransferCathayPayDetailState extends State<TransferCathayPayDetail> {
|
||||
children: [
|
||||
Spacer(),
|
||||
Text(
|
||||
"",
|
||||
name,
|
||||
textAlign: TextAlign.right,
|
||||
style: TextStyle(
|
||||
color: Color(0xff65676b),
|
||||
|
||||
Reference in New Issue
Block a user