mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 04:32:32 +00:00
NEW - [Home/Calendar] New "schedule" view to view all days as one list - [Home/Modules] Option to use module "brand" colours or the LunaSea list colours - [Search] Option to hide adult categories - [-arr/Catalogue] Ability to sort by date added - [-arr/Search] Show the indexer/tracker on the collapsed tile TWEAKS - [Development] Updated Flutter packages FIXES - Multiple smaller crash/error fixes Thanks to @lightglitch on GitHub for implementing the schedule calendar mode!
44 lines
1.4 KiB
Dart
44 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:lunasea/core.dart';
|
|
import 'package:lunasea/modules/home.dart';
|
|
|
|
class HomeSummaryTile extends StatelessWidget {
|
|
final String title;
|
|
final String subtitle;
|
|
final IconData icon;
|
|
final int index;
|
|
final String route;
|
|
final bool justPush;
|
|
final Color color;
|
|
|
|
HomeSummaryTile({
|
|
@required this.title,
|
|
@required this.subtitle,
|
|
@required this.icon,
|
|
@required this.index,
|
|
@required this.route,
|
|
@required this.color,
|
|
this.justPush = false,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) => ValueListenableBuilder(
|
|
valueListenable: Database.lunaSeaBox.listenable(keys: [HomeDatabaseValue.MODULES_BRAND_COLOURS.key]),
|
|
builder: (context, box, _) => LSCardTile(
|
|
title: LSTitle(text: title),
|
|
subtitle: LSSubtitle(text: subtitle),
|
|
leading: LSIconButton(
|
|
icon: icon,
|
|
color: HomeDatabaseValue.MODULES_BRAND_COLOURS.data
|
|
? color
|
|
: LSColors.list(index),
|
|
),
|
|
trailing: LSIconButton(
|
|
icon: Icons.arrow_forward_ios,
|
|
),
|
|
onTap: () async => justPush
|
|
? Navigator.of(context).pushNamed(route)
|
|
: Navigator.of(context).pushNamedAndRemoveUntil(route, (Route<dynamic> route) => false),
|
|
),
|
|
);
|
|
} |