diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000000000000000000000000000000000..8d86e4518e450377768d1de80adafba87984a148 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.json] +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/android/app/build.gradle b/android/app/build.gradle index 714964ccfdb29c1d2669fa16b394bfd740d8ec88..1c18897bb8e1dff4201c6ecd19c12b400fcb2ba1 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -37,7 +37,7 @@ if (keystorePropertiesFile.exists()) { } android { - compileSdkVersion 33 + compileSdkVersion 34 namespace "org.benoitharrault.random" defaultConfig { diff --git a/android/gradle.properties b/android/gradle.properties index 486dd327f0063a75a1e50110d7c8d79857207326..e848b208522bf7b0f09a52cc3e05b646f3151c4f 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.52 -app.versionCode=53 +app.versionName=1.0.53 +app.versionCode=54 diff --git a/assets/menu/demo.png b/assets/menu/demo.png deleted file mode 100644 index 0285d549c885670d34aa0969a5ba200c113c317a..0000000000000000000000000000000000000000 Binary files a/assets/menu/demo.png and /dev/null differ diff --git a/assets/menu/graph.png b/assets/menu/graph.png deleted file mode 100644 index c2224c4ffd3fbe14013888af9fb706ce56c7603f..0000000000000000000000000000000000000000 Binary files a/assets/menu/graph.png and /dev/null differ diff --git a/icons/build_application_icons.sh b/icons/build_application_icons.sh deleted file mode 100755 index 776681baf185ca8163ad753482021eef3051919f..0000000000000000000000000000000000000000 --- a/icons/build_application_icons.sh +++ /dev/null @@ -1,89 +0,0 @@ -#! /bin/bash - -# Check dependencies -command -v inkscape >/dev/null 2>&1 || { - echo >&2 "I require inkscape but it's not installed. Aborting." - exit 1 -} -command -v scour >/dev/null 2>&1 || { - echo >&2 "I require scour but it's not installed. Aborting." - exit 1 -} -command -v optipng >/dev/null 2>&1 || { - echo >&2 "I require optipng but it's not installed. Aborting." - exit 1 -} - -CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" -BASE_DIR="$(dirname "${CURRENT_DIR}")" -ASSETS_DIR="${BASE_DIR}/assets" - -OPTIPNG_OPTIONS="-preserve -quiet -o7" -ICON_SIZE=192 - -####################################################### - -# Menu images -AVAILABLE_MENU_IMAGES=" -demo -graph -" - -####################################################### - -# optimize svg -function optimize_svg() { - SOURCE="$1" - - cp "${SOURCE}" "${SOURCE}.tmp" - scour \ - --remove-descriptive-elements \ - --enable-id-stripping \ - --enable-viewboxing \ - --enable-comment-stripping \ - --nindent=4 \ - --quiet \ - -i "${SOURCE}.tmp" \ - -o "${SOURCE}" - rm "${SOURCE}.tmp" -} - -# build icons -function build_icon() { - SOURCE="$1" - TARGET="$2" - - echo "Building ${TARGET}" - - if [[ ! -f "${SOURCE}" ]]; then - echo "Missing file: ${SOURCE}" - exit 1 - fi - - if [[ ! -d "$(dirname ${TARGET})" ]]; then - mkdir -p "$(dirname ${TARGET})" - fi - - optimize_svg "${SOURCE}" - - inkscape \ - --export-width="${ICON_SIZE}" \ - --export-height="${ICON_SIZE}" \ - --export-filename="${TARGET}" \ - "${SOURCE}" - - optipng ${OPTIPNG_OPTIONS} "${TARGET}" -} - -####################################################### - -# Create output folders -mkdir -p "${ASSETS_DIR}" - -# Delete existing generated images -find "${ASSETS_DIR}" -type f -name "*.png" -delete - -# build menu images -for MENU_IMAGE in ${AVAILABLE_MENU_IMAGES}; do - build_icon "${CURRENT_DIR}/menu_${MENU_IMAGE}.svg" "${ASSETS_DIR}/menu/${MENU_IMAGE}.png" -done diff --git a/icons/build_repository_icons.sh b/icons/build_repository_icons.sh deleted file mode 100755 index b50cfc24693d2a5622ad2a7711815a2eeb41d1ce..0000000000000000000000000000000000000000 --- a/icons/build_repository_icons.sh +++ /dev/null @@ -1,127 +0,0 @@ -#! /bin/bash - -# Check dependencies -command -v inkscape >/dev/null 2>&1 || { - echo >&2 "I require inkscape but it's not installed. Aborting." - exit 1 -} -command -v scour >/dev/null 2>&1 || { - echo >&2 "I require scour but it's not installed. Aborting." - exit 1 -} -command -v optipng >/dev/null 2>&1 || { - echo >&2 "I require optipng but it's not installed. Aborting." - exit 1 -} - -CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" -BASE_DIR="$(dirname "${CURRENT_DIR}")" - -SOURCE_ICON="${CURRENT_DIR}/icon.svg" -SOURCE_FASTLANE="${CURRENT_DIR}/featureGraphic.svg" -SOURCE_LAUNCH_IMAGE="${CURRENT_DIR}/icon.svg" - -OPTIPNG_OPTIONS="-preserve -quiet -o7" - -if [ ! -f "${SOURCE_ICON}" ]; then - echo "Missing file: ${SOURCE_ICON}" -fi - -if [ ! -f "${SOURCE_FASTLANE}" ]; then - echo "Missing file: ${SOURCE_FASTLANE}" -fi - -if [ ! -f "${SOURCE_LAUNCH_IMAGE}" ]; then - echo "Missing file: ${SOURCE_LAUNCH_IMAGE}" -fi - -function optimize_svg() { - SVG="$1" - - cp "${SVG}" "${SVG}.tmp" - scour \ - --remove-descriptive-elements \ - --enable-id-stripping \ - --enable-viewboxing \ - --enable-comment-stripping \ - --nindent=4 \ - --quiet \ - -i "${SVG}.tmp" \ - -o "${SVG}" - rm "${SVG}.tmp" -} - -# optimize source svg files -optimize_svg "${SOURCE_ICON}" -optimize_svg "${SOURCE_FASTLANE}" -optimize_svg "${SOURCE_LAUNCH_IMAGE}" - -# build icons -function build_application_icon() { - ICON_SIZE="$1" - TARGET="$2" - - echo "Building ${TARGET}" - - TARGET_PNG="${TARGET}.png" - - inkscape \ - --export-width="${ICON_SIZE}" \ - --export-height="${ICON_SIZE}" \ - --export-filename="${TARGET_PNG}" \ - "${SOURCE_ICON}" - - optipng ${OPTIPNG_OPTIONS} "${TARGET_PNG}" -} - -# build fastlane image -function build_fastlane_image() { - WIDTH="$1" - HEIGHT="$2" - TARGET="$3" - - echo "Building ${TARGET}" - - TARGET_PNG="${TARGET}.png" - - inkscape \ - --export-width="${WIDTH}" \ - --export-height="${HEIGHT}" \ - --export-filename="${TARGET_PNG}" \ - "${SOURCE_FASTLANE}" - - optipng ${OPTIPNG_OPTIONS} "${TARGET_PNG}" -} - -# build launch images (splash screen) -function build_launch_image() { - ICON_SIZE="$1" - TARGET="$2" - - echo "Building ${TARGET}" - - TARGET_PNG="${TARGET}.png" - - inkscape \ - --export-width="${ICON_SIZE}" \ - --export-height="${ICON_SIZE}" \ - --export-filename="${TARGET_PNG}" \ - "${SOURCE_LAUNCH_IMAGE}" - - optipng ${OPTIPNG_OPTIONS} "${TARGET_PNG}" -} - -build_application_icon 72 "${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher" -build_application_icon 48 "${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher" -build_application_icon 96 "${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher" -build_application_icon 144 "${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher" -build_application_icon 192 "${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher" -build_application_icon 512 "${BASE_DIR}/fastlane/metadata/android/en-US/images/icon" - -build_launch_image 72 "${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/launch_image" -build_launch_image 48 "${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/launch_image" -build_launch_image 96 "${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/launch_image" -build_launch_image 144 "${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/launch_image" -build_launch_image 192 "${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/launch_image" - -build_fastlane_image 1024 500 "${BASE_DIR}/fastlane/metadata/android/en-US/images/featureGraphic" diff --git a/icons/menu_demo.svg b/icons/menu_demo.svg deleted file mode 100644 index f1ae7ea305291e00e6aee70d3d813a44cecde5ba..0000000000000000000000000000000000000000 --- a/icons/menu_demo.svg +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><defs><radialGradient id="radialGradient876" cx="51" cy="51" r="51" gradientUnits="userSpaceOnUse"><stop stop-color="#94bc4f" offset=".53489"/><stop stop-color="#e84e34" offset="1"/></radialGradient></defs><rect x="1" y="1" width="100" height="100" ry="0" fill="url(#radialGradient876)" stroke="#000" stroke-width="2"/><path d="m50.952 32.393c1.3622-0.0046 4.9652 11.398 6.07 12.195 1.1048 0.79696 13.062 0.61914 13.487 1.9133s-9.3059 8.2444-9.7225 9.5414c-0.41657 1.297 3.4475 12.614 2.3481 13.418-1.0993 0.80441-10.717-6.3028-12.079-6.2982-1.3622 0.0046-10.931 7.1767-12.036 6.3797s2.6827-12.14 2.2574-13.434c-0.42533-1.2941-10.203-8.1785-9.7868-9.4754 0.41657-1.297 12.375-1.2 13.474-2.0044s4.6252-12.231 5.9874-12.236z" fill="#fff" stroke="#030303" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="6" stroke-width="3.3"/></svg> diff --git a/icons/menu_graph.svg b/icons/menu_graph.svg deleted file mode 100644 index cb653f29ce50c75023682cf88c9b22563ef72e26..0000000000000000000000000000000000000000 --- a/icons/menu_graph.svg +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><defs><radialGradient id="radialGradient876" cx="51" cy="51" r="51" gradientUnits="userSpaceOnUse"><stop stop-color="#534fbc" offset=".53489"/><stop stop-color="#d5e834" offset="1"/></radialGradient></defs><rect x="1" y="1" width="100" height="100" ry="0" fill="url(#radialGradient876)" stroke="#000" stroke-width="2"/><path transform="translate(12.795 -12.378)" d="m41.231 66.406c1.2372-1.351 2.4315 1.0012 2.2454 2.0564-0.50427 2.8593-4.1113 3.4739-6.3581 2.4345-4.0191-1.8593-4.7114-7.1159-2.6236-10.66 3.0639-5.201 10.16-5.9833 14.962-2.8126 6.3992 4.226 7.2698 13.219 3.0017 19.263-5.371 7.6061-16.285 8.5638-23.565 3.1908-8.8179-6.5075-9.8622-19.354-3.3798-27.867 7.6392-10.033 22.425-11.163 32.169-3.5689 11.249 8.768 12.466 25.498 3.758 36.471-9.8949 12.468-28.572 13.77-40.772 3.947-13.687-11.02-15.076-31.647-4.1361-45.074 12.145-14.906 34.723-16.381 49.376-4.3252" fill="none" stroke="#000" stroke-linecap="round" stroke-width="6"/></svg> diff --git a/pubspec.lock b/pubspec.lock index 8780081654664208320026d81c814f167af63cae..5512b13f7bd0ec40582e62aaf224582e9f5f91c3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: args - sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.5.0" async: dependency: transitive description: @@ -29,42 +29,42 @@ packages: dependency: "direct main" description: name: camera - sha256: "9499cbc2e51d8eb0beadc158b288380037618ce4e30c9acbc4fae1ac3ecb5797" + sha256: "26ff41045772153f222ffffecba711a206f670f5834d40ebf5eed3811692f167" url: "https://pub.dev" source: hosted - version: "0.10.5+9" - camera_android: + version: "0.11.0+2" + camera_android_camerax: dependency: transitive description: - name: camera_android - sha256: ae5b9a996dfb8d77b02031b67f5500873d6402f33bd6a5283e932eef08542a51 + name: camera_android_camerax + sha256: "7cd93578ad201dcc6bb5810451fb00d76a86bab9b68dceb68b8cbd7038ac5846" url: "https://pub.dev" source: hosted - version: "0.10.9" + version: "0.6.8+3" camera_avfoundation: dependency: transitive description: name: camera_avfoundation - sha256: "5d009ae48de1c8ab621b1c4496dadb6e2a83f3223b76c6e6a4a252414105f561" + sha256: "7c28969a975a7eb2349bc2cb2dfe3ad218a33dba9968ecfb181ce08c87486655" url: "https://pub.dev" source: hosted - version: "0.9.15" + version: "0.9.17+3" camera_platform_interface: dependency: transitive description: name: camera_platform_interface - sha256: a250314a48ea337b35909a4c9d5416a208d736dcb01d0b02c6af122be66660b0 + sha256: b3ede1f171532e0d83111fe0980b46d17f1aa9788a07a2fbed07366bbdbb9061 url: "https://pub.dev" source: hosted - version: "2.7.4" + version: "2.8.0" camera_web: dependency: transitive description: name: camera_web - sha256: "9e9aba2fbab77ce2472924196ff8ac4dd8f9126c4f9a3096171cd1d870d6b26c" + sha256: "595f28c89d1fb62d77c73c633193755b781c6d2e0ebcd8dc25b763b514e6ba8f" url: "https://pub.dev" source: hosted - version: "0.3.3" + version: "0.3.5" characters: dependency: transitive description: @@ -93,42 +93,50 @@ packages: dependency: transitive description: name: cross_file - sha256: "55d7b444feb71301ef6b8838dbc1ae02e63dd48c8773f3810ff53bb1e2945b32" + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.4+1" + version: "0.3.4+2" crypto: dependency: transitive description: name: crypto - sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.5" curved_navigation_bar: dependency: "direct main" description: name: curved_navigation_bar - sha256: ea6412d00c5d83501bbf1cf9d1ac2ff11a20fbaf910c103c95ace7de82910334 + sha256: bb4ab128fcb6f4a9f0f1f72d227db531818b20218984789777f049fcbf919279 url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.6" dio: dependency: "direct main" description: name: dio - sha256: "0978e9a3e45305a80a7210dbeaf79d6ee8bee33f70c8e542dc654c952070217f" + sha256: "5598aa796bbf4699afd5c67c0f5f6e2ed542afc956884b9cd58c306966efc260" url: "https://pub.dev" source: hosted - version: "5.4.2+1" + version: "5.7.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "33259a9276d6cea88774a0000cfae0d861003497755969c92faa223108620dc8" + url: "https://pub.dev" + source: hosted + version: "2.0.0" easy_localization: dependency: "direct main" description: name: easy_localization - sha256: c145aeb6584aedc7c862ab8c737c3277788f47488bfdf9bae0fe112bd0a4789c + sha256: fa59bcdbbb911a764aa6acf96bbb6fa7a5cf8234354fc45ec1a43a0349ef0201 url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.7" easy_logger: dependency: transitive description: @@ -149,10 +157,10 @@ packages: dependency: transitive description: name: ffi - sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.3" file: dependency: transitive description: @@ -170,18 +178,18 @@ packages: dependency: "direct main" description: name: flutter_bloc - sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2 + sha256: b594505eac31a0518bdcb4b5b79573b8d9117b193cc80cc12e17d639b10aa27a url: "https://pub.dev" source: hosted - version: "8.1.5" + version: "8.1.6" flutter_lints: dependency: "direct dev" description: name: flutter_lints - sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "4.0.0" flutter_localizations: dependency: transitive description: flutter @@ -191,10 +199,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: b068ffc46f82a55844acfa4fdbb61fad72fa2aef0905548419d97f0f95c456da + sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" url: "https://pub.dev" source: hosted - version: "2.0.17" + version: "2.0.22" flutter_web_plugins: dependency: transitive description: flutter @@ -212,10 +220,10 @@ packages: dependency: transitive description: name: http - sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" http_parser: dependency: transitive description: @@ -236,34 +244,34 @@ packages: dependency: transitive description: name: intl - sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.18.1" + version: "0.19.0" lints: dependency: transitive description: name: lints - sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" url: "https://pub.dev" source: hosted - version: "3.0.0" + version: "4.0.0" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" nested: dependency: transitive description: @@ -276,18 +284,18 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: cb44f49b6e690fa766f023d5b22cac6b9affe741dd792b6ac7ad4fabe0d7b097 + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 url: "https://pub.dev" source: hosted - version: "6.0.0" + version: "8.0.2" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "9bc8ba46813a4cc42c66ab781470711781940780fd8beddd0c3da62506d3a6c6" + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" path: dependency: "direct main" description: @@ -300,26 +308,26 @@ packages: dependency: "direct main" description: name: path_provider - sha256: b27217933eeeba8ff24845c34003b003b2b22151de3c908d0e679e8fe1aa078b + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "477184d672607c0a3bf68fbbf601805f92ef79c82b64b4d6eb318cbca4c48668" + sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.2.10" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.0" path_provider_linux: dependency: transitive description: @@ -340,18 +348,18 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.0" platform: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: @@ -372,58 +380,58 @@ packages: dependency: transitive description: name: shared_preferences - sha256: "81429e4481e1ccfb51ede496e916348668fd0921627779233bd24cc3ff6abd02" + sha256: "746e5369a43170c25816cc472ee016d3a66bc13fcf430c0bc41ad7b4b2922051" url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.3.2" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06" + sha256: "480ba4345773f56acda9abf5f50bd966f581dac5d514e5fc4a18c62976bbba7e" url: "https://pub.dev" source: hosted - version: "2.2.1" + version: "2.3.2" shared_preferences_foundation: dependency: transitive description: name: shared_preferences_foundation - sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c" + sha256: c4b35f6cb8f63c147312c054ce7c2254c8066745125264f0c88739c417fc9d9f url: "https://pub.dev" source: hosted - version: "2.3.5" + version: "2.5.2" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux - sha256: "9f2cbcf46d4270ea8be39fa156d86379077c8a5228d9dfdb1164ae0bb93f1faa" + sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.1" shared_preferences_platform_interface: dependency: transitive description: name: shared_preferences_platform_interface - sha256: "22e2ecac9419b4246d7c22bfbbda589e3acf5c0351137d87dd2939d984d37c3b" + sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.1" shared_preferences_web: dependency: transitive description: name: shared_preferences_web - sha256: "9aee1089b36bd2aafe06582b7d7817fd317ef05fc30e6ba14bff247d0933042a" + sha256: d2ca4132d3946fec2184261726b355836a82c33d7d5b67af32692aff18a4684e url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.4.2" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows - sha256: "841ad54f3c8381c480d0c9b508b89a34036f512482c407e6df7a9c4aa2ef8f59" + sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" url: "https://pub.dev" source: hosted - version: "2.3.2" + version: "2.4.1" sky_engine: dependency: transitive description: flutter @@ -449,18 +457,18 @@ packages: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.3.0" synchronized: dependency: transitive description: name: synchronized - sha256: "539ef412b170d65ecdafd780f924e5be3f60032a1128df156adad6c5b373d558" + sha256: "51b08572b9f091f8c3eb4d9d4be253f196ff0075d5ec9b10a884026d5b55d7bc" url: "https://pub.dev" source: hosted - version: "3.1.0+1" + version: "3.3.0+2" term_glyph: dependency: transitive description: @@ -481,10 +489,10 @@ packages: dependency: "direct main" description: name: unicons - sha256: dbfcf93ff4d4ea19b324113857e358e4882115ab85db04417a4ba1c72b17a670 + sha256: f3eab9d87c226415ef857cfd2167e1d12ad81ea1f5783b46cf644224fea4eab7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "3.0.0" vector_math: dependency: transitive description: @@ -497,18 +505,18 @@ packages: dependency: transitive description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "1.0.0" win32: dependency: transitive description: name: win32 - sha256: "0a989dc7ca2bb51eac91e8fd00851297cfffd641aa7538b165c62637ca0eaa4a" + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "5.4.0" + version: "5.5.4" xdg_directories: dependency: transitive description: @@ -518,5 +526,5 @@ packages: source: hosted version: "1.0.4" sdks: - dart: ">=3.3.0 <4.0.0" - flutter: ">=3.19.0" + dart: ">=3.5.0 <4.0.0" + flutter: ">=3.24.0" diff --git a/pubspec.yaml b/pubspec.yaml index 546f914d40f2536c6a2bcec000dc2b9f291e245d..7c22ee5f24e721a674c33fe96eff74db01594809 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,34 +1,39 @@ name: random description: A random application, for testing purpose only. -publish_to: 'none' +publish_to: "none" -version: 1.0.52+53 +version: 1.0.53+54 environment: - sdk: '^3.0.0' + sdk: "^3.0.0" dependencies: flutter: sdk: flutter - camera: ^0.10.5+8 - curved_navigation_bar: ^1.0.3 + # base easy_localization: ^3.0.1 equatable: ^2.0.5 flutter_bloc: ^8.1.1 - path_provider: ^2.0.11 + hive: ^2.2.3 hydrated_bloc: ^9.0.0 - unicons: ^2.1.1 - package_info_plus: ^6.0.0 + package_info_plus: ^8.0.0 + path_provider: ^2.0.11 + unicons: ^3.0.0 + + # specific + camera: ^0.11.0+2 + curved_navigation_bar: ^1.0.3 dio: ^5.3.3 - hive: ^2.2.3 path: ^1.9.0 +dev_dependencies: + flutter_lints: ^4.0.0 + flutter: - uses-material-design: false + uses-material-design: true assets: - - assets/menu/ - assets/translations/ fonts: @@ -42,5 +47,3 @@ flutter: weight: 400 - asset: assets/fonts/Nunito-Light.ttf weight: 300 -dev_dependencies: - flutter_lints: ^3.0.1 diff --git a/resources/app/build_application_resources.sh b/resources/app/build_application_resources.sh new file mode 100755 index 0000000000000000000000000000000000000000..1ace90d0e0029bf1704122d2b60bced59d5ed348 --- /dev/null +++ b/resources/app/build_application_resources.sh @@ -0,0 +1,127 @@ +#! /bin/bash + +# Check dependencies +command -v inkscape >/dev/null 2>&1 || { + echo >&2 "I require inkscape but it's not installed. Aborting." + exit 1 +} +command -v scour >/dev/null 2>&1 || { + echo >&2 "I require scour but it's not installed. Aborting." + exit 1 +} +command -v optipng >/dev/null 2>&1 || { + echo >&2 "I require optipng but it's not installed. Aborting." + exit 1 +} + +CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" +BASE_DIR="$(dirname "$(dirname "${CURRENT_DIR}")")" + +SOURCE_ICON="${CURRENT_DIR}/icon.svg" +SOURCE_FASTLANE="${CURRENT_DIR}/featureGraphic.svg" +SOURCE_LAUNCH_IMAGE="${CURRENT_DIR}/icon.svg" + +OPTIPNG_OPTIONS="-preserve -quiet -o7" + +if [ ! -f "${SOURCE_ICON}" ]; then + echo "Missing file: ${SOURCE_ICON}" +fi + +if [ ! -f "${SOURCE_FASTLANE}" ]; then + echo "Missing file: ${SOURCE_FASTLANE}" +fi + +if [ ! -f "${SOURCE_LAUNCH_IMAGE}" ]; then + echo "Missing file: ${SOURCE_LAUNCH_IMAGE}" +fi + +function optimize_svg() { + SVG="$1" + + cp ${SVG} ${SVG}.tmp + scour \ + --remove-descriptive-elements \ + --enable-id-stripping \ + --enable-viewboxing \ + --enable-comment-stripping \ + --nindent=4 \ + --quiet \ + -i ${SVG}.tmp \ + -o ${SVG} + rm ${SVG}.tmp +} + +# optimize source svg files +optimize_svg ${SOURCE_ICON} +optimize_svg ${SOURCE_FASTLANE} +optimize_svg ${SOURCE_LAUNCH_IMAGE} + +# build icons +function build_application_icon() { + ICON_SIZE="$1" + TARGET="$2" + + echo "Building ${TARGET}" + + TARGET_PNG="${TARGET}.png" + + inkscape \ + --export-width=${ICON_SIZE} \ + --export-height=${ICON_SIZE} \ + --export-filename=${TARGET_PNG} \ + ${SOURCE_ICON} + + optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} +} + +# build fastlane image +function build_fastlane_image() { + WIDTH="$1" + HEIGHT="$2" + TARGET="$3" + + echo "Building ${TARGET}" + + TARGET_PNG="${TARGET}.png" + + inkscape \ + --export-width=${WIDTH} \ + --export-height=${HEIGHT} \ + --export-filename=${TARGET_PNG} \ + ${SOURCE_FASTLANE} + + optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} +} + +# build launch images (splash screen) +function build_launch_image() { + ICON_SIZE="$1" + TARGET="$2" + + echo "Building ${TARGET}" + + TARGET_PNG="${TARGET}.png" + + inkscape \ + --export-width=${ICON_SIZE} \ + --export-height=${ICON_SIZE} \ + --export-filename=${TARGET_PNG} \ + ${SOURCE_LAUNCH_IMAGE} + + optipng ${OPTIPNG_OPTIONS} ${TARGET_PNG} +} + +build_application_icon 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/ic_launcher +build_application_icon 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/ic_launcher +build_application_icon 96 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/ic_launcher +build_application_icon 144 ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher +build_application_icon 192 ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher +build_application_icon 512 ${BASE_DIR}/fastlane/metadata/android/en-US/images/icon + +build_launch_image 72 ${BASE_DIR}/android/app/src/main/res/mipmap-hdpi/launch_image +build_launch_image 48 ${BASE_DIR}/android/app/src/main/res/mipmap-mdpi/launch_image +build_launch_image 96 ${BASE_DIR}/android/app/src/main/res/mipmap-xhdpi/launch_image +build_launch_image 144 ${BASE_DIR}/android/app/src/main/res/mipmap-xxhdpi/launch_image +build_launch_image 192 ${BASE_DIR}/android/app/src/main/res/mipmap-xxxhdpi/launch_image + +build_fastlane_image 1024 500 ${BASE_DIR}/fastlane/metadata/android/en-US/images/featureGraphic diff --git a/icons/featureGraphic.svg b/resources/app/featureGraphic.svg similarity index 100% rename from icons/featureGraphic.svg rename to resources/app/featureGraphic.svg diff --git a/icons/icon.svg b/resources/app/icon.svg similarity index 100% rename from icons/icon.svg rename to resources/app/icon.svg diff --git a/icons/build_icons.sh b/resources/build_resources.sh similarity index 51% rename from icons/build_icons.sh rename to resources/build_resources.sh index 915a16cb0b0b9b3a7109ef6686af811fc93cb8bb..4b76d1ca261adfe8db14b4e9cc8898dc3f7cda26 100755 --- a/icons/build_icons.sh +++ b/resources/build_resources.sh @@ -2,5 +2,4 @@ CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" -"${CURRENT_DIR}/build_application_icons.sh" -"${CURRENT_DIR}/build_repository_icons.sh" +${CURRENT_DIR}/app/build_application_resources.sh diff --git a/upgrade.sh b/upgrade.sh deleted file mode 100755 index bd9c64ad3a1df6350b6b9e69b7f2c687c40066e8..0000000000000000000000000000000000000000 --- a/upgrade.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -set -o errexit -set -o nounset -set -o pipefail - -# Check dependencies -command -v flutter >/dev/null 2>&1 || { - echo >&2 "I require flutter but it's not installed. Aborting." - exit 1 -} - -flutter pub upgrade -flutter pub upgrade --major-versions -flutter pub get - -flutter build apk --debug