Instantly share code, notes, and snippets.

Embed
What would you like to do?
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