bitLoadingView function

Widget bitLoadingView(
  1. BitControl bit
)

Implementation

Widget bitLoadingView(BitControl bit) {
  return _IfTheme(
      orElse: Center(child: const CircularProgressIndicator.adaptive()),
      builder: () => Padding(
          padding: const EdgeInsets.all(10),
          child: Column(
              crossAxisAlignment: CrossAxisAlignment.center,
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                const Spinner(),
                if (bit is MsgBitControl)
                  Padded.only(
                      top: 1,
                      child: Box(
                        constraints: const RemConstraints(maxWidth: 20),
                        color: Colors.transparent,
                        border: Border.noneRect,
                        child: Text(
                            bit.state
                                    .whenOrNull<String?>(onLoading: (l) => l) ??
                                "",
                            textAlign: TextAlign.center),
                      ))
              ])));
}