Skip to content
Snippets Groups Projects
Commit b076fe69 authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Improve title bar

parent 70d203d1
No related branches found
No related tags found
1 merge request!19Resolve "Improve title bar"
Pipeline #1369 passed
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
app.versionName=0.0.24
app.versionCode=24
app.versionName=0.0.25
app.versionCode=25
assets/game/difficulty_3x3.png

2.9 KiB

assets/game/difficulty_4x4.png

2.96 KiB

assets/game/difficulty_5x5.png

2.75 KiB

......@@ -109,14 +109,29 @@ class Home extends StatelessWidget {
}
FlatButton _buildTilesetSizeSelectorItem(Data myProvider, int value) {
String text = value.toString()+'x'+value.toString();
String assetName = 'assets/game/difficulty_' + value.toString() + 'x' + value.toString() + '.png';
Color borderColor = Colors.blue;
if (myProvider.tilesCount == value) {
text = '['+text+']';
borderColor = Colors.white;
}
return FlatButton(
child: Text(text),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4),
border: Border.all(
color: borderColor,
width: 4,
),
),
margin: EdgeInsets.all(8),
child: Image(
image: AssetImage(assetName),
fit: BoxFit.fill
),
),
onPressed: () { myProvider.updateTilesCount = value; },
);
}
......
......@@ -20,5 +20,6 @@ flutter:
uses-material-design: true
assets:
- assets/files/
- assets/game/
- assets/images/
- assets/ui/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment