added proper date and time picker
This commit is contained in:
parent
fba0dd9ebc
commit
c15fdf1382
2 changed files with 14 additions and 17 deletions
|
@ -128,7 +128,7 @@ class LoginPageState extends State<LoginPage> {
|
||||||
),
|
),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18.0,
|
fontSize: 18.0,
|
||||||
color: Colors.grey,
|
color: Colors.grey[800],
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -154,7 +154,7 @@ class LoginPageState extends State<LoginPage> {
|
||||||
obscureText: true,
|
obscureText: true,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18.0,
|
fontSize: 18.0,
|
||||||
color: Colors.grey,
|
color: Colors.grey[800],
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -8,6 +8,7 @@ import 'package:local_spend/common/platform/platform_scaffold.dart';
|
||||||
import 'package:local_spend/common/widgets/basic_drawer.dart';
|
import 'package:local_spend/common/widgets/basic_drawer.dart';
|
||||||
import 'package:shared_preferences/shared_preferences.dart';
|
import 'package:shared_preferences/shared_preferences.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
import 'package:datetime_picker_formfield/datetime_picker_formfield.dart';
|
import 'package:datetime_picker_formfield/datetime_picker_formfield.dart';
|
||||||
|
|
||||||
const URL = "https://flutter.io/";
|
const URL = "https://flutter.io/";
|
||||||
|
@ -27,6 +28,8 @@ class ReceiptPageState extends State<ReceiptPage> {
|
||||||
final TextEditingController _typeController = TextEditingController();
|
final TextEditingController _typeController = TextEditingController();
|
||||||
final TextEditingController _orgController = TextEditingController();
|
final TextEditingController _orgController = TextEditingController();
|
||||||
|
|
||||||
|
DateTime date;
|
||||||
|
|
||||||
Future launchURL(String url) async {
|
Future launchURL(String url) async {
|
||||||
if (await canLaunch(url)) {
|
if (await canLaunch(url)) {
|
||||||
await launch(url, forceSafariVC: true, forceWebView: true);
|
await launch(url, forceSafariVC: true, forceWebView: true);
|
||||||
|
@ -97,19 +100,13 @@ class ReceiptPageState extends State<ReceiptPage> {
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
DateTimePickerFormField(
|
||||||
padding: EdgeInsets.fromLTRB(0.0, 5.0, 0.0, 0.0),
|
inputType: InputType.both,
|
||||||
child: TextField(
|
format: DateFormat("EEEE, MMMM d, yyyy 'at' h:mma"),
|
||||||
controller: _timeController,
|
editable: true,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: "Use your login email",
|
labelText: 'Date/Time of Transaction', hasFloatingPlaceholder: false),
|
||||||
),
|
onChanged: (dt) => setState(() => date = dt),
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 18.0,
|
|
||||||
color: Colors.grey,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.fromLTRB(0.0, 35.0, 0.0, 0.0),
|
padding: EdgeInsets.fromLTRB(0.0, 35.0, 0.0, 0.0),
|
||||||
|
@ -127,12 +124,12 @@ class ReceiptPageState extends State<ReceiptPage> {
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: _amountController,
|
controller: _amountController,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: 'Your password, keep it secret, keep it safe.',
|
hintText: 'Value in £',
|
||||||
),
|
),
|
||||||
obscureText: true,
|
obscureText: true,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18.0,
|
fontSize: 18.0,
|
||||||
color: Colors.grey,
|
color: Colors.grey[800],
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Reference in a new issue