mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-14 03:32:23 +01:00
Made build portable
This commit is contained in:
51
dependencies/fluent_ui-3.12.0/lib/src/controls/surfaces/card.dart
vendored
Normal file
51
dependencies/fluent_ui-3.12.0/lib/src/controls/surfaces/card.dart
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
import 'package:fluent_ui/fluent_ui.dart';
|
||||
|
||||
class Card extends StatelessWidget {
|
||||
const Card({
|
||||
Key? key,
|
||||
required this.child,
|
||||
this.padding = const EdgeInsets.all(12.0),
|
||||
this.backgroundColor,
|
||||
this.elevation = 4.0,
|
||||
this.borderRadius = const BorderRadius.all(Radius.circular(6.0)),
|
||||
}) : super(key: key);
|
||||
|
||||
/// The card content
|
||||
final Widget child;
|
||||
|
||||
/// The padding around content
|
||||
final EdgeInsets padding;
|
||||
|
||||
/// The background color.
|
||||
///
|
||||
/// If null, [ThemeData.cardColor] is used
|
||||
final Color? backgroundColor;
|
||||
|
||||
/// The z-coordinate relative to the parent at which to place this card
|
||||
///
|
||||
/// The valus is non-negative
|
||||
final double elevation;
|
||||
|
||||
/// The rounded corners of this card
|
||||
final BorderRadiusGeometry borderRadius;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
assert(debugCheckHasFluentLocalizations(context));
|
||||
assert(debugCheckHasDirectionality(context));
|
||||
final theme = FluentTheme.of(context);
|
||||
return PhysicalModel(
|
||||
elevation: elevation,
|
||||
color: Colors.transparent,
|
||||
borderRadius: borderRadius.resolve(Directionality.of(context)),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: backgroundColor ?? theme.cardColor,
|
||||
borderRadius: borderRadius,
|
||||
),
|
||||
padding: padding,
|
||||
child: child,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user