-
-
Save MarcinusX/f4f428150d2e794d21abb5428b2a39aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
class MulticityInput extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Form( | |
child: Padding( | |
padding: const EdgeInsets.all(16.0), | |
child: Column( | |
children: <Widget>[ | |
Padding( | |
padding: const EdgeInsets.fromLTRB(0.0, 0.0, 64.0, 8.0), | |
child: TextFormField( | |
decoration: InputDecoration( | |
icon: Icon(Icons.flight_takeoff, color: Colors.red), | |
labelText: "From", | |
), | |
), | |
), | |
Padding( | |
padding: const EdgeInsets.fromLTRB(0.0, 0.0, 64.0, 8.0), | |
child: TextFormField( | |
decoration: InputDecoration( | |
icon: Icon(Icons.flight_land, color: Colors.red), | |
labelText: "To", | |
), | |
), | |
), | |
Row( | |
children: <Widget>[ | |
Expanded( | |
child: Padding( | |
padding: const EdgeInsets.only(bottom: 8.0), | |
child: TextFormField( | |
decoration: InputDecoration( | |
icon: Icon(Icons.flight_land, color: Colors.red), | |
labelText: "To", | |
), | |
), | |
), | |
), | |
Container( | |
width: 64.0, | |
alignment: Alignment.center, | |
child: Icon(Icons.add_circle_outline, color: Colors.grey), | |
), | |
], | |
), | |
Padding( | |
padding: const EdgeInsets.fromLTRB(0.0, 0.0, 64.0, 8.0), | |
child: TextFormField( | |
decoration: InputDecoration( | |
icon: Icon(Icons.person, color: Colors.red), | |
labelText: "Passengers", | |
), | |
), | |
), | |
Row( | |
children: <Widget>[ | |
Padding( | |
padding: const EdgeInsets.only(right: 16.0), | |
child: Icon(Icons.date_range, color: Colors.red), | |
), | |
Expanded( | |
child: Padding( | |
padding: const EdgeInsets.only(right: 16.0), | |
child: TextFormField( | |
decoration: InputDecoration(labelText: "Departure"), | |
), | |
), | |
), | |
Expanded( | |
child: Padding( | |
padding: const EdgeInsets.only(left: 16.0), | |
child: TextFormField( | |
decoration: InputDecoration(labelText: "Arrival"), | |
), | |
), | |
), | |
], | |
), | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment