mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-09 15:38:13 -07:00
feature: Add new home carousel (#58)
## Pull Request Description This adds a new home carousel better suited for mobile The old one is still available ## Checklist - [x] If a new package was added, did you ensure it works for all supported platforms? Is the package also well maintained? - [x] Did you add localization for any text? If yes, did you sort the .arb file using ```arb_utils sort <INPUT_FILE>```? - [x] Check that any changes are related to the issue at hand. Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
This commit is contained in:
parent
2a2502147a
commit
d572884e61
12 changed files with 1696 additions and 393 deletions
|
|
@ -4,10 +4,11 @@ import 'dart:developer';
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:fladder/util/custom_color_themes.dart';
|
||||
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
import 'package:fladder/util/custom_color_themes.dart';
|
||||
import 'package:fladder/util/localization_helper.dart';
|
||||
|
||||
part 'client_settings_model.freezed.dart';
|
||||
part 'client_settings_model.g.dart';
|
||||
|
||||
|
|
@ -22,6 +23,7 @@ class ClientSettingsModel with _$ClientSettingsModel {
|
|||
Duration? nextUpDateCutoff,
|
||||
@Default(ThemeMode.system) ThemeMode themeMode,
|
||||
ColorThemes? themeColor,
|
||||
@Default(HomeBanner.carousel) HomeBanner homeBanner,
|
||||
@Default(false) bool amoledBlack,
|
||||
@Default(false) bool blurPlaceHolders,
|
||||
@Default(false) bool blurUpcomingEpisodes,
|
||||
|
|
@ -71,6 +73,18 @@ class LocaleConvert implements JsonConverter<Locale?, String?> {
|
|||
}
|
||||
}
|
||||
|
||||
enum HomeBanner {
|
||||
carousel,
|
||||
banner;
|
||||
|
||||
const HomeBanner();
|
||||
|
||||
String label(BuildContext context) => switch (this) {
|
||||
HomeBanner.carousel => context.localized.homeBannerCarousel,
|
||||
HomeBanner.banner => context.localized.homeBannerBanner,
|
||||
};
|
||||
}
|
||||
|
||||
class Vector2 {
|
||||
final double x;
|
||||
final double y;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue