mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-03-22 15:19:02 +00:00
92 lines
3.1 KiB
Dart
92 lines
3.1 KiB
Dart
import 'package:auto_size_text/auto_size_text.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:cake_wallet/palette.dart';
|
|
|
|
class IntroducingCard extends StatelessWidget {
|
|
IntroducingCard(
|
|
{required this.borderColor,
|
|
required this.closeCard,
|
|
required this.title,
|
|
required this.subTitle});
|
|
|
|
final String title;
|
|
final String subTitle;
|
|
final Color borderColor;
|
|
final Function() closeCard;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Padding(
|
|
padding: const EdgeInsets.fromLTRB(16,0,16,16),
|
|
child: Container(
|
|
width: double.infinity,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(30.0),
|
|
border: Border.all(
|
|
color: borderColor,
|
|
width: 1,
|
|
),
|
|
color: Theme.of(context).textTheme!.headline6!.backgroundColor!),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Expanded(
|
|
flex: 1,
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(24),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
AutoSizeText(title ?? '',
|
|
style: TextStyle(
|
|
fontSize: 24,
|
|
fontFamily: 'Lato',
|
|
fontWeight: FontWeight.bold,
|
|
color: Theme.of(context)
|
|
.accentTextTheme!
|
|
.headline2!
|
|
.backgroundColor!,
|
|
height: 1),
|
|
maxLines: 1,
|
|
textAlign: TextAlign.center),
|
|
SizedBox(height: 14),
|
|
Text(subTitle ?? '',
|
|
textAlign: TextAlign.left,
|
|
style: TextStyle(
|
|
fontSize: 12,
|
|
fontFamily: 'Lato',
|
|
color: Theme.of(context)
|
|
.accentTextTheme!
|
|
.headline2!
|
|
.backgroundColor!,
|
|
height: 1)),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.fromLTRB(0,16,16,0),
|
|
child: GestureDetector(
|
|
onTap: closeCard,
|
|
child: Container(
|
|
height: 23,
|
|
width: 23,
|
|
decoration: BoxDecoration(
|
|
color: Colors.white, shape: BoxShape.circle),
|
|
child: Center(
|
|
child: Image.asset(
|
|
'assets/images/x.png',
|
|
color: Palette.darkBlueCraiola,
|
|
height: 15,
|
|
width: 15,
|
|
)),
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|