You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
92 lines
2.9 KiB
Dart
92 lines
2.9 KiB
Dart
3 years ago
|
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<StatefulWidget> createState() => RRTRequestPickupAddressPageState();
|
||
|
|
||
|
}
|
||
|
class RRTRequestPickupAddressPageState extends State<RRTRequestPickupAddressPage>{
|
||
|
bool acceptTerms = false;
|
||
|
Completer<GoogleMapController> mapController = Completer();
|
||
|
|
||
|
static final CameraPosition mapCamera = CameraPosition(
|
||
|
target: LatLng(37.42796133580664, -122.085749655962),
|
||
|
zoom: 14.4746,
|
||
|
);
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return BaseView<RRTViewModel>(
|
||
|
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),),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
|
||
|
}
|