hacktons / convex_bottom_bar

A Flutter package which implements a ConvexAppBar to show a convex tab in the bottom bar. Theming supported.
https://bar.hacktons.cn
Apache License 2.0
801 stars 150 forks source link

Error building after adding import #190

Closed ken-salterdiazsolutions closed 1 year ago

ken-salterdiazsolutions commented 1 year ago

Describe the bug

After adding the import, I can no longer compile. I get the following error:

: Error: Member not found: 'DefaultTabController.maybeOf'.
../…/src/bar.dart:478
    return widget.controller ?? DefaultTabController.maybeOf(context);

FAILURE: Build failed with an exception.

* Where:
Script '...\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1159

If I remove the import, I can compile. I have added no other code.

Environment details

Paste the flutter environment detail.

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.3.10, on Microsoft Windows [Version 10.0.22623.1028], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.4.0)
[√] Android Studio (version 2021.3)
[√] VS Code (version 1.74.3)
[√] Connected device (4 available)
[√] HTTP Host Availability

• No issues found!

flutter --version
Flutter 3.3.10 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 135454af32 (7 weeks ago) • 2022-12-15 07:36:55 -0800
Engine • revision 3316dd8728
Tools • Dart 2.18.6 • DevTools 2.15.0

Paste the package version.

dependencies:
  convex_bottom_bar: ^3.2.0
LeoProgrammerUCAB commented 1 year ago

Hi, I'm having the exact same issue

avenwu commented 1 year ago

v3.2.0 is shipped to compact with flutter 3.7.0. You may upgrade the flutter version or use v3.1.0+1

ken-salterdiazsolutions commented 1 year ago

I tried using v3.1.0+1 but didn't work. Will try upgrading flutter next.

ken-salterdiazsolutions commented 1 year ago

Upgrading flutter to 3.7.0 resolved the issue with v3.2.0. @avenwu Thanks!