Corrected variables declaration
This commit is contained in:
parent
cf813e22c1
commit
69b28b1e59
11 changed files with 44 additions and 41 deletions
|
|
@ -26,7 +26,7 @@ class _AddDistributorPageState extends State<AddDistributorPage> {
|
||||||
final _addressController = TextEditingController();
|
final _addressController = TextEditingController();
|
||||||
final _refDistributors = RefDistributors();
|
final _refDistributors = RefDistributors();
|
||||||
|
|
||||||
late bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
|
|
||||||
Future<void> _getDistributorListCache() async {
|
Future<void> _getDistributorListCache() async {
|
||||||
final distributorList = await _refDistributors.getList();
|
final distributorList = await _refDistributors.getList();
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,12 @@ class _AddGenericsPageState extends State<AddGenericsPage> {
|
||||||
final _nameController = TextEditingController();
|
final _nameController = TextEditingController();
|
||||||
final _formKey = GlobalKey<FormState>();
|
final _formKey = GlobalKey<FormState>();
|
||||||
|
|
||||||
late bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
// late final List _categoryListCache = [];
|
// late final List _categoryListCache = [];
|
||||||
|
|
||||||
late List _categoryList = [];
|
late List _categoryList;
|
||||||
late String _selectedCategory = '';
|
late String _selectedCategory;
|
||||||
late String _categoryUUID = '';
|
late String _categoryUUID;
|
||||||
|
|
||||||
Future<void> _getGenericListCache() async {
|
Future<void> _getGenericListCache() async {
|
||||||
final genericNameList = await _refGenericNames.getList();
|
final genericNameList = await _refGenericNames.getList();
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ class _AddManufacturerPageState extends State<AddManufacturerPage> {
|
||||||
final _addressController = TextEditingController();
|
final _addressController = TextEditingController();
|
||||||
final _refManufacturers = RefManufacturers();
|
final _refManufacturers = RefManufacturers();
|
||||||
|
|
||||||
late bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
|
|
||||||
Future<void> _getManufacturerListCache() async {
|
Future<void> _getManufacturerListCache() async {
|
||||||
final manufacturerList = await _refManufacturers.getList();
|
final manufacturerList = await _refManufacturers.getList();
|
||||||
|
|
|
||||||
|
|
@ -55,23 +55,24 @@ class _AddMedicinePageState extends State<AddMedicinePage> {
|
||||||
final _nameController = TextEditingController();
|
final _nameController = TextEditingController();
|
||||||
final _barcodeController = TextEditingController();
|
final _barcodeController = TextEditingController();
|
||||||
|
|
||||||
late bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
late List _genericNameList = [];
|
bool imageUploaded = false;
|
||||||
late String _selectedGeneric = '';
|
bool uploaded = false;
|
||||||
late String _selectedCategory = '';
|
|
||||||
late List _typeList = [];
|
late List _genericNameList;
|
||||||
late String _selectedType = '';
|
late String _selectedGeneric;
|
||||||
late List _manufacturerList = [];
|
late String _selectedCategory;
|
||||||
late List _distributorList = [];
|
late List _typeList;
|
||||||
late List _supplierList = [];
|
late String _selectedType;
|
||||||
late String _selectedManufacturer = '';
|
late List _manufacturerList;
|
||||||
late String _selectedDistributor = '';
|
late List _distributorList;
|
||||||
late String _selectedSupplier = '';
|
late List _supplierList;
|
||||||
late String uuid = '';
|
late String _selectedManufacturer;
|
||||||
late bool imageUploaded = false;
|
late String _selectedDistributor;
|
||||||
late String imageUrl = '';
|
late String _selectedSupplier;
|
||||||
late bool uploaded = false;
|
late String uuid;
|
||||||
late String imageUUID = '';
|
late String imageUrl;
|
||||||
|
late String imageUUID;
|
||||||
|
|
||||||
Future<void> _getGenerics() async {
|
Future<void> _getGenerics() async {
|
||||||
_genericNameList = await _refGenericNames.getList();
|
_genericNameList = await _refGenericNames.getList();
|
||||||
|
|
|
||||||
|
|
@ -34,11 +34,12 @@ class _AddStockPageState extends State<AddStockPage> with WidgetsBindingObserver
|
||||||
final _priceController = TextEditingController();
|
final _priceController = TextEditingController();
|
||||||
final _stocks = Stocks();
|
final _stocks = Stocks();
|
||||||
|
|
||||||
late bool _isLoading = false;
|
late List _medicineList;
|
||||||
late List _medicineList = [];
|
late String _selectedMedicine;
|
||||||
late String _selectedMedicine = '';
|
late String barcode;
|
||||||
late DateTime selectedDate = DateTime.now();
|
|
||||||
late String barcode = '';
|
bool _isLoading = false;
|
||||||
|
DateTime selectedDate = DateTime.now();
|
||||||
|
|
||||||
final sampleBarcode = '8992185411017';
|
final sampleBarcode = '8992185411017';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class _AddSupplierPageState extends State<AddSupplierPage> {
|
||||||
final _nameController = TextEditingController();
|
final _nameController = TextEditingController();
|
||||||
final _refSuppliers = RefSuppliers();
|
final _refSuppliers = RefSuppliers();
|
||||||
|
|
||||||
late bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
|
|
||||||
Future<void> _getSupplierListCache() async {
|
Future<void> _getSupplierListCache() async {
|
||||||
final supplierList = await _refSuppliers.getList();
|
final supplierList = await _refSuppliers.getList();
|
||||||
|
|
|
||||||
|
|
@ -29,12 +29,13 @@ class _DeleteStockPageState extends State<DeleteStockPage> {
|
||||||
final _stocks = Stocks();
|
final _stocks = Stocks();
|
||||||
final _quantityController = TextEditingController();
|
final _quantityController = TextEditingController();
|
||||||
|
|
||||||
late List _stockList = [];
|
bool _aboveQuantity = false;
|
||||||
late String _selectedStock = '';
|
bool _noStock = false;
|
||||||
late bool _aboveQuantity = false;
|
double _serverQuantity = 0;
|
||||||
late bool _noStock = false;
|
|
||||||
late double _serverQuantity = 0;
|
late List _stockList;
|
||||||
late String _selectedUUID = '';
|
late String _selectedStock;
|
||||||
|
late String _selectedUUID;
|
||||||
|
|
||||||
void _getStocks() async {
|
void _getStocks() async {
|
||||||
_stockList = await _stocks.getList();
|
_stockList = await _stocks.getList();
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,8 @@ class ListStocksPage extends StatefulWidget {
|
||||||
class _ListStocksPageState extends State<ListStocksPage> {
|
class _ListStocksPageState extends State<ListStocksPage> {
|
||||||
final _stocks = Stocks();
|
final _stocks = Stocks();
|
||||||
|
|
||||||
late List _stockList = [];
|
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
|
late List _stockList;
|
||||||
|
|
||||||
List<DataRow> _createRows() {
|
List<DataRow> _createRows() {
|
||||||
final today = DateTime.now().toUtc();
|
final today = DateTime.now().toUtc();
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,8 @@ class _LoginPageState extends State<LoginPage> {
|
||||||
final _passwordController = TextEditingController();
|
final _passwordController = TextEditingController();
|
||||||
final FocusNode _focusNode = FocusNode();
|
final FocusNode _focusNode = FocusNode();
|
||||||
|
|
||||||
late bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
late double containerHeight = 0.35;
|
double containerHeight = 0.35;
|
||||||
|
|
||||||
void _signIn() async {
|
void _signIn() async {
|
||||||
final email = _emailController.text;
|
final email = _emailController.text;
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ class _MainPageState extends State<MainPage> {
|
||||||
final _refDistributors = RefDistributors();
|
final _refDistributors = RefDistributors();
|
||||||
final _refSuppliers = RefSuppliers();
|
final _refSuppliers = RefSuppliers();
|
||||||
|
|
||||||
late bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
|
|
||||||
void signOut() async {
|
void signOut() async {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@ class _RegisterPageState extends State<RegisterPage> {
|
||||||
final _confirmPasswordController = TextEditingController();
|
final _confirmPasswordController = TextEditingController();
|
||||||
final FocusNode _focusNode = FocusNode();
|
final FocusNode _focusNode = FocusNode();
|
||||||
|
|
||||||
late bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
late double containerHeight = 0.44;
|
double containerHeight = 0.44;
|
||||||
|
|
||||||
Future<void> _signUp() async {
|
Future<void> _signUp() async {
|
||||||
final email = _emailController.text;
|
final email = _emailController.text;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue