Skip to content
This repository was archived by the owner on Jun 25, 2019. It is now read-only.
This repository was archived by the owner on Jun 25, 2019. It is now read-only.

Restrcit height of the Google Map API #27

@ganeshjayaraman

Description

@ganeshjayaraman

How do restrict my showMap() function to occupy only 400.0 of the screen ? My below code does not seem to be working

 showMap() {
    return _mapView.show(
      new MapOptions(
          mapViewType: MapViewType.normal,
          showUserLocation: true,
          initialCameraPosition: new CameraPosition(
              new Location(45.5235258, -122.6732493), 14.0),
          title: "Recently Visited"),
      toolbarActions: [new ToolbarAction("Close", 1)]);
  }

Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return new Scaffold(
      body: new Container(
        child: new Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            new Container(
               height : 400.0,
              child:new Padding(
                padding: const EdgeInsets.all(0.2),
                child: showMap(),
              ),
            ),
            new Text(
              'Hello World',
              style: Theme.of(context).textTheme.display1,
            ),
          ],
        ),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions