41 lines
1.0 KiB
Dart
41 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
class MessageCardWidget extends StatelessWidget {
|
|
final String message;
|
|
final String? selectedFont;
|
|
const MessageCardWidget({super.key, required this.message, this.selectedFont});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Stack(
|
|
alignment: Alignment.center,
|
|
children: [
|
|
Image.asset(
|
|
'assets/images/postcard_bg.png',
|
|
width: double.infinity,
|
|
fit: BoxFit.contain,
|
|
),
|
|
|
|
Positioned(
|
|
right: 10,
|
|
top: 50,
|
|
child: SizedBox(
|
|
width: 150.w,
|
|
child: Text(message,
|
|
textAlign: TextAlign.left,
|
|
style: TextStyle(
|
|
fontFamily: selectedFont ??
|
|
GoogleFonts.poppins().fontFamily,
|
|
color: Colors.black,
|
|
fontSize: 10,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|