Rab*_*i H 6 android-emulator dart flutter
尝试在 textfromfield 模拟器键盘中输入文本后,键盘不显示,也不接受任何文本。使用颤振版本 - 3.10
尝试更新权限但没有成功
代码
类 LoginScreen 扩展 StatelessWidget { const LoginScreen({super.key});
@override Widget build(BuildContext context) { varcontroller = Get.put(AuthController());
return bgWidget(
child: Scaffold(
resizeToAvoidBottomInset: false,
body: Center(
child: Column(children: [
(context.screenHeight * 0.1).heightBox,
applogoWidget(),
10.heightBox,
"Welcome to $appname".text.white.fontFamily(bold).size(18).make(),
15.heightBox,
Obx(
() => Column(
children: [
customTextfield(
title: email,
hint: emailHint,
isPass: false,
controller: controller.emailController),
customTextfield(
title: password,
hint: passwordHint,
isPass: true,
controller: controller.passwordController),
Align(
alignment: Alignment.centerRight,
child: TextButton(
onPressed: () {},
child: forgetPassword.text.make(),
)),
5.heightBox,
controller.isLoading.value
? const CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation(redColor),
)
: logInButton(
title: logIn,
color: redColor,
textColor: whiteColor,
onPressed: () async {
controller.isLoading(true);
await controller
.logInMethod(context: context)
.then((value) {
if (value != null) {
VxToast.show(context, msg: "Logged in");
Get.offAll(() => const Home());
} else {
controller.isLoading(false);
}
});
}).box.width(context.screenWidth - 50).make(),
5.heightBox,
createAccount.text.color(fontGrey).make(),
5.heightBox,
logInButton(
title: signUp,
color: golden,
textColor: whiteColor,
onPressed: () {
Get.to(() => const SignUpScreen());
}).box.width(context.screenWidth - 50).make(),
10.heightBox,
logInWith.text.color(fontGrey).make(),
5.heightBox,
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: List<Widget>.generate(
3,
(index) => Padding(
padding: const EdgeInsets.all(8.0),
child: CircleAvatar(
backgroundColor: lightGrey,
radius: 25,
child: Image.asset(
socailIconList[index],
width: 30,
),
),
)),
),
],
)
.box
.white
.rounded
.padding(const EdgeInsets.all(18))
.width(context.width - 70)
.shadowSm
.make(),
),
]),
),
));
Run Code Online (Sandbox Code Playgroud)
} }
| 归档时间: |
|
| 查看次数: |
973 次 |
| 最近记录: |