import 'package:flutter/material.dart'; class VelocityWidget extends StatelessWidget { @override Widget build(BuildContext context) { return Form( child: Column( children: [ 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; }, ), ], ), ); } }