생성 때 고른 행성 형태·색 표시 · HOME 주간 정보
This commit is contained in:
@@ -264,8 +264,14 @@ class PlanetTier {
|
||||
this.fandomId = '',
|
||||
this.passportTier = PassportTier.silver,
|
||||
this.joined = true,
|
||||
this.planetType,
|
||||
this.colorKey,
|
||||
});
|
||||
|
||||
/// 팬덤 문서의 생성 때 고른 형태 · 색(`fn-planet-create`). 성운이면 null.
|
||||
final String? planetType;
|
||||
final String? colorKey;
|
||||
|
||||
final String fandomName;
|
||||
final int contributedPop;
|
||||
|
||||
|
||||
@@ -93,6 +93,8 @@ class FirestoreMyRepository extends SampleMyRepository {
|
||||
isPrimary: id == primaryId,
|
||||
passportTier: PassportTier.parse(passport.strOr('tier')),
|
||||
joined: joined,
|
||||
planetType: fandom['planetType'] is String ? fandom['planetType'] as String : null,
|
||||
colorKey: fandom['colorKey'] is String ? fandom['colorKey'] as String : null,
|
||||
);
|
||||
}));
|
||||
final primaryTier = tiers.where((t) => t.isPrimary).firstOrNull?.passportTier ?? PassportTier.silver;
|
||||
|
||||
@@ -6,6 +6,7 @@ import '../../core/i18n/app_locale.dart';
|
||||
import '../../core/push/push_messaging.dart';
|
||||
import '../../core/theme/tokens.dart';
|
||||
import '../../core/ui/app_icons.dart';
|
||||
import '../../core/ui/planet_25d.dart' show PlanetArt;
|
||||
import '../auth/auth.dart';
|
||||
import '../auth/auth_repository.dart';
|
||||
import '../campaign/campaign_data.dart' show CampaignRepository;
|
||||
@@ -260,12 +261,15 @@ class _MyScreenState extends State<MyScreen> {
|
||||
),
|
||||
),
|
||||
child: i < _planets.length
|
||||
? Image.asset(
|
||||
GalaxyHomeScreen.cardImageOf(
|
||||
? PlanetArt(
|
||||
fallback: GalaxyHomeScreen.cardImageOf(
|
||||
_planets[i],
|
||||
i,
|
||||
),
|
||||
fit: BoxFit.contain,
|
||||
planetType: _planets[i].stage == 0
|
||||
? null
|
||||
: _planets[i].planetType,
|
||||
colorKey: _planets[i].colorKey,
|
||||
semanticLabel: _planets[i].name,
|
||||
)
|
||||
: null,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../core/theme/tokens.dart';
|
||||
import '../../core/ui/planet_25d.dart' show PlanetArt;
|
||||
import '../home/home_screen.dart' show formatPop;
|
||||
import '../planet/planet_data.dart' show PlanetRepositoryFactory;
|
||||
import '../planet/planet_history_screen.dart';
|
||||
@@ -211,8 +212,10 @@ class _PlanetCard extends StatelessWidget {
|
||||
width: 60,
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/figma/my-planet-1.png',
|
||||
PlanetArt(
|
||||
fallback: 'assets/figma/my-planet-1.png',
|
||||
planetType: planet.planetType,
|
||||
colorKey: planet.colorKey,
|
||||
width: 60,
|
||||
height: 60,
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user