import 'dart:async'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; class RRTRequestPickupAddressPage extends StatefulWidget{ @override State createState() => RRTRequestPickupAddressPageState(); } class RRTRequestPickupAddressPageState extends State{ bool acceptTerms = false; Completer mapController = Completer(); static final CameraPosition mapCamera = CameraPosition( target: LatLng(37.42796133580664, -122.085749655962), zoom: 14.4746, ); @override Widget build(BuildContext context) { return BaseView( onModelReady: (viewModel){ }, builder: (ctx, vm, widget) => AppScaffold( appBarTitle: TranslationBase.of(context).pickupLocation, isShowAppBar: true, body: Column( crossAxisAlignment: CrossAxisAlignment.stretch, children: [ selectAddress(), Expanded( child: GoogleMap( mapType: MapType.normal, initialCameraPosition: mapCamera, onCameraIdle: (){ }, onMapCreated: (controller){ mapController.complete(controller); }, ) ), continueButton() ], ) ) ); } Widget selectAddress(){ return Container( margin: EdgeInsets.all(15), child: Expanded( child: MaterialButton( height: 50, color: Colors.white, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ), onPressed: () { }, child: Row( children: [ Text(TranslationBase.of(context).selectAddress, style: TextStyle(color: Colors.white, fontSize: 13, letterSpacing: 1),), Spacer(), Icon(Icons.keyboard_arrow_down, size: 15, color: Colors.grey,) ], ), ), ), ); } Widget continueButton(){ return Padding( padding: const EdgeInsets.all(15), child: MaterialButton( height: 50, color: Theme.of(context).appBarTheme.color, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ), onPressed: () { }, child: Text(TranslationBase.of(context).continues, style: TextStyle(color: Colors.white, fontSize: 15, letterSpacing: 1),), ), ); } }