platform_native_view 0.0.1 copy "platform_native_view: ^0.0.1" to clipboard
platform_native_view: ^0.0.1 copied to clipboard

outdated

A new flutter&ios_platformView plugin project.

example/lib/main.dart

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

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

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

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

class _MyAppState extends State<MyApp> {
  var viewPlayerController;

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

  void onViewPlayerCreated(viewPlayerController) {
    this.viewPlayerController = viewPlayerController;
    this.viewPlayerController.loadUrl("https://www.****.com/****.mp4");
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: SingleChildScrollView(
          child: Column(
            children: <Widget>[
              Text('Running on: native'),
              SizedBox(
                width: 300,
                height: 300,
                child: PlatformNativeView(
                  height: 50,
                  width: 50,
                  // onCreated: onViewPlayerCreated,
                  x: 0,
                  y: 100,
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A new flutter&ios_platformView plugin project.

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on platform_native_view