78 lines
2.3 KiB
Dart
78 lines
2.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:gap/gap.dart';
|
|
import 'package:pharmacy_mobile/widgets/input_widget.dart';
|
|
// import 'package:google_fonts/google_fonts.dart';
|
|
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
|
import 'package:pharmacy_mobile/widgets/title_widget.dart';
|
|
|
|
class AddMedicinePage extends StatefulWidget {
|
|
const AddMedicinePage({super.key});
|
|
|
|
@override
|
|
AddMedicinePageState createState() => AddMedicinePageState();
|
|
}
|
|
|
|
class AddMedicinePageState extends State<AddMedicinePage> {
|
|
final _formKey = GlobalKey<FormState>();
|
|
// final _authService = AuthService();
|
|
final _nameController = TextEditingController();
|
|
final _genericNameController = TextEditingController();
|
|
final _typeController = TextEditingController();
|
|
final _manufactorerController = TextEditingController();
|
|
final FocusNode _focusNode = FocusNode();
|
|
|
|
// @override
|
|
// void initState() {
|
|
// super.initState();
|
|
// }
|
|
|
|
@override
|
|
void dispose() {
|
|
_nameController.dispose();
|
|
_genericNameController.dispose();
|
|
_typeController.dispose();
|
|
_manufactorerController.dispose();
|
|
_focusNode.dispose();
|
|
super.dispose();
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
body: Container(
|
|
alignment: Alignment.center,
|
|
height: MediaQuery.of(context).size.height,
|
|
decoration: const BoxDecoration(
|
|
gradient: LinearGradient(
|
|
colors: [
|
|
Color.fromRGBO(34, 51, 69, 1),
|
|
Color.fromRGBO(22, 32, 44, 1),
|
|
],
|
|
begin: Alignment.topCenter,
|
|
end: Alignment.bottomCenter,
|
|
),
|
|
),
|
|
child: Center(
|
|
child: Column(
|
|
children: [
|
|
const Gap(120),
|
|
const TitleWidget(firstTextSize: 16, secondTextSize: 32),
|
|
const Gap(32),
|
|
const TextWidget(text: 'Add Medicine'),
|
|
const Gap(16),
|
|
Form(
|
|
key: _formKey,
|
|
child: Center(
|
|
child: Column(
|
|
children: [
|
|
InputWidget(label: 'Name', controller: _nameController),
|
|
],
|
|
),
|
|
))
|
|
],
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|