rework resyncing state

pull/7/head
fuwa 4 years ago
parent 03cbfc78f3
commit 54ff3cf83c

@ -25,49 +25,53 @@ import '../state.dart';
import '../config.dart' as config; import '../config.dart' as config;
Widget build(BuildContext context, ReSyncingState state) { Widget build(BuildContext context, ReSyncingState state) {
final progressWidget =
[
Spacer
(
flex: 3,
),
LinearProgressIndicator(),
Spacer
(
flex: 2,
),
Expanded
(
flex: 5,
child: Text
(
state.stdout.last,
style: Theme.of(context).textTheme.body1,
)
),
];
return Scaffold return Scaffold
( (
// appBar: AppBar
// (
// // title: Text(widget.title),
// title: Text('CyberWOW'),
// ),
body: Container body: Container
( (
// padding: const EdgeInsets.all(10.0), padding: const EdgeInsets.all(10.0),
child: Align child: Column
( (
alignment: Alignment.topLeft, mainAxisAlignment: MainAxisAlignment.center,
child: Column crossAxisAlignment: CrossAxisAlignment.stretch,
( children: <Widget>
mainAxisAlignment: MainAxisAlignment.center, [
children: <Widget> Spacer
[ (
Spacer flex: 10,
( ),
flex: 1, ] +
), progressWidget +
Expanded [
( Spacer
flex: 1, (
child: SingleChildScrollView flex: 10,
( ),
scrollDirection: Axis.vertical, ]
reverse: true,
child: Text
(
state.stdout.last,
style: Theme.of(context).textTheme.body1,
)
)
),
Spacer
(
flex: 1,
),
],
),
), ),
), )
); );
} }