Files
lunasea/lib/core/ui/description_block.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

70 lines
2.7 KiB
Dart

import 'package:flutter/material.dart';
import 'package:lunasea/core.dart';
class LSDescriptionBlock extends StatefulWidget {
final String description;
final String title;
final String uri;
final String fallbackImage;
final bool squareImage;
final Map headers;
LSDescriptionBlock({
@required this.description,
@required this.title,
@required this.uri,
@required this.fallbackImage,
@required this.headers,
this.squareImage = false,
});
@override
State<StatefulWidget> createState() => _State();
}
class _State extends State<LSDescriptionBlock> {
final double _imageDimension = 105.0;
@override
Widget build(BuildContext context) {
return LSCard(
child: InkWell(
child: Row(
children: <Widget>[
widget.uri != null
? LSNetworkImage(
height: _imageDimension,
width: widget.squareImage ? _imageDimension : _imageDimension/1.5,
url: widget.uri,
placeholder: widget.fallbackImage,
headers: ((Database.currentProfileObject.getLidarr()['headers'] ?? {}) as Map).cast<String, String>(),
)
: Container(),
Expanded(
child: Container(
height: _imageDimension,
child: Padding(
child: Text(
widget.description ?? 'No summary is available.',
overflow: TextOverflow.ellipsis,
maxLines: 5,
style: TextStyle(
color: Colors.white,
fontSize: Constants.UI_FONT_SIZE_SUBTITLE,
),
textAlign: TextAlign.start,
),
padding: EdgeInsets.all(12.0),
),
alignment: Alignment.center,
),
),
],
),
borderRadius: BorderRadius.circular(Constants.UI_BORDER_RADIUS),
onTap: () => LunaDialogs().textPreview(context, widget.title, widget.description.trim() ?? 'No summary is available.'),
),
);
}
}