Skip to content
Open
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
5 changes: 3 additions & 2 deletions app/lib/presentation/resources/custom_network_image.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:app/presentation/themes/local_theme.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';

Expand Down Expand Up @@ -45,7 +46,7 @@ class CustomNetworkImage extends StatelessWidget {
decoration: BoxDecoration(boxShadow: [
if ((shadow ?? false))
BoxShadow(
color: Colors.black.withValues(alpha: _shadowOpacity),
color: Colors.black.shadow(_shadowOpacity),
spreadRadius: 0,
blurRadius: _blurRadius,
offset: const Offset(5, 5),
Expand All @@ -62,7 +63,7 @@ class CustomNetworkImage extends StatelessWidget {
decoration: BoxDecoration(boxShadow: [
if ((shadow ?? false))
BoxShadow(
color: Colors.black.withValues(alpha: _shadowOpacity),
color: Colors.black.shadow(_shadowOpacity),
spreadRadius: 0,
blurRadius: _blurRadius,
offset: const Offset(5, 5),
Expand Down
8 changes: 8 additions & 0 deletions app/lib/presentation/themes/local_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,14 @@ abstract class LocalTheme {
}

extension ColorShadow on Color {
/// Returns a color with the specified shadow opacity.
/// If no opacity is specified, it defaults to 1.0 (fully opaque).
/// @param opacity value between 0.0 and 1.0
Color shadow(double opacity) {
assert(opacity >= 0.0 && opacity <= 1.0);
return withValues(alpha: opacity);
}

Color variant(int variant) {
try {
return (this as MaterialColor)[variant] ?? this;
Expand Down
12 changes: 6 additions & 6 deletions app/lib/presentation/themes/resources/dark_theme_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class DarkThemeColors implements ThemeColors {
/// 100: onPrimary
@override
// TODO: implement primary
MaterialColor get primary => const MaterialColor(40, {
MaterialColor get primary => const MaterialColor(0xFFFFFFDE, {
0: Color(0xFFFFFFDE),
10: Color(0xFFFFFFDE),
20: Color(0xFFFFFFDE),
Expand All @@ -31,7 +31,7 @@ class DarkThemeColors implements ThemeColors {
/// 100: onSecondary
@override
// TODO: implement secondary
MaterialColor get secondary => const MaterialColor(40, {
MaterialColor get secondary => const MaterialColor(0xFFFFFFFD, {
0: Color(0xFFFFFFDE),
10: Color(0xFF1D192B),
20: Color(0xFFFFFFDE),
Expand All @@ -53,7 +53,7 @@ class DarkThemeColors implements ThemeColors {
/// 100: onTertiary
@override
// TODO: implement tertiary
MaterialColor get tertiary => const MaterialColor(40, {
MaterialColor get tertiary => const MaterialColor(0xFFFFFFDE, {
0: Color(0xFFFFFFDE),
10: Color(0xFFFFFFDE),
20: Color(0xFFFFFFDE),
Expand All @@ -75,7 +75,7 @@ class DarkThemeColors implements ThemeColors {
/// 100: onError
@override
// TODO: implement error
MaterialColor get error => const MaterialColor(40, {
MaterialColor get error => const MaterialColor(0xFFB3261E, {
0: Color(0xFFFFFFDE),
10: Color(0xFF410E0B),
20: Color(0xFFF0524D),
Expand All @@ -96,7 +96,7 @@ class DarkThemeColors implements ThemeColors {
/// 99: background / surface
@override
// TODO: implement neutral
MaterialColor get neutral => const MaterialColor(40, {
MaterialColor get neutral => const MaterialColor(0xFF410E0B, {
0: Color(0xFF410E0B),
10: Color(0xFF410E0B),
20: Color(0xFF410E0B),
Expand All @@ -118,7 +118,7 @@ class DarkThemeColors implements ThemeColors {
/// 90: surfaceVariant
@override
// TODO: implement neutralVariant
MaterialColor get neutralVariant => const MaterialColor(40, {
MaterialColor get neutralVariant => const MaterialColor(0xFFFDDDDE, {
0: Color(0xFF000000),
10: Color(0xFF49454F),
20: Color(0xFFF0524D),
Expand Down
12 changes: 6 additions & 6 deletions app/lib/presentation/themes/resources/light_theme_colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class LightThemeColors implements ThemeColors {
/// 100: onPrimary
@override
// TODO: implement primary
MaterialColor get primary => const MaterialColor(40, {
MaterialColor get primary => const MaterialColor(0xFF6750A4, {
0: Color(0xFF000000),
10: Color(0xFF21005D), // Default Bottom navigation bar labels
20: Color(0xFFF0524D),
Expand All @@ -30,7 +30,7 @@ class LightThemeColors implements ThemeColors {
/// 100: onSecondary
@override
// TODO: implement secondary
MaterialColor get secondary => const MaterialColor(40, {
MaterialColor get secondary => const MaterialColor(0xFF625B71, {
0: Color(0xFF000000),
10: Color(0xFF1D192B),
20: Color(0xFFF0524D),
Expand All @@ -52,7 +52,7 @@ class LightThemeColors implements ThemeColors {
/// 100: onTertiary
@override
// TODO: implement tertiary
MaterialColor get tertiary => const MaterialColor(40, {
MaterialColor get tertiary => const MaterialColor(0xFF7D5260, {
0: Color(0xFF000000),
10: Color(0xFF31111D),
20: Color(0xFFF0524D),
Expand All @@ -74,7 +74,7 @@ class LightThemeColors implements ThemeColors {
/// 100: onError
@override
// TODO: implement error
MaterialColor get error => const MaterialColor(40, {
MaterialColor get error => const MaterialColor(0xFFB3261E, {
0: Color(0xFF000000),
10: Color(0xFF410E0B),
20: Color(0xFFF0524D),
Expand All @@ -95,7 +95,7 @@ class LightThemeColors implements ThemeColors {
/// 99: background / surface
@override
// TODO: implement neutral
MaterialColor get neutral => const MaterialColor(40, {
MaterialColor get neutral => const MaterialColor(0xFFFFFFFF, {
0: Color(0xFFFFFFFF), // Default Shadow
10: Color(0xFFFFFFFF), // Default Text color
20: Color(0xFFFFFFFF),
Expand All @@ -117,7 +117,7 @@ class LightThemeColors implements ThemeColors {
/// 90: surfaceVariant
@override
// TODO: implement neutralVariant
MaterialColor get neutralVariant => const MaterialColor(40, {
MaterialColor get neutralVariant => const MaterialColor(0xFFF0524D, {
0: Color(0xFF000000),
10: Color(0xFF49454F),
20: Color(0xFFF0524D),
Expand Down
11 changes: 11 additions & 0 deletions app/linux/flutter/generated_plugin_registrant.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//
// Generated file. Do not edit.
//

// clang-format off

#include "generated_plugin_registrant.h"


void fl_register_plugins(FlPluginRegistry* registry) {
}
15 changes: 15 additions & 0 deletions app/linux/flutter/generated_plugin_registrant.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// Generated file. Do not edit.
//

// clang-format off

#ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_

#include <flutter_linux/flutter_linux.h>

// Registers Flutter plugins.
void fl_register_plugins(FlPluginRegistry* registry);

#endif // GENERATED_PLUGIN_REGISTRANT_
23 changes: 23 additions & 0 deletions app/linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# Generated file, do not edit.
#

list(APPEND FLUTTER_PLUGIN_LIST
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
)

set(PLUGIN_BUNDLED_LIBRARIES)

foreach(plugin ${FLUTTER_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
endforeach(plugin)

foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
endforeach(ffi_plugin)
4 changes: 2 additions & 2 deletions app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_svg: ^2.0.5
flutter_svg: ^2.2.0
shared_preferences: ^2.5.3
intl: ^0.20.2
intl_utils: ^2.8.7
Expand Down Expand Up @@ -57,7 +57,7 @@ dependencies:
example_presentation:
path: ../example/example_presentation

http: ^0.13.6
http: ^1.5.0
melos: ^3.4.0
dev: ^1.0.0

Expand Down