// import 'package:flutter/material.dart';
// import 'package:provider/provider.dart';
// import 'package:test_sa/controllers/providers/api/service_requests_provider.dart';
// import 'package:test_sa/controllers/providers/api/user_provider.dart';
// import 'package:test_sa/controllers/providers/settings/setting_provider.dart';
// import 'package:test_sa/extensions/context_extension.dart';
// import 'package:test_sa/models/service_request/service_request.dart';
// import 'package:test_sa/views/pages/user/requests/service_request_details.dart';
// import 'package:test_sa/views/widgets/loaders/app_loading.dart';
// import 'package:test_sa/views/widgets/loaders/failed_loading.dart';
//
// class FutureRequestServiceDetails extends StatefulWidget {
//   static final String id = "/service-request-details";
//
//   @override
//   _FutureRequestServiceDetailsState createState() => _FutureRequestServiceDetailsState();
// }
// todo delete
// class _FutureRequestServiceDetailsState extends State<FutureRequestServiceDetails> {
//   UserProvider _userProvider;
//   SettingProvider _settingProvider;
//
//   @override
//   Widget build(BuildContext context) {
//     _userProvider = Provider.of<UserProvider>(context);
//     _settingProvider = Provider.of<SettingProvider>(context);
//     String requestId = ModalRoute.of(context).settings.arguments;
//
//     return Scaffold(
//       body: FutureBuilder<ServiceRequest>(
//         future: ServiceRequestsProvider().getSingleServiceRequest(requestId: requestId, user: _userProvider.user, host: _settingProvider.host, subtitle: context.translation),
//         builder: (BuildContext context, AsyncSnapshot<ServiceRequest> snapshot) {
//           if (snapshot.hasError) {
//             return FailedLoading(
//               message: snapshot.error.toString(),
//               onReload: () {
//                 setState(() {});
//               },
//             );
//           }
//           if (snapshot.hasData) {
//             return ServiceRequestDetailsPage(
//               serviceRequest: snapshot.data,
//             );
//           }
//           return Center(child: ALoading());
//         },
//       ),
//     );
//   }
// }
