update
This commit is contained in:
parent
f87e1511bc
commit
e48e400e43
13 changed files with 333 additions and 33 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:pharmacy_mobile/pages/add_generics.dart';
|
import 'package:pharmacy_mobile/pages/add_generics.dart';
|
||||||
import 'package:pharmacy_mobile/pages/add_medicine.dart';
|
import 'package:pharmacy_mobile/pages/add_medicine.dart';
|
||||||
|
import 'package:pharmacy_mobile/pages/add_stock.dart';
|
||||||
import 'package:pharmacy_mobile/pages/add_type.dart';
|
import 'package:pharmacy_mobile/pages/add_type.dart';
|
||||||
// import 'package:pharmacy_mobile/auth/auth_gate.dart';
|
// import 'package:pharmacy_mobile/auth/auth_gate.dart';
|
||||||
import 'package:pharmacy_mobile/pages/index_page.dart';
|
import 'package:pharmacy_mobile/pages/index_page.dart';
|
||||||
|
|
@ -67,6 +68,11 @@ final _router = GoRouter(
|
||||||
path: '/addtype',
|
path: '/addtype',
|
||||||
builder: (context, state) => AddTypePage(),
|
builder: (context, state) => AddTypePage(),
|
||||||
),
|
),
|
||||||
|
GoRoute(
|
||||||
|
name: 'addstock',
|
||||||
|
path: '/addstock',
|
||||||
|
builder: (context, state) => AddStockPage(),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,9 +22,10 @@ class AddGenericsPageState extends State<AddGenericsPage> {
|
||||||
final _refCategories = RefCategories();
|
final _refCategories = RefCategories();
|
||||||
final _refGenericNames = RefGenericNames();
|
final _refGenericNames = RefGenericNames();
|
||||||
final _nameController = TextEditingController();
|
final _nameController = TextEditingController();
|
||||||
late List _categoryList;
|
|
||||||
late String _selectedCategory;
|
late List _categoryList = [];
|
||||||
late String _categoryUUID;
|
late String _selectedCategory = '';
|
||||||
|
late String _categoryUUID = '';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
@ -43,7 +44,6 @@ class AddGenericsPageState extends State<AddGenericsPage> {
|
||||||
void saveGeneric() async {
|
void saveGeneric() async {
|
||||||
_categoryUUID = await _refCategories.getUUID(_selectedCategory);
|
_categoryUUID = await _refCategories.getUUID(_selectedCategory);
|
||||||
|
|
||||||
log(_categoryUUID);
|
|
||||||
await _refGenericNames.postGeneric(_nameController.text, _categoryUUID);
|
await _refGenericNames.postGeneric(_nameController.text, _categoryUUID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,11 @@ import 'package:gap/gap.dart';
|
||||||
import 'package:pharmacy_mobile/tables/ref_categories.dart';
|
import 'package:pharmacy_mobile/tables/ref_categories.dart';
|
||||||
import 'package:pharmacy_mobile/tables/ref_generic_names.dart';
|
import 'package:pharmacy_mobile/tables/ref_generic_names.dart';
|
||||||
import 'package:pharmacy_mobile/tables/ref_manufactorers.dart';
|
import 'package:pharmacy_mobile/tables/ref_manufactorers.dart';
|
||||||
|
import 'package:pharmacy_mobile/tables/ref_medicines.dart';
|
||||||
import 'package:pharmacy_mobile/tables/ref_types.dart';
|
import 'package:pharmacy_mobile/tables/ref_types.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/dropdown_widget.dart';
|
import 'package:pharmacy_mobile/widgets/dropdown_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/input_widget.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/text_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/title_widget.dart';
|
import 'package:pharmacy_mobile/widgets/title_widget.dart';
|
||||||
|
|
||||||
|
|
@ -22,22 +22,20 @@ class AddMedicinePageState extends State<AddMedicinePage> {
|
||||||
final _formKey = GlobalKey<FormState>();
|
final _formKey = GlobalKey<FormState>();
|
||||||
// final _authService = AuthService();
|
// final _authService = AuthService();
|
||||||
final _refGenericNames = RefGenericNames();
|
final _refGenericNames = RefGenericNames();
|
||||||
// final _refCategories = RefCategories();
|
final _refCategories = RefCategories();
|
||||||
final _refTypes = RefTypes();
|
final _refTypes = RefTypes();
|
||||||
final _refManufactorer = RefManufactorers();
|
final _refManufactorer = RefManufactorers();
|
||||||
|
final _refMedicines = RefMedicines();
|
||||||
final _nameController = TextEditingController();
|
final _nameController = TextEditingController();
|
||||||
final _genericNameController = TextEditingController();
|
|
||||||
final _typeController = TextEditingController();
|
|
||||||
final _manufactorerController = TextEditingController();
|
|
||||||
final _categoryController = TextEditingController();
|
|
||||||
final FocusNode _focusNode = FocusNode();
|
final FocusNode _focusNode = FocusNode();
|
||||||
|
|
||||||
late List _genericNameList = [];
|
late List _genericNameList = [];
|
||||||
late String _selectedGeneric;
|
late String _selectedGeneric = '';
|
||||||
|
late String _selectedCategory = '';
|
||||||
late List _typeList = [];
|
late List _typeList = [];
|
||||||
late String _selectedType;
|
late String _selectedType = '';
|
||||||
late List _manufactorerList = [];
|
late List _manufactorerList = [];
|
||||||
late String _selectedManufactorer;
|
late String _selectedManufactorer = '';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
@ -51,8 +49,14 @@ class AddMedicinePageState extends State<AddMedicinePage> {
|
||||||
_manufactorerList = await _refManufactorer.getList();
|
_manufactorerList = await _refManufactorer.getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
void _updateGeneric(dynamic generic) {
|
void _updateGeneric(dynamic generic) async {
|
||||||
_selectedGeneric = generic;
|
_selectedGeneric = generic;
|
||||||
|
final catuuid = await _refGenericNames.getCategoryUUID(_selectedGeneric);
|
||||||
|
final catname = await _refCategories.getName(catuuid);
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
_selectedCategory = catname;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void _updateType(dynamic type) {
|
void _updateType(dynamic type) {
|
||||||
|
|
@ -63,22 +67,27 @@ class AddMedicinePageState extends State<AddMedicinePage> {
|
||||||
_selectedManufactorer = manufactorer;
|
_selectedManufactorer = manufactorer;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @override
|
void _saveMedicine() async {
|
||||||
// void initState() {
|
final medName = _nameController.text;
|
||||||
// super.initState();
|
final medGenericUUID = await _refGenericNames.getUUID(_selectedGeneric);
|
||||||
// }
|
final medTypeUUID = await _refTypes.getUUID(_selectedType);
|
||||||
|
final medManufactorerUUID = await _refManufactorer.getUUID(_selectedManufactorer);
|
||||||
|
|
||||||
|
await _refMedicines.postMedicine(medName, medGenericUUID, medManufactorerUUID, medTypeUUID);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_nameController.dispose();
|
_nameController.dispose();
|
||||||
_genericNameController.dispose();
|
|
||||||
_typeController.dispose();
|
|
||||||
_manufactorerController.dispose();
|
|
||||||
_categoryController.dispose();
|
|
||||||
_focusNode.dispose();
|
_focusNode.dispose();
|
||||||
|
|
||||||
_genericNameList = [];
|
_genericNameList = [];
|
||||||
_selectedGeneric = '';
|
_selectedGeneric = '';
|
||||||
|
_selectedCategory = '';
|
||||||
|
_typeList = [];
|
||||||
|
_selectedType = '';
|
||||||
|
_manufactorerList = [];
|
||||||
|
_selectedManufactorer = '';
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -113,13 +122,18 @@ class AddMedicinePageState extends State<AddMedicinePage> {
|
||||||
children: [
|
children: [
|
||||||
InputWidget(label: 'Name', controller: _nameController),
|
InputWidget(label: 'Name', controller: _nameController),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
DropDownWidget(
|
Column(
|
||||||
label: 'Generic Name',
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
list: _genericNameList,
|
children: [
|
||||||
listTitle: 'generic_name',
|
DropDownWidget(
|
||||||
onChanged: _updateGeneric),
|
label: 'Generic Name',
|
||||||
const Gap(8),
|
list: _genericNameList,
|
||||||
TextWidget(text: _categoryController.text),
|
listTitle: 'generic_name',
|
||||||
|
onChanged: _updateGeneric),
|
||||||
|
const Gap(8),
|
||||||
|
TextWidget(text: _selectedCategory, size: 18),
|
||||||
|
],
|
||||||
|
),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
DropDownWidget(label: 'Type', list: _typeList, listTitle: 'type_name', onChanged: _updateType),
|
DropDownWidget(label: 'Type', list: _typeList, listTitle: 'type_name', onChanged: _updateType),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
|
|
@ -129,7 +143,7 @@ class AddMedicinePageState extends State<AddMedicinePage> {
|
||||||
listTitle: 'manufactorer_name',
|
listTitle: 'manufactorer_name',
|
||||||
onChanged: _updateManufactorer),
|
onChanged: _updateManufactorer),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
ButtonWidget(text: 'Save Medicine', onPressed: onPressed)
|
ButtonWidget(text: 'Save Medicine', onPressed: _saveMedicine)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
))
|
))
|
||||||
|
|
|
||||||
125
lib/pages/add_stock.dart
Normal file
125
lib/pages/add_stock.dart
Normal file
|
|
@ -0,0 +1,125 @@
|
||||||
|
import 'dart:developer';
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:gap/gap.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
import 'package:pharmacy_mobile/tables/ref_medicines.dart';
|
||||||
|
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
||||||
|
import 'package:pharmacy_mobile/widgets/datepicker_widget.dart';
|
||||||
|
import 'package:pharmacy_mobile/widgets/dropdown_widget.dart';
|
||||||
|
import 'package:pharmacy_mobile/widgets/input_widget.dart';
|
||||||
|
import 'package:pharmacy_mobile/widgets/text_widget.dart';
|
||||||
|
import 'package:pharmacy_mobile/widgets/title_widget.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
|
class AddStockPage extends StatefulWidget {
|
||||||
|
const AddStockPage({super.key});
|
||||||
|
|
||||||
|
@override
|
||||||
|
_AddStockPageState createState() => _AddStockPageState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _AddStockPageState extends State<AddStockPage> {
|
||||||
|
final _formKey = GlobalKey<FormState>();
|
||||||
|
final FocusNode _focusNode = FocusNode();
|
||||||
|
final _refMedicines = RefMedicines();
|
||||||
|
final _quantityController = TextEditingController();
|
||||||
|
final _dateController = TextEditingController();
|
||||||
|
|
||||||
|
late List _medicineList = [];
|
||||||
|
late String _selectedMedicine = '';
|
||||||
|
late DateTime selectedDate = DateTime.now();
|
||||||
|
|
||||||
|
void autoRun() async {
|
||||||
|
_medicineList = await _refMedicines.getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
void _updateMedicine(dynamic medicine) {
|
||||||
|
_selectedMedicine = medicine;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Future<void> _selectDate(BuildContext context) async {
|
||||||
|
// final DateTime? picked = await showDatePicker(
|
||||||
|
// context: context, initialDate: selectedDate, firstDate: DateTime(2015, 8), lastDate: DateTime(2101));
|
||||||
|
// if (picked != null && picked != selectedDate) {
|
||||||
|
// setState(() {
|
||||||
|
// selectedDate = picked;
|
||||||
|
// final DateFormat formatter = DateFormat('MMMM dd, yyyy');
|
||||||
|
// _dateController.text = formatter.format(selectedDate);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
void saveStock() async {}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
autoRun();
|
||||||
|
super.initState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
_focusNode.dispose();
|
||||||
|
_medicineList = [];
|
||||||
|
_selectedMedicine = '';
|
||||||
|
_quantityController.dispose();
|
||||||
|
_dateController.dispose();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Scaffold(
|
||||||
|
body: Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
height: MediaQuery.of(context).size.height * 8,
|
||||||
|
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 Stock'),
|
||||||
|
const Gap(16),
|
||||||
|
Form(
|
||||||
|
key: _formKey,
|
||||||
|
child: Center(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
DropDownWidget(
|
||||||
|
label: 'Medicine Name',
|
||||||
|
list: _medicineList,
|
||||||
|
listTitle: 'medicine_name',
|
||||||
|
onChanged: _updateMedicine),
|
||||||
|
const Gap(16),
|
||||||
|
InputWidget(label: 'Quantity', controller: _quantityController),
|
||||||
|
const Gap(16),
|
||||||
|
DatePickerWidget(
|
||||||
|
label: 'Date Expiration',
|
||||||
|
controller: _dateController,
|
||||||
|
value: selectedDate,
|
||||||
|
),
|
||||||
|
const Gap(16),
|
||||||
|
ButtonWidget(text: 'Add Stock', onPressed: saveStock)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -63,9 +63,7 @@ class MainPage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
MenuWidget(
|
MenuWidget(
|
||||||
icon: FontAwesomeIcons.squarePlus,
|
icon: FontAwesomeIcons.squarePlus, text: 'Add Stock', onPressed: () => {context.push('/addstock')}),
|
||||||
text: 'Add Stock',
|
|
||||||
),
|
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
MenuWidget(
|
MenuWidget(
|
||||||
icon: FontAwesomeIcons.squarePlus,
|
icon: FontAwesomeIcons.squarePlus,
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,16 @@ class RefGenericNames {
|
||||||
return data.toList();
|
return data.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<String> getCategoryUUID(name) async {
|
||||||
|
final data = await _supabase.from('ref_generic_names').select('ref_categories_uuid').eq('generic_name', name);
|
||||||
|
return data.first['ref_categories_uuid'].toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<String> getUUID(name) async {
|
||||||
|
final data = await _supabase.from('ref_generic_names').select('ref_generic_names_uuid').eq('generic_name', name);
|
||||||
|
return data.first['ref_generic_names_uuid'].toString();
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> postGeneric(String name, String uuid) async {
|
Future<void> postGeneric(String name, String uuid) async {
|
||||||
final genericUUID = Uuid().v4();
|
final genericUUID = Uuid().v4();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,4 +10,12 @@ class RefManufactorers {
|
||||||
.order('manufactorer_name', ascending: true);
|
.order('manufactorer_name', ascending: true);
|
||||||
return data.toList();
|
return data.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<String> getUUID(String name) async {
|
||||||
|
final data =
|
||||||
|
await _supabase.from('ref_manufactorers').select('ref_manufactorers_uuid').eq('manufactorer_name', name);
|
||||||
|
return data.first['ref_manufactorers_uuid'].toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
28
lib/tables/ref_medicines.dart
Normal file
28
lib/tables/ref_medicines.dart
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
import 'package:supabase_flutter/supabase_flutter.dart';
|
||||||
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
|
class RefMedicines {
|
||||||
|
final SupabaseClient _supabase = Supabase.instance.client;
|
||||||
|
|
||||||
|
Future<List> getList() async {
|
||||||
|
final data = await _supabase
|
||||||
|
.from('ref_manufactorers')
|
||||||
|
.select('manufactorer_name')
|
||||||
|
.order('manufactorer_name', ascending: true);
|
||||||
|
return data.toList();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> postMedicine(String name, String muuid, String guuid, String tuuid) async {
|
||||||
|
final uuid = Uuid().v4();
|
||||||
|
|
||||||
|
final medicine = {
|
||||||
|
'ref_medicines_uuid': uuid,
|
||||||
|
'medicine_name': name,
|
||||||
|
'ref_manufactorers_uuid': muuid,
|
||||||
|
'ref_generic_names_uuid': guuid,
|
||||||
|
'ref_types_uuid': tuuid
|
||||||
|
};
|
||||||
|
|
||||||
|
await _supabase.from('ref_medicines').insert(medicine);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -9,6 +9,11 @@ class RefTypes {
|
||||||
return data.toList();
|
return data.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<String> getUUID(String name) async {
|
||||||
|
final data = await _supabase.from('ref_types').select('ref_types_uuid').eq('type_name', name);
|
||||||
|
return data.first['ref_types_uuid'].toString();
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> postType(String name) async {
|
Future<void> postType(String name) async {
|
||||||
final typeUUID = Uuid().v4();
|
final typeUUID = Uuid().v4();
|
||||||
|
|
||||||
|
|
|
||||||
22
lib/tables/stocks.dart
Normal file
22
lib/tables/stocks.dart
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
import 'package:supabase_flutter/supabase_flutter.dart';
|
||||||
|
import 'package:uuid/uuid.dart';
|
||||||
|
|
||||||
|
class Stocks {
|
||||||
|
final SupabaseClient _supabase = Supabase.instance.client;
|
||||||
|
|
||||||
|
// Future<List> getList() async {
|
||||||
|
// final data = await _supabase.from('stocks').select('type_name').order('type_name', ascending: true);
|
||||||
|
// return data.toList();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Future<String> getUUID(String name) async {
|
||||||
|
// final data = await _supabase.from('ref_types').select('ref_types_uuid').eq('type_name', name);
|
||||||
|
// return data.first['ref_types_uuid'].toString();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Future<void> postType(String name) async {
|
||||||
|
// final typeUUID = Uuid().v4();
|
||||||
|
|
||||||
|
// await _supabase.from('ref_types').insert({'ref_types_uuid': typeUUID, 'type_name': name});
|
||||||
|
// }
|
||||||
|
}
|
||||||
66
lib/widgets/datepicker_widget.dart
Normal file
66
lib/widgets/datepicker_widget.dart
Normal file
|
|
@ -0,0 +1,66 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
import 'package:gap/gap.dart';
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
|
class DatePickerWidget extends StatelessWidget {
|
||||||
|
final String label;
|
||||||
|
final TextEditingController controller;
|
||||||
|
// final VoidCallback onPressed;
|
||||||
|
late DateTime value = DateTime.now();
|
||||||
|
|
||||||
|
DatePickerWidget({super.key, required this.label, required this.controller, required this.value});
|
||||||
|
|
||||||
|
Future<void> _selectDate(BuildContext context) async {
|
||||||
|
final DateTime? picked = await showDatePicker(
|
||||||
|
context: context, initialDate: value, firstDate: DateTime(2015, 8), lastDate: DateTime(2101));
|
||||||
|
if (picked != null && picked != value) {
|
||||||
|
value = picked;
|
||||||
|
final DateFormat formatter = DateFormat('MMMM dd, yyyy');
|
||||||
|
controller.text = formatter.format(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text('$label:',
|
||||||
|
style: GoogleFonts.outfit(
|
||||||
|
textStyle: const TextStyle(color: Colors.white, fontSize: 16),
|
||||||
|
)),
|
||||||
|
const Gap(8),
|
||||||
|
TextField(
|
||||||
|
controller: controller,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
border: OutlineInputBorder(borderRadius: BorderRadius.circular(10)),
|
||||||
|
),
|
||||||
|
readOnly: true,
|
||||||
|
style: GoogleFonts.outfit(textStyle: TextStyle(color: Colors.white, fontSize: 16)),
|
||||||
|
),
|
||||||
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.only(top: 8),
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(color: Colors.white, width: 1),
|
||||||
|
borderRadius: BorderRadius.circular(10),
|
||||||
|
),
|
||||||
|
child: TextButton(
|
||||||
|
onPressed: () => {_selectDate(context)},
|
||||||
|
child: Text('Select Date',
|
||||||
|
style: GoogleFonts.outfit(
|
||||||
|
textStyle: const TextStyle(color: Colors.white, fontSize: 16),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
16
pubspec.lock
16
pubspec.lock
|
|
@ -49,6 +49,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.1"
|
||||||
|
bottom_picker:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: bottom_picker
|
||||||
|
sha256: "8ede549685825df389135bebc7984416ed95f24d4f19631d21ad25c9c23db482"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "2.10.1"
|
||||||
characters:
|
characters:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -216,6 +224,14 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.1.2"
|
version: "4.1.2"
|
||||||
|
intl:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: intl
|
||||||
|
sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5"
|
||||||
|
url: "https://pub.dev"
|
||||||
|
source: hosted
|
||||||
|
version: "0.20.2"
|
||||||
jwt_decode:
|
jwt_decode:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@ dependencies:
|
||||||
quickalert: ^1.1.0
|
quickalert: ^1.1.0
|
||||||
font_awesome_flutter: ^10.8.0
|
font_awesome_flutter: ^10.8.0
|
||||||
uuid: ^4.5.1
|
uuid: ^4.5.1
|
||||||
|
bottom_picker: ^2.10.1
|
||||||
|
intl: ^0.20.2
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue