Below are the output screenshots & source code.
Just copy this source code in your editor & run the program using any emulator.
Output -

Source Code
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp( home: MyApp(),));
}
class MyApp extends StatefulWidget {
@override
_State createState() => _State();
}
class _State extends State<MyApp> {
TextEditingController nameController = TextEditingController();
TextEditingController passwordController = TextEditingController();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Register Screen - Task 2 || Flutter Training'),
),
body: Padding(
padding: EdgeInsets.all(1),
child: Column(
children: <Widget>[
Padding(
padding: EdgeInsets.all(1),
child: TextField(
controller: nameController,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Email Address',
hintText: 'Enter Your Email Address',
),
),
),
Padding(
padding: EdgeInsets.all(1),
child: TextField(
controller: passwordController,
obscureText: true,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Date of Birth',
hintText: 'Enter Your Date of Birth',
),
),
),
Padding(
padding: EdgeInsets.all(1),
child: TextField(
controller: passwordController,
obscureText: true,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Enter You Gender',
hintText: 'Male/Female/Other',
),
),
),
Padding(
padding: EdgeInsets.all(1),
child: TextField(
controller: passwordController,
obscureText: true,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Set Password',
hintText: 'Enter Password',
),
),
),
Padding(
padding: EdgeInsets.all(1),
child: TextField(
controller: passwordController,
obscureText: true,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Choose You Country',
hintText: 'Select Country',
),
),
),
Padding(
padding: EdgeInsets.all(1),
child: TextField(
controller: passwordController,
obscureText: true,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Enter Your State',
hintText: 'Enter State',
),
),
),
Padding(
padding: EdgeInsets.all(1),
child: TextField(
controller: passwordController,
obscureText: true,
decoration: InputDecoration(
border: OutlineInputBorder(),
labelText: 'Enter Your City',
hintText: 'Enter City',
),
),
),
RaisedButton(
textColor: Colors.white,
color: Colors.blue,
child: Text('Register Now'),
onPressed: (){
return showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: Text("Login Successful"),
// Retrieve the text which the user has entered by
// using the TextEditingController.
content: Text(nameController.text),
actions: <Widget>[
new FlatButton(
child: new Text('OK'),
onPressed: () {
Navigator.of(context).pop();
},
)
],
);
},
);
},
),
RaisedButton(
textColor: Colors.white,
color: Colors.blue,
child: Text('Forgot Password'),
onPressed: (){
return showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: Text("This feature will be available soon."),
actions: <Widget>[
new FlatButton(
child: new Text('OK'),
onPressed: () {
Navigator.of(context).pop();
},
)
],
);
},
);
},
),
RaisedButton(
textColor: Colors.white,
color: Colors.blue,
child: Text('Already a member ? Log In Now'),
onPressed: (){
},
)
],
)
)
);
}
}