getWidget method

Widget getWidget(
  1. TestBloc testBloc
)

Implementation

Widget getWidget(TestBloc testBloc) {
  return BlocBuilder(
      bloc: testBloc,
      builder: () {
        return Stack(
          children: [
            if (testBloc.state) DebugHelperWidget(testBloc),
            if (!testBloc.state)
              Positioned(
                  left: position.dx,
                  top: position.dy,
                  child: Draggable(
                      feedback: getButton(),
                      childWhenDragging: Container(),
                      onDragEnd: (details) {
                        setState(() {
                          position = details.offset;
                        });
                      },
                      child: getButton())),
          ],
        );
      });
}