hasan-hm1 / circular_menu

A simple animated circular menu for Flutter, Adjustable radius, colors, alignment, animation curve and animation duration.
MIT License
99 stars 52 forks source link

ontab fungerar inte #22

Closed LEESEONGKWON closed 1 month ago

LEESEONGKWON commented 2 years ago

class _CircleButtonState extends State { _CircleButtonState();

void setstateham() { setState(() {

});

} @override Widget build(BuildContext context) { final double tophe = MediaQuery.of(context).padding.top; final pro = Provider.of(context); US(context);

GlobalKey<CircularMenuState> key = GlobalKey<CircularMenuState>();
return Scaffold(
  backgroundColor: pro.mainColor,
  body: CircularMenu(
    toggleButtonSize: 25.0,
    toggleButtonColor: pro.backColor_jinblue,
    toggleButtonIconColor: Colors.white,
    startingAngleInRadian: 0.45 * 3.14,
    endingAngleInRadian: 0.95 *  3.14,
    toggleButtonOnPressed: (){},
    key: key,
    items: [
      CircularMenuItem(
        icon: Icons.settings,
        onTap: () {
          pro.changeMainColor();
          print('click1');
          setstateham();
        },
        color: pro.backColor_jinblue,
        iconColor: Colors.white,
      ),
      CircularMenuItem(
        icon: Icons.info_outline_rounded,
        onTap: () {
          pro.changeMainColor();
          print('click2');
          setstateham();
        },
        color: pro.backColor_jinblue,
        iconColor: Colors.white,
      ),
      CircularMenuItem(
        icon: Icons.invert_colors,
        onTap: () {
          pro.changeMainColor();
          print('click3');
          setstateham();
        },

        color: pro.backColor_jinblue,
        iconColor: Colors.white,
      ),

    ],
  ),
);

} }

Oavsett hur mycket ontab trycks ner händer ingenting. toggleButtonOnPressed: (){}, fungerar bra Animeringen av CircularMenuItem som utvecklas fungerar också. Men när jag lägger in någon funktion eller åtgärd i onTap händer ingenting. Det finns inget fel och det finns ingen logg som visar att beröringen har gått förlorad. Endast ViewPostIme-pekare 1 och ViewPostIme-pekare 0 som indikerar att någon del av skärmen berördes upprepas.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] commented 1 month ago

This issue has been automatically closed because it has not had any recent activity.