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

outdated

A new flutter plugin project.

example/lib/main.dart

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

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

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

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

class _MyAppState extends State<MyApp> {
  static const MethodChannel _channel = const MethodChannel('amazon_fire_tv_cast');

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

  _getNewActivity() async {
    try {
      await _channel.invokeMethod('startNewActivity');
    } on PlatformException catch (e) {
      print(e.message);
    }
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    _getNewActivity();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Amazon FireTV app'),
        ),
//        body: Center(
//          child: Text('Running on: $_platformVersion\n'),
//        ),
      ),
    );
  }
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A new flutter plugin project.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on amazonfiretvcast