onlyOffline method

Widget onlyOffline()

Only shows the widget when offline, otherwise shows nothing.

Implementation

Widget onlyOffline() {
  return Connective.builder(
    builder: (context, state, results) {
      return state == NyConnectivityState.none
          ? this
          : const SizedBox.shrink();
    },
  );
}