diff --git a/lib/pages/ErService/NearestEr.dart b/lib/pages/ErService/NearestEr.dart new file mode 100644 index 00000000..eba0dd4f --- /dev/null +++ b/lib/pages/ErService/NearestEr.dart @@ -0,0 +1,144 @@ +import 'package:diplomaticquarterapp/uitl/location_util.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import '../../uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart'; +class NearestEr extends StatefulWidget { + final bool isAppbar; + + const NearestEr({Key key, this.isAppbar}) : super(key: key); + @override + _NearestErState createState() => _NearestErState(); +} + +class _NearestErState extends State { + 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: ListView( + + children: [ + Text(TranslationBase.of(context).searchBy, + style: TextStyle( + fontSize: 24.0, + letterSpacing: 1.0, + fontWeight: FontWeight.bold, + color: new Color(0xFF60686b))), + Container( + margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0), + + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: CardCommonEr( + image: 'assets/images/new-design/find_us_icon.png', + text: TranslationBase.of(context).ambulancerequest, + subText: TranslationBase.of(context).requestA, + type: 0, + ), + flex: 0, + ), + Expanded( + child: CardCommonEr( + image: 'assets/images/new-design/find_us_icon.png', + text: TranslationBase.of(context).nearester, + subText: TranslationBase.of(context).locationa, + type: 1), + flex: 0, + + ) + ], + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: CardCommonEr( + image: 'assets/images/new-design/find_us_icon.png', + text: TranslationBase.of(context).ambulancerequest, + subText: TranslationBase.of(context).requestA, + type: 0, + ), + flex: 0, + ), + Expanded( + child: CardCommonEr( + image: 'assets/images/new-design/find_us_icon.png', + text: TranslationBase.of(context).nearester, + subText: TranslationBase.of(context).locationa, + type: 1), + flex: 0, + ) + ], + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: CardCommonEr( + image: 'assets/images/new-design/find_us_icon.png', + text: TranslationBase.of(context).ambulancerequest, + subText: TranslationBase.of(context).requestA, + type: 0, + ), + flex: 0, + ), + Expanded( + child: CardCommonEr( + image: 'assets/images/new-design/find_us_icon.png', + text: TranslationBase.of(context).nearester, + subText: TranslationBase.of(context).locationa, + type: 1), + flex: 0, + + ) + ], + ), + Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Expanded( + child: CardCommonEr( + image: 'assets/images/new-design/find_us_icon.png', + text: TranslationBase.of(context).ambulancerequest, + subText: TranslationBase.of(context).requestA, + type: 0, + + ), + flex: 0, + ), + + ], + ), + ], + ) + ), + ], + ), + ), + ); + } +}