Skip to content

Commit

Permalink
remove unncessary variable
Browse files Browse the repository at this point in the history
  • Loading branch information
AshAman999 committed Nov 4, 2022
1 parent d95d5c5 commit 6afc759
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ class _AddNewProductPageState extends State<AddNewProductPage> {

bool _nutritionFactsAdded = false;
bool _basicDetailsAdded = false;
bool _isProductLoaded = false;

@override
void initState() {
Expand Down Expand Up @@ -74,7 +73,7 @@ class _AddNewProductPageState extends State<AddNewProductPage> {
return SmoothScaffold(
appBar: AppBar(
title: Text(appLocalizations.new_product),
automaticallyImplyLeading: !_isProductLoaded),
automaticallyImplyLeading: _uploadedImages.isEmpty),
floatingActionButton: FloatingActionButton.extended(
onPressed: () async {
if (_basicDetailsAdded ||
Expand Down Expand Up @@ -192,9 +191,6 @@ class _AddNewProductPageState extends State<AddNewProductPage> {
if (finalPhoto != null) {
_uploadedImages[imageType] = _uploadedImages[imageType] ?? <File>[];
_uploadedImages[imageType]!.add(initialPhoto);
setState(() {
_isProductLoaded = true;
});
}
},
),
Expand Down

0 comments on commit 6afc759

Please sign in to comment.