2024-05-22 20:48:44 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter/widgets.dart';
|
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
2024-05-31 14:35:41 +00:00
|
|
|
import 'package:mnemo_cards/utils/color_helper.dart';
|
2024-05-22 20:48:44 +00:00
|
|
|
import 'package:mnemo_cards_common/mnemo_cards_common.dart';
|
|
|
|
|
import 'package:mnemo_cards/utils/string_helper.dart';
|
|
|
|
|
import '../header.dart';
|
|
|
|
|
|
|
|
|
|
class CardPackHeader extends StatelessWidget {
|
|
|
|
|
final String? title;
|
|
|
|
|
final String? subtitle;
|
|
|
|
|
final Color? color;
|
|
|
|
|
|
|
|
|
|
CardPackHeader(this.title, this.subtitle, this.color);
|
|
|
|
|
|
|
|
|
|
CardPackHeader.fromDto(CardPackDto? dto)
|
|
|
|
|
: title = dto?.title,
|
|
|
|
|
subtitle = dto?.subtitle,
|
|
|
|
|
color = dto?.color?.asColor;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
Header(
|
|
|
|
|
title,
|
|
|
|
|
subtitle: subtitle,
|
|
|
|
|
popText: 'к темам',
|
|
|
|
|
hasPopButton: true,
|
2024-05-31 14:35:41 +00:00
|
|
|
color: null,// color?.withOpacity(0.5),
|
2024-05-22 20:48:44 +00:00
|
|
|
),
|
2024-05-31 14:35:41 +00:00
|
|
|
Container(
|
|
|
|
|
color: null, //color?.withOpacity(0.5),
|
|
|
|
|
height: 25.h,
|
2024-05-22 20:48:44 +00:00
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
color: color ?? Colors.grey.withOpacity(0.5),
|
|
|
|
|
height: 1,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|