Skip to content

Commit

Permalink
change images
Browse files Browse the repository at this point in the history
  • Loading branch information
Ziedelth committed Dec 16, 2024
1 parent 5804473 commit 4aafa1f
Show file tree
Hide file tree
Showing 89 changed files with 287 additions and 210 deletions.
Binary file modified android/app/src/main/res/drawable-hdpi/android12splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-hdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-mdpi/android12splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-mdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-night-hdpi/android12splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-night-mdpi/android12splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-night-v21/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-night/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-v21/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xhdpi/android12splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xhdpi/ic_launcher_background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-xxhdpi/android12splash.png
Binary file modified android/app/src/main/res/drawable-xxhdpi/splash.png
Binary file modified android/app/src/main/res/drawable-xxxhdpi/android12splash.png
Binary file modified android/app/src/main/res/drawable-xxxhdpi/splash.png
Binary file modified android/app/src/main/res/drawable/background.png
8 changes: 6 additions & 2 deletions android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground>
<inset
android:drawable="@drawable/ic_launcher_foreground"
android:inset="16%" />
</foreground>
</adaptive-icon>
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary file added assets/dark_icon.png
Binary file added assets/dark_icon_padding.png
Binary file removed assets/icon_450x450.png
Diff not rendered.
Binary file added assets/light_icon.png
Binary file added assets/light_icon_padding.png
Binary file removed assets/splash.png
Diff not rendered.
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
Binary file modified ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
33 changes: 33 additions & 0 deletions ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,48 @@
"idiom" : "universal",
"scale" : "1x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "LaunchImageDark.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "[email protected]",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
Expand Down
Binary file modified ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
Binary file modified ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
2 changes: 2 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,7 @@
<string>Used to upload a profile picture</string>
<key>FirebaseAppDelegateProxyEnabled</key>
<false/>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
6 changes: 6 additions & 0 deletions lib/components/custom_gesture_detector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ class _CustomGestureDetectorState extends State<CustomGestureDetector> {
onTapDown: (final TapDownDetails details) {
_tapDownDetails = details;
},
onSecondaryTapDown: (final TapDownDetails details) {
_tapDownDetails = details;
},
onSecondaryTap: () {
widget.onLongPress?.call(_tapDownDetails);
},
child: widget.child,
);
}
4 changes: 3 additions & 1 deletion lib/components/episodes/episode_information_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ class EpisodeInformation extends StatelessWidget {
required this.episode,
super.key,
this.showSeason = true,
this.style,
});

final EpisodeMappingDto episode;
final bool showSeason;
final TextStyle? style;

@override
Widget build(final BuildContext context) => Text(
Expand All @@ -26,7 +28,7 @@ class EpisodeInformation extends StatelessWidget {
.episodeType(episode.episodeType.toLowerCase()),
episode.number,
),
style: Theme.of(context).textTheme.bodyMedium,
style: style ?? Theme.of(context).textTheme.bodyMedium,
overflow: TextOverflow.ellipsis,
);
}
5 changes: 4 additions & 1 deletion lib/components/episodes/followed_episode_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ class FollowedEpisodeComponent extends StatelessWidget {
maxLines: 1,
textAlign: TextAlign.center,
),
EpisodeInformation(episode: episode),
EpisodeInformation(
episode: episode,
style: Theme.of(context).textTheme.bodySmall,
),
],
),
),
Expand Down
9 changes: 5 additions & 4 deletions lib/controllers/missed_anime_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ import 'package:application/controllers/generic_controller.dart';
import 'package:application/controllers/member_controller.dart';
import 'package:application/dtos/missed_anime_dto.dart';
import 'package:application/dtos/pageable_dto.dart';
import 'package:application/utils/constant.dart';
import 'package:application/utils/http_request.dart';
import 'package:application/utils/widget_builder.dart' as wb;

class MissedAnimeController extends GenericController<MissedAnimeDto> {
static final MissedAnimeController instance = MissedAnimeController();

int get _limit =>
wb.WidgetBuilder.instance.getDeviceType() == wb.DeviceType.mobile
? 9
: 24;
int get _limit => Constant.isAndroidOrIOS &&
wb.WidgetBuilder.instance.getDeviceType() == wb.DeviceType.mobile
? 9
: 24;

void setItems(final List<MissedAnimeDto> items) {
this.items.clear();
Expand Down
11 changes: 5 additions & 6 deletions lib/controllers/navigation_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ class NavigationController {
member: snapshot.data,
width: 32,
height: 32,
hasBorder: Constant.isAndroidOrIOS && _currentIndex == 3,
hasBorder: _currentIndex == 3,
),
),
title: AppLocalizations.of(context)!.myAccount,
Expand Down Expand Up @@ -352,15 +352,14 @@ class _DrawerButtonState extends State<DrawerButton> {
},
child: SizedBox(
width: 105,
height: 80,
height: 82,
child: Container(
decoration: isHoverActive || widget.isActive
? BoxDecoration(
color: Theme.of(context)
.elevatedButtonTheme
.style!
.backgroundColor!
.resolve(<WidgetState>{}),
.getCardButtonStyle()
?.backgroundColor
?.resolve(<WidgetState>{}),
borderRadius: const BorderRadius.all(
Radius.circular(Constant.borderRadius),
),
Expand Down
13 changes: 9 additions & 4 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ class MyApp extends StatelessWidget {
snackBarBackground: Colors.white,
elevatedButtonBackground: const Color(0xfff6f6f6),
elevatedButtonShadowColor: Colors.grey[300]!,
iconImage: const AssetImage('assets/dark_icon.png'),
),
darkTheme: _buildTheme(
brightness: Brightness.dark,
Expand All @@ -91,6 +92,7 @@ class MyApp extends StatelessWidget {
snackBarBackground: Colors.grey[900]!,
elevatedButtonBackground: const Color(0xff1f1f1f),
elevatedButtonShadowColor: Colors.grey[900]!,
iconImage: const AssetImage('assets/light_icon.png'),
),
home: hasInternet ? const MyHomePage() : const NoInternet(),
debugShowCheckedModeBanner: false,
Expand All @@ -105,6 +107,7 @@ class MyApp extends StatelessWidget {
required final Color snackBarBackground,
required final Color elevatedButtonBackground,
required final Color elevatedButtonShadowColor,
required final AssetImage iconImage,
}) =>
ThemeData(
brightness: brightness,
Expand Down Expand Up @@ -176,12 +179,14 @@ class MyApp extends StatelessWidget {
dialogTheme: DialogTheme(
backgroundColor: canvasColor,
),
)..addInputDecorationTheme(
)
..addInputDecorationTheme(
ElevatedButton.styleFrom(
backgroundColor: elevatedButtonBackground,
shadowColor: elevatedButtonShadowColor,
),
);
)
..addImageDecorationTheme(iconImage);
}

class MyHomePage extends StatefulWidget {
Expand Down Expand Up @@ -309,8 +314,8 @@ class ApplicationAppBar extends StatelessWidget implements PreferredSizeWidget {
AppBar(
elevation: 0,
centerTitle: false,
title: const Image(
image: AssetImage('assets/icon_450x450.png'),
title: Image(
image: Theme.of(context).getIconImage()!,
width: 36,
height: 36,
),
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/constant.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

class Constant {
static const String apiUrl = 'https://api.shikkanime.fr';
static const String baseUrl = 'https://www.shikkanime.fr';
static const String apiUrl = 'http://192.168.1.71:37100/api';
static const String baseUrl = 'http://192.168.1.71:37100';

static const Color watchlistBookmarkColor = Colors.yellow;
static const double borderRadius = 16;
Expand Down
7 changes: 7 additions & 0 deletions lib/utils/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,17 @@ extension ExtensionsList<T> on List<T> {

extension ExtensionsThemeData on ThemeData {
static final Map<Brightness, ButtonStyle> _map = <Brightness, ButtonStyle>{};
static final Map<Brightness, AssetImage> _mapImage =
<Brightness, AssetImage>{};

void addInputDecorationTheme(final ButtonStyle buttonStyle) {
_map[brightness] = buttonStyle;
}

void addImageDecorationTheme(final AssetImage image) {
_mapImage[brightness] = image;
}

ButtonStyle? getCardButtonStyle() => _map[brightness];
AssetImage? getIconImage() => _mapImage[brightness];
}
Loading

0 comments on commit 4aafa1f

Please sign in to comment.