Skip to content

Commit

Permalink
[Presentation] Another attempt to make the ui better
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Jan 8, 2022
1 parent 1fad747 commit 3960469
Show file tree
Hide file tree
Showing 5 changed files with 549 additions and 183 deletions.
11 changes: 10 additions & 1 deletion lib/presentation/artifacts/widgets/artifact_card.dart
Expand Up @@ -20,6 +20,8 @@ class ArtifactCard extends StatelessWidget {
final bool withoutDetails;
final bool withElevation;
final bool isInSelectionMode;
final bool withShape;
final bool withTextOverflow;

const ArtifactCard({
Key? key,
Expand All @@ -32,6 +34,8 @@ class ArtifactCard extends StatelessWidget {
this.imgHeight = 120,
this.withElevation = true,
this.isInSelectionMode = false,
this.withShape = true,
this.withTextOverflow = false,
}) : withoutDetails = false,
super(key: key);

Expand All @@ -44,6 +48,8 @@ class ArtifactCard extends StatelessWidget {
this.isInSelectionMode = false,
this.imgWidth = 70,
this.imgHeight = 60,
this.withShape = true,
this.withTextOverflow = false,
}) : bonus = const [],
withoutDetails = true,
withElevation = false,
Expand All @@ -57,6 +63,8 @@ class ArtifactCard extends StatelessWidget {
this.withElevation = true,
this.withoutDetails = false,
this.isInSelectionMode = false,
this.withShape = true,
this.withTextOverflow = false,
}) : keyName = item.key,
name = item.name,
image = item.image,
Expand All @@ -72,7 +80,7 @@ class ArtifactCard extends StatelessWidget {
onTap: () => _gotoDetailPage(context),
child: GradientCard(
clipBehavior: Clip.hardEdge,
shape: Styles.mainCardShape,
shape: withShape ? Styles.mainCardShape : null,
elevation: withElevation ? Styles.cardTenElevation : 0,
gradient: rarity.getRarityGradient(),
child: Padding(
Expand All @@ -90,6 +98,7 @@ class ArtifactCard extends StatelessWidget {
child: Text(
name,
textAlign: TextAlign.center,
overflow: withTextOverflow ? TextOverflow.ellipsis : null,
style: theme.textTheme.subtitle1!.copyWith(fontWeight: FontWeight.bold, color: Colors.white),
),
),
Expand Down

0 comments on commit 3960469

Please sign in to comment.