flutter_walle 0.0.1 copy "flutter_walle: ^0.0.1" to clipboard
flutter_walle: ^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_walle/flutter_walle.dart';

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

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

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

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

  Future<void> initChannelState() async {
    String channel;
    try {
      channel = await FlutterWalle.channel;
    } catch (e) {
      print(e.toString());
    }

    if (!mounted) return;

    setState(() {
      _channel = channel;
    });
  }

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

Publisher

unverified uploader

A new flutter plugin project.

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_walle