日报周报月报
This commit is contained in:
78
lib/pages/sleep_report/component/TrendDataTablePage.dart
Normal file
78
lib/pages/sleep_report/component/TrendDataTablePage.dart
Normal file
@@ -0,0 +1,78 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:flutterflow_ui/flutterflow_ui.dart';
|
||||
import 'package:vbvs_app/common/util/FitTool.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
|
||||
|
||||
class TrendDataTablePage extends StatefulWidget {
|
||||
final String title;
|
||||
final String tipText;
|
||||
final Widget? chartContent;
|
||||
final double? padding;
|
||||
|
||||
const TrendDataTablePage({
|
||||
Key? key,
|
||||
required this.title,
|
||||
required this.tipText,
|
||||
required this.chartContent,
|
||||
required this.padding,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<TrendDataTablePage> createState() => _TrendDataTablePageState();
|
||||
}
|
||||
|
||||
class _TrendDataTablePageState extends State<TrendDataTablePage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: themeController.currentColor.sc5,
|
||||
borderRadius: BorderRadius.circular(25.rpx)),
|
||||
padding:
|
||||
EdgeInsets.fromLTRB(26.rpx, 29.rpx, 26.rpx, widget.padding ?? 45.rpx),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
widget.title,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 30.rpx,
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
showTipDialog(
|
||||
context,
|
||||
Container(
|
||||
child: Text(
|
||||
widget.tipText,
|
||||
style: TextStyle(
|
||||
fontSize: 26.rpx,
|
||||
color: themeController.currentColor.sc3,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
width: 30.rpx,
|
||||
height: 30.rpx,
|
||||
child: SvgPicture.asset('assets/img/icon/explain.svg',
|
||||
color: Color(0xFFD3D3D3)),
|
||||
)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 47.rpx),
|
||||
widget.chartContent ?? Container(),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user