Advertisement
AtomicOs

copyright

Jun 21st, 2021
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. // Copyright 2013 The Flutter Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4.  
  5. // ignore_for_file: public_member_api_docs
  6.  
  7. import 'package:flutter/material.dart';
  8. import 'package:google_maps_flutter_example/lite_mode.dart';
  9. import 'animate_camera.dart';
  10. import 'map_click.dart';
  11. import 'map_coordinates.dart';
  12. import 'map_ui.dart';
  13. import 'marker_icons.dart';
  14. import 'move_camera.dart';
  15. import 'padding.dart';
  16. import 'page.dart';
  17. import 'place_circle.dart';
  18. import 'place_marker.dart';
  19. import 'place_polygon.dart';
  20. import 'place_polyline.dart';
  21. import 'scrolling_map.dart';
  22. import 'snapshot.dart';
  23. import 'tile_overlay.dart';
  24.  
  25. final List<GoogleMapExampleAppPage> _allPages = <GoogleMapExampleAppPage>[
  26. MapUiPage(),
  27. MapCoordinatesPage(),
  28. MapClickPage(),
  29. AnimateCameraPage(),
  30. MoveCameraPage(),
  31. PlaceMarkerPage(),
  32. MarkerIconsPage(),
  33. ScrollingMapPage(),
  34. PlacePolylinePage(),
  35. PlacePolygonPage(),
  36. PlaceCirclePage(),
  37. PaddingPage(),
  38. SnapshotPage(),
  39. LiteModePage(),
  40. TileOverlayPage(),
  41. ];
  42.  
  43. class MapsDemo extends StatelessWidget {
  44. void _pushPage(BuildContext context, GoogleMapExampleAppPage page) {
  45. Navigator.of(context).push(MaterialPageRoute<void>(
  46. builder: (_) => Scaffold(
  47. appBar: AppBar(title: Text(page.title)),
  48. body: page,
  49. )));
  50. }
  51.  
  52. @override
  53. Widget build(BuildContext context) {
  54. return Scaffold(
  55. appBar: AppBar(title: const Text('GoogleMaps examples')),
  56. body: ListView.builder(
  57. itemCount: _allPages.length,
  58. itemBuilder: (_, int index) => ListTile(
  59. leading: _allPages[index].leading,
  60. title: Text(_allPages[index].title),
  61. onTap: () => _pushPage(context, _allPages[index]),
  62. ),
  63. ),
  64. );
  65. }
  66. }
  67.  
  68. void main() {
  69. runApp(MaterialApp(home: MapsDemo()));
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement