Compare commits
6 Commits
70f4f151c0
...
f7fe3fa7df
Author | SHA1 | Date |
---|---|---|
poka | f7fe3fa7df | |
poka | c055dbfe3a | |
poka | 613b6b282e | |
poka | 8ddd877131 | |
poka | c6cfb4e548 | |
poka | 875341a804 |
|
@ -8,6 +8,7 @@ import 'package:gecko/globals.dart';
|
|||
import 'package:gecko/models/queries_indexer.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
import 'package:gecko/providers/cesium_plus.dart';
|
||||
import 'package:gecko/providers/search.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:gecko/providers/wallets_profiles.dart';
|
||||
import 'package:gecko/screens/wallet_view.dart';
|
||||
|
@ -159,6 +160,7 @@ class DuniterIndexer with ChangeNotifier {
|
|||
WalletsProfilesProvider walletsProfiles =
|
||||
Provider.of<WalletsProfilesProvider>(context, listen: false);
|
||||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
final searchProvider = Provider.of<SearchProvider>(context, listen: false);
|
||||
if (indexerEndpoint == '') {
|
||||
return const Text('Aucun résultat');
|
||||
}
|
||||
|
@ -207,6 +209,9 @@ class DuniterIndexer with ChangeNotifier {
|
|||
.putIfAbsent(profile['pubkey'], () => profile['name']);
|
||||
}
|
||||
|
||||
searchProvider.resultLenght = identities.length;
|
||||
// TODO: Find a way to reload a provider here, in Widget build...
|
||||
|
||||
double avatarSize = 55;
|
||||
return Expanded(
|
||||
child: ListView(children: <Widget>[
|
||||
|
@ -269,7 +274,7 @@ class DuniterIndexer with ChangeNotifier {
|
|||
}
|
||||
|
||||
List parseHistory(blockchainTX, pubkey) {
|
||||
var transBC = [];
|
||||
List transBC = [];
|
||||
int i = 0;
|
||||
|
||||
for (final trans in blockchainTX) {
|
||||
|
@ -306,16 +311,18 @@ class DuniterIndexer with ChangeNotifier {
|
|||
|
||||
pageInfo = result.data['transaction_connection']['pageInfo'];
|
||||
fetchMoreCursor = pageInfo!['endCursor'];
|
||||
final hasNextPage = pageInfo!['hasNextPage'];
|
||||
final hasPreviousPage = pageInfo!['hasPreviousPage'];
|
||||
if (fetchMoreCursor == null) nPage = 1;
|
||||
|
||||
log.d(fetchMoreCursor);
|
||||
log.d('endCursor: $fetchMoreCursor $hasNextPage $hasPreviousPage');
|
||||
|
||||
if (nPage == 1) {
|
||||
nRepositories = 40;
|
||||
} else if (nPage == 2) {
|
||||
nRepositories = 100;
|
||||
}
|
||||
// nRepositories = 10;
|
||||
// if (nPage == 1) {
|
||||
// nRepositories = 20;
|
||||
// } else if (nPage == 4) {
|
||||
// nRepositories = 40;
|
||||
// }
|
||||
// // nRepositories = 10;
|
||||
nPage++;
|
||||
|
||||
if (fetchMoreCursor != null) {
|
||||
|
|
|
@ -7,6 +7,7 @@ class SearchProvider with ChangeNotifier {
|
|||
List searchResult = [];
|
||||
final cacheDuring = 20 * 60 * 1000; //First number is minutes
|
||||
int cacheTime = 0;
|
||||
int resultLenght = 0;
|
||||
|
||||
void reload() {
|
||||
notifyListeners();
|
||||
|
|
|
@ -5,29 +5,40 @@ import 'package:easy_localization/easy_localization.dart';
|
|||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/queries_indexer.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
import 'package:gecko/providers/cesium_plus.dart';
|
||||
import 'package:gecko/providers/duniter_indexer.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/screens/wallet_view.dart';
|
||||
import 'package:gecko/widgets/bottom_app_bar.dart';
|
||||
import 'package:gecko/widgets/header_profile.dart';
|
||||
import 'package:gecko/widgets/page_route_no_transition.dart';
|
||||
import 'package:gecko/widgets/transaction_tile.dart';
|
||||
import 'package:graphql_flutter/graphql_flutter.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
||||
class ActivityScreen extends StatefulWidget with ChangeNotifier {
|
||||
ActivityScreen({required this.address, required this.avatar, this.username})
|
||||
: super(key: keyActivityScreen);
|
||||
final ScrollController scrollController = ScrollController();
|
||||
final double avatarsSize = 80;
|
||||
final String address;
|
||||
final String? username;
|
||||
final Image avatar;
|
||||
|
||||
@override
|
||||
State<ActivityScreen> createState() => _ActivityScreenState();
|
||||
}
|
||||
|
||||
class _ActivityScreenState extends State<ActivityScreen> {
|
||||
@override
|
||||
void initState() {
|
||||
final duniterIndexerInit =
|
||||
Provider.of<DuniterIndexer>(context, listen: false);
|
||||
duniterIndexerInit.nPage = 1;
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
final ScrollController scrollController = ScrollController();
|
||||
final double avatarsSize = 80;
|
||||
FetchMore? fetchMore;
|
||||
FetchMoreOptions? opts;
|
||||
|
||||
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
@override
|
||||
|
@ -44,7 +55,7 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
|||
),
|
||||
bottomNavigationBar: const GeckoBottomAppBar(),
|
||||
body: Column(children: <Widget>[
|
||||
HeaderProfile(address: address, username: username),
|
||||
HeaderProfile(address: widget.address, username: widget.username),
|
||||
historyQuery(context),
|
||||
]));
|
||||
}
|
||||
|
@ -85,7 +96,7 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
|||
options: QueryOptions(
|
||||
document: gql(getHistoryByAddressQ),
|
||||
variables: <String, dynamic>{
|
||||
'address': address,
|
||||
'address': widget.address,
|
||||
'number': 20,
|
||||
'cursor': null
|
||||
},
|
||||
|
@ -93,7 +104,9 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
|||
builder: (QueryResult result, {fetchMore, refetch}) {
|
||||
if (result.isLoading && result.data == null) {
|
||||
return const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
child: CircularProgressIndicator(
|
||||
color: orangeC,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -120,7 +133,8 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
|||
|
||||
if (result.isNotLoading) {
|
||||
// log.d(result.data);
|
||||
opts = duniterIndexer.checkQueryResult(result, opts, address);
|
||||
opts = duniterIndexer.checkQueryResult(
|
||||
result, opts, widget.address);
|
||||
}
|
||||
|
||||
// Build history list
|
||||
|
@ -163,7 +177,7 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
|||
)
|
||||
])
|
||||
: Column(children: <Widget>[
|
||||
getTransactionTile(context, duniterIndexer),
|
||||
getHistory(context, duniterIndexer),
|
||||
if (result.isLoading && duniterIndexer.pageInfo!['hasPreviousPage'])
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
@ -184,18 +198,60 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
|||
]);
|
||||
}
|
||||
|
||||
Widget getTransactionTile(
|
||||
BuildContext context, DuniterIndexer duniterIndexer) {
|
||||
Widget getHistory(BuildContext context, DuniterIndexer duniterIndexer) {
|
||||
int keyID = 0;
|
||||
String? dateDelimiter;
|
||||
String? lastDateDelimiter;
|
||||
const double avatarSize = 200;
|
||||
String? lastDateDelimiter;
|
||||
bool? isDouble;
|
||||
|
||||
return Column(
|
||||
children: duniterIndexer.transBC!.map((repository) {
|
||||
final answer =
|
||||
_computeHistoryView(repository, lastDateDelimiter, isDouble);
|
||||
isDouble = lastDateDelimiter == answer['dateDelimiter'];
|
||||
lastDateDelimiter = answer['dateDelimiter'];
|
||||
|
||||
return Column(children: <Widget>[
|
||||
if (answer['isMigrationTime'])
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 30),
|
||||
child: Text(
|
||||
'Début de la ĞDev',
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
color: Colors.blueAccent,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
if (!isDouble! && answer['dateDelimiter'] != '')
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 30),
|
||||
child: Text(
|
||||
answer['dateDelimiter'],
|
||||
style: const TextStyle(
|
||||
fontSize: 23, color: orangeC, fontWeight: FontWeight.w300),
|
||||
),
|
||||
),
|
||||
TransactionTile(
|
||||
widget: widget,
|
||||
keyID: keyID,
|
||||
avatarSize: avatarSize,
|
||||
repository: repository,
|
||||
dateForm: answer['dateForm'],
|
||||
finalAmount: answer['finalAmount'],
|
||||
duniterIndexer: duniterIndexer,
|
||||
context: context),
|
||||
]);
|
||||
}).toList());
|
||||
}
|
||||
|
||||
Map _computeHistoryView(repository, lastDateDelimiter, isDouble) {
|
||||
bool isTody = false;
|
||||
bool isYesterday = false;
|
||||
bool isThisWeek = false;
|
||||
bool isMigrationTime = false;
|
||||
bool isMigrationTimePassed = false;
|
||||
String? dateDelimiter;
|
||||
|
||||
final Map<int, String> monthsInYear = {
|
||||
1: "month1".tr(),
|
||||
|
@ -211,168 +267,85 @@ class ActivityScreen extends StatelessWidget with ChangeNotifier {
|
|||
11: "month11".tr(),
|
||||
12: "month12".tr()
|
||||
};
|
||||
final bool isUdUnit = configBox.get('isUdUnit') ?? false;
|
||||
late double amount;
|
||||
late String finalAmount;
|
||||
DateTime now = DateTime.now();
|
||||
DateTime date = repository[0];
|
||||
String dateForm;
|
||||
bool isDelimiter = true;
|
||||
|
||||
return Column(
|
||||
children: duniterIndexer.transBC!.map((repository) {
|
||||
// log.d('bbbbbbbbbbbbbbbbbbbbbb: ' + repository.toString());
|
||||
if ({4, 10, 11, 12}.contains(date.month)) {
|
||||
dateForm = "${date.day} ${monthsInYear[date.month]!.substring(0, 3)}.";
|
||||
} else if ({1, 2, 7, 9}.contains(date.month)) {
|
||||
dateForm = "${date.day} ${monthsInYear[date.month]!.substring(0, 4)}.";
|
||||
} else {
|
||||
dateForm = "${date.day} ${monthsInYear[date.month]}";
|
||||
}
|
||||
|
||||
DateTime now = DateTime.now();
|
||||
DateTime date = repository[0];
|
||||
int weekNumber(DateTime date) {
|
||||
int dayOfYear = int.parse(DateFormat("D").format(date));
|
||||
return ((dayOfYear - date.weekday + 10) / 7).floor();
|
||||
}
|
||||
|
||||
String dateForm;
|
||||
if ({4, 10, 11, 12}.contains(date.month)) {
|
||||
dateForm = "${date.day} ${monthsInYear[date.month]!.substring(0, 3)}.";
|
||||
} else if ({1, 2, 7, 9}.contains(date.month)) {
|
||||
dateForm = "${date.day} ${monthsInYear[date.month]!.substring(0, 4)}.";
|
||||
final transactionDate = DateTime(date.year, date.month, date.day);
|
||||
final todayDate = DateTime(now.year, now.month, now.day);
|
||||
final yesterdayDate = DateTime(now.year, now.month, now.day - 1);
|
||||
|
||||
if (transactionDate == todayDate && !isTody) {
|
||||
dateDelimiter = lastDateDelimiter = "today".tr();
|
||||
isTody = true;
|
||||
} else if (transactionDate == yesterdayDate && !isYesterday) {
|
||||
dateDelimiter = lastDateDelimiter = "yesterday".tr();
|
||||
isYesterday = true;
|
||||
} else if (weekNumber(date) == weekNumber(now) &&
|
||||
date.year == now.year &&
|
||||
lastDateDelimiter != "thisWeek".tr() &&
|
||||
transactionDate != yesterdayDate &&
|
||||
transactionDate != todayDate &&
|
||||
!isThisWeek) {
|
||||
dateDelimiter = lastDateDelimiter = "thisWeek".tr();
|
||||
isThisWeek = true;
|
||||
} else if (lastDateDelimiter != monthsInYear[date.month] &&
|
||||
lastDateDelimiter != "${monthsInYear[date.month]} ${date.year}" &&
|
||||
transactionDate != todayDate &&
|
||||
transactionDate != yesterdayDate &&
|
||||
!(weekNumber(date) == weekNumber(now) && date.year == now.year)) {
|
||||
if (date.year == now.year) {
|
||||
dateDelimiter = lastDateDelimiter = monthsInYear[date.month];
|
||||
} else {
|
||||
dateForm = "${date.day} ${monthsInYear[date.month]}";
|
||||
dateDelimiter =
|
||||
lastDateDelimiter = "${monthsInYear[date.month]} ${date.year}";
|
||||
}
|
||||
} else {
|
||||
isDelimiter = false;
|
||||
}
|
||||
|
||||
int weekNumber(DateTime date) {
|
||||
int dayOfYear = int.parse(DateFormat("D").format(date));
|
||||
return ((dayOfYear - date.weekday + 10) / 7).floor();
|
||||
}
|
||||
amount = repository[4] == 'RECEIVED' ? repository[3] : repository[3] * -1;
|
||||
|
||||
final transactionDate = DateTime(date.year, date.month, date.day);
|
||||
final todayDate = DateTime(now.year, now.month, now.day);
|
||||
final yesterdayDate = DateTime(now.year, now.month, now.day - 1);
|
||||
if (isUdUnit) {
|
||||
amount = round(amount / balanceRatio);
|
||||
finalAmount = 'ud'.tr(args: ['$amount ']);
|
||||
} else {
|
||||
finalAmount = '$amount $currencyName';
|
||||
}
|
||||
|
||||
if (transactionDate == todayDate && !isTody) {
|
||||
dateDelimiter = lastDateDelimiter = "today".tr();
|
||||
isTody = true;
|
||||
} else if (transactionDate == yesterdayDate && !isYesterday) {
|
||||
dateDelimiter = lastDateDelimiter = "yesterday".tr();
|
||||
isYesterday = true;
|
||||
} else if (weekNumber(date) == weekNumber(now) &&
|
||||
date.year == now.year &&
|
||||
lastDateDelimiter != "thisWeek".tr() &&
|
||||
transactionDate != yesterdayDate &&
|
||||
transactionDate != todayDate &&
|
||||
!isThisWeek) {
|
||||
dateDelimiter = lastDateDelimiter = "thisWeek".tr();
|
||||
isThisWeek = true;
|
||||
} else if (lastDateDelimiter != monthsInYear[date.month] &&
|
||||
lastDateDelimiter != "${monthsInYear[date.month]} ${date.year}" &&
|
||||
transactionDate != todayDate &&
|
||||
transactionDate != yesterdayDate &&
|
||||
!(weekNumber(date) == weekNumber(now) && date.year == now.year)) {
|
||||
if (date.year == now.year) {
|
||||
dateDelimiter = lastDateDelimiter = monthsInYear[date.month];
|
||||
} else {
|
||||
dateDelimiter =
|
||||
lastDateDelimiter = "${monthsInYear[date.month]} ${date.year}";
|
||||
}
|
||||
} else {
|
||||
dateDelimiter = null;
|
||||
}
|
||||
if (!isMigrationTimePassed && date.compareTo(startBlockchainTime) < 0) {
|
||||
isMigrationTimePassed = true;
|
||||
isMigrationTime = true;
|
||||
} else {
|
||||
isMigrationTime = false;
|
||||
}
|
||||
|
||||
final bool isUdUnit = configBox.get('isUdUnit') ?? false;
|
||||
late double amount;
|
||||
late String finalAmount;
|
||||
amount = repository[4] == 'RECEIVED' ? repository[3] : repository[3] * -1;
|
||||
log.d('dateDelimiter: $dateDelimiter');
|
||||
log.d('lastDateDelimiter: $lastDateDelimiter');
|
||||
|
||||
if (isUdUnit) {
|
||||
amount = round(amount / balanceRatio);
|
||||
finalAmount = 'ud'.tr(args: ['$amount ']);
|
||||
} else {
|
||||
finalAmount = '$amount $currencyName';
|
||||
}
|
||||
|
||||
if (!isMigrationTimePassed && date.compareTo(startBlockchainTime) < 0) {
|
||||
isMigrationTimePassed = true;
|
||||
isMigrationTime = true;
|
||||
} else {
|
||||
isMigrationTime = false;
|
||||
}
|
||||
|
||||
return Column(children: <Widget>[
|
||||
if (isMigrationTime)
|
||||
const Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 30),
|
||||
child: Text(
|
||||
'Début de la ĞDev',
|
||||
style: TextStyle(
|
||||
fontSize: 25,
|
||||
color: Colors.blueAccent,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
if (dateDelimiter != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 30),
|
||||
child: Text(
|
||||
dateDelimiter!,
|
||||
style: const TextStyle(
|
||||
fontSize: 23, color: orangeC, fontWeight: FontWeight.w300),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 0),
|
||||
child:
|
||||
// Row(children: [Column(children: [],)],)
|
||||
ListTile(
|
||||
key: keyTransaction(keyID++),
|
||||
contentPadding: const EdgeInsets.only(
|
||||
left: 20, right: 30, top: 15, bottom: 15),
|
||||
leading: ClipOval(
|
||||
child: defaultAvatar(avatarSize),
|
||||
),
|
||||
title: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 5),
|
||||
child: Text(getShortPubkey(repository[1]),
|
||||
style: const TextStyle(
|
||||
fontSize: 18, fontFamily: 'Monospace')),
|
||||
),
|
||||
subtitle: RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Colors.grey[700],
|
||||
),
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: dateForm,
|
||||
),
|
||||
if (repository[2] != '')
|
||||
TextSpan(
|
||||
text: ' · ',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
color: Colors.grey[550],
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: repository[2],
|
||||
style: TextStyle(
|
||||
fontStyle: FontStyle.italic,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
trailing: Text(finalAmount,
|
||||
style: const TextStyle(
|
||||
fontSize: 18, fontWeight: FontWeight.w500),
|
||||
textAlign: TextAlign.justify),
|
||||
dense: false,
|
||||
isThreeLine: false,
|
||||
onTap: () {
|
||||
duniterIndexer.nPage = 1;
|
||||
// _cesiumPlusProvider.avatarCancelToken.cancel('cancelled');
|
||||
Navigator.push(
|
||||
context,
|
||||
PageNoTransit(builder: (context) {
|
||||
return WalletViewScreen(
|
||||
address: repository[1],
|
||||
username: username ?? '',
|
||||
);
|
||||
}),
|
||||
);
|
||||
// Navigator.pop(context);
|
||||
}),
|
||||
),
|
||||
]);
|
||||
}).toList());
|
||||
return {
|
||||
'finalAmount': finalAmount,
|
||||
'isMigrationTime': isMigrationTime,
|
||||
'dateDelimiter': dateDelimiter ?? '',
|
||||
'isDelimiter': isDelimiter,
|
||||
'dateForm': dateForm,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,7 +92,6 @@ class _HomeScreenState extends State<HomeScreen> {
|
|||
// sub.nodeConnected = false;
|
||||
// }
|
||||
|
||||
// TODO: fix random bad network status on startup
|
||||
HomeProvider homeProvider =
|
||||
Provider.of<HomeProvider>(context, listen: false);
|
||||
Connectivity()
|
||||
|
|
|
@ -62,7 +62,7 @@ class WalletsHome extends StatelessWidget {
|
|||
children: [
|
||||
Image.asset(
|
||||
'assets/chests/${currentChest.imageName}',
|
||||
height: 40,
|
||||
height: 32,
|
||||
),
|
||||
const SizedBox(width: 17),
|
||||
Text(currentChest.name!,
|
||||
|
|
|
@ -2,18 +2,11 @@ import 'package:easy_localization/easy_localization.dart';
|
|||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
import 'package:gecko/providers/cesium_plus.dart';
|
||||
import 'package:gecko/models/g1_wallets_list.dart';
|
||||
import 'package:gecko/providers/duniter_indexer.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:gecko/providers/wallets_profiles.dart';
|
||||
import 'package:gecko/screens/common_elements.dart';
|
||||
import 'package:gecko/screens/wallet_view.dart';
|
||||
import 'package:gecko/widgets/balance.dart';
|
||||
import 'package:gecko/widgets/bottom_app_bar.dart';
|
||||
import 'package:gecko/widgets/name_by_address.dart';
|
||||
import 'package:gecko/widgets/contacts_list.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class ContactsScreen extends StatelessWidget {
|
||||
|
@ -24,15 +17,9 @@ class ContactsScreen extends StatelessWidget {
|
|||
WalletsProfilesProvider walletsProfilesClass =
|
||||
Provider.of<WalletsProfilesProvider>(context, listen: true);
|
||||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
|
||||
double avatarSize = 55;
|
||||
|
||||
final myContacts = contactsBox.toMap().values.toList();
|
||||
|
||||
// for (var element in myContacts) {
|
||||
// log.d('yooo: ${element.pubkey} ${element.username}');
|
||||
// }
|
||||
|
||||
myContacts.sort((p1, p2) {
|
||||
return Comparable.compare(p1.username?.toLowerCase() ?? 'zz',
|
||||
p2.username?.toLowerCase() ?? 'zz');
|
||||
|
@ -52,85 +39,11 @@ class ContactsScreen extends StatelessWidget {
|
|||
bottomNavigationBar: const GeckoBottomAppBar(),
|
||||
body: SafeArea(
|
||||
child: Stack(children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 20),
|
||||
if (myContacts.isEmpty)
|
||||
Text('noContacts'.tr())
|
||||
else
|
||||
Expanded(
|
||||
child: ListView(children: <Widget>[
|
||||
for (G1WalletsList g1Wallet in myContacts)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5),
|
||||
child: ListTile(
|
||||
key: keySearchResult('keyID++'),
|
||||
horizontalTitleGap: 40,
|
||||
contentPadding: const EdgeInsets.all(5),
|
||||
leading: defaultAvatar(avatarSize),
|
||||
title: Row(children: <Widget>[
|
||||
Text(getShortPubkey(g1Wallet.address),
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontFamily: 'Monospace',
|
||||
fontWeight: FontWeight.w500),
|
||||
textAlign: TextAlign.center),
|
||||
]),
|
||||
trailing: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 110,
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Balance(
|
||||
address:
|
||||
g1Wallet.address,
|
||||
size: 16),
|
||||
]),
|
||||
]),
|
||||
),
|
||||
]),
|
||||
subtitle: Row(children: <Widget>[
|
||||
NameByAddress(
|
||||
wallet:
|
||||
WalletData(address: g1Wallet.address))
|
||||
]),
|
||||
dense: false,
|
||||
isThreeLine: false,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
walletsProfilesClass.address =
|
||||
g1Wallet.address;
|
||||
return WalletViewScreen(
|
||||
address: g1Wallet.address,
|
||||
username:
|
||||
duniterIndexer.walletNameIndexer[
|
||||
g1Wallet.address] ??
|
||||
'',
|
||||
avatar: g1WalletsBox
|
||||
.get(g1Wallet.address)
|
||||
?.avatar,
|
||||
);
|
||||
}),
|
||||
);
|
||||
}),
|
||||
),
|
||||
]),
|
||||
)
|
||||
]),
|
||||
),
|
||||
ContactsList(
|
||||
myContacts: myContacts,
|
||||
avatarSize: avatarSize,
|
||||
walletsProfilesClass: walletsProfilesClass,
|
||||
duniterIndexer: duniterIndexer),
|
||||
CommonElements().offlineInfo(context),
|
||||
]),
|
||||
),
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
|
@ -21,6 +23,8 @@ class SearchScreen extends StatefulWidget {
|
|||
class _SearchScreenState extends State<SearchScreen> {
|
||||
bool canPasteAddress = false;
|
||||
String pastedAddress = '';
|
||||
Timer? debounce;
|
||||
final int debouneTime = 50;
|
||||
|
||||
Future getClipBoard() async {
|
||||
final clipboard = await Clipboard.getData('text/plain');
|
||||
|
@ -88,10 +92,12 @@ class _SearchScreenState extends State<SearchScreen> {
|
|||
autofocus: true,
|
||||
maxLines: 1,
|
||||
textAlign: TextAlign.left,
|
||||
onChanged: (v) async => {
|
||||
await getClipBoard(),
|
||||
setState(() {}),
|
||||
searchProvider.reload()
|
||||
onChanged: (v) => {
|
||||
if (debounce?.isActive ?? false) {debounce!.cancel()},
|
||||
debounce = Timer(Duration(milliseconds: debouneTime), () {
|
||||
getClipBoard();
|
||||
searchProvider.reload();
|
||||
})
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
filled: true,
|
||||
|
@ -99,6 +105,23 @@ class _SearchScreenState extends State<SearchScreen> {
|
|||
prefixIconConstraints: const BoxConstraints(
|
||||
minHeight: 32,
|
||||
),
|
||||
suffixIcon: searchProvider.searchController.text == ''
|
||||
? null
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 17),
|
||||
child: IconButton(
|
||||
onPressed: (() async => {
|
||||
searchProvider.searchController.text = '',
|
||||
await getClipBoard(),
|
||||
searchProvider.reload(),
|
||||
}),
|
||||
icon: Icon(
|
||||
Icons.close,
|
||||
color: Colors.grey[600],
|
||||
size: 30,
|
||||
),
|
||||
),
|
||||
),
|
||||
prefixIcon: const Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 17),
|
||||
child: Image(
|
||||
|
|
|
@ -2,19 +2,12 @@ import 'package:easy_localization/easy_localization.dart';
|
|||
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
import 'package:gecko/providers/cesium_plus.dart';
|
||||
import 'package:gecko/models/g1_wallets_list.dart';
|
||||
import 'package:gecko/providers/duniter_indexer.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:gecko/providers/wallets_profiles.dart';
|
||||
import 'package:gecko/providers/search.dart';
|
||||
import 'package:gecko/screens/common_elements.dart';
|
||||
import 'package:gecko/screens/wallet_view.dart';
|
||||
import 'package:gecko/widgets/balance.dart';
|
||||
import 'package:gecko/widgets/bottom_app_bar.dart';
|
||||
import 'package:gecko/widgets/name_by_address.dart';
|
||||
import 'package:gecko/widgets/search_result_list.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
class SearchResultScreen extends StatelessWidget {
|
||||
|
@ -28,6 +21,13 @@ class SearchResultScreen extends StatelessWidget {
|
|||
final duniterIndexer = Provider.of<DuniterIndexer>(context, listen: false);
|
||||
|
||||
double avatarSize = 55;
|
||||
// List<G1WalletsList> myContacts = contactsBox.toMap().values.toList();
|
||||
// myContacts = myContacts
|
||||
// .where((map) =>
|
||||
// (map.username ?? '').contains(searchProvider.searchController.text))
|
||||
// .toList();
|
||||
|
||||
// final searchProvider.resultLenght.toString();
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: backgroundColor,
|
||||
|
@ -48,126 +48,42 @@ class SearchResultScreen extends StatelessWidget {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 30),
|
||||
RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
color: Colors.grey[700],
|
||||
),
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: "resultsFor".tr(),
|
||||
),
|
||||
TextSpan(
|
||||
text: '"${searchProvider.searchController.text}"',
|
||||
style: const TextStyle(fontStyle: FontStyle.italic),
|
||||
Center(
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Text(
|
||||
"resultsFor".tr(),
|
||||
style: TextStyle(color: Colors.grey[600]),
|
||||
),
|
||||
Text(
|
||||
'"${searchProvider.searchController.text}"',
|
||||
style: const TextStyle(
|
||||
fontStyle: FontStyle.italic, fontSize: 21),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
// const SizedBox(height: 40),
|
||||
// Text(
|
||||
// 'Dans mes contacts'.tr(args: [currencyName]),
|
||||
// style: const TextStyle(fontSize: 20),
|
||||
// ),
|
||||
// ContactsList(
|
||||
// myContacts: myContacts,
|
||||
// avatarSize: avatarSize,
|
||||
// walletsProfilesClass: walletsProfilesClass,
|
||||
// duniterIndexer: duniterIndexer),
|
||||
const SizedBox(height: 40),
|
||||
Text(
|
||||
'inBlockchainResult'.tr(args: [currencyName]),
|
||||
style: const TextStyle(fontSize: 20),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
FutureBuilder(
|
||||
future: searchProvider.searchAddress(),
|
||||
builder: (context, AsyncSnapshot<List?> snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
if (snapshot.data?.isEmpty ?? true) {
|
||||
return duniterIndexer.searchIdentity(
|
||||
context, searchProvider.searchController.text);
|
||||
// const Text('Aucun résultat');
|
||||
} else {
|
||||
return Expanded(
|
||||
child: ListView(children: <Widget>[
|
||||
for (G1WalletsList g1Wallet
|
||||
in snapshot.data ?? [])
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 5),
|
||||
child: ListTile(
|
||||
key: keySearchResult(g1Wallet.address),
|
||||
horizontalTitleGap: 40,
|
||||
contentPadding: const EdgeInsets.all(5),
|
||||
leading: defaultAvatar(avatarSize),
|
||||
title: Row(children: <Widget>[
|
||||
Text(getShortPubkey(g1Wallet.address),
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontFamily: 'Monospace',
|
||||
fontWeight: FontWeight.w500),
|
||||
textAlign: TextAlign.center),
|
||||
]),
|
||||
trailing: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 110,
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment
|
||||
.center,
|
||||
children: [
|
||||
Balance(
|
||||
address: g1Wallet
|
||||
.address,
|
||||
size: 16),
|
||||
]),
|
||||
]),
|
||||
),
|
||||
]),
|
||||
subtitle: Row(children: <Widget>[
|
||||
NameByAddress(
|
||||
wallet: WalletData(
|
||||
address: g1Wallet.address),
|
||||
),
|
||||
]),
|
||||
dense: false,
|
||||
isThreeLine: false,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
walletsProfilesClass.address =
|
||||
g1Wallet.address;
|
||||
return WalletViewScreen(
|
||||
address: g1Wallet.address,
|
||||
username: duniterIndexer
|
||||
.walletNameIndexer[
|
||||
g1Wallet.address] ??
|
||||
'',
|
||||
avatar: g1WalletsBox
|
||||
.get(g1Wallet.address)
|
||||
?.avatar,
|
||||
);
|
||||
}),
|
||||
);
|
||||
}),
|
||||
),
|
||||
]),
|
||||
);
|
||||
}
|
||||
}
|
||||
return const Center(
|
||||
heightFactor: 5,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 3,
|
||||
backgroundColor: yellowC,
|
||||
color: orangeC,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
// Text(
|
||||
// _searchProvider.searchResult.toString(),
|
||||
// )
|
||||
SearchResult(
|
||||
searchProvider: searchProvider,
|
||||
duniterIndexer: duniterIndexer,
|
||||
avatarSize: avatarSize,
|
||||
walletsProfilesClass: walletsProfilesClass),
|
||||
]),
|
||||
),
|
||||
CommonElements().offlineInfo(context),
|
||||
|
|
|
@ -0,0 +1,106 @@
|
|||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/g1_wallets_list.dart';
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
import 'package:gecko/providers/cesium_plus.dart';
|
||||
import 'package:gecko/providers/duniter_indexer.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:gecko/providers/wallets_profiles.dart';
|
||||
import 'package:gecko/screens/wallet_view.dart';
|
||||
import 'package:gecko/widgets/balance.dart';
|
||||
import 'package:gecko/widgets/name_by_address.dart';
|
||||
|
||||
class ContactsList extends StatelessWidget {
|
||||
const ContactsList({
|
||||
Key? key,
|
||||
required this.myContacts,
|
||||
required this.avatarSize,
|
||||
required this.walletsProfilesClass,
|
||||
required this.duniterIndexer,
|
||||
}) : super(key: key);
|
||||
|
||||
final List<G1WalletsList> myContacts;
|
||||
final double avatarSize;
|
||||
final WalletsProfilesProvider walletsProfilesClass;
|
||||
final DuniterIndexer duniterIndexer;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 20),
|
||||
if (myContacts.isEmpty)
|
||||
Text('noContacts'.tr())
|
||||
else
|
||||
Expanded(
|
||||
child: ListView(children: <Widget>[
|
||||
for (G1WalletsList g1Wallet in myContacts)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5),
|
||||
child: ListTile(
|
||||
key: keySearchResult('keyID++'),
|
||||
horizontalTitleGap: 40,
|
||||
contentPadding: const EdgeInsets.all(5),
|
||||
leading: defaultAvatar(avatarSize),
|
||||
title: Row(children: <Widget>[
|
||||
Text(getShortPubkey(g1Wallet.address),
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontFamily: 'Monospace',
|
||||
fontWeight: FontWeight.w500),
|
||||
textAlign: TextAlign.center),
|
||||
]),
|
||||
trailing: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 110,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Balance(
|
||||
address: g1Wallet.address,
|
||||
size: 16),
|
||||
]),
|
||||
]),
|
||||
),
|
||||
]),
|
||||
subtitle: Row(children: <Widget>[
|
||||
NameByAddress(
|
||||
wallet: WalletData(address: g1Wallet.address))
|
||||
]),
|
||||
dense: false,
|
||||
isThreeLine: false,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
walletsProfilesClass.address = g1Wallet.address;
|
||||
return WalletViewScreen(
|
||||
address: g1Wallet.address,
|
||||
username: duniterIndexer.walletNameIndexer[
|
||||
g1Wallet.address] ??
|
||||
'',
|
||||
avatar: g1WalletsBox
|
||||
.get(g1Wallet.address)
|
||||
?.avatar,
|
||||
);
|
||||
}),
|
||||
);
|
||||
}),
|
||||
),
|
||||
]),
|
||||
)
|
||||
]),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/globals.dart';
|
||||
import 'package:gecko/models/g1_wallets_list.dart';
|
||||
import 'package:gecko/models/wallet_data.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
import 'package:gecko/providers/cesium_plus.dart';
|
||||
import 'package:gecko/providers/duniter_indexer.dart';
|
||||
import 'package:gecko/providers/search.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:gecko/providers/wallets_profiles.dart';
|
||||
import 'package:gecko/screens/wallet_view.dart';
|
||||
import 'package:gecko/widgets/balance.dart';
|
||||
import 'package:gecko/widgets/name_by_address.dart';
|
||||
|
||||
class SearchResult extends StatelessWidget {
|
||||
const SearchResult({
|
||||
Key? key,
|
||||
required this.searchProvider,
|
||||
required this.duniterIndexer,
|
||||
required this.avatarSize,
|
||||
required this.walletsProfilesClass,
|
||||
}) : super(key: key);
|
||||
|
||||
final SearchProvider searchProvider;
|
||||
final DuniterIndexer duniterIndexer;
|
||||
final double avatarSize;
|
||||
final WalletsProfilesProvider walletsProfilesClass;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return FutureBuilder(
|
||||
future: searchProvider.searchAddress(),
|
||||
builder: (context, AsyncSnapshot<List?> snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
if (snapshot.data?.isEmpty ?? true) {
|
||||
return duniterIndexer.searchIdentity(
|
||||
context, searchProvider.searchController.text);
|
||||
// const Text('Aucun résultat');
|
||||
} else {
|
||||
return Expanded(
|
||||
child: ListView(children: <Widget>[
|
||||
for (G1WalletsList g1Wallet in snapshot.data ?? [])
|
||||
resultTile(g1Wallet, context),
|
||||
]),
|
||||
);
|
||||
}
|
||||
}
|
||||
return const Center(
|
||||
heightFactor: 5,
|
||||
child: CircularProgressIndicator(
|
||||
strokeWidth: 3,
|
||||
backgroundColor: yellowC,
|
||||
color: orangeC,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Padding resultTile(G1WalletsList g1Wallet, BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 5),
|
||||
child: ListTile(
|
||||
key: keySearchResult(g1Wallet.address),
|
||||
horizontalTitleGap: 40,
|
||||
contentPadding: const EdgeInsets.all(5),
|
||||
leading: defaultAvatar(avatarSize),
|
||||
title: Row(children: <Widget>[
|
||||
Text(getShortPubkey(g1Wallet.address),
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontFamily: 'Monospace',
|
||||
fontWeight: FontWeight.w500),
|
||||
textAlign: TextAlign.center),
|
||||
]),
|
||||
trailing:
|
||||
Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
SizedBox(
|
||||
width: 110,
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.end, children: [
|
||||
Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
||||
Balance(address: g1Wallet.address, size: 16),
|
||||
]),
|
||||
]),
|
||||
),
|
||||
]),
|
||||
subtitle: Row(children: <Widget>[
|
||||
NameByAddress(
|
||||
wallet: WalletData(address: g1Wallet.address),
|
||||
),
|
||||
]),
|
||||
dense: false,
|
||||
isThreeLine: false,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) {
|
||||
walletsProfilesClass.address = g1Wallet.address;
|
||||
return WalletViewScreen(
|
||||
address: g1Wallet.address,
|
||||
username:
|
||||
duniterIndexer.walletNameIndexer[g1Wallet.address] ?? '',
|
||||
avatar: g1WalletsBox.get(g1Wallet.address)?.avatar,
|
||||
);
|
||||
}),
|
||||
);
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:gecko/models/widgets_keys.dart';
|
||||
import 'package:gecko/providers/cesium_plus.dart';
|
||||
import 'package:gecko/providers/duniter_indexer.dart';
|
||||
import 'package:gecko/providers/substrate_sdk.dart';
|
||||
import 'package:gecko/screens/activity.dart';
|
||||
import 'package:gecko/screens/wallet_view.dart';
|
||||
import 'package:gecko/widgets/page_route_no_transition.dart';
|
||||
|
||||
class TransactionTile extends StatelessWidget {
|
||||
const TransactionTile({
|
||||
Key? key,
|
||||
required this.widget,
|
||||
required this.keyID,
|
||||
required this.avatarSize,
|
||||
required this.repository,
|
||||
required this.dateForm,
|
||||
required this.finalAmount,
|
||||
required this.duniterIndexer,
|
||||
required this.context,
|
||||
}) : super(key: key);
|
||||
|
||||
final ActivityScreen widget;
|
||||
final int keyID;
|
||||
final double avatarSize;
|
||||
final List repository;
|
||||
final String dateForm;
|
||||
final String finalAmount;
|
||||
final DuniterIndexer duniterIndexer;
|
||||
final BuildContext context;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final newKey = keyID + 1;
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(right: 0),
|
||||
child: ListTile(
|
||||
key: keyTransaction(newKey),
|
||||
contentPadding:
|
||||
const EdgeInsets.only(left: 20, right: 30, top: 15, bottom: 15),
|
||||
leading: ClipOval(
|
||||
child: defaultAvatar(avatarSize),
|
||||
),
|
||||
title: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 5),
|
||||
child: Text(getShortPubkey(repository[1]),
|
||||
style: const TextStyle(fontSize: 18, fontFamily: 'Monospace')),
|
||||
),
|
||||
subtitle: RichText(
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: Colors.grey[700],
|
||||
),
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: dateForm,
|
||||
),
|
||||
if (repository[2] != '')
|
||||
TextSpan(
|
||||
text: ' · ',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
color: Colors.grey[550],
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: repository[2],
|
||||
style: TextStyle(
|
||||
fontStyle: FontStyle.italic,
|
||||
color: Colors.grey[600],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
trailing: Text(finalAmount,
|
||||
style: const TextStyle(fontSize: 18, fontWeight: FontWeight.w500),
|
||||
textAlign: TextAlign.justify),
|
||||
dense: false,
|
||||
isThreeLine: false,
|
||||
onTap: () {
|
||||
duniterIndexer.nPage = 1;
|
||||
// _cesiumPlusProvider.avatarCancelToken.cancel('cancelled');
|
||||
Navigator.push(
|
||||
context,
|
||||
PageNoTransit(builder: (context) {
|
||||
return WalletViewScreen(
|
||||
address: repository[1],
|
||||
username: widget.username ?? '',
|
||||
);
|
||||
}),
|
||||
);
|
||||
// Navigator.pop(context);
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue