Files
lunasea/lib/core/ui/card/card_tile.dart
Jagandeep Brar f7807ed762 [Release] v4.2.0+40200001 (#287)
NEW
- [Settings/Modules] Add an information/help button with module descriptions and links

TWEAKS
- [Radarr] Always show the amount of days content will be available instead of limiting it to only content in the next 30 days
- [Settings] Moved "Backup & Restore" and "Logs" to "System" section
- [Settings] Merged "Customization" and "Modules" sections into "Configuration"
- [Settings/Sonarr] Removed the need to enable Sonarr to test the connection
- [Settings/Tautulli] Removed the need to enable Tautulli to test the connection

FIXES
- [IAPs] Ensure all IAPs are marked as "consumed"
- [Flutter] Updated packages
- [Logging] Updated Sentry to v4 framework to improve capturing fatal/crashing bugs
- [Settings/Logs] Hide exception and stack trace buttons when an error is not available
- [Sonarr/History] Fixed history fetching the oldest entries, not the newest
- [State] Correctly clear state when clearing LunaSea's configuration
- [Tautulli/Activity] Fixed consistency of hardware transcoding indicator compared to the web UI
- [UI/Divider] Fix consistency of divider width across regular and AMOLED dark theme
2020-12-22 08:46:25 -06:00

74 lines
2.4 KiB
Dart

import 'package:flutter/material.dart';
import 'package:lunasea/core.dart';
class LSCardTile extends StatelessWidget {
final Widget title;
final Widget subtitle;
final Widget trailing;
final Widget leading;
final Function onTap;
final Function onLongPress;
final bool padContent;
final bool reducedMargin;
final EdgeInsets customPadding;
final EdgeInsets customMargin;
final Decoration decoration;
final Color color;
LSCardTile({
@required this.title,
this.subtitle,
this.trailing,
this.leading,
this.onTap,
this.onLongPress,
this.padContent = false,
this.decoration,
this.customMargin,
this.reducedMargin = false,
this.customPadding,
this.color,
});
@override
Widget build(BuildContext context) => ValueListenableBuilder(
valueListenable: Database.lunaSeaBox.listenable(keys: [
LunaDatabaseValue.THEME_AMOLED.key,
LunaDatabaseValue.THEME_AMOLED_BORDER.key,
]),
builder: (context, box, widget) => Card(
child: Container(
child: InkWell(
child: ListTile(
title: title,
subtitle: subtitle,
trailing: trailing,
leading: leading,
contentPadding: customPadding == null
? padContent
? EdgeInsets.symmetric(vertical: 6.0, horizontal: 12.0)
: null
: customPadding,
),
borderRadius: BorderRadius.circular(Constants.UI_BORDER_RADIUS),
onTap: onTap,
onLongPress: onLongPress,
),
decoration: decoration,
),
margin: customMargin == null
? reducedMargin
? EdgeInsets.symmetric(horizontal: 6.0, vertical: 6.0)
: Constants.UI_CARD_MARGIN
: customMargin,
elevation: Constants.UI_ELEVATION,
shape: LunaDatabaseValue.THEME_AMOLED.data && LunaDatabaseValue.THEME_AMOLED_BORDER.data
? LSRoundedShapeWithBorder()
: LSRoundedShape(),
color: color == null
? Theme.of(context).primaryColor
: color,
),
);
}