Skip to content

Conflict between CarouselController from carousel_slider and Flutter's CarouselView #464

@Kaif-Shariff

Description

@Kaif-Shariff

Issue

After updating to the latest Flutter version, I encountered a conflict due to the introduction of a new widget called CarouselView in the Flutter framework. This widget uses a CarouselController, which has the same name as the controller in the carousel_slider package. This naming conflict leads to the following error:

../../AppData/Local/Pub/Cache/hosted/pub.dev/carousel_slider-4.2.1/lib/carousel_slider.dart:9:1: Error: 'CarouselController' is imported from both 'package:carousel_slider/carousel_controller.dart' and 'package:flutter/src/material/carousel.dart'.
import 'carousel_controller.dart';

Solution

To resolve this issue, renaming the CarouselController class in the carousel_slider package would prevent the naming conflict with Flutter's new CarouselView widget. This change would ensure compatibility with the latest Flutter updates.

Thank you for your attention to this matter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions