Skip to content

Commit

Permalink
Removed some page paddings
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Feb 5, 2021
1 parent 3adfe9f commit 3b2277b
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 27 deletions.
8 changes: 4 additions & 4 deletions assets/db/characters.json
Original file line number Diff line number Diff line change
Expand Up @@ -7435,8 +7435,8 @@
"weaponImages": [
"aquila_favonia.png",
"the_black_sword.png",
"the_black_sword.png",
"lions_roar.png"
"lions_roar.png",
"the_flute.png"
],
"artifacts": [
{
Expand Down Expand Up @@ -7476,8 +7476,8 @@
"weaponImages": [
"aquila_favonia.png",
"the_black_sword.png",
"the_black_sword.png",
"lions_roar.png"
"lions_roar.png",
"the_flute.png"
],
"artifacts": [
{
Expand Down
14 changes: 9 additions & 5 deletions lib/presentation/elements/widgets/sliver_element_debuffs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:genshindb/application/bloc.dart';
import 'package:genshindb/presentation/shared/loading.dart';
import 'package:genshindb/presentation/shared/styles.dart';

import 'element_debuff_card.dart';

Expand All @@ -16,11 +17,14 @@ class SliverElementDebuffs extends StatelessWidget {
loaded: (debuffs, _, __) => SliverGrid.count(
crossAxisCount: isPortrait ? 2 : 3,
children: debuffs
.map((item) => ElementDebuffCard(
key: Key(item.name),
effect: item.effect,
image: item.image,
name: item.name,
.map((item) => Padding(
padding: Styles.edgeInsetAll5,
child: ElementDebuffCard(
key: Key(item.name),
effect: item.effect,
image: item.image,
name: item.name,
),
))
.toList(),
),
Expand Down
16 changes: 10 additions & 6 deletions lib/presentation/elements/widgets/sliver_element_reactions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:genshindb/application/bloc.dart';
import 'package:genshindb/presentation/shared/loading.dart';
import 'package:genshindb/presentation/shared/styles.dart';

import 'element_reaction_card.dart';

Expand All @@ -16,12 +17,15 @@ class SliverElementReactions extends StatelessWidget {
delegate: SliverChildBuilderDelegate(
(ctx, index) {
final e = reactions[index];
return ElementReactionCard.withImages(
key: Key('reaction_$index'),
name: e.name,
effect: e.effect,
principal: e.principal,
secondary: e.secondary,
return Padding(
padding: Styles.edgeInsetAll5,
child: ElementReactionCard.withImages(
key: Key('reaction_$index'),
name: e.name,
effect: e.effect,
principal: e.principal,
secondary: e.secondary,
),
);
},
childCount: reactions.length,
Expand Down
31 changes: 19 additions & 12 deletions lib/presentation/elements/widgets/sliver_element_resonances.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:genshindb/application/bloc.dart';
import 'package:genshindb/presentation/shared/loading.dart';
import 'package:genshindb/presentation/shared/styles.dart';

import 'element_reaction_card.dart';

Expand All @@ -17,21 +18,27 @@ class SliverElementResonances extends StatelessWidget {
(ctx, index) {
final e = resonances[index];
if (e.principal.isNotEmpty && e.secondary.isNotEmpty) {
return ElementReactionCard.withImages(
key: Key('resonance_$index'),
name: e.name,
effect: e.effect,
principal: e.principal,
secondary: e.secondary,
showPlusIcon: false,
return Padding(
padding: Styles.edgeInsetAll5,
child: ElementReactionCard.withImages(
key: Key('resonance_$index'),
name: e.name,
effect: e.effect,
principal: e.principal,
secondary: e.secondary,
showPlusIcon: false,
),
);
}

return ElementReactionCard.withoutImage(
name: e.name,
effect: e.effect,
showPlusIcon: false,
description: e.description,
return Padding(
padding: Styles.edgeInsetAll5,
child: ElementReactionCard.withoutImage(
name: e.name,
effect: e.effect,
showPlusIcon: false,
description: e.description,
),
);
},
childCount: resonances.length,
Expand Down

0 comments on commit 3b2277b

Please sign in to comment.