import 'package:sefer_driver/constant/links.dart';
import 'package:sefer_driver/controller/functions/crud.dart';
import 'package:sefer_driver/views/home/Captin/home_captain/home_captin.dart';
import 'package:sefer_driver/views/widgets/elevated_btn.dart';
import 'package:flutter/material.dart';

class OverlayContent1 extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Material(
      child: Container(
        padding: EdgeInsets.all(16.0),
        color: Colors.white,
        child: MyElevatedButton(
          title: 'go to order',
          onPressed: () async {
            var res = await CRUD().post(
              link: AppLink.addFeedBack,
              payload: {
                "passengerId": 'dddddd',
                "feedBack": "eeeee",
              },
            );
            print(res);
            if (res != 'failure') {
              Navigator.push(
                  context, MaterialPageRoute(builder: (cont) => HomeCaptain()));
              // Get.to(OrderRequestPage());
            }
          },
        ),
      ),
    );
  }
}
