feat: Update file selector and PDF types banner to use super.key for improved widget initialization
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:core_localization/core_localization.dart';
|
||||
/// Widget for selecting certificate file.
|
||||
class FileSelector extends StatelessWidget {
|
||||
const FileSelector({
|
||||
super.key,
|
||||
required this.selectedFilePath,
|
||||
required this.onTap,
|
||||
});
|
||||
|
||||
@@ -3,33 +3,12 @@ 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});
|
||||
const PdfFileTypesBanner({super.key, required this.message});
|
||||
|
||||
final String message;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: UiConstants.space4,
|
||||
vertical: UiConstants.space3,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.primaryForeground,
|
||||
borderRadius: BorderRadius.circular(UiConstants.radiusBase),
|
||||
border: Border.all(color: UiColors.primary.withValues(alpha: 0.3)),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
const Icon(UiIcons.info, size: 20, color: UiColors.primary),
|
||||
const SizedBox(width: UiConstants.space3),
|
||||
Expanded(
|
||||
child: Text(message, style: UiTypography.body2r.textSecondary),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
return UiNoticeBanner(title: message, icon: UiIcons.info);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user