Corrected variables declaration

This commit is contained in:
Patrick Alvin Alcala 2025-09-22 13:17:38 +08:00
parent cf813e22c1
commit 69b28b1e59
11 changed files with 44 additions and 41 deletions

View file

@ -26,7 +26,7 @@ class _AddDistributorPageState extends State<AddDistributorPage> {
final _addressController = TextEditingController();
final _refDistributors = RefDistributors();
late bool _isLoading = false;
bool _isLoading = false;
Future<void> _getDistributorListCache() async {
final distributorList = await _refDistributors.getList();

View file

@ -30,12 +30,12 @@ class _AddGenericsPageState extends State<AddGenericsPage> {
final _nameController = TextEditingController();
final _formKey = GlobalKey<FormState>();
late bool _isLoading = false;
bool _isLoading = false;
// late final List _categoryListCache = [];
late List _categoryList = [];
late String _selectedCategory = '';
late String _categoryUUID = '';
late List _categoryList;
late String _selectedCategory;
late String _categoryUUID;
Future<void> _getGenericListCache() async {
final genericNameList = await _refGenericNames.getList();

View file

@ -26,7 +26,7 @@ class _AddManufacturerPageState extends State<AddManufacturerPage> {
final _addressController = TextEditingController();
final _refManufacturers = RefManufacturers();
late bool _isLoading = false;
bool _isLoading = false;
Future<void> _getManufacturerListCache() async {
final manufacturerList = await _refManufacturers.getList();

View file

@ -55,23 +55,24 @@ class _AddMedicinePageState extends State<AddMedicinePage> {
final _nameController = TextEditingController();
final _barcodeController = TextEditingController();
late bool _isLoading = false;
late List _genericNameList = [];
late String _selectedGeneric = '';
late String _selectedCategory = '';
late List _typeList = [];
late String _selectedType = '';
late List _manufacturerList = [];
late List _distributorList = [];
late List _supplierList = [];
late String _selectedManufacturer = '';
late String _selectedDistributor = '';
late String _selectedSupplier = '';
late String uuid = '';
late bool imageUploaded = false;
late String imageUrl = '';
late bool uploaded = false;
late String imageUUID = '';
bool _isLoading = false;
bool imageUploaded = false;
bool uploaded = false;
late List _genericNameList;
late String _selectedGeneric;
late String _selectedCategory;
late List _typeList;
late String _selectedType;
late List _manufacturerList;
late List _distributorList;
late List _supplierList;
late String _selectedManufacturer;
late String _selectedDistributor;
late String _selectedSupplier;
late String uuid;
late String imageUrl;
late String imageUUID;
Future<void> _getGenerics() async {
_genericNameList = await _refGenericNames.getList();

View file

@ -34,11 +34,12 @@ class _AddStockPageState extends State<AddStockPage> with WidgetsBindingObserver
final _priceController = TextEditingController();
final _stocks = Stocks();
late bool _isLoading = false;
late List _medicineList = [];
late String _selectedMedicine = '';
late DateTime selectedDate = DateTime.now();
late String barcode = '';
late List _medicineList;
late String _selectedMedicine;
late String barcode;
bool _isLoading = false;
DateTime selectedDate = DateTime.now();
final sampleBarcode = '8992185411017';

View file

@ -25,7 +25,7 @@ class _AddSupplierPageState extends State<AddSupplierPage> {
final _nameController = TextEditingController();
final _refSuppliers = RefSuppliers();
late bool _isLoading = false;
bool _isLoading = false;
Future<void> _getSupplierListCache() async {
final supplierList = await _refSuppliers.getList();

View file

@ -29,12 +29,13 @@ class _DeleteStockPageState extends State<DeleteStockPage> {
final _stocks = Stocks();
final _quantityController = TextEditingController();
late List _stockList = [];
late String _selectedStock = '';
late bool _aboveQuantity = false;
late bool _noStock = false;
late double _serverQuantity = 0;
late String _selectedUUID = '';
bool _aboveQuantity = false;
bool _noStock = false;
double _serverQuantity = 0;
late List _stockList;
late String _selectedStock;
late String _selectedUUID;
void _getStocks() async {
_stockList = await _stocks.getList();

View file

@ -18,8 +18,8 @@ class ListStocksPage extends StatefulWidget {
class _ListStocksPageState extends State<ListStocksPage> {
final _stocks = Stocks();
late List _stockList = [];
bool _isLoading = false;
late List _stockList;
List<DataRow> _createRows() {
final today = DateTime.now().toUtc();

View file

@ -26,8 +26,8 @@ class _LoginPageState extends State<LoginPage> {
final _passwordController = TextEditingController();
final FocusNode _focusNode = FocusNode();
late bool _isLoading = false;
late double containerHeight = 0.35;
bool _isLoading = false;
double containerHeight = 0.35;
void _signIn() async {
final email = _emailController.text;

View file

@ -45,7 +45,7 @@ class _MainPageState extends State<MainPage> {
final _refDistributors = RefDistributors();
final _refSuppliers = RefSuppliers();
late bool _isLoading = false;
bool _isLoading = false;
void signOut() async {
try {

View file

@ -25,8 +25,8 @@ class _RegisterPageState extends State<RegisterPage> {
final _confirmPasswordController = TextEditingController();
final FocusNode _focusNode = FocusNode();
late bool _isLoading = false;
late double containerHeight = 0.44;
bool _isLoading = false;
double containerHeight = 0.44;
Future<void> _signUp() async {
final email = _emailController.text;