transvod_plugin 0.1.0 copy "transvod_plugin: ^0.1.0" to clipboard
transvod_plugin: ^0.1.0 copied to clipboard

Plugin that allow Flutter to communicate with transvod.

example/lib/main.dart

import 'dart:async';

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

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

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

class _MyAppState extends State<MyApp> {
  final _controller = new OpenGLTextureController();
  final _width = 200.0;
  final _height = 200.0;

  @override
  initState() {
    super.initState();

    initializeController();
  }

  @override
  void dispose() {
    _controller.dispose();

    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('OpenGL via Texture widget example'),
        ),
        body: new Center(
          child: new Container(
            width: _width,
            height: _height,
            child: _controller.isInitialized
                ? new Texture(textureId: _controller.textureId)
                : null,
          ),
        ),
      ),
    );
  }

  Future<Null> initializeController() async {
    await _controller.initialize(_width, _height);
    setState(() {});
  }
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Plugin that allow Flutter to communicate with transvod.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on transvod_plugin