tkms_dart 0.1.9 copy "tkms_dart: ^0.1.9" to clipboard
tkms_dart: ^0.1.9 copied to clipboard

Mpc on local device.

example/lib/main.dart

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

import 'package:tkms_dart/tkms_dart.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    final service = TkmsService('http://key3.safematrix.io:8001');
    final path = await TkmsService.getTkmsPath();
    final result = service.initService(path);
    print(result);

    // service.newProject('0', '0', Uint8List.fromList([0]));
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: TextButton(
            onPressed: initPlatformState,
            child: const Text('TEST'),
          ),
        ),
      ),
    );
  }
}
0
likes
130
points
62
downloads

Publisher

verified publisherstonegate.me

Weekly Downloads

Mpc on local device.

Homepage

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

ffi, flutter, path_provider

More

Packages that depend on tkms_dart

Packages that implement tkms_dart