error method

Widget error({
  1. required String appId,
  2. required String error,
})

Implementation

Widget error({required String appId, required String error}) {
  return FutureBuilder<dynamic>(
      future: getApp(appId),
      builder: (context, snapshot) {
        if (snapshot.hasData) {
          var app = snapshot.data;
          return ErrorComponent(app: app, error: error);
        } else {
          return Center(child: CircularProgressIndicator());
        }
      });
}