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

Merge branch '66-clean-improve-update-code' into 'master'

Resolve "Clean / improve / update code"

Closes #66

See merge request !64
parents 512b76b8 7f617c45
No related branches found
Tags Release_1.0.58_59
1 merge request!64Resolve "Clean / improve / update code"
Pipeline #6110 passed
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
app.versionName=1.0.57
app.versionCode=58
app.versionName=1.0.58
app.versionCode=59
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
class AppHeader extends StatelessWidget {
const AppHeader({super.key, required this.text});
final String text;
@override
Widget build(BuildContext context) {
return Text(
tr(text),
textAlign: TextAlign.start,
style: Theme.of(context).textTheme.headlineMedium!.apply(fontWeightDelta: 2),
);
}
}
class AppTitle extends StatelessWidget {
const AppTitle({super.key, required this.text});
final String text;
@override
Widget build(BuildContext context) {
return Text(
tr(text),
textAlign: TextAlign.start,
style: Theme.of(context).textTheme.titleLarge!.apply(fontWeightDelta: 2),
);
}
}
......@@ -68,7 +68,7 @@ class StyledButton extends StatelessWidget {
Key? key,
required VoidCallback? onPressed,
VoidCallback? onLongPress,
required IconData icon,
required Icon icon,
required Color color,
required double iconSize,
}) {
......@@ -77,8 +77,8 @@ class StyledButton extends StatelessWidget {
onPressed: onPressed,
onLongPress: onLongPress,
child: Icon(
icon,
color: color.darken(60),
icon.icon,
color: icon.color ?? color.darken(60),
size: iconSize,
shadows: [
Shadow(
......@@ -113,8 +113,8 @@ class StyledButton extends StatelessWidget {
const double borderRadius = 10;
return Container(
margin: EdgeInsets.all(2),
padding: EdgeInsets.all(2),
margin: const EdgeInsets.all(2),
padding: const EdgeInsets.all(2),
decoration: BoxDecoration(
color: color,
border: Border.all(
......@@ -130,7 +130,7 @@ class StyledButton extends StatelessWidget {
child: MaterialButton(
onPressed: onPressed,
onLongPress: onLongPress,
padding: EdgeInsets.all(8),
padding: const EdgeInsets.all(8),
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
minWidth: 40,
child: child,
......
......@@ -30,7 +30,8 @@ class CellPainter extends CustomPainter {
const borderWidth = 0.05;
final Rect baseSquare = Rect.fromPoints(const Offset(0, 0), Offset(size.width, size.height));
final Rect baseSquare =
Rect.fromPoints(const Offset(0, 0), Offset(size.width, size.height));
final paintBaseSquare = Paint()
..style = PaintingStyle.fill
......
......@@ -35,7 +35,8 @@ class GraphPainter extends CustomPainter {
paintBackground.color = Colors.black;
paintBackground.style = PaintingStyle.fill;
final Rect rectBackground = Rect.fromPoints(const Offset(0, 0), Offset(size.width, size.height));
final Rect rectBackground =
Rect.fromPoints(const Offset(0, 0), Offset(size.width, size.height));
canvas.drawRect(rectBackground, paintBackground);
// Draw some lines
......
......@@ -83,7 +83,7 @@ class DemoPage extends StatelessWidget {
},
),
StyledButton.icon(
icon: UniconsLine.setting,
icon: Icon(UniconsLine.setting),
color: Colors.purple,
iconSize: 20,
onPressed: () {
......
......@@ -45,18 +45,18 @@ packages:
dependency: transitive
description:
name: camera_android_camerax
sha256: e65d0d29a298926c63b0f009c5e045735a3ac183f5ae61a07ad826d8007a6018
sha256: e3627fdc2132d89212b8a8676679f5b07008c7e3d8ae00cea775c3397f9e742b
url: "https://pub.dev"
source: hosted
version: "0.6.9+1"
version: "0.6.10"
camera_avfoundation:
dependency: transitive
description:
name: camera_avfoundation
sha256: "7c28969a975a7eb2349bc2cb2dfe3ad218a33dba9968ecfb181ce08c87486655"
sha256: "0d04cec8715b59fb6dc60eefb47e69024f51233c570e475b886dc9290568bca7"
url: "https://pub.dev"
source: hosted
version: "0.9.17+3"
version: "0.9.17+4"
camera_platform_interface:
dependency: transitive
description:
......@@ -173,10 +173,10 @@ packages:
dependency: transitive
description:
name: file
sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4
url: "https://pub.dev"
source: hosted
version: "7.0.0"
version: "7.0.1"
flutter:
dependency: "direct main"
description: flutter
......@@ -207,10 +207,10 @@ packages:
dependency: transitive
description:
name: flutter_plugin_android_lifecycle
sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda"
sha256: "9b78450b89f059e96c9ebb355fa6b3df1d6b330436e0b885fb49594c41721398"
url: "https://pub.dev"
source: hosted
version: "2.0.22"
version: "2.0.23"
flutter_web_plugins:
dependency: transitive
description: flutter
......@@ -292,10 +292,10 @@ packages:
dependency: "direct main"
description:
name: package_info_plus
sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918
sha256: "894f37107424311bdae3e476552229476777b8752c5a2a2369c0cb9a2d5442ef"
url: "https://pub.dev"
source: hosted
version: "8.0.2"
version: "8.0.3"
package_info_plus_platform_interface:
dependency: transitive
description:
......@@ -324,10 +324,10 @@ packages:
dependency: transitive
description:
name: path_provider_android
sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7"
sha256: c464428172cb986b758c6d1724c603097febb8fb855aa265aeecc9280c294d4a
url: "https://pub.dev"
source: hosted
version: "2.2.10"
version: "2.2.12"
path_provider_foundation:
dependency: transitive
description:
......@@ -396,18 +396,18 @@ packages:
dependency: transitive
description:
name: shared_preferences_android
sha256: "480ba4345773f56acda9abf5f50bd966f581dac5d514e5fc4a18c62976bbba7e"
sha256: "3b9febd815c9ca29c9e3520d50ec32f49157711e143b7a4ca039eb87e8ade5ab"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
version: "2.3.3"
shared_preferences_foundation:
dependency: transitive
description:
name: shared_preferences_foundation
sha256: c4b35f6cb8f63c147312c054ce7c2254c8066745125264f0c88739c417fc9d9f
sha256: "07e050c7cd39bad516f8d64c455f04508d09df104be326d8c02551590a0d513d"
url: "https://pub.dev"
source: hosted
version: "2.5.2"
version: "2.5.3"
shared_preferences_linux:
dependency: transitive
description:
......
......@@ -3,7 +3,7 @@ description: A random application, for testing purpose only.
publish_to: "none"
version: 1.0.57+58
version: 1.0.58+59
environment:
sdk: "^3.0.0"
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
enable-background="new 0 0 100 100"
version="1.1"
viewBox="0 0 93.665 93.676"
xml:space="preserve"
id="svg2"
sodipodi:docname="button_back.svg"
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs2" /><sodipodi:namedview
id="namedview2"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="2.8284271"
inkscape:cx="13.788582"
inkscape:cy="69.473241"
inkscape:window-width="1480"
inkscape:window-height="987"
inkscape:window-x="3693"
inkscape:window-y="22"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" /><path
sodipodi:type="star"
style="fill:#ffffff;fill-opacity:1;stroke:#950e4f;stroke-width:7.28322966;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
id="path3"
inkscape:flatsided="true"
sodipodi:sides="3"
sodipodi:cx="-9.412034"
sodipodi:cy="-29.827261"
sodipodi:r1="25.983957"
sodipodi:r2="0.25983959"
sodipodi:arg1="0.62599396"
sodipodi:arg2="1.6731915"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 11.644875,-14.603181 -44.769804,-4.600301 26.3688801,-36.471637 z"
transform="matrix(1.3783311,0.61746806,-0.61746806,1.3783311,45.198281,93.762039)" /></svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
enable-background="new 0 0 100 100"
version="1.1"
viewBox="0 0 93.665 93.676"
xml:space="preserve"
id="svg1"
sodipodi:docname="button_delete_saved_game.svg"
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs1" /><sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="8.9457276"
inkscape:cx="46.838001"
inkscape:cy="46.893894"
inkscape:window-width="1480"
inkscape:window-height="987"
inkscape:window-x="3532"
inkscape:window-y="83"
inkscape:window-maximized="0"
inkscape:current-layer="svg1" /><path
d="m76.652 23.303-3.6441 58.302c-0.28153 4.5103-4.0223 8.0241-8.5413 8.0241h-35.27c-4.5189 0-8.2598-3.5138-8.5413-8.0241l-3.6441-58.302h-5.4824c-1.7723 0-3.2093-1.437-3.2093-3.2093 0-1.773 1.437-3.2093 3.2093-3.2093h70.605c1.7723 0 3.2093 1.4363 3.2093 3.2093 0 1.7723-1.437 3.2093-3.2093 3.2093zm-6.8314 0h-45.979l3.0819 55.867c0.12535 2.268 2.0008 4.0433 4.2732 4.0433h31.268c2.2724 0 4.1478-1.7752 4.2732-4.0433zm-22.99 6.4188c1.6541 0 2.9952 1.3411 2.9952 2.9952v41.08c0 1.6541-1.3411 2.9952-2.9952 2.9952-1.6542 0-2.9952-1.3411-2.9952-2.9952v-41.08c0-1.6541 1.3411-2.9952 2.9952-2.9952zm-12.837 0c1.6756 0 3.0553 1.3181 3.1312 2.9921l1.8776 41.3c0.06665 1.4664-1.0681 2.7087-2.5345 2.7762-0.04011 0.0015-0.08024 0.0021-0.12108 0.0021-1.5595 0-2.8476-1.2193-2.9328-2.7774l-2.253-41.3c-0.08524-1.5646 1.114-2.9012 2.6779-2.9864 0.05157-0.0029 0.10317-0.0042 0.15474-0.0042zm25.675 0c1.5667 0 2.8361 1.2694 2.8361 2.8361 0 0.05156-6.87e-4 0.10317-0.0036 0.15474l-2.2416 41.088c-0.09171 1.6778-1.4786 2.991-3.1586 2.991-1.5667 0-2.8361-1.2694-2.8361-2.8361 0-0.05156 7.31e-4 -0.10315 0.0036-0.15474l2.2417-41.088c0.09172-1.6778 1.4786-2.991 3.1586-2.991zm-21.397-25.675h17.117c4.7265 0 8.5578 3.8313 8.5578 8.5578v4.2795h-34.231v-4.2795c0-4.7265 3.8313-8.5578 8.5578-8.5578zm0.42837 6.4188c-1.4184 0-2.5675 1.1491-2.5675 2.5675v3.8512h21.394v-3.8512c0-1.4184-1.1491-2.5675-2.5675-2.5675z"
fill="#fff"
fill-rule="evenodd"
stroke="#bd4812"
stroke-width=".75383"
id="path1"
style="stroke:#050200;stroke-opacity:1;stroke-width:1;stroke-dasharray:none" /></svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
enable-background="new 0 0 100 100"
version="1.1"
viewBox="0 0 93.665 93.676"
xml:space="preserve"
id="svg3"
sodipodi:docname="button_resume_game.svg"
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs3" /><sodipodi:namedview
id="namedview3"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="6.3255846"
inkscape:cx="42.525713"
inkscape:cy="46.161741"
inkscape:window-width="1920"
inkscape:window-height="1032"
inkscape:window-x="1600"
inkscape:window-y="25"
inkscape:window-maximized="1"
inkscape:current-layer="svg3" /><g
id="g4"
transform="translate(-5.6180493)"><path
sodipodi:type="star"
style="fill:#ffffff;fill-opacity:1;stroke:#105ea2;stroke-width:7.28323;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
id="path3"
inkscape:flatsided="true"
sodipodi:sides="3"
sodipodi:cx="-9.412034"
sodipodi:cy="-29.827261"
sodipodi:r1="25.983957"
sodipodi:r2="0.25983959"
sodipodi:arg1="0.62599396"
sodipodi:arg2="1.6731915"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 11.644875,-14.603181 -44.769804,-4.600301 26.3688801,-36.471637 z"
transform="matrix(-1.3783311,-0.61746806,0.61746806,-1.3783311,55.567492,-0.08603523)" /><path
id="path4"
style="fill:#ffffff;stroke:#105ea2;stroke-width:11;stroke-linecap:round;stroke-linejoin:round"
d="m 15.534575,12.851645 0.002,67.972712 z"
sodipodi:nodetypes="ccc" /></g></svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
enable-background="new 0 0 100 100"
version="1.1"
viewBox="0 0 93.665 93.676"
xml:space="preserve"
id="svg3"
sodipodi:docname="button_start.svg"
inkscape:version="1.3.2 (1:1.3.2+202311252150+091e20ef0f)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs3" /><sodipodi:namedview
id="namedview3"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="3.1627923"
inkscape:cx="-9.4852892"
inkscape:cy="1.8970578"
inkscape:window-width="1920"
inkscape:window-height="1032"
inkscape:window-x="1600"
inkscape:window-y="25"
inkscape:window-maximized="1"
inkscape:current-layer="svg3" /><path
sodipodi:type="star"
style="fill:#ffffff;fill-opacity:1;stroke:#105ea2;stroke-width:7.28323;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
id="path3"
inkscape:flatsided="true"
sodipodi:sides="3"
sodipodi:cx="-9.412034"
sodipodi:cy="-29.827261"
sodipodi:r1="25.983957"
sodipodi:r2="0.25983959"
sodipodi:arg1="0.62599396"
sodipodi:arg2="1.6731915"
inkscape:rounded="0"
inkscape:randomized="0"
d="m 11.644875,-14.603181 -44.769804,-4.600301 26.3688801,-36.471637 z"
transform="matrix(-1.3783311,-0.61746806,0.61746806,-1.3783311,46.954337,-0.08603523)" /></svg>
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