hyzp_ybqx-Commit001:代码刚转换好,编译通过
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutterptcontrol/flutterptcontrol.dart';
|
||||
|
||||
void main() => runApp(MyApp());
|
||||
|
||||
class MyApp extends StatefulWidget {
|
||||
@override
|
||||
_MyAppState createState() => _MyAppState();
|
||||
}
|
||||
|
||||
class _MyAppState extends State<MyApp> {
|
||||
final double _outerRadius = 99;
|
||||
final double _innerRadius = 99 / 2;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return MaterialApp(
|
||||
home: Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('云台方向按钮widget'),
|
||||
),
|
||||
body: Center(
|
||||
child: SizedBox(
|
||||
width: 2 * _outerRadius,
|
||||
height: 2 * _outerRadius,
|
||||
child: PtControlWidget(
|
||||
innerRadius: _innerRadius,
|
||||
outerRadius: _outerRadius,
|
||||
callback: (status) {
|
||||
print('status = $status');
|
||||
}),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user