smartbacha1111

smartbacha1111

Lv1

smartbacha1111

0 Followers
0 Following
2 Helped
ask me anything

ANSWERS

Published10

Subjects

English2Mechanical Engineering1Algebra1Computer Science1Physics4Chemistry1

Don't know what to put the return value in the return line (The last line) see below for Flutter.

class MyAppState extends State<MyApp>{
@override
Widget build(BuildContext context) {
return;

The entire code listed below -

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

void main() {

runApp(const MyApp());
}
class MyAppState extends State<MyApp>{
@override
Widget build(BuildContext context) {
return;
}
}
class MyApp extends StatefulWidget {

const MyApp({super.key});

@override

MyAppState createState() => MyAppState();
}

class LoginData {
String username = "";
String password = "";
}

class _MyApp extends State {

LoginData loginData = LoginData();
final GlobalKey<FormState> _formkey = GlobalKey<FormState>();
@override

Widget build(BuildContext inContext) {
return MaterialApp(home: Scaffold(
body : Container(
padding : const EdgeInsets.all(50.0),
child : Form(
key: _formkey,
child: Column(
children: [
TextFormField(
keyboardType: TextInputType.emailAddress,
validator: (String? inValue) {
if (inValue?.isEmpty?? true) {
return "Please enter username";
}
return null;
},
onSaved: (String? inValue) {
loginData.username = inValue!;
},

decoration: const InputDecoration(
hintText: "[email protected]",
labelText: "Username (eMail address)"
),
),

TextFormField(

obscureText: true,

validator: (String? inValue) {
if (inValue == null) {
return "Password cannot be null";
} else if (inValue.length < 10) {
return "Password must be >= 10 in length";
}
return null;
},

onSaved: (String? inValue) {
loginData.password = inValue!;
},

decoration: const InputDecoration(
hintText : "Password",
labelText : "Password"
),
),

ElevatedButton(

child : const Text("Log In!"),

onPressed: (){

if (_formkey.currentState!.validate()){

_formkey.currentState!.save();

if (kDebugMode) {
debugPrint ("Username: ${loginData.username}");
}
if (kDebugMode) {
debugPrint ("Password: ${loginData.password}");
}

}

},

),

]

),

),

),

));

}

}


Answer: In the last line of the build method, you need to return a Widget obje...
Answer: RA 3019, also known as the Anti-Graft and Corrupt Practices Act, is a ...