Files
hash-wallet/lib/new-ui/widgets/modal_header.dart
T
malik1004xandGitHub 89e07fbba6 Move to precompiled SVGs (#3072)
* add compile script

* merge

* move to CakeImageWidget

* add precompiled .vec

* fix double declaration

* move .svg

* add to ci

* add svgs
2026-03-13 00:42:06 +01:00

50 lines
1.6 KiB
Dart

import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
class ModalHeader extends StatelessWidget {
const ModalHeader(
{super.key, required this.iconPath, required this.message, required this.title});
final String iconPath;
final String title;
final String message;
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainer,
borderRadius: BorderRadius.circular(16)),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
spacing: 10,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
CakeImageWidget(
imageUrl: iconPath, width: 36, height: 36),
Text(
title,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: Theme.of(context).colorScheme.onSurface),
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 32),
child: Text(
message,
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w400,
color: Theme.of(context).colorScheme.onSurfaceVariant),
textAlign: TextAlign.center,
))
],
),
),
);
}
}