mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-09 07:28:14 -07:00
Init repo
This commit is contained in:
commit
764b6034e3
566 changed files with 212335 additions and 0 deletions
31
lib/widgets/shared/status_card.dart
Normal file
31
lib/widgets/shared/status_card.dart
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
class StatusCard extends ConsumerWidget {
|
||||
final Color? color;
|
||||
final Widget child;
|
||||
|
||||
const StatusCard({this.color, required this.child, super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.all(5),
|
||||
child: SizedBox(
|
||||
width: 33,
|
||||
height: 33,
|
||||
child: Card(
|
||||
elevation: 10,
|
||||
surfaceTintColor: color,
|
||||
shadowColor: color != null ? Colors.transparent : null,
|
||||
child: IconTheme(
|
||||
data: IconThemeData(
|
||||
color: color,
|
||||
),
|
||||
child: Center(child: child),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue