Skip to content

Commit

Permalink
地図色をMaterial Color利用へ変更 (#534)
Browse files Browse the repository at this point in the history
* update flutter

* fix: 初期化バグ

* fix: 地図色をMaterial Color利用へ変更
  • Loading branch information
YumNumm authored Jan 21, 2024
1 parent 39a705e commit e30edbd
Show file tree
Hide file tree
Showing 14 changed files with 173 additions and 197 deletions.
2 changes: 1 addition & 1 deletion .fvm/fvm_config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"flutterSdkVersion": "3.16.7",
"flutterSdkVersion": "3.19.0-0.2.pre@beta",
"flavors": {}
}
2 changes: 1 addition & 1 deletion ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1500;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
85145B1D2B1F5A0100784C85 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
46 changes: 16 additions & 30 deletions lib/core/provider/map/map_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,45 +28,31 @@ class MapColorScheme with _$MapColorScheme {
@JsonKey(fromJson: colorFromJson, toJson: colorToJson)
required Color worldLandColor,
@JsonKey(fromJson: colorFromJson, toJson: colorToJson)
required Color worldCoastlineColor,
@JsonKey(fromJson: colorFromJson, toJson: colorToJson)
required Color worldBorderLineColor,
required Color worldLineColor,
@JsonKey(fromJson: colorFromJson, toJson: colorToJson)
required Color japanLandColor,
@JsonKey(fromJson: colorFromJson, toJson: colorToJson)
required Color japanCoastlineColor,
@JsonKey(fromJson: colorFromJson, toJson: colorToJson)
required Color japanBorderLineColor,
required Color japanLineColor,
}) = _MapColorScheme;

factory MapColorScheme.fromJson(Map<String, dynamic> json) =>
_$MapColorSchemeFromJson(json);

factory MapColorScheme.light() => MapColorScheme(
backgroundColor: Color.lerp(
const Color.fromARGB(255, 253, 252, 255),
Colors.blueAccent,
0.3,
)!,
worldLandColor: Colors.white.withOpacity(0.8),
worldCoastlineColor: Colors.black.withOpacity(0.15),
worldBorderLineColor: Colors.black.withOpacity(0.3),
japanLandColor: Colors.white,
japanCoastlineColor: Colors.grey.withOpacity(0.5),
japanBorderLineColor: Colors.grey,
factory MapColorScheme.light({required ColorScheme colorScheme}) =>
MapColorScheme(
backgroundColor: colorScheme.surfaceVariant,
worldLandColor: colorScheme.surface,
worldLineColor: colorScheme.onSurfaceVariant,
japanLandColor: colorScheme.surface,
japanLineColor: colorScheme.onSurfaceVariant,
);

factory MapColorScheme.dark() => MapColorScheme(
backgroundColor: Color.lerp(
const Color(0xff0a0a0a),
Colors.blueAccent,
0.3,
)!,
worldLandColor: Colors.blueGrey.shade900.withOpacity(0.9),
worldCoastlineColor: Colors.white.withOpacity(0.3),
worldBorderLineColor: Colors.white.withOpacity(0.3),
japanLandColor: const Color(0xFF1a1c1e),
japanCoastlineColor: Colors.grey.shade400,
japanBorderLineColor: Colors.grey,
factory MapColorScheme.dark({required ColorScheme colorScheme}) =>
MapColorScheme(
backgroundColor: colorScheme.surfaceVariant,
worldLandColor: colorScheme.surface,
worldLineColor: colorScheme.onSurfaceVariant,
japanLandColor: colorScheme.surface,
japanLineColor: colorScheme.onSurfaceVariant,
);
}
174 changes: 58 additions & 116 deletions lib/core/provider/map/map_config.freezed.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e30edbd

Please sign in to comment.