Search packages, repositories and app categories

flutter_screenshot_google_street_view cover
Package detailsv0.0.2

flutter_screenshot_google_street_view

A Flutter package for capturing Google Street View screenshots

AndroidiOSWeb
30-day downloads
34
Likes
1
Pub points
150

Install package

flutter pub add flutter_screenshot_google_street_view

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package enabling developers to capture screenshots from Google Street View within their apps. It integrates seamlessly with Android, iOS, and Web platforms, allowing users to take visual snapshots of street-level imagery. The package simplifies the process of embedding and interacting with Google's Street View API, making it ideal for location-based applications that require visual documentation or sharing of real-world views. Built with Dart, it ensures cross-platform consistency and ease of use.

Use cases

  • Capturing street-level images for travel apps
  • Generating visual reports in real estate apps
  • Supporting navigation aids with image references
  • Enabling user-generated content from Street View
  • Sharing location visuals in social features

Key features

  • Cross-platform support (Android, iOS, Web)
  • Simple integration with Google Street View API
  • Screenshot capture functionality
  • Consistent UI across platforms
  • Lightweight and focused on screenshot tasks

Suitable for

  • Travel and mapping applications
  • Real estate and property visualization tools
  • Location-based social platforms
  • Navigation and wayfinding apps
  • Field data collection systems

Considerations

  • Requires valid Google Maps API key
  • Dependent on Google Street View availability
  • May have usage limits based on API plan
  • Web support may vary by browser
  • Additional permissions needed for mobile platforms

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Flutter Screenshot Google Street View

Important Note

For accurate testing and functionality validation, it is essential to test this package on a physical device rather than an emulator.

This package allows capturing and displaying Google Street View images in Flutter applications.

Features

  • Street View image capture
  • Display of captured images
  • Customizable capture settings

Getting started

To start using this package, make sure you have a Google Maps API key enabled for the Street View service.

Requirements
Android
  • Minimum SDK: 20
  • Required permissions in AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
  • API key in AndroidManifest.xml:
<meta-data
    android:name="com.google.android.geo.API_KEY"
    android:value="API_KEY"/>
iOS
  • Minimum version: 14.0
  • Configure API key in AppDelegate.swift:
GMSServices.provideAPIKey("API_KEY")
API Configuration
  1. Get an API key at https://cloud.google.com/maps-platform/
  2. Enable Google Maps SDK:
    • Maps SDK for Android
    • Maps SDK for iOS
    • Street View Static API

Usage

Here's an example of how to use the StreetViewCapture and StreetViewPreview widgets:

import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:flutter_screenshot_google_street_view/flutter_screenshot_google_street_view.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('Street View Example')),
        body: StreetViewExample(),
      ),
    );
  }
}

class StreetViewExample extends StatefulWidget {
  @override
  _StreetViewExampleState createState() => _StreetViewExampleState();
}

class _StreetViewExampleState extends State<StreetViewExample> {
  String? _imageUrl;

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        StreetViewCapture(
          initialPosition: LatLng(37.7749, -122.4194), // San Francisco
          config: StreetViewConfig(apiKey: 'API_KEY'),
          onImageCaptured: (imageUrl, position) {
            setState(() {
              _imageUrl = imageUrl;
            });
          },
        ),
        if (_imageUrl != null)
          StreetViewPreview(
            imageUrl: _imageUrl!,
            fit: BoxFit.cover,
          ),
      ],
    );
  }
}

Additional information

For more information about contributing to the package or reporting issues, visit the project repository.

Categories

Dependencies

Dependency list 2 items

Source repository

Projects using this package

No data available yet.