Error Setting Up Bagisto Mobile Flutter App: CarouselController Conflict and Missing Implementations
-
Hi Team,
I’m trying to set up the Bagisto Mobile Open Source Flutter app, but I’m encountering several errors when running flutter run. I’ve tried resolving the issues but haven’t had success yet. Below are the error details:
- CarouselController Conflict:
lib/screens/product_screen/utils/index.dart:48:1: Error: 'CarouselController' is exported from both 'package:carousel_slider/carousel_controller.dart' and 'package:flutter/src/material/carousel.dart'. export 'package:carousel_slider/carousel_slider.dart'; ^
- HtmlFlex Missing Implementation:
../../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_widget_from_html_core-0.14.12/lib/src/widgets/html_flex.dart:69:7: Error: The non-abstract class 'HtmlFlex' is missing implementations for these members: - Flex.spacing
- HtmlFlexRenderObject Missing Implementation:
../../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_widget_from_html_core-0.14.12/lib/src/widgets/html_flex.dart:182:7: Error: The non-abstract class '_HtmlFlexRenderObject' is missing implementations for these members: - RenderFlex.spacing - RenderFlex.spacing=
- Build Failure:
Target kernel_snapshot_program failed: Exception FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'. > Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1
Any help or guidance would be greatly appreciated! Thank you in advance.
-
Hello @arunchahar
Please let us know the flutter and dart version that you are currently using on your system.
Also do share the output of flutter doctor command with us so that we can have a precise look at the issue and help you solve the same.
For this project you need to use following versions for flutter and dart :-
1) Flutter Version - 3.19.2
2) Dart - 3.3.0
3) Android Studio Version - Flamingo | 2022.2.1
4) Java version 17
5) gradle: 7.1.3Please try once the mentioned versions and then try building the project, Let us know if you still any issues.
Thanks & Regards
-
@Rishabh-Webkul Hi Rishabh, i have applied above version, now getting this error:
You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply ../../../../AppData/Local/Pub/Cache/hosted/pub.dev/chewie-1.8.7/lib/src/material/material_controls.dart:473:35: Error: The method 'withValues' isn't defined for the class 'Color'. - 'Color' is from 'dart:ui'. Try correcting the name to the name of an existing method, or defining a method named 'withValues'. color: Colors.white.withValues(alpha: .75), ^^^^^^^^^^ ../../../../AppData/Local/Pub/Cache/hosted/pub.dev/chewie-1.8.7/lib/src/material/material_controls.dart:685:57: Error: The method 'withValues' isn't defined for the class 'Color'. - 'Color' is from 'dart:ui'. Try correcting the name to the name of an existing method, or defining a method named 'withValues'. Theme.of(context).colorScheme.surface.withValues(alpha: 0.5), ^^^^^^^^^^ ../../../../AppData/Local/Pub/Cache/hosted/pub.dev/chewie-1.8.7/lib/src/material/material_controls.dart:687:51: Error: The method 'withValues' isn't defined for the class 'Color'. - 'Color' is from 'dart:ui'. Try correcting the name to the name of an existing method, or defining a method named 'withValues'. Theme.of(context).disabledColor.withValues(alpha: .5), ^^^^^^^^^^ ../../../../AppData/Local/Pub/Cache/hosted/pub.dev/chewie-1.8.7/lib/src/material/material_desktop_controls.dart:651:57: Error: The method 'withValues' isn't defined for the class 'Color'. - 'Color' is from 'dart:ui'. Try correcting the name to the name of an existing method, or defining a method named 'withValues'. Theme.of(context).colorScheme.surface.withValues(alpha: 0.5), ^^^^^^^^^^ ../../../../AppData/Local/Pub/Cache/hosted/pub.dev/chewie-1.8.7/lib/src/material/material_desktop_controls.dart:653:51: Error: The method 'withValues' isn't defined for the class 'Color'. - 'Color' is from 'dart:ui'. Try correcting the name to the name of an existing method, or defining a method named 'withValues'. Theme.of(context).disabledColor.withValues(alpha: 0.5), ^^^^^^^^^^ Target kernel_snapshot failed: Exception FAILURE: Build failed with an exception. * Where: Script 'C:\flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy' line: 1419 * What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'. > Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1 * Try: Running Gradle task 'assembleDebug'... 72.9s Error: Gradle task assembleDebug failed with exit code 1