build method

  1. @override
Widget build(
  1. BuildContext context,
  2. UpgradeBaseState state
)
override

Describes the part of the user interface represented by this widget.

Implementation

@override
Widget build(BuildContext context, UpgradeBaseState state) {
  if (upgrader.debugLogging) {
    print('upgrader: build UpgradeAlert');
  }

  return FutureBuilder(
      future: state.initialized,
      builder: (BuildContext context, AsyncSnapshot<bool> processed) {
        if (processed.connectionState == ConnectionState.done &&
            processed.data != null &&
            processed.data!) {
          upgrader.checkVersion(context: context);
        }
        return child ?? Container();
      });
}