mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-29 04:49:51 +00:00
* Add more choices for pin code required duration * Fix spacing in Cake Features * Update Cake Features cards * Update Cake Pay image * Add NanoGPT image * Update Sign/Verify strings * Update more flags * update moonpay currency name * Update more icons * Add friendly message for less than minimum fee * fix translation [skip ci] * Fix icon theming and add Telegram link * Fix color issue for restore screen * rename matic poly to pol * minor potential fix [skip ci] * minor fix [skip ci] * Update analysis_options.yaml * fix translations * fix translation * revert regex changes * Update bitcoin_cash_electrum_server_list.yml * Update address_validator.dart --------- Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
74 lines
2.3 KiB
Dart
74 lines
2.3 KiB
Dart
import 'package:cake_wallet/themes/extensions/option_tile_theme.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class OptionTile extends StatelessWidget {
|
|
const OptionTile(
|
|
{required this.onPressed,
|
|
this.image,
|
|
this.icon,
|
|
required this.title,
|
|
required this.description,
|
|
super.key})
|
|
: assert(image!=null || icon!=null);
|
|
|
|
final VoidCallback onPressed;
|
|
final Image? image;
|
|
final Icon? icon;
|
|
final String title;
|
|
final String description;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return GestureDetector(
|
|
onTap: onPressed,
|
|
child: Container(
|
|
width: double.infinity,
|
|
padding: EdgeInsets.all(24),
|
|
alignment: Alignment.center,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.all(Radius.circular(12)),
|
|
color: Theme.of(context).cardColor,
|
|
),
|
|
child: Row(
|
|
mainAxisSize: MainAxisSize.max,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
icon ?? image!,
|
|
Expanded(
|
|
child: Padding(
|
|
padding: EdgeInsets.only(left: 16),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Text(
|
|
title,
|
|
style: TextStyle(
|
|
fontSize: 20,
|
|
fontWeight: FontWeight.w500,
|
|
color: Theme.of(context).extension<OptionTileTheme>()!.titleColor,
|
|
),
|
|
),
|
|
Padding(
|
|
padding: EdgeInsets.only(top: 5),
|
|
child: Text(
|
|
description,
|
|
style: TextStyle(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.normal,
|
|
color: Theme.of(context).extension<OptionTileTheme>()!.descriptionColor,
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|