Raid_Manager/app/lib/utils/disk_info_page.dart

38 lines
1.4 KiB
Dart
Raw Permalink Normal View History

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';
import '../breadcrumb_page/breadcrumb_controller.dart';
2022-12-10 12:36:59 +00:00
import '../types/disk.dart';
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;
@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,
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),
TextButton(
onPressed: () {
Provider.of<BreadCrumbController>(context, listen: false)
.pushPage(const Text("your smart infos..."), "S.M.A.R.T");
},
child: const Text("Click me"))
],
);
}
}