flutter_bridgefy 0.0.2

Flutter Android iOS

A new flutter plugin project.

example/lib/main.dart

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

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

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

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

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

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

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    var _flutterBridgefy = new FlutterBridgefy();
    // Platform messages may fail, so we use a try/catch PlatformException.
    try {
      await _flutterBridgefy.init('380948ce-a45c-4176-8508-dbff103bbd0a');
      await _flutterBridgefy.start();
    } on PlatformException {
      debugPrint('Error');
    }

    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.    
  }

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

A new flutter plugin project.

Homepage

Documentation

API reference

Uploader

mikaelim.id@gmail.com

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_bridgefy