2022-12-09 11:50:58 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
2022-12-10 12:36:59 +00:00
|
|
|
import 'package:raid_manager/utils/file_formatter.dart';
|
2022-12-09 11:50:58 +00:00
|
|
|
|
2022-12-09 14:44:27 +00:00
|
|
|
import '../breadcrumb_page/breadcrumb_controller.dart';
|
2022-12-10 12:36:59 +00:00
|
|
|
import '../types/disk.dart';
|
2022-12-09 11:50:58 +00:00
|
|
|
|
|
|
|
class DiskInfoPage extends StatefulWidget {
|
2022-12-10 12:36:59 +00:00
|
|
|
const DiskInfoPage({Key? key, required this.disk}) : super(key: key);
|
|
|
|
final Disk disk;
|
2022-12-09 11:50:58 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
State<DiskInfoPage> createState() => _DiskInfoPageState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _DiskInfoPageState extends State<DiskInfoPage> {
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Column(
|
2022-12-10 12:36:59 +00:00
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
2022-12-09 11:50:58 +00:00
|
|
|
children: [
|
2022-12-10 12:36:59 +00:00
|
|
|
Text("Name:",style: Theme.of(context).textTheme.labelMedium),
|
|
|
|
Text(widget.disk.name,style: Theme.of(context).textTheme.labelMedium),
|
|
|
|
Text("Size:",style: Theme.of(context).textTheme.labelMedium),
|
|
|
|
Text(widget.disk.size.readableFileSize(),style: Theme.of(context).textTheme.labelMedium),
|
|
|
|
Text("Mountpoints:",style: Theme.of(context).textTheme.labelMedium),
|
|
|
|
Text(widget.disk.mountpoints.toString(),style: Theme.of(context).textTheme.labelMedium),
|
2022-12-09 11:50:58 +00:00
|
|
|
TextButton(
|
|
|
|
onPressed: () {
|
|
|
|
Provider.of<BreadCrumbController>(context, listen: false)
|
|
|
|
.pushPage(const Text("your smart infos..."), "S.M.A.R.T");
|
|
|
|
},
|
|
|
|
child: const Text("Click me"))
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|