作为颤振的初学者,我在颤振中制作了第一个登录表单,但唯一的问题是我不知道如何在颤振中隐藏/显示密码我已经在互联网上复制了隐藏/显示密码代码,但我多次收到错误我不知道如何执行代码的正确方法请帮助我,这是下面给出的我的代码。
import 'package:flutter/material.dart';
class LogInForm extends StatelessWidget {
const LogInForm({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
height: MediaQuery.of(context).size.height,
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Column(
children: <Widget>[
Text(
"Welcome",
style: TextStyle(
fontSize: 50, fontWeight: FontWeight.bold),
),
SizedBox(
height: 30,
),
Text(
"Login to your account",
style: TextStyle(fontSize: 25, color: Colors.grey[700]),
)
],
),
Container(
margin: EdgeInsets.fromLTRB(200, 100, 200, 0),
child: TextField(
decoration: InputDecoration(
border: …Run Code Online (Sandbox Code Playgroud)