Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added requested features and themes #269

Merged
merged 4 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"cSpell.words": [
"canonicalized",
"Compat",
"dattatreya",
"horiz",
"keydown",
"kindlish",
"localsourcelang",
"Mangas",
Expand All @@ -26,4 +28,4 @@
"licenser.license": "MPLv2",
"licenser.projectName": "Tachidesk-Sorayomi",
"licenser.author": "Contributors to the Suwayomi project"
}
}
34 changes: 0 additions & 34 deletions lib/src/constants/app_sizes.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import 'dart:math';

import 'package:flutter/material.dart';

import '../utils/extensions/custom_extensions.dart';
import 'app_constants.dart';
import 'db_keys.dart';

Expand Down Expand Up @@ -72,39 +71,6 @@ enum KEdgeInsets {
final EdgeInsets size;
}

enum KSizedBox {
h4(SizedBox(height: 4)),
h8(SizedBox(height: 8)),
w4(SizedBox(width: 4)),
h16(SizedBox(height: 16)),
w16(SizedBox(width: 16)),
h32(SizedBox(height: 32)),
w32(SizedBox(width: 32)),
h64(SizedBox(height: 64)),
w64(SizedBox(width: 64)),
h96(SizedBox(height: 96)),
w96(SizedBox(width: 96)),
h104(SizedBox(height: 104)),
;

static SizedBox scale(
BuildContext context, {
double? height,
double? width,
Widget? child,
}) {
return SizedBox(
height: height != null ? context.height * height : null,
width: width != null ? context.width * width : null,
child: child,
);
}

const KSizedBox(this.size);

final SizedBox size;
}

enum KBorderRadius {
r8(BorderRadius.all(Radius.circular(8))),
r12(BorderRadius.all(Radius.circular(12))),
Expand Down
27 changes: 0 additions & 27 deletions lib/src/constants/app_themes/app_theme.dart

This file was deleted.

88 changes: 0 additions & 88 deletions lib/src/constants/app_themes/color_schemas/default_theme.dart

This file was deleted.

4 changes: 4 additions & 0 deletions lib/src/constants/db_keys.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

import 'package:flex_color_scheme/flex_color_scheme.dart';
import 'package:flutter/material.dart';

import 'enum.dart';
Expand All @@ -16,6 +17,7 @@ enum DBKeys {
extensionLanguageFilter(["installed", "update", "en", "all"]),
sourceLastUsed(null),
themeMode(ThemeMode.system),
isTrueBlack(false),
authType(AuthType.none),
basicCredentials(null),
readerMode(ReaderMode.webtoon),
Expand Down Expand Up @@ -46,6 +48,8 @@ enum DBKeys {
readerOverlay(true),
volumeTap(false),
volumeTapInvert(false),
pinchToZoom(true),
flexScheme(FlexScheme.material),
;

const DBKeys(this.initial);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class _$AboutImpl implements _About {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$AboutImpl &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class _$ServerUpdateImpl implements _ServerUpdate {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ServerUpdateImpl &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@

import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:go_router/go_router.dart';

import '../../../../../constants/urls.dart';

import '../../../../../utils/extensions/custom_extensions.dart';
import '../../../../../utils/launch_url_in_web.dart';
import '../../../../../utils/misc/toast/toast.dart';
Expand All @@ -29,14 +27,14 @@ void appUpdateDialog({
content: Text(context.l10n!.versionAvailable(title, newRelease)),
actions: [
TextButton(
onPressed: () => context.pop(),
onPressed: () => Navigator.pop(context),
child: Text(context.l10n!.close),
),
ElevatedButton.icon(
onPressed: () {
launchUrlInWeb(context,
url ?? AppUrls.sorayomiLatestReleaseUrl.url, toast);
context.pop();
Navigator.pop(context);
},
icon: const Icon(FontAwesomeIcons.github),
label: Text(context.l10n!.gitHub),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ class _$ExtensionImpl implements _Extension {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ExtensionImpl &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class _$FilterImpl implements _Filter {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FilterImpl &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class _$FilterHeaderImpl implements FilterHeader {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FilterHeaderImpl &&
Expand Down Expand Up @@ -432,7 +432,7 @@ class _$FilterSeparatorImpl implements FilterSeparator {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FilterSeparatorImpl &&
Expand Down Expand Up @@ -643,7 +643,7 @@ class _$FilterTextImpl implements FilterText {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FilterTextImpl &&
Expand Down Expand Up @@ -853,7 +853,7 @@ class _$FilterCheckBoxImpl implements FilterCheckBox {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FilterCheckBoxImpl &&
Expand Down Expand Up @@ -1064,7 +1064,7 @@ class _$FilterTriStateImpl implements FilterTriState {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FilterTriStateImpl &&
Expand Down Expand Up @@ -1305,7 +1305,7 @@ class _$FilterSortImpl implements FilterSort {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FilterSortImpl &&
Expand Down Expand Up @@ -1539,7 +1539,7 @@ class _$FilterSelectImpl implements FilterSelect {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FilterSelectImpl &&
Expand Down Expand Up @@ -1765,7 +1765,7 @@ class _$FilterGroupImpl implements FilterGroup {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FilterGroupImpl &&
Expand Down Expand Up @@ -2024,7 +2024,7 @@ class _$SortStateImpl implements _SortState {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$SortStateImpl &&
Expand Down Expand Up @@ -2178,7 +2178,7 @@ class _$SelectValuesImpl implements _SelectValues {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$SelectValuesImpl &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class _$LanguageImpl extends _Language {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$LanguageImpl &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class _$MangaPageImpl implements _MangaPage {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$MangaPageImpl &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class _$SourceImpl implements _Source {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$SourceImpl &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class _$SourcePreferenceImpl implements _SourcePreference {
}

@override
bool operator ==(dynamic other) {
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$SourcePreferenceImpl &&
Expand Down
Loading