packet_ng_helper 0.0.2 copy "packet_ng_helper: ^0.0.2" to clipboard
packet_ng_helper: ^0.0.2 copied to clipboard

packet_ng for Flutter.

example/lib/main.dart

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

void main() {
  runApp(MyApp());
}

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

class _MyAppState extends State<MyApp> {
  String channel = "Running";

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

    PacketNgHelper.getMarketName().then((value) {
      setState(() {
        channel = value;
      });
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text(channel),
        ),
      ),
    );
  }
}
0
likes
120
points
21
downloads

Publisher

unverified uploader

Weekly Downloads

packet_ng for Flutter.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on packet_ng_helper