Skip to content

Instantly share code, notes, and snippets.

@MarcinusX
Created September 3, 2018 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcinusX/f4f428150d2e794d21abb5428b2a39aa to your computer and use it in GitHub Desktop.
Save MarcinusX/f4f428150d2e794d21abb5428b2a39aa to your computer and use it in GitHub Desktop.
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