Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make icons aligned #815

Merged
merged 2 commits into from
Dec 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 50 additions & 29 deletions app/lib/widgets/farm_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ class _FarmItemWidgetState extends State<FarmItemWidget> {
},
icon: const Icon(Icons.person))
: null)),
subtitle: const Text('This address will be used for payout.'),
subtitle: const Padding(padding: EdgeInsets.only(top:10),
child: Text('This address will be used for payout.')),
trailing: isSaving
? Transform.scale(
scale: 0.5, child: const CircularProgressIndicator())
Expand Down Expand Up @@ -287,36 +288,56 @@ class _FarmItemWidgetState extends State<FarmItemWidget> {
),
),
ListTile(
title: TextField(
readOnly: true,
obscureText: !showTfchainSecret,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
title: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: TextField(
readOnly: true,
obscureText: !showTfchainSecret,
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
color: Theme.of(context).colorScheme.onSurface,
),
controller: tfchainWalletSecretController,
decoration: InputDecoration(
labelText: 'TFChain Secret',
suffixIcon: IconButton(
onPressed: () {
setState(() {
showTfchainSecret = !showTfchainSecret;
});
},
icon: Icon(
showTfchainSecret
? Icons.visibility
: Icons.visibility_off,
),
),
),
controller: tfchainWalletSecretController,
decoration: InputDecoration(
labelText: 'TFChain Secret',
suffixIcon: IconButton(
onPressed: () {
setState(() {
showTfchainSecret = !showTfchainSecret;
});
},
icon: Icon(showTfchainSecret
? Icons.visibility
: Icons.visibility_off)),
)),
),
),
Column(
mainAxisSize: MainAxisSize.min,
children: [
const SizedBox(height: 30),
IconButton(
onPressed: () {
Clipboard.setData(ClipboardData(
text: tfchainWalletSecretController.text));
ScaffoldMessenger.of(context).clearSnackBars();
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text('Copied!')));
},
icon: const Icon(Icons.copy),
),
],
),

],
),
subtitle: const Text(
'You can login into ThreeFold Dashboard using this secret for more farm management.'),
trailing: IconButton(
onPressed: () {
Clipboard.setData(
ClipboardData(text: tfchainWalletSecretController.text));
ScaffoldMessenger.of(context).clearSnackBars();
ScaffoldMessenger.of(context)
.showSnackBar(const SnackBar(content: Text('Copied!')));
},
icon: const Icon(Icons.copy)),
'Use this secret to log in to the ThreeFold Dashboard for farm management.',
),
),
ListTile(
title: TextField(
Expand Down
Loading