Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Error Setting Up Bagisto Mobile Flutter App: CarouselController Conflict and Missing Implementations

    General Discussion
    2
    4
    485
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      arunchahar last edited by

      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:

      1. 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';
      ^
      
      1. 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
      
      1. 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=
      
      
      1. 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.

      1 Reply Last reply Reply Quote 0
      • Rishabh-Webkul
        Rishabh-Webkul last edited by

        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.3

        Please try once the mentioned versions and then try building the project, Let us know if you still any issues.

        Thanks & Regards

        A 1 Reply Last reply Reply Quote 0
        • A
          arunchahar @Rishabh-Webkul last edited by

          @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
          
          
          1 Reply Last reply Reply Quote 0
          • Rishabh-Webkul
            Rishabh-Webkul last edited by

            Hello @arunchahar

            Kindly check the steps below; all the steps are written step by step, which will help resolve your query.


            • Flutter Version - 3.19.2
            • Dart - 3.3.0
            • Xcode - 15.2
            • Swift - 5
            • Java version 17 OpenJDK Runtime Environment Temurin-17.0.13+11 (build 17.0.13+11)

            Use “flutter doctor --verbose” command to verify the above mention versions.

            Step 2 :-

            Navigate to android/build.gradle and verify the Gradle and kotlin version :-

            classpath "com.android.tools.build:gradle:7.1.3"

            ext.kotlin_version = '1.9.0'

            Step 3 :-

            Navigate to android/gradle/gradle-wrapper.properties and verify the version of Gradle distribution URL :-

            distributionUrl=https://services.gradle.org/distributions/gradle-7.5-all.zip

            Step 4 :-

            Navigate to pubspec.yaml file and add the dependency override as :-

            dependency_overrides:
            intl: ^0.18.0
            flutter_local_notifications_linux: null
            open_file_macos: null

            Add chewie dependency as this dependency downloaded by third party library indirectly in the project which fix the issue as :

            chewie: 1.8.1

            Step 5 :-

            Navigate to the project's directory and run the following command :-

            flutter pub get

            flutter pub run build_runner build --delete-conflicting-outputs

            flutter run


            Thanks & Regards

            1 Reply Last reply Reply Quote 0
            • First post
              Last post