55 lines
1.7 KiB
Dart
55 lines
1.7 KiB
Dart
|
import 'package:energy/widgets/InputFieldWidget.dart';
|
||
|
import 'package:flutter/material.dart';
|
||
|
import 'package:provider/provider.dart';
|
||
|
|
||
|
import '../models/CalculateModels.dart';
|
||
|
|
||
|
class InputWidget extends StatelessWidget {
|
||
|
const InputWidget({super.key});
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
final model = Provider.of<CalculateModels>(context);
|
||
|
|
||
|
return Column(children: [
|
||
|
Row(
|
||
|
mainAxisSize: MainAxisSize.min,
|
||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||
|
children: [
|
||
|
Expanded(
|
||
|
child: AppBar(
|
||
|
automaticallyImplyLeading: false,
|
||
|
title: const Text(
|
||
|
"Geben sie die Gewünschten Werte ein",
|
||
|
),
|
||
|
)),
|
||
|
]),
|
||
|
const SizedBox(height: 10),
|
||
|
Row(
|
||
|
mainAxisSize: MainAxisSize.min,
|
||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||
|
children: [
|
||
|
InputFieldWidget("Anfangsgeschwindigkeit", "Eingabe in m/s",
|
||
|
model.setStartVelocity),
|
||
|
const SizedBox(width: 5),
|
||
|
InputFieldWidget(
|
||
|
"Endgeschwindigkeit", "Eingabe in m/s", model.setEndVelocity)
|
||
|
],
|
||
|
),
|
||
|
const SizedBox(height: 10),
|
||
|
Row(
|
||
|
mainAxisSize: MainAxisSize.max,
|
||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||
|
children: [
|
||
|
InputFieldWidget(
|
||
|
"Anfangshöhe", " Eingabe in m", model.setStartHeight),
|
||
|
const SizedBox(width: 5),
|
||
|
InputFieldWidget("Endhöhe", "Eingabe in m", model.setEndHeight),
|
||
|
],
|
||
|
),
|
||
|
const SizedBox(height: 10),
|
||
|
InputFieldWidget("Gewicht", "Eingabe in kg", model.setWeight),
|
||
|
]);
|
||
|
}
|
||
|
}
|