onPressed ElevatedButton call automatically in Flutter
setState() or markNeedsBuild() called during build Initially I want to know why onPress call automatically while rendering. After getting above issue I tried solving it in a number of ways like WidgetsBinding.instance.addPostFrameCallback and Future.delayed . Code class ShadowBtn { static…