diff --git a/android/gradle.properties b/android/gradle.properties index 6aaa4ee3a3f053ba7c99634bddde1b76776e0923..3ca4d32e08fed6f3b035e7671d295b0cbddb3eed 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ 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 diff --git a/lib/ui/helpers/app_titles.dart b/lib/ui/helpers/app_titles.dart new file mode 100644 index 0000000000000000000000000000000000000000..b98107b12fabc3114ebfbec994166b588abcf1ad --- /dev/null +++ b/lib/ui/helpers/app_titles.dart @@ -0,0 +1,32 @@ +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), + ); + } +} diff --git a/lib/ui/helpers/styled_button.dart b/lib/ui/helpers/styled_button.dart index 87864285885531439bbb571a5936679f08920ee1..7f2807fea93a587abf6b9bf3e06cd93f304d534c 100644 --- a/lib/ui/helpers/styled_button.dart +++ b/lib/ui/helpers/styled_button.dart @@ -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, diff --git a/lib/ui/painters/cell_painter.dart b/lib/ui/painters/cell_painter.dart index 851f70e6d3fe584eabe370da331d7bf06fcf4e91..cd5aed74fa6545ddd1b566f6552c713cb84b0d84 100644 --- a/lib/ui/painters/cell_painter.dart +++ b/lib/ui/painters/cell_painter.dart @@ -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 diff --git a/lib/ui/painters/graph_painter.dart b/lib/ui/painters/graph_painter.dart index 38a30c6b90d22f24f8149b48f61ee31e75ab9a31..ad972cbad99b1b6006e90648d0c13ab387c5be57 100644 --- a/lib/ui/painters/graph_painter.dart +++ b/lib/ui/painters/graph_painter.dart @@ -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 diff --git a/lib/ui/screens/demo_page.dart b/lib/ui/screens/demo_page.dart index 95fe1fa030d47a91f258f5274505431f373a3ce4..4b5018cf22fa2534189b372c5a77585ab4bc7c12 100644 --- a/lib/ui/screens/demo_page.dart +++ b/lib/ui/screens/demo_page.dart @@ -83,7 +83,7 @@ class DemoPage extends StatelessWidget { }, ), StyledButton.icon( - icon: UniconsLine.setting, + icon: Icon(UniconsLine.setting), color: Colors.purple, iconSize: 20, onPressed: () { diff --git a/pubspec.lock b/pubspec.lock index bdc7207a18d234329bcc3de421b158ea9f5d9f3f..b5faee9652e50d9d40a4cfba9c95de0aa31260e3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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: diff --git a/pubspec.yaml b/pubspec.yaml index 5900c83096613680dbf0f81912e88bb503c6af95..110d089c5425c3aa3d6d392cbeb8aeafbdb67cfc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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" diff --git a/resources/ui/images/button_back.svg b/resources/ui/images/button_back.svg new file mode 100644 index 0000000000000000000000000000000000000000..646fb03e0c0f0986e10206db9d03321f81db07e3 --- /dev/null +++ b/resources/ui/images/button_back.svg @@ -0,0 +1,46 @@ +<?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> diff --git a/resources/ui/images/button_delete_saved_game.svg b/resources/ui/images/button_delete_saved_game.svg new file mode 100644 index 0000000000000000000000000000000000000000..20961300a46bfb9a0ac5c665978f7879f4b94159 --- /dev/null +++ b/resources/ui/images/button_delete_saved_game.svg @@ -0,0 +1,38 @@ +<?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> diff --git a/resources/ui/images/button_resume_game.svg b/resources/ui/images/button_resume_game.svg new file mode 100644 index 0000000000000000000000000000000000000000..7b62a384c8268a0e307da3e3d60428a4132fb572 --- /dev/null +++ b/resources/ui/images/button_resume_game.svg @@ -0,0 +1,52 @@ +<?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> diff --git a/resources/ui/images/button_start.svg b/resources/ui/images/button_start.svg new file mode 100644 index 0000000000000000000000000000000000000000..014e5653816d62daff482c4e40be79cc1a1b9a65 --- /dev/null +++ b/resources/ui/images/button_start.svg @@ -0,0 +1,46 @@ +<?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>