Skip to content

Commit

Permalink
Removed not needed container
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfteam committed Jan 23, 2021
1 parent 410e411 commit e1cba05
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 48 deletions.
89 changes: 42 additions & 47 deletions lib/ui/widgets/ascension_materials/skill_item.dart
@@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';


import '../../../bloc/bloc.dart';
import '../../../common/styles.dart';
import '../../../generated/l10n.dart';
Expand All @@ -26,52 +25,48 @@ class SkillItem extends StatelessWidget {
final theme = Theme.of(context);
final s = S.of(context);

return Container(
margin: Styles.edgeInsetVertical5,
padding: Styles.edgeInsetHorizontal16,
child: Column(
children: [
Text(name, style: theme.textTheme.subtitle2),
const Divider(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
IncrementButton(
title: s.currentLevel,
value: currentLevel,
incrementIsDisabled: currentLevel == CalculatorAscMaterialsItemBloc.maxSkillLevel,
decrementIsDisabled: currentLevel == CalculatorAscMaterialsItemBloc.minSkillLevel,
onMinus: (val) {
context
.read<CalculatorAscMaterialsItemBloc>()
.add(CalculatorAscMaterialsItemEvent.skillCurrentLevelChanged(index: index, newValue: val));
},
onAdd: (val) {
context
.read<CalculatorAscMaterialsItemBloc>()
.add(CalculatorAscMaterialsItemEvent.skillCurrentLevelChanged(index: index, newValue: val));
},
),
IncrementButton(
title: s.desiredLevel,
value: desiredLevel,
incrementIsDisabled: desiredLevel == CalculatorAscMaterialsItemBloc.maxSkillLevel,
decrementIsDisabled: desiredLevel == CalculatorAscMaterialsItemBloc.minSkillLevel,
onMinus: (val) {
context
.read<CalculatorAscMaterialsItemBloc>()
.add(CalculatorAscMaterialsItemEvent.skillDesiredLevelChanged(index: index, newValue: val));
},
onAdd: (val) {
context
.read<CalculatorAscMaterialsItemBloc>()
.add(CalculatorAscMaterialsItemEvent.skillDesiredLevelChanged(index: index, newValue: val));
},
),
],
),
],
),
return Column(
children: [
Text(name, style: theme.textTheme.subtitle2),
const Divider(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
IncrementButton(
title: s.currentLevel,
value: currentLevel,
incrementIsDisabled: currentLevel == CalculatorAscMaterialsItemBloc.maxSkillLevel,
decrementIsDisabled: currentLevel == CalculatorAscMaterialsItemBloc.minSkillLevel,
onMinus: (val) {
context
.read<CalculatorAscMaterialsItemBloc>()
.add(CalculatorAscMaterialsItemEvent.skillCurrentLevelChanged(index: index, newValue: val));
},
onAdd: (val) {
context
.read<CalculatorAscMaterialsItemBloc>()
.add(CalculatorAscMaterialsItemEvent.skillCurrentLevelChanged(index: index, newValue: val));
},
),
IncrementButton(
title: s.desiredLevel,
value: desiredLevel,
incrementIsDisabled: desiredLevel == CalculatorAscMaterialsItemBloc.maxSkillLevel,
decrementIsDisabled: desiredLevel == CalculatorAscMaterialsItemBloc.minSkillLevel,
onMinus: (val) {
context
.read<CalculatorAscMaterialsItemBloc>()
.add(CalculatorAscMaterialsItemEvent.skillDesiredLevelChanged(index: index, newValue: val));
},
onAdd: (val) {
context
.read<CalculatorAscMaterialsItemBloc>()
.add(CalculatorAscMaterialsItemEvent.skillDesiredLevelChanged(index: index, newValue: val));
},
),
],
),
],
);
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Expand Up @@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.6+12
version: 1.0.6+14

environment:
sdk: ">=2.10.4 <3.0.0"
Expand Down

0 comments on commit e1cba05

Please sign in to comment.