Preview:
  bool _showLoading = true;
  @override
  void initState() {
    super.initState();

    Timer(const Duration(seconds: 90), () {
      if (mounted) {
        setState(() {
          _showLoading = false;
        });
      }
    });
  }




 if (pipes.isEmpty) {
              if (_showLoading) {
                return const Padding(
                  padding: EdgeInsets.all(16.0),
                  child: Center(
                    child: Loader(),
                  ),
                );
              } else {
                return const Padding(
                  padding: EdgeInsets.all(16.0),
                  child: Center(
                    child: Text("No pipes found in enquiry"),
                  ),
                );
              }
            } else {



  error: (error, st) {
              return Center(
                child: Text(error.toString()),
              );
            },
            loading: () {
              return const Loader();
            },




 child: (salesStock.isEmpty)
            ? (_showLoading
                ? const Padding(
                    padding: EdgeInsets.all(16.0),
                    child: Center(
                      child: CircularProgressIndicator(),
                    ),
                  )
                : const Padding(
                    padding: EdgeInsets.all(16.0),
                    child: Center(
                      child: Text("No Enquiry Found"),
                    ),
                  ))
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter