Issue
I'm new to flutter, can anyone help me to know how to achieve screen design as shown in screenshot using flutter.

Below is the code what I have achieved so far:
Container(
padding: EdgeInsets.all(16.0),
child: Row(
children: [
Container(
width: 50.0,
height: 48.0,
child: Padding(
padding: const EdgeInsets.only(left: 5, right: 5),
child: TextField(
style: TextStyle(
fontSize: 10.0,
fontWeight: FontWeight.bold,
color: Colors.black,
),
autocorrect: true,
decoration: InputDecoration(
hintStyle: TextStyle(color: Colors.grey),
fillColor: Colors.white70,
focusedBorder: OutlineInputBorder(
borderRadius:
BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.greenAccent),
),
),
)),
),
Container(
width: 50.0,
height: 48.0,
child: Padding(
padding: const EdgeInsets.only(left: 5, right: 5),
child: TextField(
style: TextStyle(
fontSize: 10.0,
color: Colors.black,
),
autocorrect: true,
decoration: InputDecoration(
hintStyle: TextStyle(color: Colors.grey),
fillColor: Colors.white70,
focusedBorder: OutlineInputBorder(
borderRadius:
BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.greenAccent),
),
),
)),
),
Container(
width: 50.0,
height: 48.0,
child: Padding(
padding: const EdgeInsets.only(left: 5, right: 5),
child: TextField(
style: TextStyle(
fontSize: 10.0,
color: Colors.black,
),
autocorrect: true,
decoration: InputDecoration(
hintStyle: TextStyle(color: Colors.grey),
fillColor: Colors.white70,
focusedBorder: OutlineInputBorder(
borderRadius:
BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.greenAccent),
),
),
)),
),
Container(
width: 50.0,
height: 48.0,
child: Padding(
padding: const EdgeInsets.only(left: 5, right: 5),
child: TextField(
style: TextStyle(
fontSize: 10.0,
color: Colors.black,
),
autocorrect: true,
decoration: InputDecoration(
hintStyle: TextStyle(color: Colors.grey),
fillColor: Colors.white70,
focusedBorder: OutlineInputBorder(
borderRadius:
BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.greenAccent),
),
),
)),
),
Container(
width: 50.0,
height: 48.0,
child: Padding(
padding: const EdgeInsets.only(left: 5, right: 5),
child: TextField(
style: TextStyle(
fontSize: 10.0,
color: Colors.black,
),
autocorrect: true,
decoration: InputDecoration(
hintStyle: TextStyle(color: Colors.grey),
fillColor: Colors.white70,
focusedBorder: OutlineInputBorder(
borderRadius:
BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.greenAccent),
),
),
)),
),
Container(
width: 50.0,
height: 48.0,
child: Padding(
padding: const EdgeInsets.only(left: 5, right: 5),
child: TextField(
style: TextStyle(
fontSize: 10.0,
color: Colors.black,
),
autocorrect: true,
decoration: InputDecoration(
hintStyle: TextStyle(color: Colors.grey),
fillColor: Colors.white70,
focusedBorder: OutlineInputBorder(
borderRadius:
BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: Colors.greenAccent),
),
),
)),
),
],
),
),
Solution
https://github.com/ChiragKothiya1996/Flutter/blob/main/Otp.dart
Use this file for show same as your otp view
Answered By - Chirag Kothiya
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.