import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';

import 'package:flutter/material.dart';
import '../../uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart';

class ErOptions extends StatefulWidget {
  final bool isAppbar;

  const ErOptions({Key key, this.isAppbar}) : super(key: key);


  @override
  _ErOptionsState createState() => _ErOptionsState();
}

class _ErOptionsState extends State<ErOptions> {
  LocationUtils locationUtils;

  @override
  void initState() {
    locationUtils =
    new LocationUtils(isShowConfirmDialog: true, context: context);
    WidgetsBinding.instance
        .addPostFrameCallback((_) => locationUtils.getCurrentLocation());

    super.initState();
  }
  @override
  Widget build(BuildContext context) {
    return AppScaffold(
      isShowAppBar: widget.isAppbar,
      appBarTitle: TranslationBase.of(context).bookAppo,
      body: Container(
        margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[

            Container(
              margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
              child: Row(
                mainAxisSize: MainAxisSize.max,
                mainAxisAlignment: MainAxisAlignment.start,
                children: <Widget>[
                  Expanded(
                    child: CardCommonEr(
                      image: 'assets/images/new-design/AM.PNG',
                      text: TranslationBase.of(context).ambulancerequest,
                      subText: TranslationBase.of(context).requestA,
                      type: 0,

                    ),
                  ),
                  Expanded(
                    child: CardCommonEr(
                        image: 'assets/images/new-design/emergency_icon.png',
                        text: TranslationBase.of(context).nearester,
                        subText: TranslationBase.of(context).locationa,
                        type: 1),

                  )
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}

