fix: null username on search_result screen
This commit is contained in:
parent
82c1d5bf4c
commit
cf4387a280
|
@ -127,10 +127,10 @@ class SearchResultScreen extends StatelessWidget {
|
||||||
]),
|
]),
|
||||||
subtitle: Row(children: <Widget>[
|
subtitle: Row(children: <Widget>[
|
||||||
NameByAddress(
|
NameByAddress(
|
||||||
address: g1Wallet.address,
|
address: g1Wallet.address,
|
||||||
wallet: WalletData(
|
wallet: WalletData(
|
||||||
address: g1Wallet.address),
|
address: g1Wallet.address),
|
||||||
canEdit: false)
|
),
|
||||||
]),
|
]),
|
||||||
dense: false,
|
dense: false,
|
||||||
isThreeLine: false,
|
isThreeLine: false,
|
||||||
|
|
|
@ -16,11 +16,11 @@ class WalletName extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double newSize = wallet.name!.length <= 15 ? size : size - 2;
|
double newSize = (wallet.name?.length ?? 0) <= 15 ? size : size - 2;
|
||||||
|
|
||||||
return Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
|
return Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
|
||||||
Text(
|
Text(
|
||||||
truncate(wallet.name!, 20),
|
truncate(wallet.name ?? '', 20),
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: isTall ? newSize : newSize * 0.9,
|
fontSize: isTall ? newSize : newSize * 0.9,
|
||||||
|
|
|
@ -48,8 +48,6 @@ class WalletNameController extends StatelessWidget {
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
key: keyRenameWallet,
|
key: keyRenameWallet,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
// _isNewNameValid =
|
|
||||||
// walletProvider.editWalletName(wallet.id(), isCesium: false);
|
|
||||||
await walletOptions.editWalletName(context, wallet.id());
|
await walletOptions.editWalletName(context, wallet.id());
|
||||||
await Future.delayed(const Duration(milliseconds: 30));
|
await Future.delayed(const Duration(milliseconds: 30));
|
||||||
walletNameFocus.requestFocus();
|
walletNameFocus.requestFocus();
|
||||||
|
|
Loading…
Reference in New Issue