salkuadrat/slide_drawer

Compilation Error for MenuItem multiple inclusion

Opened this issue · 2 comments

With Flutter 3.x and slide_drawer: ^1.0.3, getting this below compilation issue while building the project.

../../../../Program_Installs/flutter/.pub-cache/hosted/pub.dartlang.org/slide_drawer-1.0.3/lib/src/container.dart:3:1: Error: 'MenuItem' is imported from both 'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:slide_drawer/src/item.dart'.
import 'package:slide_drawer/src/item.dart';
^^^^^^^^
../../../../Program_Installs/flutter/.pub-cache/hosted/pub.dartlang.org/slide_drawer-1.0.3/lib/src/drawer.dart:6:1: Error: 'MenuItem' is imported from both 'package:flutter/src/widgets/platform_menu_bar.dart' and 'package:slide_drawer/src/item.dart'.
import 'package:slide_drawer/src/item.dart';
^^^^^^^^
../../../../Program_Installs/flutter/.pub-cache/hosted/pub.dartlang.org/slide_drawer-1.0.3/lib/src/drawer.dart:196:25: Error: The method 'SlideDrawerContainer' isn't defined for the class '_SlideDrawerState'.

  • '_SlideDrawerState' is from 'package:slide_drawer/src/drawer.dart' ('../../../../Program_Installs/flutter/.pub-cache/hosted/pub.dartlang.org/slide_drawer-1.0.3/lib/src/drawer.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'SlideDrawerContainer'.
    Widget get _drawer => SlideDrawerContainer(
    ^^^^^^^^^^^^^^^^^^^^

FAILURE: Build failed with an exception.

facing this issue too on flutter 3.0.1

Seems the package is no longer maintained.
You can fork it and make the necessary changes.
or maybe use my fork.

slide_drawer:
    git:
      url: https://github.com/ndungudedan/slide_drawer.git