The supported platform is iOS and Android, and the language is kotlin and swift, respectively, to create a project.
flutter create --platforms=android,ios -i swift -a kotlin your_app_name
Copy to the project that created the Flutter plugin package for THETA Client.
demo-flutter
is placed in demo-flutter/packages/theta_client_flutter
under the
project.
Added theta_client_flutter
copied to dependencies
of pubspec.yaml
.
dependencies:
flutter:
sdk: flutter
theta_client_flutter:
path: ./packages/theta_client_flutter
Set the minimum SDK version to 26 or higher
MinSdkVersion 26
Set iOS Deployment Target to 15 or higher
Connect the wireless LAN between THETA and the smartphone that runs on the application using this THETA Client.
import 'package:theta_client_flutter/theta_client_flutter.dart';
final _thetaClientFlutterPlugin = ThetaClientFlutter();
_thetaClientFlutterPlugin.initialize()
.then((value) {
// success
})
.onError((error, stackTrace) {
// handle error
});
OR
_thetaClientFlutterPlugin.initialize('http://<IP address>:<port number>')
.then((value) {
// success
})
.onError((error, stackTrace) {
// handle error
});