This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
LocalSpend-Tracker/lib/pages/map_page.dart

62 lines
1.5 KiB
Dart
Raw Normal View History

2019-08-21 11:35:21 +00:00
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:local_spend/common/platform/platform_scaffold.dart';
2019-08-21 11:35:21 +00:00
class MapPage extends StatefulWidget {
MapPage({Key key}) : super(key: key);
@override
_MapPageState createState() {
return _MapPageState();
}
}
class _MapPageState extends State<MapPage> {
@override
Widget build(BuildContext context) {
return PlatformScaffold(
appBar: AppBar(
backgroundColor: Colors.blue[400],
title: Text(
"Submit Receipt",
style: TextStyle(
fontSize: 20,
color: Colors.white,
),
),
centerTitle: true,
iconTheme: IconThemeData(color: Colors.black),
),
body: null,
);
2019-08-21 11:35:21 +00:00
}
}
2019-08-21 11:35:21 +00:00
class MapSample extends StatefulWidget {
2019-08-21 11:35:21 +00:00
@override
State<MapSample> createState() => MapSampleState();
}
class MapSampleState extends State<MapSample> {
Completer<GoogleMapController> _controller = Completer();
static final CameraPosition _kGooglePlex = CameraPosition(
target: LatLng(37.42796133580664, -122.085749655962),
zoom: 14.4746,
);
2019-08-21 11:35:21 +00:00
@override
Widget build(BuildContext context) {
return new Scaffold(
body: GoogleMap(
mapType: MapType.hybrid,
initialCameraPosition: _kGooglePlex,
onMapCreated: (GoogleMapController controller) {
_controller.complete(controller);
},
),
);
2019-08-21 11:35:21 +00:00
}
}