resizeToAvoidBottomPadding: false
olmadıKodunu atarsan daha rahat yardımcı olabilirim, birkaç tahmin var aklımda ve birkaç değişiklikle düzeltme yapılabilir ama eğer kodunu hiç değiştirmek istemiyorsan Scaffold'una
resizeToAvoidBottomPadding: false
eklersen hata gider.
Olmadı.
pardonKodu görmemiz lazım.
class Mobile_Login extends StatefulWidget {
const Mobile_Login({Key? key}) : super(key: key);
_Mobile_LoginState createState() => _Mobile_LoginState();
}
class _Mobile_LoginState extends State<Mobile_Login> {
final _formKey = GlobalKey<FormState>();
bool isgozukme = true;
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: true,
body: Form(
key: _formKey,
child: Scaffold(
body: Container(
child: Column(children: [
SizedBox(height: 100),
Center(
child: Text(
"BlockMedia",
style: TextStyle(fontSize: 45, fontWeight: FontWeight.w400),
),
),
SizedBox(height: 30),
//////////////
Container(
width: 350,
child: Theme(
data: new ThemeData(
primaryColor: Colors.red,
primaryColorDark: Colors.black,
),
child: TextFormField(
keyboardType: TextInputType.emailAddress,
validator: (value) {
if (value == null ||
value.isEmpty ||
!value.contains('@') ||
!value.contains('.com') ||
value.length < 8) {
return 'E-posta gerekli';
} else if (value.contains(' ')) {
return "E-posta'da boşluk olamaz ";
}
return null;
},
decoration: new InputDecoration(
labelText: "E-posta",
fillColor: Colors.black,
border: new OutlineInputBorder(
borderRadius: new BorderRadius.circular(5.0),
borderSide: new BorderSide(),
),
//fillColor: Colors.green
),
style: new TextStyle(
fontFamily: "Poppins",
),
),
),
),
SizedBox(height: 7),
/////////////
Container(
width: 350,
child: TextFormField(
obscureText: isgozukme,
keyboardType: TextInputType.visiblePassword,
validator: (value) {
if (value == null || value.length < 8) {
return 'Şifre gerekli';
}
return null;
},
decoration: new InputDecoration(
labelText: "Password",
fillColor: Colors.white,
border: new OutlineInputBorder(
borderRadius: new BorderRadius.circular(5.0),
borderSide: new BorderSide(),
),
suffixIcon: InkWell(
onTap: _togglePasswordView,
child: Icon(Icons.visibility),
),
),
),
),
SizedBox(height: 25),
ElevatedButton(
child: Container(
decoration: new BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.circular(5),
),
width: 200,
height: 50,
child: Center(
child: Text("GirisYap",
style:
TextStyle(fontSize: 25, color: Colors.white)))),
onPressed: () {
if (_formKey.currentState!.validate()) {
Navigator.push(context,
MaterialPageRoute(builder: (context) => Home()));
}
},
),
SizedBox(height: 25),
Center(
child: Wrap(
children: <Widget>[
//SizedBox(width: 55),
Text("Hesabın yok mu?",
style: TextStyle(color: Colors.black, fontSize: 20)),
TextButton(
child: Text("Üye Ol",
style: TextStyle(color: Colors.blue, fontSize: 20)),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => KullaniciAdi()));
},
),
],
),
)
])))));
}
void _togglePasswordView() {
setState(() {
isgozukme = !isgozukme;
});
}
}
Bu sitenin çalışmasını sağlamak için gerekli çerezleri ve deneyiminizi iyileştirmek için isteğe bağlı çerezleri kullanıyoruz.