import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:raid_manager/utils/file_formatter.dart'; import '../breadcrumb_page/breadcrumb_controller.dart'; import '../types/disk.dart'; class DiskInfoPage extends StatefulWidget { const DiskInfoPage({Key? key, required this.disk}) : super(key: key); final Disk disk; @override State createState() => _DiskInfoPageState(); } class _DiskInfoPageState extends State { @override Widget build(BuildContext context) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ 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(context, listen: false) .pushPage(const Text("your smart infos..."), "S.M.A.R.T"); }, child: const Text("Click me")) ], ); } }