tkms_dart 0.1.9
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'),
),
),
),
);
}
}