底部部件

This commit is contained in:
tanlinxing 2024-08-20 17:44:39 +08:00
parent de783fa083
commit b0769fe37d
4 changed files with 275 additions and 578 deletions

View File

@ -1 +1 @@
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_android-2.2.10\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_linux-2.2.1\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_windows-2.3.0\\\\","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2024-08-19 18:27:32.051943","version":"3.24.0","swift_package_manager_enabled":false}
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_android-2.2.10\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_foundation-2.4.0\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_linux-2.2.1\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\Administrator\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.dev\\\\path_provider_windows-2.3.0\\\\","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2024-08-20 16:40:54.130946","version":"3.24.0","swift_package_manager_enabled":false}

View File

@ -1,437 +0,0 @@
import 'package:cpnav/pages/pass_track/view.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
class BottomMenu extends StatefulWidget {
@override
_BottomMenuState createState() => _BottomMenuState();
}
class _BottomMenuState extends State<BottomMenu> {
int _selectedIndex = -1;
void _temporarilySelectContainer(int index) {
setState(() {
_selectedIndex = index;
});
Future.delayed(Duration(milliseconds: 200), () {
setState(() {
_selectedIndex = -1;
});
});
}
@override
Widget build(BuildContext context) {
var isPortrait = MediaQuery.of(context).orientation == Orientation.portrait;
return isPortrait
? Positioned(
right: 10,
bottom: 130,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
width: 36,
decoration: BoxDecoration(
color: Colors.transparent, //
border: Border.all(
color: Color.fromARGB(255, 54, 52, 52),
width: 1.0, //
),
borderRadius: BorderRadius.circular(5.0), //
),
child: Column(children: [
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: Colors.green, // 绿
border: Border.all(
color: Colors.white, //
),
borderRadius: BorderRadius.circular(5.0), //
),
child: InkWell(
child: const Icon(
Icons.article,
color: Colors.white,
),
onTap: () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
// onUpdate?.call(
// mapcontroller.centerXY, 1.0, 0.0);
// sight.reset();
},
),
),
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: Colors.green, // 绿
border: Border.all(
color: Colors.white, //
),
borderRadius: BorderRadius.circular(5.0), //
),
child: InkWell(
child: const Icon(
Icons.speed,
color: Colors.white,
),
onTap: () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
// onUpdate?.call(
// mapcontroller.centerXY, 1.0, 0.0);
// sight.reset();
},
),
),
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: Colors.green, // 绿
border: Border.all(
color: Colors.white, //
),
borderRadius: BorderRadius.circular(5.0), //
),
child: InkWell(
child: const Icon(
Icons.thermostat,
color: Colors.white,
),
onTap: () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
// onUpdate?.call(
// mapcontroller.centerXY, 1.0, 0.0);
// sight.reset();
},
),
),
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: Colors.green, // 绿
border: Border.all(
color: Colors.white, //
width: 2.0, //
),
borderRadius: BorderRadius.circular(5.0), //
),
child: InkWell(
child: const Icon(
Icons.zoom_in,
color: Colors.white,
),
onTap: () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
// onUpdate?.call(
// mapcontroller.centerXY, 1.0, 0.0);
// sight.reset();
},
),
),
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: Colors.green, // 绿
border: Border.all(
color: Colors.white, //
width: 2.0, //
),
borderRadius: BorderRadius.circular(5.0), //
),
child: InkWell(
child: const Icon(
Icons.zoom_out,
color: Colors.white,
),
onTap: () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
// onUpdate?.call(
// mapcontroller.centerXY, 1.0, 0.0);
// sight.reset();
},
),
),
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: Colors.green, // 绿
border: Border.all(
color: Colors.white, //
),
borderRadius: BorderRadius.circular(5.0), //
),
child: InkWell(
child: const Icon(
Icons.refresh,
color: Colors.white,
),
onTap: () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
// onUpdate?.call(
// mapcontroller.centerXY, 1.0, 0.0);
// sight.reset();
},
),
),
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: Colors.green, // 绿
border: Border.all(
color: Colors.white, //
),
borderRadius: BorderRadius.circular(5.0), //
),
child: InkWell(
child: const Icon(
Icons.place,
color: Colors.white,
),
onTap: () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
// onUpdate?.call(
// mapcontroller.centerXY, 1.0, 0.0);
// sight.reset();
},
),
),
]),
),
],
))
: Positioned(
right: 10,
bottom: 15,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
height: 36,
decoration: BoxDecoration(
color: Colors.transparent, //
border: Border.all(
color: Color.fromARGB(255, 54, 52, 52),
width: 1.0, //
),
borderRadius: BorderRadius.circular(5.0), //
),
child: Center(
// 使 Center
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: Colors.green, // 绿
border: Border.all(
color: Colors.white, //
),
borderRadius:
BorderRadius.circular(5.0), //
),
child: InkWell(
child: const Icon(
Icons.article,
color: Colors.white,
),
onTap: () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
// onUpdate?.call(
// mapcontroller.centerXY, 1.0, 0.0);
// sight.reset();
},
),
),
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: Colors.green, // 绿
border: Border.all(
color: Colors.white, //
),
borderRadius:
BorderRadius.circular(5.0), //
),
child: InkWell(
child: const Icon(
Icons.speed,
color: Colors.white,
),
onTap: () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
// onUpdate?.call(
// mapcontroller.centerXY, 1.0, 0.0);
// sight.reset();
},
),
),
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: Colors.green, // 绿
border: Border.all(
color: Colors.white, //
),
borderRadius:
BorderRadius.circular(5.0), //
),
child: InkWell(
child: const Icon(
Icons.thermostat,
color: Colors.white,
),
onTap: () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
// onUpdate?.call(
// mapcontroller.centerXY, 1.0, 0.0);
// sight.reset();
},
),
),
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: Colors.green, // 绿
border: Border.all(
color: Colors.white, //
width: 2.0, //
),
borderRadius:
BorderRadius.circular(5.0), //
),
child: InkWell(
child: const Icon(
Icons.zoom_in,
color: Colors.white,
),
onTap: () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
// onUpdate?.call(
// mapcontroller.centerXY, 1.0, 0.0);
// sight.reset();
},
),
),
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: Colors.green, // 绿
border: Border.all(
color: Colors.white, //
width: 2.0, //
),
borderRadius:
BorderRadius.circular(5.0), //
),
child: InkWell(
child: const Icon(
Icons.zoom_out,
color: Colors.white,
),
onTap: () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
// onUpdate?.call(
// mapcontroller.centerXY, 1.0, 0.0);
// sight.reset();
},
),
),
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: Colors.green, // 绿
border: Border.all(
color: Colors.white, //
),
borderRadius:
BorderRadius.circular(5.0), //
),
child: InkWell(
child: const Icon(
Icons.refresh,
color: Colors.white,
),
onTap: () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
// onUpdate?.call(
// mapcontroller.centerXY, 1.0, 0.0);
// sight.reset();
},
),
),
Container(
width: 30,
height: 30,
decoration: BoxDecoration(
color: Colors.green, // 绿
border: Border.all(
color: Colors.white, //
),
borderRadius:
BorderRadius.circular(5.0), //
),
child: InkWell(
child: const Icon(
Icons.place,
color: Colors.white,
),
onTap: () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
// onUpdate?.call(
// mapcontroller.centerXY, 1.0, 0.0);
// sight.reset();
},
),
),
],
),
),
),
],
));
}
}

View File

@ -0,0 +1,153 @@
import 'package:cpnav/pages/pass_track/view.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
class IconContainer extends StatefulWidget {
@override
_IconContainerState createState() => _IconContainerState();
}
class _IconContainerState extends State<IconContainer> {
final Map<IconData, Color> _iconColors = {
Icons.article: Colors.green,
Icons.speed: Colors.green,
Icons.thermostat: Colors.green,
Icons.zoom_in: Colors.green,
Icons.zoom_out: Colors.green,
Icons.refresh: Colors.green,
Icons.place: Colors.green,
};
void _handleTap(IconData icon, VoidCallback onTap) {
setState(() {
_iconColors[icon] = const Color.fromARGB(255, 166, 182, 149); //
});
onTap();
Future.delayed(Duration(milliseconds: 200), () {
setState(() {
_iconColors[icon] = Colors.green; //
});
});
}
@override
Widget build(BuildContext context) {
var isPortrait = MediaQuery.of(context).orientation == Orientation.portrait;
return isPortrait
? Positioned(
right: 10,
bottom: 130,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
width: 36,
decoration: BoxDecoration(
color: Colors.transparent,
border: Border.all(
color: Color.fromARGB(255, 54, 52, 52),
width: 1.0,
),
borderRadius: BorderRadius.circular(5.0),
),
child: Column(
children: [
_buildIcon(Icons.article, () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
}),
_buildIcon(Icons.speed, () {
// speed
}),
_buildIcon(Icons.thermostat, () {
// thermostat
}),
_buildIcon(Icons.zoom_in, () {
// zoom_in
}),
_buildIcon(Icons.zoom_out, () {
// zoom_out
}),
_buildIcon(Icons.refresh, () {
// refresh
}),
_buildIcon(Icons.place, () {
// place
}),
],
),
)
],
))
: Positioned(
right: 10,
bottom: 15,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Container(
height: 36,
decoration: BoxDecoration(
color: Colors.transparent,
border: Border.all(
color: Color.fromARGB(255, 54, 52, 52),
width: 1.0,
),
borderRadius: BorderRadius.circular(5.0),
),
child: Row(
children: [
_buildIcon(Icons.article, () {
mapcontroller.scale = 1.0;
mapcontroller.rotation.value = 0.0;
mapcontroller.updateCount.value++;
}),
_buildIcon(Icons.speed, () {
// speed
}),
_buildIcon(Icons.thermostat, () {
// thermostat
}),
_buildIcon(Icons.zoom_in, () {
// zoom_in
}),
_buildIcon(Icons.zoom_out, () {
// zoom_out
}),
_buildIcon(Icons.refresh, () {
// refresh
}),
_buildIcon(Icons.place, () {
// place
}),
],
),
)
],
));
}
Widget _buildIcon(IconData icon, VoidCallback onTap) {
return Container(
width: 30,
height: 30,
margin: EdgeInsets.symmetric(vertical: 2.0),
decoration: BoxDecoration(
color: _iconColors[icon],
border: Border.all(
color: Colors.white,
),
borderRadius: BorderRadius.circular(5.0),
),
child: InkWell(
child: Icon(
icon,
color: Colors.white,
),
onTap: () => _handleTap(icon, onTap),
),
);
}
}

View File

@ -9,7 +9,7 @@ import 'package:scence_map/controller.dart';
import 'package:scence_map/scence_map.dart';
import 'package:bottom_picker/bottom_picker.dart';
import 'package:syncfusion_flutter_sliders/sliders.dart';
import 'bottomMenu.dart';
import 'iconContainer.dart';
import "controller.dart";
// import '../login_in/connect/bluetooth_page.dart';
// import '../login_in/connect/config.dart';
@ -32,8 +32,6 @@ class PassTrack extends StatefulWidget {
State<PassTrack> createState() => _PasstrackState();
}
// FileHandle fileHandle = FileHandle();
class _PasstrackState extends State<PassTrack> {
final controller = Get.put(PassTrackController("WXLMB", "cp_orad"));
String str = "播放";
@ -42,9 +40,8 @@ class _PasstrackState extends State<PassTrack> {
int speed = 50;
List<int> speedList = [1, 2, 10, 20, 50, 100, 200, 500];
int maxLength = 200;
// int _value = 0;
SfRangeValues _rangevalues = const SfRangeValues(0.0, 200.0);
// late final ScenceMapScaleMoveCallback? onUpdate;
@override
initState() {
super.initState();
@ -102,51 +99,48 @@ class _PasstrackState extends State<PassTrack> {
Widget build(BuildContext context) {
final size = MediaQuery.of(context).size;
var isPortrait = MediaQuery.of(context).orientation == Orientation.portrait;
return Stack(
children: [
ScenceMapView(
children: [],
onUpdate: (Offset center, double scale, double rotation) {
print("center:$center scale:$scale rotation:$rotation");
},
),
Positioned(
width: isPortrait ? size.width * .63 : size.width * .42,
left: isPortrait ? 190 : 200,
bottom: 30,
child: Container(
padding: EdgeInsets.only(bottom: 5),
child: SfRangeSlider(
//
min: 0.0,
max: maxLength,
values: _rangevalues,
// interval: 5,
showTicks: false,
showLabels: false,
enableTooltip: true,
minorTicksPerInterval: 1,
stepSize: 1,
onChanged: (SfRangeValues values) {
setState(() {
_rangevalues = SfRangeValues(
values.start.roundToDouble(), values.end.roundToDouble());
});
},
return OrientationBuilder(builder: (context, orientation) {
return Stack(
children: [
ScenceMapView(
children: [],
onUpdate: (Offset center, double scale, double rotation) {
print("center:$center scale:$scale rotation:$rotation");
},
),
Positioned(
width: isPortrait ? size.width * .63 : size.width * .42,
left: isPortrait ? 190 : 200,
bottom: 30,
child: Container(
padding: const EdgeInsets.only(bottom: 5),
child: SfRangeSlider(
min: 0.0,
max: maxLength,
values: _rangevalues,
showTicks: false,
showLabels: false,
enableTooltip: true,
minorTicksPerInterval: 1,
stepSize: 1,
onChanged: (SfRangeValues values) {
setState(() {
_rangevalues = SfRangeValues(values.start.roundToDouble(),
values.end.roundToDouble());
});
},
),
),
),
),
Positioned(
left: isPortrait ? 190 : 200,
bottom: 0,
child: Row(
children: [
const SizedBox(
width: 18,
),
SizedBox(
width: 74, //
child: ElevatedButton(
Positioned(
left: isPortrait ? 190 : 200,
bottom: 0,
child: Row(
children: [
const SizedBox(width: 18),
SizedBox(
width: 74,
child: ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color?>(
str == "播放" ? Colors.blue : Colors.red,
@ -154,107 +148,94 @@ class _PasstrackState extends State<PassTrack> {
),
onPressed: () {
setState(() {
if (str == "播放") {
str = "暂停";
} else {
str = "播放";
}
str = str == "播放" ? "暂停" : "播放";
});
},
child: Text(
str,
style: TextStyle(fontSize: 12, color: Colors.black),
)),
),
const SizedBox(
width: 5,
),
ElevatedButton(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all<Color?>(
Colors.transparent,
style: const TextStyle(fontSize: 12, color: Colors.black),
),
),
),
onPressed: () {
_openSpeedPicker(context, speedList);
},
child: Text(speed.toString()),
),
const SizedBox(
width: 15,
),
Column(children: [
Text("此处遍数0"),
StreamBuilder<DateTime>(
stream: Stream.periodic(
Duration(seconds: 1), (_) => DateTime.now()),
builder: (context, snapshot) {
if (snapshot.hasData) {
final dateTime = snapshot.data!.toLocal();
final formattedDate =
"${dateTime.year % 100}-${dateTime.month.toString().padLeft(2, '0')}-${dateTime.day.toString().padLeft(2, '0')}";
final formattedTime =
"${dateTime.hour.toString().padLeft(2, '0')}:${dateTime.minute.toString().padLeft(2, '0')}:${dateTime.second.toString().padLeft(2, '0')}";
return Text(
"$formattedDate $formattedTime",
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
const SizedBox(width: 5),
Container(
width: 82,
height: 35,
padding: const EdgeInsets.symmetric(horizontal: 1.0),
decoration: BoxDecoration(
color: const Color.fromARGB(255, 255, 255, 255),
border: Border.all(color: Colors.black),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Center(
child: Text(
"$speed X",
style: const TextStyle(
fontSize: 11, color: Colors.black),
),
);
} else {
return const Text(
"加载中...",
style: TextStyle(
fontSize: 16, fontWeight: FontWeight.bold),
);
}
},
),
PopupMenuButton<int>(
padding: const EdgeInsets.all(1.0),
icon: const Icon(Icons.arrow_drop_up,
color: Color.fromARGB(255, 47, 48, 47)),
onSelected: (int value) {
setState(() {
speed = value;
});
},
itemBuilder: (BuildContext context) {
return speedList.map((int speed) {
return PopupMenuItem<int>(
height: 30,
value: speed,
child: Text("$speed X速度"),
);
}).toList();
},
),
],
),
),
])
],
),
),
BottomMenu(),
],
);
}
void _openSpeedPicker(BuildContext context, List<int> items) {
List<Text> list = items.map((speed) => Text("$speed 速度")).toList();
showModalBottomSheet(
context: context,
builder: (BuildContext context) {
return Container(
width: MediaQuery.of(context).size.width * 0.5, // 80%
child: BottomPicker(
items: list,
pickerTitle: Text('选择播放速度'),
titleAlignment: Alignment.center,
titlePadding: const EdgeInsets.all(8.0),
dismissable: true,
onSubmit: (index) {
setState(() {
speed = items[index];
});
},
bottomPickerTheme: BottomPickerTheme.morningSalad,
backgroundColor: Colors.white,
pickerTextStyle: const TextStyle(
fontSize: 14,
color: Colors.black,
const SizedBox(width: 12),
Column(
children: [
const Text("此处遍数0"),
StreamBuilder<DateTime>(
stream: Stream.periodic(
const Duration(seconds: 1), (_) => DateTime.now()),
builder: (context, snapshot) {
if (snapshot.hasData) {
final dateTime = snapshot.data!.toLocal();
final formattedDate =
"${dateTime.year % 100}-${dateTime.month.toString().padLeft(2, '0')}-${dateTime.day.toString().padLeft(2, '0')}";
final formattedTime =
"${dateTime.hour.toString().padLeft(2, '0')}:${dateTime.minute.toString().padLeft(2, '0')}:${dateTime.second.toString().padLeft(2, '0')}";
return Text(
"$formattedDate $formattedTime",
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
),
);
} else {
return const Text(
"加载中...",
style: TextStyle(
fontSize: 16, fontWeight: FontWeight.bold),
);
}
},
),
],
)
],
),
itemExtent: 35.0,
displayCloseIcon: true,
closeIconColor: Colors.black,
closeIconSize: 20,
layoutOrientation: TextDirection.ltr,
buttonAlignment: MainAxisAlignment.end,
displaySubmitButton: true,
buttonContent: Text("确认"),
),
);
},
);
IconContainer()
],
);
});
}
}