Этот репозиторий содержит Flutter плагины для платформы ОС Аврора.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

41 lines
1.1 KiB

// SPDX-FileCopyrightText: Copyright 2023 Open Mobile Platform LLC <community@omp.ru>
// SPDX-License-Identifier: BSD-3-Clause
import 'package:flutter/material.dart';
import 'package:flutter_example_packages/theme/radius.dart';
import 'package:flutter_example_packages/widgets/texts/export.dart';
/// Alert
class BlockAlert extends StatelessWidget {
const BlockAlert(
this.text, {
super.key,
this.color = Colors.redAccent,
this.padding = const EdgeInsets.only(bottom: 20),
});
final EdgeInsets padding;
final Color color;
final String? text;
@override
Widget build(BuildContext context) {
return Visibility(
visible: text != null,
child: Padding(
padding: padding,
child: Container(
width: double.infinity,
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: color,
borderRadius: AppRadius.small,
),
child: TextBodyMedium(
'$text',
color: Colors.white,
),
),
),
);
}
}