41 lines
960 B
Dart
41 lines
960 B
Dart
|
import 'package:flutter/material.dart';
|
||
|
import 'package:flutter/services.dart';
|
||
|
|
||
|
import '../real/component/chart.dart';
|
||
|
|
||
|
class MyLineChart extends StatefulWidget {
|
||
|
final int pileId;
|
||
|
const MyLineChart({super.key, required this.pileId});
|
||
|
|
||
|
@override
|
||
|
State<MyLineChart> createState() => _MyLineChartState();
|
||
|
}
|
||
|
|
||
|
class _MyLineChartState extends State<MyLineChart> {
|
||
|
@override
|
||
|
void initState() {
|
||
|
super.initState();
|
||
|
}
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
final size = MediaQuery.of(context).size;
|
||
|
// 锁定横屏
|
||
|
SystemChrome.setPreferredOrientations([
|
||
|
DeviceOrientation.landscapeLeft,
|
||
|
DeviceOrientation.landscapeRight,
|
||
|
]);
|
||
|
return Scaffold(
|
||
|
appBar: AppBar(
|
||
|
toolbarHeight: 30,
|
||
|
title: Text("桩点${widget.pileId}过程"),
|
||
|
),
|
||
|
body: SizedBox(
|
||
|
height: size.height - 30,
|
||
|
child: ProcessChart(
|
||
|
pileId: widget.pileId,
|
||
|
)),
|
||
|
);
|
||
|
}
|
||
|
}
|