simbrief own card in ui

This commit is contained in:
2024-11-08 23:02:28 +01:00
parent 4ab8b70524
commit bcd10ed512

View File

@@ -220,27 +220,72 @@ class ExpectationInputPageState extends State<ExpectationInputPage> {
padding: const EdgeInsets.all(16.0),
child: Column(
children: [
const Card(
elevation: 2,
child: Padding(
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Welcome to IFR Buddy!',
style: TextStyle(
fontSize: 18, fontWeight: FontWeight.bold),
textAlign: TextAlign.left,
// IntrinsicHeight Widget hinzufügen
IntrinsicHeight(
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch, // Stretch hinzufügen
children: [
// Welcome Card - nimmt 60% der Breite
Expanded(
flex: 3,
child: Card(
elevation: 2,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: const [
Text(
'Welcome to IFR Buddy!',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
SizedBox(height: 10),
Text(
'Just an easy tool for writing down IFR clearances without a pen.',
style: TextStyle(fontSize: 16),
),
],
),
),
),
SizedBox(height: 10),
Text(
'Just an easy tool for writing down IFR clearances without a pen.',
style: TextStyle(fontSize: 16),
textAlign: TextAlign.left,
),
const SizedBox(width: 16), // Abstand zwischen den Cards
// SimBrief Card - nimmt 40% der Breite
Expanded(
flex: 2,
child: Card(
elevation: 2,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'SimBrief Import',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
),
const SizedBox(height: 10),
TextFormField(
controller: _simbriefIdController,
decoration: const InputDecoration(
labelText: 'SimBrief Pilot ID',
border: OutlineInputBorder(),
),
),
const SizedBox(height: 10),
SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: _fetchSimbriefData,
child: const Text('Load SimBrief Data'),
),
),
],
),
),
),
],
),
),
],
),
),
const SizedBox(height: 16),