37 lines
1.1 KiB
Dart
37 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class VelocityWidget extends StatelessWidget {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Form(
|
|
child: Column(
|
|
children: <Widget>[
|
|
const Text('Velocity'),
|
|
TextFormField(
|
|
decoration: const InputDecoration(
|
|
hintText: 'Enter the velocity of the starting point (in s)',
|
|
),
|
|
validator: (String? value) {
|
|
if (value == null || value.isEmpty) {
|
|
return 'Invalid input. Please enter the velocity of the starting point (in s)';
|
|
}
|
|
return null;
|
|
},
|
|
),
|
|
TextFormField(
|
|
decoration: const InputDecoration(
|
|
hintText: 'Enter the velocity of the ending point (in s)',
|
|
),
|
|
validator: (String? value) {
|
|
if (value == null || value.isEmpty) {
|
|
return 'Invalid input. Please enter the velocity of the ending point (in s)';
|
|
}
|
|
return null;
|
|
},
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|