victorevox / simple_tooltp

MIT License
30 stars 47 forks source link

Severe performance issue: content widget is being rebuit infinitely #17

Closed alectogeek closed 4 years ago

alectogeek commented 4 years ago
изображение

My widget code:

GestureDetector(
      onTap: () {
        setState(() {
          showToolTip = !showToolTip;
        });
      },

      child: SimpleTooltip(
        show: showToolTip,
        backgroundColor: const Color(0xFFFFFACF),
        customShadows: const <BoxShadow>[],

        tooltipTap: () {
          print("Tooltip tap");
        },

        animationDuration: Duration(milliseconds: 300),
        tooltipDirection: TooltipDirection.down,
        content: Text(
          "Hello world",
          style: TextStyle(
            color: Colors.black,
            height: 1,
            fontSize: 18,
            fontFamily: 'SFProDisplay',
          ),
        ),
        minHeight: 0,
        minWidth: 0,
        borderWidth: 0,
        ballonPadding: EdgeInsets.symmetric(vertical: 4, horizontal: 15),
        borderRadius: 20,
        arrowBaseWidth: 22,
        arrowLength: 15,
        child: Container(height: 100, width:  100, color: Colors.black,),
      ),
    )

Flutter doctor:

[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.6 19G2021, locale en-RU)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.7)
[✓] Android Studio (version 4.0)
[✓] Connected device (1 available)

• No issues found!
victorevox commented 4 years ago

Thanks for reporting, will be fixed in next release