Apply new design for recover deleted emails
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -3,32 +3,28 @@ import 'package:flutter/material.dart';
|
||||
|
||||
class LimitsBanner extends StatelessWidget {
|
||||
final String bannerContent;
|
||||
|
||||
final EdgeInsetsGeometry? padding;
|
||||
final bool isCenter;
|
||||
|
||||
const LimitsBanner({
|
||||
super.key,
|
||||
required this.bannerContent,
|
||||
this.isCenter = false,
|
||||
this.padding,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(vertical: 12.0, horizontal: 16.0),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.yellow[400],
|
||||
borderRadius: const BorderRadius.all(Radius.circular(8.0)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
bannerContent,
|
||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||
fontSize: 16,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
final bodyWidget = Text(
|
||||
bannerContent,
|
||||
textAlign: isCenter ? TextAlign.center : TextAlign.start,
|
||||
style: ThemeUtils.textStyleM3BodyMedium1,
|
||||
);
|
||||
|
||||
if (padding != null) {
|
||||
return Padding(padding: padding!, child: bodyWidget);
|
||||
} else {
|
||||
return bodyWidget;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user