update
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2 KiB |
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 976 B After Width: | Height: | Size: 720 B |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 4 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 9.4 KiB After Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 7.8 KiB |
|
|
@ -11,7 +11,6 @@ import 'package:pharmacy_mobile/tables/storage.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/dropdown_wrappermulti_widget.dart';
|
import 'package:pharmacy_mobile/widgets/dropdown_wrappermulti_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/form_border_widget.dart';
|
|
||||||
import 'package:pharmacy_mobile/widgets/form_border_widget2.dart';
|
import 'package:pharmacy_mobile/widgets/form_border_widget2.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/input_widget.dart';
|
import 'package:pharmacy_mobile/widgets/input_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import 'package:pharmacy_mobile/tables/stocks.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
import 'package:pharmacy_mobile/widgets/button_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/datepicker_widget.dart';
|
import 'package:pharmacy_mobile/widgets/datepicker_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/dropdown_widget.dart';
|
import 'package:pharmacy_mobile/widgets/dropdown_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/form_border_widget.dart';
|
|
||||||
import 'package:pharmacy_mobile/widgets/form_border_widget2.dart';
|
import 'package:pharmacy_mobile/widgets/form_border_widget2.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/input_widget.dart';
|
import 'package:pharmacy_mobile/widgets/input_widget.dart';
|
||||||
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
import 'package:pharmacy_mobile/widgets/page_background_widget.dart';
|
||||||
|
|
@ -27,6 +26,8 @@ class _AddStockPageState extends State<AddStockPage> {
|
||||||
final _dateController = TextEditingController();
|
final _dateController = TextEditingController();
|
||||||
final _stocks = Stocks();
|
final _stocks = Stocks();
|
||||||
|
|
||||||
|
final bool _isLoading = false;
|
||||||
|
|
||||||
late List _medicineList = [];
|
late List _medicineList = [];
|
||||||
late String _selectedMedicine = '';
|
late String _selectedMedicine = '';
|
||||||
late DateTime selectedDate = DateTime.now();
|
late DateTime selectedDate = DateTime.now();
|
||||||
|
|
@ -99,7 +100,7 @@ class _AddStockPageState extends State<AddStockPage> {
|
||||||
controller: _dateController,
|
controller: _dateController,
|
||||||
value: selectedDate,
|
value: selectedDate,
|
||||||
),
|
),
|
||||||
const Gap(16),
|
const Gap(32),
|
||||||
ButtonWidget(text: 'Add Stock', onPressed: _saveStock)
|
ButtonWidget(text: 'Add Stock', onPressed: _saveStock)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -3,21 +3,27 @@ import 'package:google_fonts/google_fonts.dart';
|
||||||
import 'package:gap/gap.dart';
|
import 'package:gap/gap.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
class DatePickerWidget extends StatelessWidget {
|
class DatePickerWidget extends StatefulWidget {
|
||||||
final String label;
|
final String label;
|
||||||
final TextEditingController controller;
|
final TextEditingController controller;
|
||||||
// final VoidCallback onPressed;
|
DateTime value;
|
||||||
late DateTime value = DateTime.now();
|
|
||||||
|
|
||||||
DatePickerWidget({super.key, required this.label, required this.controller, required this.value});
|
DatePickerWidget({super.key, required this.label, required this.controller, required this.value});
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<DatePickerWidget> createState() => _DatePickerWidgetState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _DatePickerWidgetState extends State<DatePickerWidget> {
|
||||||
Future<void> _selectDate(BuildContext context) async {
|
Future<void> _selectDate(BuildContext context) async {
|
||||||
final DateTime? picked = await showDatePicker(
|
final DateTime? picked = await showDatePicker(
|
||||||
context: context, initialDate: value, firstDate: DateTime(2015, 8), lastDate: DateTime(2101));
|
context: context, initialDate: widget.value, firstDate: DateTime(2015, 8), lastDate: DateTime(2101));
|
||||||
if (picked != null && picked != value) {
|
if (picked != null && picked != widget.value) {
|
||||||
value = picked;
|
setState(() {
|
||||||
final DateFormat formatter = DateFormat('MMMM dd, yyyy');
|
widget.value = picked;
|
||||||
controller.text = formatter.format(value);
|
final DateFormat formatter = DateFormat('MMMM dd, yyyy');
|
||||||
|
widget.controller.text = formatter.format(widget.value);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -26,39 +32,26 @@ class DatePickerWidget extends StatelessWidget {
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text('$label:',
|
Text('${widget.label}:',
|
||||||
style: GoogleFonts.outfit(
|
style: GoogleFonts.outfit(
|
||||||
textStyle: const TextStyle(color: Colors.white, fontSize: 16),
|
textStyle: const TextStyle(color: Colors.white, fontSize: 12),
|
||||||
)),
|
)),
|
||||||
const Gap(8),
|
const Gap(8),
|
||||||
TextField(
|
GestureDetector(
|
||||||
controller: controller,
|
onTap: () => {_selectDate(context)},
|
||||||
decoration: InputDecoration(
|
child: Container(
|
||||||
border: OutlineInputBorder(borderRadius: BorderRadius.circular(10)),
|
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 16),
|
||||||
),
|
decoration: BoxDecoration(
|
||||||
readOnly: true,
|
// border: OutlineInputBorder(borderRadius: BorderRadius.circular(8)),
|
||||||
style: GoogleFonts.outfit(textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: 16)),
|
border: Border.all(color: Colors.white),
|
||||||
),
|
borderRadius: BorderRadius.circular(8),
|
||||||
Row(
|
color: Colors.transparent,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.only(top: 8),
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border.all(color: const Color.fromRGBO(255, 255, 255, 1), 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: 14, height: 2),
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
alignment: Alignment.centerLeft,
|
||||||
|
child: Text(widget.controller.text.isNotEmpty ? widget.controller.text : 'Select Date',
|
||||||
|
style: GoogleFonts.outfit(
|
||||||
|
textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: 16))),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -25,13 +25,13 @@ class DropDownWidget extends StatelessWidget {
|
||||||
Text(
|
Text(
|
||||||
'$label:',
|
'$label:',
|
||||||
style: GoogleFonts.outfit(
|
style: GoogleFonts.outfit(
|
||||||
textStyle: const TextStyle(color: Colors.white, fontSize: 16),
|
textStyle: const TextStyle(color: Colors.white, fontSize: 12),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Gap(8),
|
const Gap(8),
|
||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(12), // Set the desired border radius
|
borderRadius: BorderRadius.circular(8), // Set the desired border radius
|
||||||
border: Border.all(color: const Color.fromRGBO(255, 255, 255, 1)), // Set the border color
|
border: Border.all(color: const Color.fromRGBO(255, 255, 255, 1)), // Set the border color
|
||||||
),
|
),
|
||||||
child: DropdownMenu(
|
child: DropdownMenu(
|
||||||
|
|
@ -42,19 +42,20 @@ class DropDownWidget extends StatelessWidget {
|
||||||
label: item[listTitle].toString(),
|
label: item[listTitle].toString(),
|
||||||
value: item[listTitle],
|
value: item[listTitle],
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
foregroundColor: WidgetStateProperty.all<Color>(const Color.fromRGBO(255, 255, 255, 1)),
|
foregroundColor: WidgetStateProperty.all<Color>(const Color.fromRGBO(230, 230, 230, 1)),
|
||||||
textStyle: WidgetStateProperty.all<TextStyle>(
|
textStyle: WidgetStateProperty.all<TextStyle>(
|
||||||
GoogleFonts.outfit(fontSize: 16, fontWeight: FontWeight.w500)))),
|
GoogleFonts.inter(fontSize: 16, fontWeight: FontWeight.w500)))),
|
||||||
],
|
],
|
||||||
onSelected: onChanged,
|
onSelected: onChanged,
|
||||||
width: MediaQuery.of(context).size.width * 0.8,
|
width: MediaQuery.of(context).size.width * 0.9,
|
||||||
menuHeight: MediaQuery.of(context).size.height * 0.8,
|
menuHeight: MediaQuery.of(context).size.height * 0.8,
|
||||||
textStyle: GoogleFonts.outfit(textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1))),
|
textStyle:
|
||||||
|
GoogleFonts.outfit(textStyle: const TextStyle(color: Color.fromRGBO(255, 255, 255, 1), fontSize: 16)),
|
||||||
menuStyle: MenuStyle(
|
menuStyle: MenuStyle(
|
||||||
backgroundColor: WidgetStateProperty.all<Color>(const Color.fromRGBO(23, 37, 62, 0.8)),
|
backgroundColor: WidgetStateProperty.all<Color>(const Color.fromRGBO(13, 21, 42, 0.663)),
|
||||||
padding: WidgetStateProperty.all(const EdgeInsets.symmetric(vertical: 16)),
|
padding: WidgetStateProperty.all(const EdgeInsets.symmetric(vertical: 16, horizontal: 8)),
|
||||||
shape: WidgetStateProperty.all(RoundedRectangleBorder(
|
shape: WidgetStateProperty.all(RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(20), // Set the border radius for the dropdown menu
|
borderRadius: BorderRadius.circular(8), // Set the border radius for the dropdown menu
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -1,68 +1,68 @@
|
||||||
{
|
{
|
||||||
"images" : [
|
"info": {
|
||||||
{
|
"version": 1,
|
||||||
"size" : "16x16",
|
"author": "xcode"
|
||||||
"idiom" : "mac",
|
|
||||||
"filename" : "app_icon_16.png",
|
|
||||||
"scale" : "1x"
|
|
||||||
},
|
},
|
||||||
{
|
"images": [
|
||||||
"size" : "16x16",
|
{
|
||||||
"idiom" : "mac",
|
"size": "16x16",
|
||||||
"filename" : "app_icon_32.png",
|
"idiom": "mac",
|
||||||
"scale" : "2x"
|
"filename": "app_icon_16.png",
|
||||||
},
|
"scale": "1x"
|
||||||
{
|
},
|
||||||
"size" : "32x32",
|
{
|
||||||
"idiom" : "mac",
|
"size": "16x16",
|
||||||
"filename" : "app_icon_32.png",
|
"idiom": "mac",
|
||||||
"scale" : "1x"
|
"filename": "app_icon_32.png",
|
||||||
},
|
"scale": "2x"
|
||||||
{
|
},
|
||||||
"size" : "32x32",
|
{
|
||||||
"idiom" : "mac",
|
"size": "32x32",
|
||||||
"filename" : "app_icon_64.png",
|
"idiom": "mac",
|
||||||
"scale" : "2x"
|
"filename": "app_icon_32.png",
|
||||||
},
|
"scale": "1x"
|
||||||
{
|
},
|
||||||
"size" : "128x128",
|
{
|
||||||
"idiom" : "mac",
|
"size": "32x32",
|
||||||
"filename" : "app_icon_128.png",
|
"idiom": "mac",
|
||||||
"scale" : "1x"
|
"filename": "app_icon_64.png",
|
||||||
},
|
"scale": "2x"
|
||||||
{
|
},
|
||||||
"size" : "128x128",
|
{
|
||||||
"idiom" : "mac",
|
"size": "128x128",
|
||||||
"filename" : "app_icon_256.png",
|
"idiom": "mac",
|
||||||
"scale" : "2x"
|
"filename": "app_icon_128.png",
|
||||||
},
|
"scale": "1x"
|
||||||
{
|
},
|
||||||
"size" : "256x256",
|
{
|
||||||
"idiom" : "mac",
|
"size": "128x128",
|
||||||
"filename" : "app_icon_256.png",
|
"idiom": "mac",
|
||||||
"scale" : "1x"
|
"filename": "app_icon_256.png",
|
||||||
},
|
"scale": "2x"
|
||||||
{
|
},
|
||||||
"size" : "256x256",
|
{
|
||||||
"idiom" : "mac",
|
"size": "256x256",
|
||||||
"filename" : "app_icon_512.png",
|
"idiom": "mac",
|
||||||
"scale" : "2x"
|
"filename": "app_icon_256.png",
|
||||||
},
|
"scale": "1x"
|
||||||
{
|
},
|
||||||
"size" : "512x512",
|
{
|
||||||
"idiom" : "mac",
|
"size": "256x256",
|
||||||
"filename" : "app_icon_512.png",
|
"idiom": "mac",
|
||||||
"scale" : "1x"
|
"filename": "app_icon_512.png",
|
||||||
},
|
"scale": "2x"
|
||||||
{
|
},
|
||||||
"size" : "512x512",
|
{
|
||||||
"idiom" : "mac",
|
"size": "512x512",
|
||||||
"filename" : "app_icon_1024.png",
|
"idiom": "mac",
|
||||||
"scale" : "2x"
|
"filename": "app_icon_512.png",
|
||||||
}
|
"scale": "1x"
|
||||||
],
|
},
|
||||||
"info" : {
|
{
|
||||||
"version" : 1,
|
"size": "512x512",
|
||||||
"author" : "xcode"
|
"idiom": "mac",
|
||||||
}
|
"filename": "app_icon_1024.png",
|
||||||
}
|
"scale": "2x"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 520 B After Width: | Height: | Size: 547 B |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.8 KiB |
BIN
web/favicon.png
Normal file
|
After Width: | Height: | Size: 547 B |
BIN
web/icons/Icon-192.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
web/icons/Icon-512.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
web/icons/Icon-maskable-192.png
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
web/icons/Icon-maskable-512.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
0
web/manifest.json
Normal file
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 2 KiB |