apex_socket 0.0.15 apex_socket: ^0.0.15 copied to clipboard
ApexSocket plugin.
import 'package:apex_socket/apex_api.dart';
import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
void main() {
Logger.root.level = Level.OFF; // defaults to Level.INFO
Logger.root.onRecord.listen((record) {
print('${record.level.name}: ${record.time}: ${record.message}');
});
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
String _platformVersion = 'Unknown';
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: ApexApi(
ApexApiConfig(
'https://api.apexteam.net/qoex/handler.php',
null,
'qoex',
'message',
androidKey: KeyPair('1', '2'),
iosKey: KeyPair('3', '4'),
webKey: KeyPair('5', '6'),
options: OptionBuilder(),
),
child: Builder(
builder: (innerContext) {
return Scaffold(
appBar: AppBar(
title: Text(ApexApi.api.config.androidKey.secretKey),
),
body: Center(
child:
GestureDetector(onTap: () {}, child: Text('Running on: $_platformVersion\n')),
),
);
},
),
),
);
}
}