flutter 使用的时数据需要setState方法进行数据处理,这样才能初始化针对的UI以及dialog等,
再就是点击方法应该为()=>login() 找到方法
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/animation.dart';
import 'package:flutter_demo/utils/utils.dart';
import 'dart:async';
class myLogin extends StatefulWidget{
@override
State<StatefulWidget> createState() {
// TODO: implement createState
return initLogin();
}
}
class initLogin extends State<myLogin>{
TextEditingController phoneController;
TextEditingController passController;
var buttomLogin = false;
@override
void initState() {
// TODO: implement initState