feat(ui): ability to set background color on LunaBlock tiles [skip ci]

This commit is contained in:
Jagandeep Brar
2022-04-08 12:07:17 -04:00
parent 9b1e5820de
commit e108cfbac5
3 changed files with 10 additions and 4 deletions

View File

@@ -13,6 +13,7 @@ class LunaBlock extends StatelessWidget {
final bool? disabled;
final String? title;
final Color titleColor;
final Color? backgroundColor;
/// If defined, only takes the first body subtitle from the [body] array
/// And allows that single [TextSpan] to overflow to this many lines
@@ -48,6 +49,7 @@ class LunaBlock extends StatelessWidget {
this.disabled = false,
this.title,
this.titleColor = Colors.white,
this.backgroundColor,
this.body,
this.bodyLeadingIcons,
this.bodyLeadingIconsColor = LunaColours.accent,
@@ -157,6 +159,7 @@ class LunaBlock extends StatelessWidget {
onLongPress: onLongPress as void Function()?,
),
height: _height,
color: backgroundColor,
);
}

View File

@@ -21,6 +21,7 @@ class LunaGridBlock extends StatelessWidget {
final bool posterIsSquare;
final String? backgroundUrl;
final Map? backgroundHeaders;
final Color? backgroundColor;
final bool disabled;
final String? title;
@@ -36,6 +37,7 @@ class LunaGridBlock extends StatelessWidget {
required this.title,
required this.subtitle,
this.titleColor = Colors.white,
this.backgroundColor,
this.posterPlaceholderIcon,
this.posterUrl,
this.posterHeaders = const {},
@@ -51,6 +53,7 @@ class LunaGridBlock extends StatelessWidget {
return LunaCard(
context: context,
margin: LunaUI.MARGIN_HALF,
color: backgroundColor,
child: InkWell(
child: Stack(
children: [

View File

@@ -18,7 +18,7 @@ PODS:
- Firebase/Storage (8.14.0):
- Firebase/CoreOnly
- FirebaseStorage (~> 8.14.0)
- firebase_auth (3.3.12):
- firebase_auth (3.3.13):
- Firebase/Auth (~> 8.14.0)
- Firebase/CoreOnly (~> 8.14.0)
- firebase_core
@@ -31,7 +31,7 @@ PODS:
- Firebase/Messaging (~> 8.14.0)
- firebase_core
- FlutterMacOS
- firebase_storage (10.2.10):
- firebase_storage (10.2.11):
- Firebase/CoreOnly (~> 8.14.0)
- Firebase/Storage (~> 8.14.0)
- firebase_core
@@ -194,10 +194,10 @@ CHECKOUT OPTIONS:
SPEC CHECKSUMS:
cloud_firestore: c23ba0e6a76166991659c1ad7f6252c69b4383cb
Firebase: 7e8fe528c161b9271d365217a74c16aaf834578e
firebase_auth: c8026dc7c04e4c1532f1ccc1a72affbacb043c9c
firebase_auth: 14d1bd01f56e2811ba93d0c8f885b76c2f4c3cfd
firebase_core: 1b221df9828666916f22bae151f1b6d139c84e5a
firebase_messaging: 04c6204575e1ad504ff2db09727a1207b32e4ab7
firebase_storage: 28f78dbd0c95f409014399a619a3aa5c305f2315
firebase_storage: 78cd92305e9987105925dfbd52c5462a4a6efcf3
FirebaseAuth: c5fde343630090253d3af7e2d35697b414b40202
FirebaseCore: b84a44ee7ba999e0f9f76d198a9c7f60a797b848
FirebaseCoreDiagnostics: fd0c8490f34287229c1d6c103d3a55f81ec85712