Skip to content

Commit

Permalink
refactor: 4415 - removed useless code (#4418)
Browse files Browse the repository at this point in the history
Deleted file:
* `product_questions_card.dart`

Impacted files:
* `new_product_page.dart`: removed useless parameter and method
* `product_image_carousel.dart`: removed useless field
  • Loading branch information
monsieurtanuki authored Aug 3, 2023
1 parent 7f3bddf commit de1fdb3
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@ class ProductImageCarousel extends StatelessWidget {
this.product, {
required this.height,
this.controller,
this.onUpload,
});

final Product product;
final double height;
final ScrollController? controller;
final Function(BuildContext)? onUpload;

@override
Widget build(BuildContext context) {
Expand Down
14 changes: 0 additions & 14 deletions packages/smooth_app/lib/pages/product/new_product_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,6 @@ class _ProductPageState extends State<ProductPage>
);
}

Future<void> _refreshProduct(BuildContext context) async {
final bool success = await ProductRefresher().fetchAndRefresh(
barcode: barcode,
widget: this,
);
if (context.mounted) {
if (success) {
// Reset the carousel to the beginning
_carouselController.jumpTo(0.0);
}
}
}

Future<void> _updateLocalDatabaseWithProductHistory(
final BuildContext context,
) async {
Expand Down Expand Up @@ -209,7 +196,6 @@ class _ProductPageState extends State<ProductPage>
upToDateProduct,
height: 200,
controller: _carouselController,
onUpload: _refreshProduct,
),
),
Padding(
Expand Down
81 changes: 0 additions & 81 deletions packages/smooth_app/lib/pages/product/product_question_card.dart

This file was deleted.

0 comments on commit de1fdb3

Please sign in to comment.