ricoh_theta_plugin 1.1.4

ricoh_theta_plugin #

A flutter plugin for Ricoh Theta camera.

Features #

  • Taking a picture
  • Timer (1 to 10 seconds)
  • Capture options (HDR, DR Compensation, Noise Reduction)
  • Adjust the brightness

Supported Languages #

  • English
  • Japanese
  • Korean

Installation #

Add ricoh_theta_plugin as a dependency.

dependencies:
  flutter:
    sdk: flutter
  ricoh_theta_plugin: ^0.0.5

iOS #

Allow access wifi information Add this line in Podfile

config.build_settings['SWIFT_VERSION'] = '4.2'

Android #

Change the minimum Android sdk version to 16 or higher in your android/app/build.gradle file.

minSdkVersion 16

Example #

import 'dart:io';

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:ricoh_theta_plugin/ricoh_theta_plugin.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';
  String _imageUri;

  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  Future<void> initPlatformState() async {
    String platformVersion;
    try {
      platformVersion = await RicohThetaPlugin.platformVersion;
    } on PlatformException {
      platformVersion = 'Failed to get platform version.';
    }

    if (!mounted) return;

    setState(() {
      _platformVersion = platformVersion;
    });
  }

  Future startCamera() async {
    try {
      String imageUri = await RicohThetaPlugin.startCamera();
      setState(() => this._imageUri = imageUri);
    } on PlatformException catch (e) {
      print('error: $e');
    } on FormatException{
      print('null (User returned using the "back"-button before scanning anything. Result)');
    } catch (e) {
      print('error: $e');
    }
  }

  Widget _showUri(){
    if(_imageUri != null && _imageUri.isNotEmpty){
      File file = new File(_imageUri.replaceAll("file:", ""));
      return new Container(
          width: 300.0,
          child:new Column(
            children:[
              Text(
                '$_imageUri\n',
                style: TextStyle(fontSize: 10),
              ),
              new Image.file(
                file,
                width: 600.0,
                height: 240.0,
                fit: BoxFit.cover,
              ),
            ]
          )


      );
    }
    return Container();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Ricoh Theta Plugin Sample App'),
        ),
        body: Center(
            child:
            new Column(
                mainAxisAlignment: MainAxisAlignment.center,
                crossAxisAlignment: CrossAxisAlignment.center,
                children:[
                  Text('Running on: $_platformVersion\n'),
                  _showUri(),
                  RaisedButton(
                    splashColor: Colors.pinkAccent,
                    color: Colors.black,
                    child: new Text(
                      "Start Camera",
                      style: new TextStyle(fontSize: 20.0, color: Colors.white),
                    ),
                    onPressed: () {
                      startCamera();
                    },
                  ),
                ])
        ),
      ),
    );
  }
}

0.0.1 #

1.0.8 #

support swift4.2

1.0.9 #

bugfix: support swift4.2

##1.1.2 add files to resource bundle

example/README.md

ricoh_theta_plugin_example #

Demonstrates how to use the ricoh_theta_plugin plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  ricoh_theta_plugin: ^1.1.4

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:ricoh_theta_plugin/ricoh_theta_plugin.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
45
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
95
Overall:
Weighted score of the above. [more]
71
Learn more about scoring.

We analyzed this package on Jul 15, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

5 out of 5 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/ricoh_theta_plugin.dart.

Run flutter format to format lib/ricoh_theta_plugin.dart.

Maintenance suggestions

Homepage URL is insecure. (-5 points)

Update the homepage field and use a secure (https) URL.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
flutter_localizations 0.0.0
Transitive dependencies
collection 1.14.11
intl 0.15.8
meta 1.1.6 1.1.7
path 1.6.2
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test
intl_translation ^0.17.1

Admin