119 lines
4.0 KiB
Dart
119 lines
4.0 KiB
Dart
import 'package:auto_size_text/auto_size_text.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:gascom/screens/success_screen.dart';
|
|
import 'package:gascom/widgets/app_button.dart';
|
|
import 'package:gascom/widgets/app_text_field.dart';
|
|
import 'package:gascom/widgets/custom_app_bar.dart';
|
|
import 'package:persistent_bottom_nav_bar_v2/persistent_bottom_nav_bar_v2.dart';
|
|
|
|
class ChangeEngineScreen extends StatefulWidget {
|
|
const ChangeEngineScreen({super.key});
|
|
|
|
@override
|
|
State<ChangeEngineScreen> createState() => _ChangeEngineScreenState();
|
|
}
|
|
|
|
class _ChangeEngineScreenState extends State<ChangeEngineScreen> {
|
|
TextEditingController reasonController = TextEditingController();
|
|
TextEditingController countryController = TextEditingController();
|
|
TextEditingController engineNumberController = TextEditingController();
|
|
TextEditingController enginePowerController = TextEditingController();
|
|
TextEditingController engineTypeController = TextEditingController();
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: const CustomAppBar(
|
|
title: "تبديل المحرك",
|
|
),
|
|
body: SafeArea(
|
|
child: ListView(
|
|
padding: const EdgeInsets.all(20.0),
|
|
children: [
|
|
AutoSizeText(
|
|
"لتبديل المحرك يرجى تزويدنا بمعلومات المحرك الجديد الجديد.",
|
|
maxLines: 3,
|
|
style: Theme.of(context).textTheme.bodyLarge,
|
|
),
|
|
const SizedBox(height: 20.0),
|
|
AutoSizeText(
|
|
"سبب التبديل",
|
|
style: Theme.of(context).textTheme.bodyMedium,
|
|
),
|
|
const SizedBox(height: 5.0),
|
|
AppTextField(
|
|
controller: reasonController,
|
|
keyboardType: TextInputType.multiline,
|
|
),
|
|
const SizedBox(height: 15.0),
|
|
AutoSizeText(
|
|
"منشأ المحرك الجديد",
|
|
style: Theme.of(context).textTheme.bodyMedium,
|
|
),
|
|
const SizedBox(height: 5.0),
|
|
AppTextField(
|
|
controller: countryController,
|
|
keyboardType: TextInputType.multiline,
|
|
),
|
|
const SizedBox(height: 15.0),
|
|
AutoSizeText(
|
|
"رقم المحرك",
|
|
style: Theme.of(context).textTheme.bodyMedium,
|
|
),
|
|
const SizedBox(height: 5.0),
|
|
AppTextField(
|
|
controller: engineNumberController,
|
|
keyboardType: TextInputType.multiline,
|
|
),
|
|
const SizedBox(height: 15.0),
|
|
AutoSizeText(
|
|
"القدرة التوليدية (KV.A)",
|
|
style: Theme.of(context).textTheme.bodyMedium,
|
|
),
|
|
const SizedBox(height: 5.0),
|
|
AppTextField(
|
|
controller: enginePowerController,
|
|
keyboardType: TextInputType.multiline,
|
|
),
|
|
const SizedBox(height: 15.0),
|
|
AutoSizeText(
|
|
"نوع المحرك",
|
|
style: Theme.of(context).textTheme.bodyMedium,
|
|
),
|
|
const SizedBox(height: 5.0),
|
|
AppTextField(
|
|
controller: engineTypeController,
|
|
keyboardType: TextInputType.multiline,
|
|
),
|
|
const SizedBox(height: 25.0),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
SizedBox(
|
|
width: 200,
|
|
child: AppButton(
|
|
onPressed: handleSendRequest,
|
|
label: "تاكيد",
|
|
isElevated: true),
|
|
),
|
|
],
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
void handleSendRequest() {
|
|
// handle request
|
|
|
|
pushScreenWithoutNavBar(
|
|
context,
|
|
const SuccessScreen(
|
|
title: "تم تقديم الطلب بنجاح",
|
|
subtitle: "سيتم مراجعة طلبك، واعلامك بالموافقة قريباً"
|
|
)
|
|
);
|
|
}
|
|
}
|