From 2d136f89cf28547f5545e20a484dc485b4e1cd06 Mon Sep 17 00:00:00 2001 From: poka Date: Fri, 29 Jan 2021 03:44:09 +0100 Subject: [PATCH] Fix history provider --- lib/screens/history.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/screens/history.dart b/lib/screens/history.dart index 2843f3c..22c5837 100644 --- a/lib/screens/history.dart +++ b/lib/screens/history.dart @@ -13,7 +13,7 @@ class HistoryScreen extends StatelessWidget with ChangeNotifier { final TextEditingController _outputPubkey = TextEditingController(); ScrollController scrollController = ScrollController(); final nRepositories = 20; - HistoryProvider _historyProvider; + // HistoryProvider _historyProvider; bool isTheEnd = false; List _transBC; @@ -67,11 +67,12 @@ class HistoryScreen extends StatelessWidget with ChangeNotifier { disabledBorder: InputBorder.none, ), style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.bold)), - if (_historyProvider.pubkey != '') historyQuery(), + if (_historyProvider.pubkey != '') historyQuery(context), ])); } - historyQuery() { + historyQuery(context) { + HistoryProvider _historyProvider = Provider.of(context); return Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.start,