yuxiaozhu_blue_clock 0.1.4 copy "yuxiaozhu_blue_clock: ^0.1.4" to clipboard
yuxiaozhu_blue_clock: ^0.1.4 copied to clipboard

PlatformAndroid

A new Flutter plugin.

example/lib/main.dart

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

import 'package:flutter/services.dart';
import 'package:yuxiaozhu_blue_clock/flutter_plugin.dart';

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

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

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

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

  }

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

    if (!mounted) return;
    Map<String,String> query={
      "mac":'200000',
      "pwd":'0000000',
      "newPwd":'1111111',
      "config":'alkdsjmshr'
    };
    _platformVersion=await FlutterPlugin.platformVersion("4", query);
    setState(() {

    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Column(
          children: [
            Center(
              child: TextButton(child: Text('测试'),onPressed: (){
                initPlatformState();
              },),
            ),
            Text(_platformVersion)
          ],
        ),
      ),
    );
  }
}
0
likes
100
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter plugin.

Homepage

Documentation

API reference

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on yuxiaozhu_blue_clock