From 1e3781f1314f1f5afe4a3aa39f827cab2eec518a Mon Sep 17 00:00:00 2001 From: fossephate Date: Thu, 31 Oct 2024 10:19:00 -0700 Subject: [PATCH] [skip ci] fix logs page --- lib/src/screens/settings/mweb_logs_page.dart | 51 +++++++++----------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/lib/src/screens/settings/mweb_logs_page.dart b/lib/src/screens/settings/mweb_logs_page.dart index 2dfd59a2c..cd81e39b1 100644 --- a/lib/src/screens/settings/mweb_logs_page.dart +++ b/lib/src/screens/settings/mweb_logs_page.dart @@ -26,37 +26,32 @@ class MwebLogsPage extends BasePage { return Stack( fit: StackFit.expand, children: [ - - Expanded( - child: FutureBuilder( - future: mwebSettingsViewModelBase.getAbbreviatedLogs(), - builder: (context, snapshot) { - if (snapshot.connectionState == ConnectionState.waiting) { - return Center(child: CircularProgressIndicator()); - } else if (snapshot.hasError || !snapshot.hasData || snapshot.data!.isEmpty) { - return Center(child: Text('No logs found')); - } else { - return SingleChildScrollView( - child: Padding( - padding: EdgeInsets.all(16.0), - child: Text( - snapshot.data!, - style: TextStyle(fontFamily: 'Monospace'), - ), + FutureBuilder( + future: mwebSettingsViewModelBase.getAbbreviatedLogs(), + builder: (context, snapshot) { + if (snapshot.connectionState == ConnectionState.waiting) { + return Center(child: CircularProgressIndicator()); + } else if (snapshot.hasError || !snapshot.hasData || snapshot.data!.isEmpty) { + return Center(child: Text('No logs found')); + } else { + return SingleChildScrollView( + child: Padding( + padding: EdgeInsets.all(16.0), + child: Text( + snapshot.data!, + style: TextStyle(fontFamily: 'Monospace'), ), - ); - } - }, - ), + ), + ); + } + }, ), Positioned( - child: Observer( - builder: (_) => LoadingPrimaryButton( - onPressed: () => onExportLogs(context), - text: S.of(context).export_logs, - color: Theme.of(context).primaryColor, - textColor: Colors.white, - ), + child: LoadingPrimaryButton( + onPressed: () => onExportLogs(context), + text: S.of(context).export_logs, + color: Theme.of(context).primaryColor, + textColor: Colors.white, ), bottom: 24, left: 24,