63 lines
1.7 KiB
Dart
63 lines
1.7 KiB
Dart
|
|
import 'package:flutter/material.dart';
|
|
import 'package:oc_front/main.dart';
|
|
|
|
class InfoAlertBannerChild extends StatelessWidget {
|
|
final String text;
|
|
const InfoAlertBannerChild({super.key, required this.text});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
width: double.infinity,
|
|
constraints: BoxConstraints(maxWidth: getMainWidth(context) * 0.8),
|
|
decoration: const BoxDecoration(
|
|
color: Colors.greenAccent,
|
|
borderRadius: BorderRadius.all(Radius.circular(5)),
|
|
),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(10),
|
|
child: Material(
|
|
color: Colors.transparent,
|
|
child: Text(text,
|
|
style: const TextStyle(color: Colors.white, fontSize: 18),
|
|
maxLines: 3,
|
|
overflow: TextOverflow.ellipsis,
|
|
textAlign: TextAlign.center,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
class AlertAlertBannerChild extends StatelessWidget {
|
|
final String text;
|
|
const AlertAlertBannerChild({super.key, required this.text});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
width: double.infinity,
|
|
constraints: BoxConstraints(maxWidth: getMainWidth(context) * 0.8),
|
|
decoration: BoxDecoration(
|
|
color: redColor,
|
|
borderRadius: BorderRadius.all(
|
|
Radius.circular(5),
|
|
),
|
|
),
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(10),
|
|
child: Material(
|
|
color: Colors.transparent,
|
|
child: Text( text,
|
|
style: const TextStyle(color: Colors.white, fontSize: 18),
|
|
maxLines: 3,
|
|
overflow: TextOverflow.ellipsis,
|
|
textAlign: TextAlign.center,
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |