feat(upload): enhance PDF upload banners with title and description
This commit is contained in:
@@ -186,7 +186,8 @@ class _CertificateUploadPageState extends State<CertificateUploadPage> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
PdfFileTypesBanner(
|
||||
message: t.staff_documents.upload.pdf_banner,
|
||||
title: t.staff_documents.upload.pdf_banner_title,
|
||||
description: t.staff_documents.upload.pdf_banner_description,
|
||||
),
|
||||
const SizedBox(height: UiConstants.space6),
|
||||
|
||||
|
||||
@@ -3,12 +3,24 @@ import 'package:flutter/material.dart';
|
||||
|
||||
/// Banner displaying accepted file types and size limit for PDF upload.
|
||||
class PdfFileTypesBanner extends StatelessWidget {
|
||||
const PdfFileTypesBanner({super.key, required this.message});
|
||||
const PdfFileTypesBanner({
|
||||
super.key,
|
||||
required this.title,
|
||||
this.description,
|
||||
});
|
||||
|
||||
final String message;
|
||||
/// Short title for the banner.
|
||||
final String title;
|
||||
|
||||
/// Optional description with additional details.
|
||||
final String? description;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return UiNoticeBanner(title: message, icon: UiIcons.info);
|
||||
return UiNoticeBanner(
|
||||
title: title,
|
||||
description: description,
|
||||
icon: UiIcons.info,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,8 @@ class DocumentUploadPage extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
PdfFileTypesBanner(
|
||||
message: t.staff_documents.upload.pdf_banner,
|
||||
title: t.staff_documents.upload.pdf_banner_title,
|
||||
description: t.staff_documents.upload.pdf_banner_description,
|
||||
),
|
||||
const SizedBox(height: UiConstants.space6),
|
||||
DocumentFileSelector(
|
||||
|
||||
@@ -3,12 +3,24 @@ import 'package:flutter/material.dart';
|
||||
|
||||
/// Banner displaying accepted file types and size limit for PDF upload.
|
||||
class PdfFileTypesBanner extends StatelessWidget {
|
||||
const PdfFileTypesBanner({required this.message, super.key});
|
||||
const PdfFileTypesBanner({
|
||||
super.key,
|
||||
required this.title,
|
||||
this.description,
|
||||
});
|
||||
|
||||
final String message;
|
||||
/// Short title for the banner.
|
||||
final String title;
|
||||
|
||||
/// Optional description with additional details.
|
||||
final String? description;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return UiNoticeBanner(title: message, icon: UiIcons.info);
|
||||
return UiNoticeBanner(
|
||||
title: title,
|
||||
description: description,
|
||||
icon: UiIcons.info,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user