Compare commits
No commits in common. "d1ebee0172bcaecf26a044e5577f44042d388c77" and "af85165943e183ff7dd8f4a1eff046e543ae36ff" have entirely different histories.
d1ebee0172
...
af85165943
25
.vscode/launch.json
vendored
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "huacu_mobile",
|
||||
"request": "launch",
|
||||
"type": "dart"
|
||||
},
|
||||
{
|
||||
"name": "huacu_mobile (profile mode)",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"flutterMode": "profile"
|
||||
},
|
||||
{
|
||||
"name": "huacu_mobile (release mode)",
|
||||
"request": "launch",
|
||||
"type": "dart",
|
||||
"flutterMode": "release"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -65,7 +65,7 @@ android {
|
|||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "xyz.nuark.mobile.huacu_mobile"
|
||||
applicationId "com.example.huacu_mobile"
|
||||
// You can update the following values to match your application needs.
|
||||
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
|
||||
minSdkVersion flutter.minSdkVersion
|
||||
|
|
|
|||
|
|
@ -2,10 +2,9 @@
|
|||
package="com.example.huacu_mobile">
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<application
|
||||
android:label="HUACU"
|
||||
android:label="huacu_mobile"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:roundIcon="@mipmap/ic_launcher_round">
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@mipmap/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
<monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
|
||||
</adaptive-icon>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@mipmap/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
<monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
|
||||
</adaptive-icon>
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 544 B |
|
Before Width: | Height: | Size: 895 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 769 B |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 442 B |
|
Before Width: | Height: | Size: 713 B |
|
Before Width: | Height: | Size: 904 B |
|
Before Width: | Height: | Size: 662 B |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 721 B |
|
Before Width: | Height: | Size: 1 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 820 B |
|
Before Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 978 B |
|
Before Width: | Height: | Size: 6.2 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 6 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 6.8 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
|
@ -1,122 +1,122 @@
|
|||
{
|
||||
"images": [
|
||||
"images" : [
|
||||
{
|
||||
"filename": "Icon-App-20x20@2x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "2x",
|
||||
"size": "20x20"
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-20x20@3x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "3x",
|
||||
"size": "20x20"
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-29x29@1x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "1x",
|
||||
"size": "29x29"
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-29x29@2x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "2x",
|
||||
"size": "29x29"
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-29x29@3x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "3x",
|
||||
"size": "29x29"
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-40x40@2x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "2x",
|
||||
"size": "40x40"
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-40x40@3x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "3x",
|
||||
"size": "40x40"
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-60x60@2x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "2x",
|
||||
"size": "60x60"
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-60x60@3x.png",
|
||||
"idiom": "iphone",
|
||||
"scale": "3x",
|
||||
"size": "60x60"
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-20x20@1x.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "1x",
|
||||
"size": "20x20"
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-20x20@2x.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "2x",
|
||||
"size": "20x20"
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-29x29@1x.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "1x",
|
||||
"size": "29x29"
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-29x29@2x.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "2x",
|
||||
"size": "29x29"
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-40x40@1x.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "1x",
|
||||
"size": "40x40"
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-40x40@2x.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "2x",
|
||||
"size": "40x40"
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-76x76@1x.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "1x",
|
||||
"size": "76x76"
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-76x76@2x.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "2x",
|
||||
"size": "76x76"
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-83.5x83.5@2x.png",
|
||||
"idiom": "ipad",
|
||||
"scale": "2x",
|
||||
"size": "83.5x83.5"
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename": "Icon-App-1024x1024@1x.png",
|
||||
"idiom": "ios-marketing",
|
||||
"scale": "1x",
|
||||
"size": "1024x1024"
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"author": "icons_launcher",
|
||||
"version": 1
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 591 B After Width: | Height: | Size: 564 B |
|
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 707 B After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 624 B After Width: | Height: | Size: 1 KiB |
|
Before Width: | Height: | Size: 695 B After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 791 B After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 743 B After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 912 B After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 912 B After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 734 B After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 995 B After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 3.5 KiB |
|
|
@ -13,7 +13,7 @@
|
|||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>HUACU</string>
|
||||
<string>huacu_mobile</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
|
|
|
|||
|
|
@ -1,506 +1,204 @@
|
|||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
const pallete = {
|
||||
"A1": Color.fromRGBO(107, 38, 5, 1),
|
||||
"A2": Color.fromRGBO(117, 33, 5, 1),
|
||||
"A3": Color.fromRGBO(128, 26, 12, 1),
|
||||
"A4": Color.fromRGBO(148, 13, 17, 1),
|
||||
"A5": Color.fromRGBO(162, 3, 21, 1),
|
||||
"A6": Color.fromRGBO(174, 0, 25, 1),
|
||||
"A7": Color.fromRGBO(190, 0, 26, 1),
|
||||
"A8": Color.fromRGBO(217, 1, 25, 1),
|
||||
"A9": Color.fromRGBO(246, 1, 18, 1),
|
||||
"A10": Color.fromRGBO(255, 0, 13, 1),
|
||||
"A11": Color.fromRGBO(255, 0, 6, 1),
|
||||
"A12": Color.fromRGBO(255, 0, 8, 1),
|
||||
"A13": Color.fromRGBO(255, 0, 30, 1),
|
||||
"A14": Color.fromRGBO(255, 0, 48, 1),
|
||||
"A15": Color.fromRGBO(255, 1, 65, 1),
|
||||
"A16": Color.fromRGBO(255, 0, 80, 1),
|
||||
"A17": Color.fromRGBO(250, 0, 98, 1),
|
||||
"A18": Color.fromRGBO(247, 0, 117, 1),
|
||||
"A19": Color.fromRGBO(236, 0, 136, 1),
|
||||
"A20": Color.fromRGBO(230, 1, 146, 1),
|
||||
"A21": Color.fromRGBO(218, 0, 146, 1),
|
||||
"A22": Color.fromRGBO(203, 19, 149, 1),
|
||||
"A23": Color.fromRGBO(198, 35, 152, 1),
|
||||
"A24": Color.fromRGBO(183, 39, 153, 1),
|
||||
"A25": Color.fromRGBO(173, 46, 153, 1),
|
||||
"A26": Color.fromRGBO(158, 49, 154, 1),
|
||||
"A27": Color.fromRGBO(151, 56, 156, 1),
|
||||
"A28": Color.fromRGBO(142, 57, 158, 1),
|
||||
"A29": Color.fromRGBO(135, 59, 159, 1),
|
||||
"A30": Color.fromRGBO(124, 62, 161, 1),
|
||||
"B1": Color.fromRGBO(146, 71, 14, 1),
|
||||
"B2": Color.fromRGBO(161, 63, 16, 1),
|
||||
"B3": Color.fromRGBO(171, 55, 16, 1),
|
||||
"B4": Color.fromRGBO(185, 52, 21, 1),
|
||||
"B5": Color.fromRGBO(199, 43, 21, 1),
|
||||
"B6": Color.fromRGBO(216, 12, 24, 1),
|
||||
"B7": Color.fromRGBO(237, 2, 19, 1),
|
||||
"B8": Color.fromRGBO(250, 0, 14, 1),
|
||||
"B9": Color.fromRGBO(255, 0, 8, 1),
|
||||
"B10": Color.fromRGBO(255, 0, 24, 1),
|
||||
"B11": Color.fromRGBO(255, 0, 34, 1),
|
||||
"B12": Color.fromRGBO(254, 0, 52, 1),
|
||||
"B13": Color.fromRGBO(255, 1, 55, 1),
|
||||
"B14": Color.fromRGBO(255, 0, 76, 1),
|
||||
"B15": Color.fromRGBO(255, 0, 94, 1),
|
||||
"B16": Color.fromRGBO(255, 0, 110, 1),
|
||||
"B17": Color.fromRGBO(255, 1, 126, 1),
|
||||
"B18": Color.fromRGBO(255, 0, 144, 1),
|
||||
"B19": Color.fromRGBO(240, 1, 147, 1),
|
||||
"B20": Color.fromRGBO(226, 35, 151, 1),
|
||||
"B21": Color.fromRGBO(207, 49, 159, 1),
|
||||
"B22": Color.fromRGBO(198, 48, 158, 1),
|
||||
"B23": Color.fromRGBO(180, 48, 157, 1),
|
||||
"B24": Color.fromRGBO(170, 54, 155, 1),
|
||||
"B25": Color.fromRGBO(165, 54, 156, 1),
|
||||
"B26": Color.fromRGBO(152, 55, 152, 1),
|
||||
"B27": Color.fromRGBO(140, 58, 158, 1),
|
||||
"B28": Color.fromRGBO(137, 59, 160, 1),
|
||||
"B29": Color.fromRGBO(120, 58, 157, 1),
|
||||
"B30": Color.fromRGBO(113, 57, 158, 1),
|
||||
"C1": Color.fromRGBO(176, 94, 21, 1),
|
||||
"C2": Color.fromRGBO(184, 85, 18, 1),
|
||||
"C3": Color.fromRGBO(200, 84, 11, 1),
|
||||
"C4": Color.fromRGBO(208, 69, 14, 1),
|
||||
"C5": Color.fromRGBO(223, 57, 17, 1),
|
||||
"C6": Color.fromRGBO(235, 45, 19, 1),
|
||||
"C7": Color.fromRGBO(249, 25, 13, 1),
|
||||
"C8": Color.fromRGBO(254, 0, 3, 1),
|
||||
"C9": Color.fromRGBO(255, 7, 23, 1),
|
||||
"C10": Color.fromRGBO(255, 26, 55, 1),
|
||||
"C11": Color.fromRGBO(255, 35, 70, 1),
|
||||
"C12": Color.fromRGBO(255, 25, 74, 1),
|
||||
"C13": Color.fromRGBO(255, 21, 90, 1),
|
||||
"C14": Color.fromRGBO(255, 0, 104, 1),
|
||||
"C15": Color.fromRGBO(255, 0, 120, 1),
|
||||
"C16": Color.fromRGBO(255, 1, 136, 1),
|
||||
"C17": Color.fromRGBO(255, 0, 154, 1),
|
||||
"C18": Color.fromRGBO(239, 47, 156, 1),
|
||||
"C19": Color.fromRGBO(220, 60, 158, 1),
|
||||
"C20": Color.fromRGBO(200, 66, 161, 1),
|
||||
"C21": Color.fromRGBO(195, 64, 160, 1),
|
||||
"C22": Color.fromRGBO(179, 64, 157, 1),
|
||||
"C23": Color.fromRGBO(172, 62, 157, 1),
|
||||
"C24": Color.fromRGBO(161, 60, 156, 1),
|
||||
"C25": Color.fromRGBO(152, 62, 158, 1),
|
||||
"C26": Color.fromRGBO(142, 57, 160, 1),
|
||||
"C27": Color.fromRGBO(132, 57, 158, 1),
|
||||
"C28": Color.fromRGBO(124, 56, 157, 1),
|
||||
"C29": Color.fromRGBO(110, 55, 156, 1),
|
||||
"C30": Color.fromRGBO(97, 46, 149, 1),
|
||||
"D1": Color.fromRGBO(213, 128, 1, 1),
|
||||
"D2": Color.fromRGBO(230, 125, 0, 1),
|
||||
"D3": Color.fromRGBO(238, 112, 1, 1),
|
||||
"D4": Color.fromRGBO(248, 114, 3, 1),
|
||||
"D5": Color.fromRGBO(249, 94, 1, 1),
|
||||
"D6": Color.fromRGBO(253, 81, 0, 1),
|
||||
"D7": Color.fromRGBO(255, 83, 0, 1),
|
||||
"D8": Color.fromRGBO(255, 70, 29, 1),
|
||||
"D9": Color.fromRGBO(254, 61, 44, 1),
|
||||
"D10": Color.fromRGBO(255, 71, 73, 1),
|
||||
"D11": Color.fromRGBO(255, 79, 95, 1),
|
||||
"D12": Color.fromRGBO(255, 81, 104, 1),
|
||||
"D13": Color.fromRGBO(255, 73, 111, 1),
|
||||
"D14": Color.fromRGBO(255, 66, 124, 1),
|
||||
"D15": Color.fromRGBO(255, 60, 142, 1),
|
||||
"D16": Color.fromRGBO(255, 59, 157, 1),
|
||||
"D17": Color.fromRGBO(241, 73, 161, 1),
|
||||
"D18": Color.fromRGBO(223, 76, 165, 1),
|
||||
"D19": Color.fromRGBO(205, 88, 169, 1),
|
||||
"D20": Color.fromRGBO(195, 81, 168, 1),
|
||||
"D21": Color.fromRGBO(177, 79, 166, 1),
|
||||
"D22": Color.fromRGBO(167, 72, 162, 1),
|
||||
"D23": Color.fromRGBO(160, 71, 165, 1),
|
||||
"D24": Color.fromRGBO(153, 69, 163, 1),
|
||||
"D25": Color.fromRGBO(140, 65, 160, 1),
|
||||
"D26": Color.fromRGBO(132, 62, 160, 1),
|
||||
"D27": Color.fromRGBO(119, 59, 159, 1),
|
||||
"D28": Color.fromRGBO(110, 54, 155, 1),
|
||||
"D29": Color.fromRGBO(95, 50, 153, 1),
|
||||
"D30": Color.fromRGBO(73, 46, 143, 1),
|
||||
"E1": Color.fromRGBO(247, 152, 0, 1),
|
||||
"E2": Color.fromRGBO(254, 148, 0, 1),
|
||||
"E3": Color.fromRGBO(255, 139, 0, 1),
|
||||
"E4": Color.fromRGBO(255, 133, 3, 1),
|
||||
"E5": Color.fromRGBO(255, 125, 1, 1),
|
||||
"E6": Color.fromRGBO(255, 110, 1, 1),
|
||||
"E7": Color.fromRGBO(254, 110, 39, 1),
|
||||
"E8": Color.fromRGBO(255, 100, 52, 1),
|
||||
"E9": Color.fromRGBO(255, 100, 69, 1),
|
||||
"E10": Color.fromRGBO(254, 111, 97, 1),
|
||||
"E11": Color.fromRGBO(255, 109, 112, 1),
|
||||
"E12": Color.fromRGBO(255, 110, 125, 1),
|
||||
"E13": Color.fromRGBO(254, 109, 138, 1),
|
||||
"E14": Color.fromRGBO(254, 102, 153, 1),
|
||||
"E15": Color.fromRGBO(255, 93, 168, 1),
|
||||
"E16": Color.fromRGBO(249, 103, 176, 1),
|
||||
"E17": Color.fromRGBO(226, 107, 175, 1),
|
||||
"E18": Color.fromRGBO(211, 108, 177, 1),
|
||||
"E19": Color.fromRGBO(200, 109, 178, 1),
|
||||
"E20": Color.fromRGBO(183, 99, 174, 1),
|
||||
"E21": Color.fromRGBO(168, 91, 171, 1),
|
||||
"E22": Color.fromRGBO(157, 85, 171, 1),
|
||||
"E23": Color.fromRGBO(148, 82, 169, 1),
|
||||
"E24": Color.fromRGBO(141, 79, 165, 1),
|
||||
"E25": Color.fromRGBO(130, 69, 162, 1),
|
||||
"E26": Color.fromRGBO(118, 68, 163, 1),
|
||||
"E27": Color.fromRGBO(105, 61, 158, 1),
|
||||
"E28": Color.fromRGBO(95, 50, 151, 1),
|
||||
"E29": Color.fromRGBO(79, 42, 156, 1),
|
||||
"E30": Color.fromRGBO(54, 43, 135, 1),
|
||||
"F1": Color.fromRGBO(254, 177, 1, 1),
|
||||
"F2": Color.fromRGBO(255, 173, 1, 1),
|
||||
"F3": Color.fromRGBO(255, 166, 0, 1),
|
||||
"F4": Color.fromRGBO(251, 171, 0, 1),
|
||||
"F5": Color.fromRGBO(254, 160, 24, 1),
|
||||
"F6": Color.fromRGBO(255, 159, 49, 1),
|
||||
"F7": Color.fromRGBO(254, 146, 71, 1),
|
||||
"F8": Color.fromRGBO(255, 136, 80, 1),
|
||||
"F9": Color.fromRGBO(255, 130, 90, 1),
|
||||
"F10": Color.fromRGBO(255, 129, 110, 1),
|
||||
"F11": Color.fromRGBO(254, 136, 122, 1),
|
||||
"F12": Color.fromRGBO(254, 138, 139, 1),
|
||||
"F13": Color.fromRGBO(254, 135, 154, 1),
|
||||
"F14": Color.fromRGBO(255, 134, 165, 1),
|
||||
"F15": Color.fromRGBO(255, 129, 182, 1),
|
||||
"F16": Color.fromRGBO(239, 136, 189, 1),
|
||||
"F17": Color.fromRGBO(221, 136, 193, 1),
|
||||
"F18": Color.fromRGBO(208, 137, 193, 1),
|
||||
"F19": Color.fromRGBO(196, 128, 189, 1),
|
||||
"F20": Color.fromRGBO(180, 119, 186, 1),
|
||||
"F21": Color.fromRGBO(165, 115, 186, 1),
|
||||
"F22": Color.fromRGBO(152, 101, 178, 1),
|
||||
"F23": Color.fromRGBO(138, 93, 174, 1),
|
||||
"F24": Color.fromRGBO(130, 88, 172, 1),
|
||||
"F25": Color.fromRGBO(119, 79, 168, 1),
|
||||
"F26": Color.fromRGBO(105, 75, 165, 1),
|
||||
"F27": Color.fromRGBO(95, 66, 158, 1),
|
||||
"F28": Color.fromRGBO(79, 51, 154, 1),
|
||||
"F29": Color.fromRGBO(61, 46, 149, 1),
|
||||
"F30": Color.fromRGBO(46, 41, 125, 1),
|
||||
"G1": Color.fromRGBO(254, 189, 0, 1),
|
||||
"G2": Color.fromRGBO(254, 189, 1, 1),
|
||||
"G3": Color.fromRGBO(255, 180, 0, 1),
|
||||
"G4": Color.fromRGBO(250, 180, 0, 1),
|
||||
"G5": Color.fromRGBO(255, 183, 75, 1),
|
||||
"G6": Color.fromRGBO(255, 168, 63, 1),
|
||||
"G7": Color.fromRGBO(254, 167, 87, 1),
|
||||
"G8": Color.fromRGBO(254, 158, 98, 1),
|
||||
"G9": Color.fromRGBO(255, 157, 110, 1),
|
||||
"G10": Color.fromRGBO(255, 156, 127, 1),
|
||||
"G11": Color.fromRGBO(255, 154, 146, 1),
|
||||
"G12": Color.fromRGBO(255, 153, 151, 1),
|
||||
"G13": Color.fromRGBO(255, 153, 166, 1),
|
||||
"G14": Color.fromRGBO(255, 150, 170, 1),
|
||||
"G15": Color.fromRGBO(255, 152, 199, 1),
|
||||
"G16": Color.fromRGBO(237, 162, 203, 1),
|
||||
"G17": Color.fromRGBO(218, 165, 207, 1),
|
||||
"G18": Color.fromRGBO(211, 172, 216, 1),
|
||||
"G19": Color.fromRGBO(190, 149, 205, 1),
|
||||
"G20": Color.fromRGBO(174, 138, 199, 1),
|
||||
"G21": Color.fromRGBO(159, 130, 194, 1),
|
||||
"G22": Color.fromRGBO(141, 118, 186, 1),
|
||||
"G23": Color.fromRGBO(129, 109, 180, 1),
|
||||
"G24": Color.fromRGBO(118, 101, 179, 1),
|
||||
"G25": Color.fromRGBO(105, 94, 173, 1),
|
||||
"G26": Color.fromRGBO(89, 85, 170, 1),
|
||||
"G27": Color.fromRGBO(81, 75, 163, 1),
|
||||
"G28": Color.fromRGBO(70, 66, 163, 1),
|
||||
"G29": Color.fromRGBO(50, 55, 155, 1),
|
||||
"G30": Color.fromRGBO(42, 47, 139, 1),
|
||||
"H1": Color.fromRGBO(255, 205, 2, 1),
|
||||
"H2": Color.fromRGBO(255, 204, 0, 1),
|
||||
"H3": Color.fromRGBO(255, 197, 1, 1),
|
||||
"H4": Color.fromRGBO(255, 196, 4, 1),
|
||||
"H5": Color.fromRGBO(255, 196, 32, 1),
|
||||
"H6": Color.fromRGBO(255, 188, 63, 1),
|
||||
"H7": Color.fromRGBO(253, 186, 73, 1),
|
||||
"H8": Color.fromRGBO(255, 182, 93, 1),
|
||||
"H9": Color.fromRGBO(255, 175, 112, 1),
|
||||
"H10": Color.fromRGBO(255, 171, 122, 1),
|
||||
"H11": Color.fromRGBO(255, 171, 137, 1),
|
||||
"H12": Color.fromRGBO(255, 176, 157, 1),
|
||||
"H13": Color.fromRGBO(254, 180, 171, 1),
|
||||
"H14": Color.fromRGBO(252, 181, 179, 1),
|
||||
"H15": Color.fromRGBO(247, 179, 200, 1),
|
||||
"H16": Color.fromRGBO(223, 181, 217, 1),
|
||||
"H17": Color.fromRGBO(210, 183, 218, 1),
|
||||
"H18": Color.fromRGBO(206, 189, 221, 1),
|
||||
"H19": Color.fromRGBO(183, 170, 214, 1),
|
||||
"H20": Color.fromRGBO(165, 162, 207, 1),
|
||||
"H21": Color.fromRGBO(154, 149, 205, 1),
|
||||
"H22": Color.fromRGBO(131, 137, 199, 1),
|
||||
"H23": Color.fromRGBO(116, 126, 195, 1),
|
||||
"H24": Color.fromRGBO(104, 118, 191, 1),
|
||||
"H25": Color.fromRGBO(90, 108, 180, 1),
|
||||
"H26": Color.fromRGBO(77, 100, 180, 1),
|
||||
"H27": Color.fromRGBO(68, 90, 175, 1),
|
||||
"H28": Color.fromRGBO(59, 80, 169, 1),
|
||||
"H29": Color.fromRGBO(40, 70, 160, 1),
|
||||
"H30": Color.fromRGBO(30, 60, 158, 1),
|
||||
"I1": Color.fromRGBO(254, 225, 1, 1),
|
||||
"I2": Color.fromRGBO(254, 220, 0, 1),
|
||||
"I3": Color.fromRGBO(255, 216, 1, 1),
|
||||
"I4": Color.fromRGBO(252, 216, 0, 1),
|
||||
"I5": Color.fromRGBO(255, 222, 5, 1),
|
||||
"I6": Color.fromRGBO(254, 214, 54, 1),
|
||||
"I7": Color.fromRGBO(254, 216, 69, 1),
|
||||
"I8": Color.fromRGBO(255, 212, 82, 1),
|
||||
"I9": Color.fromRGBO(251, 219, 108, 1),
|
||||
"I10": Color.fromRGBO(241, 226, 133, 1),
|
||||
"I11": Color.fromRGBO(239, 221, 149, 1),
|
||||
"I12": Color.fromRGBO(233, 226, 174, 1),
|
||||
"I13": Color.fromRGBO(227, 224, 193, 1),
|
||||
"I14": Color.fromRGBO(220, 225, 202, 1),
|
||||
"I15": Color.fromRGBO(208, 226, 210, 1),
|
||||
"I16": Color.fromRGBO(192, 223, 228, 1),
|
||||
"I17": Color.fromRGBO(188, 218, 244, 1),
|
||||
"I18": Color.fromRGBO(187, 217, 243, 1),
|
||||
"I19": Color.fromRGBO(158, 203, 236, 1),
|
||||
"I20": Color.fromRGBO(144, 187, 229, 1),
|
||||
"I21": Color.fromRGBO(130, 172, 222, 1),
|
||||
"I22": Color.fromRGBO(112, 162, 221, 1),
|
||||
"I23": Color.fromRGBO(105, 146, 210, 1),
|
||||
"I24": Color.fromRGBO(94, 135, 201, 1),
|
||||
"I25": Color.fromRGBO(76, 123, 191, 1),
|
||||
"I26": Color.fromRGBO(68, 110, 186, 1),
|
||||
"I27": Color.fromRGBO(57, 99, 181, 1),
|
||||
"I28": Color.fromRGBO(48, 93, 178, 1),
|
||||
"I29": Color.fromRGBO(43, 80, 169, 1),
|
||||
"I30": Color.fromRGBO(31, 72, 164, 1),
|
||||
"J1": Color.fromRGBO(252, 236, 1, 1),
|
||||
"J2": Color.fromRGBO(253, 235, 1, 1),
|
||||
"J3": Color.fromRGBO(254, 234, 0, 1),
|
||||
"J4": Color.fromRGBO(255, 236, 0, 1),
|
||||
"J5": Color.fromRGBO(252, 239, 0, 1),
|
||||
"J6": Color.fromRGBO(251, 243, 48, 1),
|
||||
"J7": Color.fromRGBO(250, 240, 80, 1),
|
||||
"J8": Color.fromRGBO(240, 239, 112, 1),
|
||||
"J9": Color.fromRGBO(230, 236, 126, 1),
|
||||
"J10": Color.fromRGBO(221, 233, 147, 1),
|
||||
"J11": Color.fromRGBO(213, 232, 166, 1),
|
||||
"J12": Color.fromRGBO(207, 233, 186, 1),
|
||||
"J13": Color.fromRGBO(206, 233, 202, 1),
|
||||
"J14": Color.fromRGBO(199, 235, 209, 1),
|
||||
"J15": Color.fromRGBO(193, 232, 214, 1),
|
||||
"J16": Color.fromRGBO(176, 232, 231, 1),
|
||||
"J17": Color.fromRGBO(164, 230, 244, 1),
|
||||
"J18": Color.fromRGBO(164, 229, 249, 1),
|
||||
"J19": Color.fromRGBO(139, 223, 249, 1),
|
||||
"J20": Color.fromRGBO(107, 216, 255, 1),
|
||||
"J21": Color.fromRGBO(98, 201, 242, 1),
|
||||
"J22": Color.fromRGBO(89, 183, 234, 1),
|
||||
"J23": Color.fromRGBO(76, 172, 222, 1),
|
||||
"J24": Color.fromRGBO(72, 154, 214, 1),
|
||||
"J25": Color.fromRGBO(58, 141, 207, 1),
|
||||
"J26": Color.fromRGBO(59, 126, 197, 1),
|
||||
"J27": Color.fromRGBO(44, 113, 191, 1),
|
||||
"J28": Color.fromRGBO(35, 104, 182, 1),
|
||||
"J29": Color.fromRGBO(42, 92, 177, 1),
|
||||
"J30": Color.fromRGBO(36, 82, 168, 1),
|
||||
"K1": Color.fromRGBO(249, 240, 0, 1),
|
||||
"K2": Color.fromRGBO(249, 240, 1, 1),
|
||||
"K3": Color.fromRGBO(248, 239, 0, 1),
|
||||
"K4": Color.fromRGBO(249, 237, 3, 1),
|
||||
"K5": Color.fromRGBO(244, 236, 47, 1),
|
||||
"K6": Color.fromRGBO(236, 237, 74, 1),
|
||||
"K7": Color.fromRGBO(231, 234, 105, 1),
|
||||
"K8": Color.fromRGBO(222, 230, 118, 1),
|
||||
"K9": Color.fromRGBO(212, 229, 117, 1),
|
||||
"K10": Color.fromRGBO(198, 223, 132, 1),
|
||||
"K11": Color.fromRGBO(182, 223, 144, 1),
|
||||
"K12": Color.fromRGBO(171, 219, 157, 1),
|
||||
"K13": Color.fromRGBO(170, 220, 169, 1),
|
||||
"K14": Color.fromRGBO(167, 220, 178, 1),
|
||||
"K15": Color.fromRGBO(162, 221, 191, 1),
|
||||
"K16": Color.fromRGBO(165, 222, 215, 1),
|
||||
"K17": Color.fromRGBO(158, 222, 222, 1),
|
||||
"K18": Color.fromRGBO(153, 224, 228, 1),
|
||||
"K19": Color.fromRGBO(131, 219, 233, 1),
|
||||
"K20": Color.fromRGBO(109, 217, 243, 1),
|
||||
"K21": Color.fromRGBO(71, 213, 249, 1),
|
||||
"K22": Color.fromRGBO(40, 205, 250, 1),
|
||||
"K23": Color.fromRGBO(45, 192, 236, 1),
|
||||
"K24": Color.fromRGBO(52, 173, 226, 1),
|
||||
"K25": Color.fromRGBO(47, 160, 220, 1),
|
||||
"K26": Color.fromRGBO(45, 140, 208, 1),
|
||||
"K27": Color.fromRGBO(33, 127, 199, 1),
|
||||
"K28": Color.fromRGBO(36, 116, 187, 1),
|
||||
"K29": Color.fromRGBO(34, 103, 181, 1),
|
||||
"K30": Color.fromRGBO(34, 95, 178, 1),
|
||||
"L1": Color.fromRGBO(244, 237, 1, 1),
|
||||
"L2": Color.fromRGBO(242, 235, 0, 1),
|
||||
"L3": Color.fromRGBO(235, 233, 0, 1),
|
||||
"L4": Color.fromRGBO(234, 233, 1, 1),
|
||||
"L5": Color.fromRGBO(229, 231, 0, 1),
|
||||
"L6": Color.fromRGBO(219, 229, 36, 1),
|
||||
"L7": Color.fromRGBO(209, 224, 71, 1),
|
||||
"L8": Color.fromRGBO(186, 219, 86, 1),
|
||||
"L9": Color.fromRGBO(168, 217, 89, 1),
|
||||
"L10": Color.fromRGBO(157, 214, 107, 1),
|
||||
"L11": Color.fromRGBO(146, 212, 115, 1),
|
||||
"L12": Color.fromRGBO(136, 211, 129, 1),
|
||||
"L13": Color.fromRGBO(126, 210, 148, 1),
|
||||
"L14": Color.fromRGBO(122, 207, 152, 1),
|
||||
"L15": Color.fromRGBO(121, 210, 166, 1),
|
||||
"L16": Color.fromRGBO(120, 209, 177, 1),
|
||||
"L17": Color.fromRGBO(122, 211, 191, 1),
|
||||
"L18": Color.fromRGBO(116, 212, 200, 1),
|
||||
"L19": Color.fromRGBO(101, 212, 205, 1),
|
||||
"L20": Color.fromRGBO(91, 209, 213, 1),
|
||||
"L21": Color.fromRGBO(58, 206, 220, 1),
|
||||
"L22": Color.fromRGBO(0, 205, 226, 1),
|
||||
"L23": Color.fromRGBO(3, 201, 246, 1),
|
||||
"L24": Color.fromRGBO(0, 190, 242, 1),
|
||||
"L25": Color.fromRGBO(0, 172, 232, 1),
|
||||
"L26": Color.fromRGBO(2, 156, 218, 1),
|
||||
"L27": Color.fromRGBO(25, 138, 208, 1),
|
||||
"L28": Color.fromRGBO(21, 121, 196, 1),
|
||||
"L29": Color.fromRGBO(37, 115, 190, 1),
|
||||
"L30": Color.fromRGBO(30, 102, 184, 1),
|
||||
"M1": Color.fromRGBO(226, 227, 1, 1),
|
||||
"M2": Color.fromRGBO(218, 226, 1, 1),
|
||||
"M3": Color.fromRGBO(211, 226, 1, 1),
|
||||
"M4": Color.fromRGBO(203, 223, 1, 1),
|
||||
"M5": Color.fromRGBO(198, 219, 0, 1),
|
||||
"M6": Color.fromRGBO(180, 215, 11, 1),
|
||||
"M7": Color.fromRGBO(168, 212, 41, 1),
|
||||
"M8": Color.fromRGBO(148, 208, 52, 1),
|
||||
"M9": Color.fromRGBO(126, 202, 67, 1),
|
||||
"M10": Color.fromRGBO(112, 200, 78, 1),
|
||||
"M11": Color.fromRGBO(96, 199, 92, 1),
|
||||
"M12": Color.fromRGBO(81, 199, 103, 1),
|
||||
"M13": Color.fromRGBO(78, 197, 117, 1),
|
||||
"M14": Color.fromRGBO(77, 197, 126, 1),
|
||||
"M15": Color.fromRGBO(76, 199, 136, 1),
|
||||
"M16": Color.fromRGBO(78, 200, 143, 1),
|
||||
"M17": Color.fromRGBO(78, 199, 156, 1),
|
||||
"M18": Color.fromRGBO(81, 203, 164, 1),
|
||||
"M19": Color.fromRGBO(85, 203, 169, 1),
|
||||
"M20": Color.fromRGBO(63, 202, 181, 1),
|
||||
"M21": Color.fromRGBO(35, 200, 186, 1),
|
||||
"M22": Color.fromRGBO(0, 198, 197, 1),
|
||||
"M23": Color.fromRGBO(3, 196, 211, 1),
|
||||
"M24": Color.fromRGBO(0, 197, 224, 1),
|
||||
"M25": Color.fromRGBO(0, 190, 234, 1),
|
||||
"M26": Color.fromRGBO(0, 174, 234, 1),
|
||||
"M27": Color.fromRGBO(0, 160, 222, 1),
|
||||
"M28": Color.fromRGBO(0, 142, 210, 1),
|
||||
"M29": Color.fromRGBO(1, 129, 200, 1),
|
||||
"M30": Color.fromRGBO(0, 116, 189, 1),
|
||||
"N1": Color.fromRGBO(191, 218, 1, 1),
|
||||
"N2": Color.fromRGBO(182, 215, 0, 1),
|
||||
"N3": Color.fromRGBO(172, 212, 1, 1),
|
||||
"N4": Color.fromRGBO(159, 207, 1, 1),
|
||||
"N5": Color.fromRGBO(147, 206, 0, 1),
|
||||
"N6": Color.fromRGBO(133, 205, 1, 1),
|
||||
"N7": Color.fromRGBO(109, 197, 27, 1),
|
||||
"N8": Color.fromRGBO(93, 196, 29, 1),
|
||||
"N9": Color.fromRGBO(77, 191, 41, 1),
|
||||
"N10": Color.fromRGBO(47, 185, 46, 1),
|
||||
"N11": Color.fromRGBO(23, 184, 55, 1),
|
||||
"N12": Color.fromRGBO(0, 181, 71, 1),
|
||||
"N13": Color.fromRGBO(0, 186, 75, 1),
|
||||
"N14": Color.fromRGBO(0, 187, 98, 1),
|
||||
"N15": Color.fromRGBO(0, 191, 108, 1),
|
||||
"N16": Color.fromRGBO(12, 193, 112, 1),
|
||||
"N17": Color.fromRGBO(27, 191, 120, 1),
|
||||
"N18": Color.fromRGBO(29, 195, 133, 1),
|
||||
"N19": Color.fromRGBO(40, 196, 135, 1),
|
||||
"N20": Color.fromRGBO(47, 194, 140, 1),
|
||||
"N21": Color.fromRGBO(25, 195, 156, 1),
|
||||
"N22": Color.fromRGBO(0, 198, 171, 1),
|
||||
"N23": Color.fromRGBO(3, 196, 177, 1),
|
||||
"N24": Color.fromRGBO(0, 195, 197, 1),
|
||||
"N25": Color.fromRGBO(0, 195, 209, 1),
|
||||
"N26": Color.fromRGBO(0, 189, 221, 1),
|
||||
"N27": Color.fromRGBO(0, 177, 227, 1),
|
||||
"N28": Color.fromRGBO(1, 170, 227, 1),
|
||||
"N29": Color.fromRGBO(0, 154, 216, 1),
|
||||
"N30": Color.fromRGBO(1, 135, 206, 1),
|
||||
"O1": Color.fromRGBO(149, 197, 1, 1),
|
||||
"O2": Color.fromRGBO(142, 198, 1, 1),
|
||||
"O3": Color.fromRGBO(134, 197, 4, 1),
|
||||
"O4": Color.fromRGBO(121, 194, 29, 1),
|
||||
"O5": Color.fromRGBO(107, 191, 33, 1),
|
||||
"O6": Color.fromRGBO(81, 182, 42, 1),
|
||||
"O7": Color.fromRGBO(69, 179, 44, 1),
|
||||
"O8": Color.fromRGBO(40, 172, 53, 1),
|
||||
"O9": Color.fromRGBO(28, 170, 52, 1),
|
||||
"O10": Color.fromRGBO(3, 160, 53, 1),
|
||||
"O11": Color.fromRGBO(0, 161, 58, 1),
|
||||
"O12": Color.fromRGBO(3, 167, 55, 1),
|
||||
"O13": Color.fromRGBO(1, 172, 58, 1),
|
||||
"O14": Color.fromRGBO(2, 180, 56, 1),
|
||||
"O15": Color.fromRGBO(2, 183, 68, 1),
|
||||
"O16": Color.fromRGBO(3, 186, 82, 1),
|
||||
"O17": Color.fromRGBO(2, 188, 89, 1),
|
||||
"O18": Color.fromRGBO(0, 190, 104, 1),
|
||||
"O19": Color.fromRGBO(2, 189, 110, 1),
|
||||
"O20": Color.fromRGBO(2, 190, 113, 1),
|
||||
"O21": Color.fromRGBO(0, 193, 128, 1),
|
||||
"O22": Color.fromRGBO(3, 191, 141, 1),
|
||||
"O23": Color.fromRGBO(3, 193, 157, 1),
|
||||
"O24": Color.fromRGBO(3, 191, 167, 1),
|
||||
"O25": Color.fromRGBO(1, 192, 185, 1),
|
||||
"O26": Color.fromRGBO(3, 195, 200, 1),
|
||||
"O27": Color.fromRGBO(1, 193, 214, 1),
|
||||
"O28": Color.fromRGBO(3, 182, 215, 1),
|
||||
"O29": Color.fromRGBO(1, 173, 221, 1),
|
||||
"O30": Color.fromRGBO(4, 162, 227, 1),
|
||||
"P1": Color.fromRGBO(112, 167, 40, 1),
|
||||
"P2": Color.fromRGBO(100, 172, 36, 1),
|
||||
"P3": Color.fromRGBO(92, 170, 50, 1),
|
||||
"P4": Color.fromRGBO(80, 165, 46, 1),
|
||||
"P5": Color.fromRGBO(57, 167, 52, 1),
|
||||
"P6": Color.fromRGBO(29, 162, 55, 1),
|
||||
"P7": Color.fromRGBO(0, 154, 56, 1),
|
||||
"P8": Color.fromRGBO(0, 153, 57, 1),
|
||||
"P9": Color.fromRGBO(0, 149, 59, 1),
|
||||
"P10": Color.fromRGBO(1, 139, 61, 1),
|
||||
"P11": Color.fromRGBO(0, 144, 59, 1),
|
||||
"P12": Color.fromRGBO(0, 148, 56, 1),
|
||||
"P13": Color.fromRGBO(0, 158, 58, 1),
|
||||
"P14": Color.fromRGBO(0, 165, 61, 1),
|
||||
"P15": Color.fromRGBO(0, 174, 61, 1),
|
||||
"P16": Color.fromRGBO(0, 181, 60, 1),
|
||||
"P17": Color.fromRGBO(0, 183, 59, 1),
|
||||
"P18": Color.fromRGBO(0, 184, 72, 1),
|
||||
"P19": Color.fromRGBO(0, 185, 84, 1),
|
||||
"P20": Color.fromRGBO(3, 186, 93, 1),
|
||||
"P21": Color.fromRGBO(0, 188, 104, 1),
|
||||
"P22": Color.fromRGBO(0, 190, 120, 1),
|
||||
"P23": Color.fromRGBO(2, 189, 136, 1),
|
||||
"P24": Color.fromRGBO(0, 187, 152, 1),
|
||||
"P25": Color.fromRGBO(0, 191, 160, 1),
|
||||
"P26": Color.fromRGBO(0, 191, 175, 1),
|
||||
"P27": Color.fromRGBO(0, 191, 192, 1),
|
||||
"P28": Color.fromRGBO(1, 192, 202, 1),
|
||||
"P29": Color.fromRGBO(0, 187, 218, 1),
|
||||
"P30": Color.fromRGBO(0, 182, 232, 1),
|
||||
"A0": Color.fromRGBO(0, 0, 186, 1),
|
||||
"A1": Color.fromRGBO(0, 26, 186, 1),
|
||||
"A2": Color.fromRGBO(0, 51, 186, 1),
|
||||
"A3": Color.fromRGBO(0, 77, 186, 1),
|
||||
"A4": Color.fromRGBO(0, 102, 186, 1),
|
||||
"A5": Color.fromRGBO(0, 128, 186, 1),
|
||||
"A6": Color.fromRGBO(0, 153, 186, 1),
|
||||
"A7": Color.fromRGBO(0, 179, 186, 1),
|
||||
"A8": Color.fromRGBO(0, 204, 186, 1),
|
||||
"A9": Color.fromRGBO(0, 230, 186, 1),
|
||||
"B0": Color.fromRGBO(13, 0, 186, 1),
|
||||
"B1": Color.fromRGBO(13, 26, 186, 1),
|
||||
"B2": Color.fromRGBO(13, 51, 186, 1),
|
||||
"B3": Color.fromRGBO(13, 77, 186, 1),
|
||||
"B4": Color.fromRGBO(13, 102, 186, 1),
|
||||
"B5": Color.fromRGBO(13, 128, 186, 1),
|
||||
"B6": Color.fromRGBO(13, 153, 186, 1),
|
||||
"B7": Color.fromRGBO(13, 179, 186, 1),
|
||||
"B8": Color.fromRGBO(13, 204, 186, 1),
|
||||
"B9": Color.fromRGBO(13, 230, 186, 1),
|
||||
"C0": Color.fromRGBO(26, 0, 186, 1),
|
||||
"C1": Color.fromRGBO(26, 26, 186, 1),
|
||||
"C2": Color.fromRGBO(26, 51, 186, 1),
|
||||
"C3": Color.fromRGBO(26, 77, 186, 1),
|
||||
"C4": Color.fromRGBO(26, 102, 186, 1),
|
||||
"C5": Color.fromRGBO(26, 128, 186, 1),
|
||||
"C6": Color.fromRGBO(26, 153, 186, 1),
|
||||
"C7": Color.fromRGBO(26, 179, 186, 1),
|
||||
"C8": Color.fromRGBO(26, 204, 186, 1),
|
||||
"C9": Color.fromRGBO(26, 230, 186, 1),
|
||||
"D0": Color.fromRGBO(38, 0, 186, 1),
|
||||
"D1": Color.fromRGBO(38, 26, 186, 1),
|
||||
"D2": Color.fromRGBO(38, 51, 186, 1),
|
||||
"D3": Color.fromRGBO(38, 77, 186, 1),
|
||||
"D4": Color.fromRGBO(38, 102, 186, 1),
|
||||
"D5": Color.fromRGBO(38, 128, 186, 1),
|
||||
"D6": Color.fromRGBO(38, 153, 186, 1),
|
||||
"D7": Color.fromRGBO(38, 179, 186, 1),
|
||||
"D8": Color.fromRGBO(38, 204, 186, 1),
|
||||
"D9": Color.fromRGBO(38, 230, 186, 1),
|
||||
"E0": Color.fromRGBO(51, 0, 186, 1),
|
||||
"E1": Color.fromRGBO(51, 26, 186, 1),
|
||||
"E2": Color.fromRGBO(51, 51, 186, 1),
|
||||
"E3": Color.fromRGBO(51, 77, 186, 1),
|
||||
"E4": Color.fromRGBO(51, 102, 186, 1),
|
||||
"E5": Color.fromRGBO(51, 128, 186, 1),
|
||||
"E6": Color.fromRGBO(51, 153, 186, 1),
|
||||
"E7": Color.fromRGBO(51, 179, 186, 1),
|
||||
"E8": Color.fromRGBO(51, 204, 186, 1),
|
||||
"E9": Color.fromRGBO(51, 230, 186, 1),
|
||||
"F0": Color.fromRGBO(64, 0, 186, 1),
|
||||
"F1": Color.fromRGBO(64, 26, 186, 1),
|
||||
"F2": Color.fromRGBO(64, 51, 186, 1),
|
||||
"F3": Color.fromRGBO(64, 77, 186, 1),
|
||||
"F4": Color.fromRGBO(64, 102, 186, 1),
|
||||
"F5": Color.fromRGBO(64, 128, 186, 1),
|
||||
"F6": Color.fromRGBO(64, 153, 186, 1),
|
||||
"F7": Color.fromRGBO(64, 179, 186, 1),
|
||||
"F8": Color.fromRGBO(64, 204, 186, 1),
|
||||
"F9": Color.fromRGBO(64, 230, 186, 1),
|
||||
"G0": Color.fromRGBO(77, 0, 186, 1),
|
||||
"G1": Color.fromRGBO(77, 26, 186, 1),
|
||||
"G2": Color.fromRGBO(77, 51, 186, 1),
|
||||
"G3": Color.fromRGBO(77, 77, 186, 1),
|
||||
"G4": Color.fromRGBO(77, 102, 186, 1),
|
||||
"G5": Color.fromRGBO(77, 128, 186, 1),
|
||||
"G6": Color.fromRGBO(77, 153, 186, 1),
|
||||
"G7": Color.fromRGBO(77, 179, 186, 1),
|
||||
"G8": Color.fromRGBO(77, 204, 186, 1),
|
||||
"G9": Color.fromRGBO(77, 230, 186, 1),
|
||||
"H0": Color.fromRGBO(89, 0, 186, 1),
|
||||
"H1": Color.fromRGBO(89, 26, 186, 1),
|
||||
"H2": Color.fromRGBO(89, 51, 186, 1),
|
||||
"H3": Color.fromRGBO(89, 77, 186, 1),
|
||||
"H4": Color.fromRGBO(89, 102, 186, 1),
|
||||
"H5": Color.fromRGBO(89, 128, 186, 1),
|
||||
"H6": Color.fromRGBO(89, 153, 186, 1),
|
||||
"H7": Color.fromRGBO(89, 179, 186, 1),
|
||||
"H8": Color.fromRGBO(89, 204, 186, 1),
|
||||
"H9": Color.fromRGBO(89, 230, 186, 1),
|
||||
"I0": Color.fromRGBO(102, 0, 186, 1),
|
||||
"I1": Color.fromRGBO(102, 26, 186, 1),
|
||||
"I2": Color.fromRGBO(102, 51, 186, 1),
|
||||
"I3": Color.fromRGBO(102, 77, 186, 1),
|
||||
"I4": Color.fromRGBO(102, 102, 186, 1),
|
||||
"I5": Color.fromRGBO(102, 128, 186, 1),
|
||||
"I6": Color.fromRGBO(102, 153, 186, 1),
|
||||
"I7": Color.fromRGBO(102, 179, 186, 1),
|
||||
"I8": Color.fromRGBO(102, 204, 186, 1),
|
||||
"I9": Color.fromRGBO(102, 230, 186, 1),
|
||||
"J0": Color.fromRGBO(115, 0, 186, 1),
|
||||
"J1": Color.fromRGBO(115, 26, 186, 1),
|
||||
"J2": Color.fromRGBO(115, 51, 186, 1),
|
||||
"J3": Color.fromRGBO(115, 77, 186, 1),
|
||||
"J4": Color.fromRGBO(115, 102, 186, 1),
|
||||
"J5": Color.fromRGBO(115, 128, 186, 1),
|
||||
"J6": Color.fromRGBO(115, 153, 186, 1),
|
||||
"J7": Color.fromRGBO(115, 179, 186, 1),
|
||||
"J8": Color.fromRGBO(115, 204, 186, 1),
|
||||
"J9": Color.fromRGBO(115, 230, 186, 1),
|
||||
"K0": Color.fromRGBO(128, 0, 186, 1),
|
||||
"K1": Color.fromRGBO(128, 26, 186, 1),
|
||||
"K2": Color.fromRGBO(128, 51, 186, 1),
|
||||
"K3": Color.fromRGBO(128, 77, 186, 1),
|
||||
"K4": Color.fromRGBO(128, 102, 186, 1),
|
||||
"K5": Color.fromRGBO(128, 128, 186, 1),
|
||||
"K6": Color.fromRGBO(128, 153, 186, 1),
|
||||
"K7": Color.fromRGBO(128, 179, 186, 1),
|
||||
"K8": Color.fromRGBO(128, 204, 186, 1),
|
||||
"K9": Color.fromRGBO(128, 230, 186, 1),
|
||||
"L0": Color.fromRGBO(140, 0, 186, 1),
|
||||
"L1": Color.fromRGBO(140, 26, 186, 1),
|
||||
"L2": Color.fromRGBO(140, 51, 186, 1),
|
||||
"L3": Color.fromRGBO(140, 77, 186, 1),
|
||||
"L4": Color.fromRGBO(140, 102, 186, 1),
|
||||
"L5": Color.fromRGBO(140, 128, 186, 1),
|
||||
"L6": Color.fromRGBO(140, 153, 186, 1),
|
||||
"L7": Color.fromRGBO(140, 179, 186, 1),
|
||||
"L8": Color.fromRGBO(140, 204, 186, 1),
|
||||
"L9": Color.fromRGBO(140, 230, 186, 1),
|
||||
"M0": Color.fromRGBO(153, 0, 186, 1),
|
||||
"M1": Color.fromRGBO(153, 26, 186, 1),
|
||||
"M2": Color.fromRGBO(153, 51, 186, 1),
|
||||
"M3": Color.fromRGBO(153, 77, 186, 1),
|
||||
"M4": Color.fromRGBO(153, 102, 186, 1),
|
||||
"M5": Color.fromRGBO(153, 128, 186, 1),
|
||||
"M6": Color.fromRGBO(153, 153, 186, 1),
|
||||
"M7": Color.fromRGBO(153, 179, 186, 1),
|
||||
"M8": Color.fromRGBO(153, 204, 186, 1),
|
||||
"M9": Color.fromRGBO(153, 230, 186, 1),
|
||||
"N0": Color.fromRGBO(166, 0, 186, 1),
|
||||
"N1": Color.fromRGBO(166, 26, 186, 1),
|
||||
"N2": Color.fromRGBO(166, 51, 186, 1),
|
||||
"N3": Color.fromRGBO(166, 77, 186, 1),
|
||||
"N4": Color.fromRGBO(166, 102, 186, 1),
|
||||
"N5": Color.fromRGBO(166, 128, 186, 1),
|
||||
"N6": Color.fromRGBO(166, 153, 186, 1),
|
||||
"N7": Color.fromRGBO(166, 179, 186, 1),
|
||||
"N8": Color.fromRGBO(166, 204, 186, 1),
|
||||
"N9": Color.fromRGBO(166, 230, 186, 1),
|
||||
"O0": Color.fromRGBO(179, 0, 186, 1),
|
||||
"O1": Color.fromRGBO(179, 26, 186, 1),
|
||||
"O2": Color.fromRGBO(179, 51, 186, 1),
|
||||
"O3": Color.fromRGBO(179, 77, 186, 1),
|
||||
"O4": Color.fromRGBO(179, 102, 186, 1),
|
||||
"O5": Color.fromRGBO(179, 128, 186, 1),
|
||||
"O6": Color.fromRGBO(179, 153, 186, 1),
|
||||
"O7": Color.fromRGBO(179, 179, 186, 1),
|
||||
"O8": Color.fromRGBO(179, 204, 186, 1),
|
||||
"O9": Color.fromRGBO(179, 230, 186, 1),
|
||||
"P0": Color.fromRGBO(191, 0, 186, 1),
|
||||
"P1": Color.fromRGBO(191, 26, 186, 1),
|
||||
"P2": Color.fromRGBO(191, 51, 186, 1),
|
||||
"P3": Color.fromRGBO(191, 77, 186, 1),
|
||||
"P4": Color.fromRGBO(191, 102, 186, 1),
|
||||
"P5": Color.fromRGBO(191, 128, 186, 1),
|
||||
"P6": Color.fromRGBO(191, 153, 186, 1),
|
||||
"P7": Color.fromRGBO(191, 179, 186, 1),
|
||||
"P8": Color.fromRGBO(191, 204, 186, 1),
|
||||
"P9": Color.fromRGBO(191, 230, 186, 1),
|
||||
"Q0": Color.fromRGBO(204, 0, 186, 1),
|
||||
"Q1": Color.fromRGBO(204, 26, 186, 1),
|
||||
"Q2": Color.fromRGBO(204, 51, 186, 1),
|
||||
"Q3": Color.fromRGBO(204, 77, 186, 1),
|
||||
"Q4": Color.fromRGBO(204, 102, 186, 1),
|
||||
"Q5": Color.fromRGBO(204, 128, 186, 1),
|
||||
"Q6": Color.fromRGBO(204, 153, 186, 1),
|
||||
"Q7": Color.fromRGBO(204, 179, 186, 1),
|
||||
"Q8": Color.fromRGBO(204, 204, 186, 1),
|
||||
"Q9": Color.fromRGBO(204, 230, 186, 1),
|
||||
"R0": Color.fromRGBO(217, 0, 186, 1),
|
||||
"R1": Color.fromRGBO(217, 26, 186, 1),
|
||||
"R2": Color.fromRGBO(217, 51, 186, 1),
|
||||
"R3": Color.fromRGBO(217, 77, 186, 1),
|
||||
"R4": Color.fromRGBO(217, 102, 186, 1),
|
||||
"R5": Color.fromRGBO(217, 128, 186, 1),
|
||||
"R6": Color.fromRGBO(217, 153, 186, 1),
|
||||
"R7": Color.fromRGBO(217, 179, 186, 1),
|
||||
"R8": Color.fromRGBO(217, 204, 186, 1),
|
||||
"R9": Color.fromRGBO(217, 230, 186, 1),
|
||||
"S0": Color.fromRGBO(230, 0, 186, 1),
|
||||
"S1": Color.fromRGBO(230, 26, 186, 1),
|
||||
"S2": Color.fromRGBO(230, 51, 186, 1),
|
||||
"S3": Color.fromRGBO(230, 77, 186, 1),
|
||||
"S4": Color.fromRGBO(230, 102, 186, 1),
|
||||
"S5": Color.fromRGBO(230, 128, 186, 1),
|
||||
"S6": Color.fromRGBO(230, 153, 186, 1),
|
||||
"S7": Color.fromRGBO(230, 179, 186, 1),
|
||||
"S8": Color.fromRGBO(230, 204, 186, 1),
|
||||
"S9": Color.fromRGBO(230, 230, 186, 1),
|
||||
"T0": Color.fromRGBO(242, 0, 186, 1),
|
||||
"T1": Color.fromRGBO(242, 26, 186, 1),
|
||||
"T2": Color.fromRGBO(242, 51, 186, 1),
|
||||
"T3": Color.fromRGBO(242, 77, 186, 1),
|
||||
"T4": Color.fromRGBO(242, 102, 186, 1),
|
||||
"T5": Color.fromRGBO(242, 128, 186, 1),
|
||||
"T6": Color.fromRGBO(242, 153, 186, 1),
|
||||
"T7": Color.fromRGBO(242, 179, 186, 1),
|
||||
"T8": Color.fromRGBO(242, 204, 186, 1),
|
||||
"T9": Color.fromRGBO(242, 230, 186, 1)
|
||||
};
|
||||
|
||||
final labelColorForComputedLightness = pallete.map(
|
||||
(key, value) => MapEntry(
|
||||
key,
|
||||
ThemeData.estimateBrightnessForColor(pallete[key]!) == Brightness.light
|
||||
? Colors.black
|
||||
: Colors.white,
|
||||
),
|
||||
);
|
||||
|
||||
const palletteAlphabet = "ABCDEFGHIJKLMNOP";
|
||||
const palletteWidth = 30;
|
||||
|
||||
const avatarColors = [
|
||||
Color(0xffA3A948),
|
||||
Color(0xffEDB92E),
|
||||
Color(0xffF85931),
|
||||
Color(0xffCE1836),
|
||||
Color(0xff009989)
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
class AuthData {
|
||||
final String id;
|
||||
final String login;
|
||||
final String password;
|
||||
|
||||
const AuthData(this.id, this.login, this.password);
|
||||
const AuthData(this.login, this.password);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class SettingsItemModel {
|
||||
final IconData icon;
|
||||
final Color color;
|
||||
final String title;
|
||||
final String description;
|
||||
final VoidCallback? onTap;
|
||||
|
||||
const SettingsItemModel({
|
||||
required this.color,
|
||||
required this.description,
|
||||
required this.icon,
|
||||
required this.title,
|
||||
this.onTap,
|
||||
});
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
class UserData {
|
||||
final int gamesWon;
|
||||
final int gamesLost;
|
||||
|
||||
const UserData(this.gamesWon, this.gamesLost);
|
||||
}
|
||||
|
|
@ -13,11 +13,7 @@ class AuthPage extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _AuthPageState extends State<AuthPage> {
|
||||
static const serverUrl =
|
||||
kDebugMode ? "http://localhost:9800" : "https://huacu.nuark.xyz";
|
||||
io.Socket socket = io.io(serverUrl, <String, dynamic>{
|
||||
"transports": ["websocket"],
|
||||
});
|
||||
late io.Socket socket;
|
||||
|
||||
TextEditingController loginController = TextEditingController();
|
||||
TextEditingController passwordController = TextEditingController();
|
||||
|
|
@ -26,9 +22,11 @@ class _AuthPageState extends State<AuthPage> {
|
|||
void initState() {
|
||||
super.initState();
|
||||
|
||||
if (!socket.connected) {
|
||||
socket.connect();
|
||||
}
|
||||
const serverUrl =
|
||||
kDebugMode ? "http://localhost:9800" : "https://huacu.nuark.xyz";
|
||||
socket = io.io(serverUrl, <String, dynamic>{
|
||||
"transports": ["websocket"],
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -78,7 +76,6 @@ class _AuthPageState extends State<AuthPage> {
|
|||
border: OutlineInputBorder(),
|
||||
labelText: "Password",
|
||||
),
|
||||
obscureText: true,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
|
|
@ -113,9 +110,7 @@ class _AuthPageState extends State<AuthPage> {
|
|||
message,
|
||||
);
|
||||
if (ok) {
|
||||
Get.put(
|
||||
AuthData(data[2], loginController.text, passwordController.text),
|
||||
);
|
||||
Get.put(AuthData(loginController.text, passwordController.text));
|
||||
Get.put(socket);
|
||||
Get.offNamed("/home");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:huacu_mobile/game_pallete.dart';
|
||||
import 'package:huacu_mobile/models/auth_data.dart';
|
||||
import 'package:huacu_mobile/models/chat_entry.dart';
|
||||
import 'package:huacu_mobile/models/game.dart';
|
||||
|
|
@ -32,46 +31,16 @@ class _GamePageState extends State<GamePage> {
|
|||
void initState() {
|
||||
super.initState();
|
||||
|
||||
socket.on("hello", _onHelloEvent);
|
||||
socket.on("gameStatus", _onGameStatusEvent);
|
||||
socket.on("leaveGameResponse", _onLeaveGameResponseEvent);
|
||||
socket.on("chatResponse", _onChatResponseEvent);
|
||||
if (isGuesser) {
|
||||
socket.on("guessResponse", _onGuessResponseEvent);
|
||||
} else {
|
||||
socket.on("guess", _onGuessEvent);
|
||||
}
|
||||
|
||||
chat.listen((data) {
|
||||
_scrollToEnd();
|
||||
_showMessageNotification(data.last);
|
||||
socket.on("hello", (idky) {
|
||||
socket.dispose();
|
||||
Get.offAllNamed("/auth");
|
||||
});
|
||||
}
|
||||
|
||||
void _onHelloEvent(dynamic idky) {
|
||||
socket.dispose();
|
||||
Get.offAllNamed("/auth");
|
||||
}
|
||||
|
||||
void _onGameStatusEvent(dynamic data) {
|
||||
bool won = data[0];
|
||||
Get.defaultDialog(
|
||||
title: "Game ended",
|
||||
middleText: won ? "You won!" : "You lost!",
|
||||
barrierDismissible: false,
|
||||
onConfirm: () {
|
||||
Get.put(authData);
|
||||
Get.put(socket);
|
||||
Get.offAllNamed("/home");
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void _onLeaveGameResponseEvent(dynamic data) {
|
||||
if (data[0] == true && data[1] == 410) {
|
||||
socket.on("gameStatus", (data) {
|
||||
bool won = data[0];
|
||||
Get.defaultDialog(
|
||||
title: "Game ended",
|
||||
middleText: "Your opponent left the game",
|
||||
middleText: won ? "You won!" : "You lost!",
|
||||
barrierDismissible: false,
|
||||
onConfirm: () {
|
||||
Get.put(authData);
|
||||
|
|
@ -79,44 +48,48 @@ class _GamePageState extends State<GamePage> {
|
|||
Get.offAllNamed("/home");
|
||||
},
|
||||
);
|
||||
} else {
|
||||
Get.put(authData);
|
||||
Get.put(socket);
|
||||
Get.offAllNamed("/home");
|
||||
}
|
||||
}
|
||||
|
||||
void _onChatResponseEvent(dynamic data) {
|
||||
bool ok = data[0];
|
||||
if (ok) {
|
||||
chat.add(ChatEntry(data[1]["from"], data[1]["message"]));
|
||||
}
|
||||
}
|
||||
|
||||
void _onGuessEvent(dynamic data) {
|
||||
setState(() {
|
||||
guessedColors.add(data);
|
||||
});
|
||||
}
|
||||
|
||||
void _onGuessResponseEvent(dynamic data) {
|
||||
bool ok = data[0];
|
||||
if (ok) {
|
||||
Get.snackbar("Success", "Guess sent successfully");
|
||||
socket.on("leaveGameResponse", (data) {
|
||||
if (data[0] == true && data[1] == 410) {
|
||||
Get.defaultDialog(
|
||||
title: "Game ended",
|
||||
middleText: "Your opponent left the game",
|
||||
barrierDismissible: false,
|
||||
onConfirm: () {
|
||||
Get.put(authData);
|
||||
Get.put(socket);
|
||||
Get.offAllNamed("/home");
|
||||
},
|
||||
);
|
||||
} else {
|
||||
Get.put(authData);
|
||||
Get.put(socket);
|
||||
Get.offAllNamed("/home");
|
||||
}
|
||||
});
|
||||
|
||||
socket.on("chatResponse", (data) {
|
||||
bool ok = data[0];
|
||||
if (ok) {
|
||||
chat.add(ChatEntry(data[1]["from"], data[1]["message"]));
|
||||
}
|
||||
});
|
||||
|
||||
if (isGuesser) {
|
||||
socket.on("guessResponse", _onGuessResponse);
|
||||
} else {
|
||||
Get.snackbar("Error", "Guess failed to send");
|
||||
socket.on("guess", (data) {
|
||||
setState(() {
|
||||
guessedColors.add(data);
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
socket.off("hello", _onHelloEvent);
|
||||
socket.off("gameStatus", _onGameStatusEvent);
|
||||
socket.off("leaveGameResponse", _onLeaveGameResponseEvent);
|
||||
socket.off("chatResponse", _onChatResponseEvent);
|
||||
socket.off("guessResponse", _onGuessResponseEvent);
|
||||
socket.off("guess", _onGuessEvent);
|
||||
super.dispose();
|
||||
chat.listen((data) {
|
||||
_scrollToEnd();
|
||||
_showMessageNotification(data.last);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -134,7 +107,7 @@ class _GamePageState extends State<GamePage> {
|
|||
constrained: false,
|
||||
boundaryMargin: const EdgeInsets.all(800),
|
||||
maxScale: 0.8,
|
||||
minScale: 0.3,
|
||||
minScale: 0.4,
|
||||
child:
|
||||
isGuesser ? _generateGameField() : _generateStaticField(),
|
||||
),
|
||||
|
|
@ -223,68 +196,67 @@ class _GamePageState extends State<GamePage> {
|
|||
}
|
||||
|
||||
Widget _generateGameField() {
|
||||
const alphabet = "ABCDEFGHIJKLMNOPQRST";
|
||||
return Container(
|
||||
width: (palletteWidth + 2) * 100,
|
||||
height: (palletteAlphabet.length + 2) * 100,
|
||||
width: (alphabet.length + 3) * 100,
|
||||
height: 1300,
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: Stack(
|
||||
children: [
|
||||
for (int i = 0; i < palletteAlphabet.length; i++)
|
||||
for (int j = 0; j < palletteWidth; j++)
|
||||
for (int i = 0; i < alphabet.length; i++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
Positioned(
|
||||
left: (j + 1) * 100.0,
|
||||
top: (i + 1) * 100.0,
|
||||
left: (i + 1) * 100.0,
|
||||
top: (j + 1) * 100.0,
|
||||
child: ColorPlate(
|
||||
plateName: "${palletteAlphabet[i]}${j + 1}",
|
||||
plateName: "${alphabet[i]}$j",
|
||||
size: 90,
|
||||
onSelected: _onPlateSelected,
|
||||
),
|
||||
),
|
||||
// Now I need to generate letters and numbers around field
|
||||
for (int i = 1; i <= palletteWidth; i++)
|
||||
for (int i = 0; i < alphabet.length; i++)
|
||||
Positioned(
|
||||
left: i * 100.0,
|
||||
left: (i + 1) * 100.0,
|
||||
top: 0,
|
||||
child: Container(
|
||||
width: 90,
|
||||
height: 90,
|
||||
alignment: Alignment.center,
|
||||
child: Text("$i", style: const TextStyle(fontSize: 40)),
|
||||
child: Text(alphabet[i], style: const TextStyle(fontSize: 40)),
|
||||
),
|
||||
),
|
||||
for (int i = 1; i <= palletteWidth; i++)
|
||||
for (int i = 0; i < alphabet.length; i++)
|
||||
Positioned(
|
||||
left: i * 100.0,
|
||||
top: (palletteAlphabet.length + 1) * 100,
|
||||
left: (i + 1) * 100.0,
|
||||
top: 1100,
|
||||
child: Container(
|
||||
width: 90,
|
||||
height: 90,
|
||||
alignment: Alignment.center,
|
||||
child: Text("$i", style: const TextStyle(fontSize: 40)),
|
||||
child: Text(alphabet[i], style: const TextStyle(fontSize: 40)),
|
||||
),
|
||||
),
|
||||
for (int i = 0; i < palletteAlphabet.length; i++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
Positioned(
|
||||
left: 0,
|
||||
top: (i + 1) * 100,
|
||||
top: (j + 1) * 100.0,
|
||||
child: Container(
|
||||
width: 90,
|
||||
height: 90,
|
||||
alignment: Alignment.center,
|
||||
child: Text(palletteAlphabet[i],
|
||||
style: const TextStyle(fontSize: 40)),
|
||||
child: Text("$j", style: const TextStyle(fontSize: 40)),
|
||||
),
|
||||
),
|
||||
for (int i = 0; i < palletteAlphabet.length; i++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
Positioned(
|
||||
left: (palletteWidth + 1) * 100,
|
||||
top: (i + 1) * 100,
|
||||
left: (alphabet.length + 1) * 100,
|
||||
top: (j + 1) * 100.0,
|
||||
child: Container(
|
||||
width: 90,
|
||||
height: 90,
|
||||
alignment: Alignment.center,
|
||||
child: Text(palletteAlphabet[i],
|
||||
style: const TextStyle(fontSize: 40)),
|
||||
child: Text("$j", style: const TextStyle(fontSize: 40)),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -293,68 +265,67 @@ class _GamePageState extends State<GamePage> {
|
|||
}
|
||||
|
||||
Widget _generateStaticField() {
|
||||
const alphabet = "ABCDEFGHIJKLMNOPQRST";
|
||||
return Container(
|
||||
width: (palletteWidth + 2) * 100,
|
||||
height: (palletteAlphabet.length + 2) * 100,
|
||||
width: (alphabet.length + 3) * 100,
|
||||
height: 1300,
|
||||
padding: const EdgeInsets.all(10),
|
||||
child: Stack(
|
||||
children: [
|
||||
for (int i = 0; i < palletteAlphabet.length; i++)
|
||||
for (int j = 0; j < palletteWidth; j++)
|
||||
for (int i = 0; i < alphabet.length; i++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
Positioned(
|
||||
left: (j + 1) * 100.0,
|
||||
top: (i + 1) * 100.0,
|
||||
left: (i + 1) * 100.0,
|
||||
top: (j + 1) * 100.0,
|
||||
child: StaticColorPlate(
|
||||
plateName: "${palletteAlphabet[i]}${j + 1}",
|
||||
plateName: "${alphabet[i]}$j",
|
||||
size: 90,
|
||||
marked:
|
||||
guessedColors.contains("${palletteAlphabet[i]}${j + 1}"),
|
||||
marked: guessedColors.contains("${alphabet[i]}$j"),
|
||||
),
|
||||
),
|
||||
for (int i = 1; i <= palletteWidth; i++)
|
||||
// Now I need to generate letters and numbers around field
|
||||
for (int i = 0; i < alphabet.length; i++)
|
||||
Positioned(
|
||||
left: i * 100.0,
|
||||
left: (i + 1) * 100.0,
|
||||
top: 0,
|
||||
child: Container(
|
||||
width: 90,
|
||||
height: 90,
|
||||
alignment: Alignment.center,
|
||||
child: Text("$i", style: const TextStyle(fontSize: 40)),
|
||||
child: Text(alphabet[i], style: const TextStyle(fontSize: 40)),
|
||||
),
|
||||
),
|
||||
for (int i = 1; i <= palletteWidth; i++)
|
||||
for (int i = 0; i < alphabet.length; i++)
|
||||
Positioned(
|
||||
left: i * 100.0,
|
||||
top: (palletteAlphabet.length + 1) * 100,
|
||||
left: (i + 1) * 100.0,
|
||||
top: 1100,
|
||||
child: Container(
|
||||
width: 90,
|
||||
height: 90,
|
||||
alignment: Alignment.center,
|
||||
child: Text("$i", style: const TextStyle(fontSize: 40)),
|
||||
child: Text(alphabet[i], style: const TextStyle(fontSize: 40)),
|
||||
),
|
||||
),
|
||||
for (int i = 0; i < palletteAlphabet.length; i++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
Positioned(
|
||||
left: 0,
|
||||
top: (i + 1) * 100,
|
||||
top: (j + 1) * 100.0,
|
||||
child: Container(
|
||||
width: 90,
|
||||
height: 90,
|
||||
alignment: Alignment.center,
|
||||
child: Text(palletteAlphabet[i],
|
||||
style: const TextStyle(fontSize: 40)),
|
||||
child: Text("$j", style: const TextStyle(fontSize: 40)),
|
||||
),
|
||||
),
|
||||
for (int i = 0; i < palletteAlphabet.length; i++)
|
||||
for (int j = 0; j < 10; j++)
|
||||
Positioned(
|
||||
left: (palletteWidth + 1) * 100,
|
||||
top: (i + 1) * 100,
|
||||
left: (alphabet.length + 1) * 100,
|
||||
top: (j + 1) * 100.0,
|
||||
child: Container(
|
||||
width: 90,
|
||||
height: 90,
|
||||
alignment: Alignment.center,
|
||||
child: Text(palletteAlphabet[i],
|
||||
style: const TextStyle(fontSize: 40)),
|
||||
child: Text("$j", style: const TextStyle(fontSize: 40)),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -367,6 +338,15 @@ class _GamePageState extends State<GamePage> {
|
|||
socket.emit("guess", [gameInfo.id, name]);
|
||||
}
|
||||
|
||||
void _onGuessResponse(dynamic data) {
|
||||
bool ok = data[0];
|
||||
if (ok) {
|
||||
Get.snackbar("Success", "Guess sent successfully");
|
||||
} else {
|
||||
Get.snackbar("Error", "Guess failed to send");
|
||||
}
|
||||
}
|
||||
|
||||
void _openChat() {
|
||||
Get.bottomSheet(BottomSheet(
|
||||
onClosing: () {},
|
||||
|
|
|
|||
|
|
@ -1,18 +1,10 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_boring_avatars/flutter_boring_avatars.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:huacu_mobile/game_pallete.dart';
|
||||
import 'dart:math';
|
||||
import 'package:huacu_mobile/models/auth_data.dart';
|
||||
import 'package:huacu_mobile/models/available_game.dart';
|
||||
import 'package:huacu_mobile/models/game.dart';
|
||||
import 'package:huacu_mobile/models/settings_item_model.dart';
|
||||
import 'package:huacu_mobile/models/user_data.dart';
|
||||
import 'package:huacu_mobile/ui/widgets/settings.dart';
|
||||
import 'package:huacu_mobile/ui/widgets/socket_connection_indicator.dart';
|
||||
import 'package:huacu_mobile/ui/widgets/user_card.dart';
|
||||
import 'package:socket_io_client/socket_io_client.dart' as io;
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
class HomePage extends StatefulWidget {
|
||||
const HomePage({super.key});
|
||||
|
|
@ -24,7 +16,6 @@ class HomePage extends StatefulWidget {
|
|||
class _HomePageState extends State<HomePage> {
|
||||
final io.Socket socket = Get.find();
|
||||
final AuthData authData = Get.find();
|
||||
UserData userData = const UserData(0, 0);
|
||||
|
||||
final availableGames = <AvailableGame>[].obs;
|
||||
|
||||
|
|
@ -32,126 +23,67 @@ class _HomePageState extends State<HomePage> {
|
|||
void initState() {
|
||||
super.initState();
|
||||
|
||||
socket.on("hello", _onHelloEvent);
|
||||
socket.on("update", _onUpdateEvent);
|
||||
socket.on("updateNeeded", _onUpdateNeededEvent);
|
||||
socket.on("removeGameResponse", _onRemoveGameResponseEvent);
|
||||
socket.on("createGameResponse", _onCreateGameResponseEvent);
|
||||
socket.on("getUserDataResponse", _onGetUserDataResponseEvent);
|
||||
socket.on("joinGameResponse", onJoinGameResponseEvent);
|
||||
socket.on("hello", (idky) {
|
||||
socket.dispose();
|
||||
Get.offAllNamed("/auth");
|
||||
});
|
||||
|
||||
socket.on("update", (update) {
|
||||
bool ok = update[0];
|
||||
if (ok) {
|
||||
var data = update[1];
|
||||
availableGames.value = (data["availableGames"] as List<dynamic>? ?? [])
|
||||
.map((e) => AvailableGame(
|
||||
id: e["id"],
|
||||
opponentName: e["player"],
|
||||
tries: e["tries"],
|
||||
neededRole: e["neededRole"],
|
||||
))
|
||||
.toList(growable: false);
|
||||
} else {
|
||||
Get.snackbar("Error", "Update failed with message: ${update[1]}");
|
||||
}
|
||||
});
|
||||
|
||||
socket.on("updateNeeded", (data) {
|
||||
socket.emit("getUpdate");
|
||||
});
|
||||
|
||||
socket.on("removeGameResponse", (data) => null);
|
||||
socket.on("createGameResponse", (data) => null);
|
||||
|
||||
socket.on("joinGameResponse", (data) {
|
||||
bool ok = data[0];
|
||||
if (ok) {
|
||||
socket.off("hello");
|
||||
socket.off("update");
|
||||
socket.off("updateNeeded");
|
||||
socket.off("someoneJoinedGame");
|
||||
Get.put(authData);
|
||||
Get.put(socket);
|
||||
Get.put(Game(
|
||||
data[1]["id"],
|
||||
data[1]["guesser"],
|
||||
data[1]["suggester"],
|
||||
data[1]["tries"],
|
||||
(data[2] as List<dynamic>).map((e) => e.toString()).toSet(),
|
||||
));
|
||||
Get.offNamed("/game");
|
||||
} else {
|
||||
Get.snackbar("Request response", data[1]);
|
||||
}
|
||||
});
|
||||
|
||||
socket.emit("getUserData");
|
||||
socket.emit("getUpdate");
|
||||
}
|
||||
|
||||
void _onHelloEvent(dynamic idky) {
|
||||
socket.dispose();
|
||||
Get.offAllNamed("/auth");
|
||||
}
|
||||
|
||||
void _onUpdateEvent(dynamic update) {
|
||||
bool ok = update[0];
|
||||
if (ok) {
|
||||
var data = update[1];
|
||||
availableGames.value = (data["availableGames"] as List<dynamic>? ?? [])
|
||||
.map((e) => AvailableGame(
|
||||
id: e["id"],
|
||||
opponentName: e["player"],
|
||||
tries: e["tries"],
|
||||
neededRole: e["neededRole"],
|
||||
))
|
||||
.toList(growable: false);
|
||||
} else {
|
||||
Get.snackbar("Error", "Update failed with message: ${update[1]}");
|
||||
}
|
||||
}
|
||||
|
||||
void _onUpdateNeededEvent(dynamic data) {
|
||||
socket.emit("getUpdate");
|
||||
}
|
||||
|
||||
void _onRemoveGameResponseEvent(dynamic data) {}
|
||||
|
||||
void _onCreateGameResponseEvent(dynamic data) {}
|
||||
|
||||
void _onGetUserDataResponseEvent(dynamic data) {
|
||||
bool ok = data[0];
|
||||
if (ok) {
|
||||
userData = UserData(
|
||||
data[1]["client"]["wins"],
|
||||
data[1]["client"]["losses"],
|
||||
);
|
||||
} else {
|
||||
Get.snackbar("Error", "Failed to get user data:\n ${data[1]}");
|
||||
}
|
||||
}
|
||||
|
||||
void onJoinGameResponseEvent(dynamic data) {
|
||||
bool ok = data[0];
|
||||
if (ok) {
|
||||
Get.put(authData);
|
||||
Get.put(socket);
|
||||
Get.put(Game(
|
||||
data[1]["id"],
|
||||
data[1]["guesser"],
|
||||
data[1]["suggester"],
|
||||
data[1]["tries"],
|
||||
(data[2] as List<dynamic>).map((e) => e.toString()).toSet(),
|
||||
));
|
||||
Get.offNamed("/game");
|
||||
} else {
|
||||
Get.snackbar("Request response", data[1]);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
socket.off("hello", _onHelloEvent);
|
||||
socket.off("update", _onUpdateEvent);
|
||||
socket.off("updateNeeded", _onUpdateNeededEvent);
|
||||
socket.off("removeGameResponse", _onRemoveGameResponseEvent);
|
||||
socket.off("createGameResponse", _onCreateGameResponseEvent);
|
||||
socket.off("getUserDataResponse", _onGetUserDataResponseEvent);
|
||||
socket.off("joinGameResponse", onJoinGameResponseEvent);
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final size = MediaQuery.of(context).size;
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Text("HUACU"),
|
||||
SocketConnectionIndicator(socket: socket, size: 8),
|
||||
],
|
||||
),
|
||||
Obx(
|
||||
() => Text(
|
||||
"Available ${availableGames.length} game(s)",
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
InkResponse(
|
||||
onTap: _openProfile,
|
||||
child: BoringAvatars(
|
||||
name: authData.id,
|
||||
colors: avatarColors,
|
||||
type: BoringAvatarsType.beam,
|
||||
).paddingAll(8),
|
||||
),
|
||||
],
|
||||
title: Obx(() => Text("Available ${availableGames.length} game(s)")),
|
||||
),
|
||||
body: SizedBox(
|
||||
width: size.width,
|
||||
|
|
@ -201,29 +133,26 @@ class _HomePageState extends State<HomePage> {
|
|||
availableGames,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: ObxValue(
|
||||
(data) {
|
||||
return ElevatedButton(
|
||||
onPressed: data.firstWhereOrNull((g) =>
|
||||
g.opponentName == authData.login) ==
|
||||
null
|
||||
? _createGame
|
||||
: null,
|
||||
child: const Text("Create"),
|
||||
);
|
||||
},
|
||||
availableGames,
|
||||
),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: ObxValue(
|
||||
(data) {
|
||||
return ElevatedButton(
|
||||
onPressed: data.firstWhereOrNull(
|
||||
(g) => g.opponentName == authData.login) ==
|
||||
null
|
||||
? _createGame
|
||||
: null,
|
||||
child: const Text("Create"),
|
||||
);
|
||||
},
|
||||
availableGames,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -234,8 +163,6 @@ class _HomePageState extends State<HomePage> {
|
|||
void _createGame() async {
|
||||
var tries = 20;
|
||||
var role = "guesser";
|
||||
var controller = TextEditingController(text: tries.toString());
|
||||
|
||||
final data = await Get.dialog<Map<String, dynamic>?>(
|
||||
StatefulBuilder(builder: (buildContext, setState) {
|
||||
return AlertDialog(
|
||||
|
|
@ -244,57 +171,19 @@ class _HomePageState extends State<HomePage> {
|
|||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text("Tries:"),
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 32,
|
||||
child: IconButton.outlined(
|
||||
iconSize: 8,
|
||||
onPressed: tries <= 10
|
||||
? null
|
||||
: () {
|
||||
setState(() {
|
||||
tries = max(tries - 1, 10);
|
||||
controller.text = tries.toString();
|
||||
});
|
||||
},
|
||||
icon: const Icon(Icons.remove),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
controller: controller,
|
||||
keyboardType: TextInputType.number,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
tries = clamp(int.tryParse(value) ?? 20, 10, 50);
|
||||
controller.text = tries.toString();
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
SizedBox(
|
||||
width: 32,
|
||||
child: IconButton.outlined(
|
||||
iconSize: 8,
|
||||
onPressed: tries >= 50
|
||||
? null
|
||||
: () {
|
||||
setState(() {
|
||||
tries = min(tries + 1, 50);
|
||||
controller.text = tries.toString();
|
||||
});
|
||||
},
|
||||
icon: const Icon(Icons.add),
|
||||
),
|
||||
),
|
||||
],
|
||||
).paddingOnly(bottom: 16),
|
||||
Text("Tries: $tries"),
|
||||
Slider(
|
||||
value: tries.toDouble(),
|
||||
label: tries.toString(),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
tries = value.round();
|
||||
});
|
||||
},
|
||||
min: 10,
|
||||
max: 50,
|
||||
divisions: 40,
|
||||
),
|
||||
const Text("Needed role:"),
|
||||
Row(
|
||||
children: [
|
||||
|
|
@ -343,20 +232,14 @@ class _HomePageState extends State<HomePage> {
|
|||
}));
|
||||
if (data == null) return;
|
||||
|
||||
final triesSelected = data["tries"] as int;
|
||||
final roleSelected = data["role"] as String;
|
||||
tries = data["tries"];
|
||||
role = data["role"];
|
||||
|
||||
socket.emit("createGame", [triesSelected, roleSelected]);
|
||||
socket.emit("createGame", [tries, role]);
|
||||
|
||||
Get.snackbar("Game created", "Game created");
|
||||
}
|
||||
|
||||
int clamp(int value, int min, int max) {
|
||||
if (value <= min) return min;
|
||||
if (value >= max) return max;
|
||||
return value;
|
||||
}
|
||||
|
||||
void _joinGame(String gameId) {
|
||||
socket.emit("joinGame", gameId);
|
||||
}
|
||||
|
|
@ -367,8 +250,8 @@ class _HomePageState extends State<HomePage> {
|
|||
content: const Text("Are you sure you want to delete this game?"),
|
||||
textConfirm: "Delete",
|
||||
onConfirm: () {
|
||||
Get.back();
|
||||
socket.emit("removeGame", gameId);
|
||||
Get.back();
|
||||
},
|
||||
textCancel: "Cancel",
|
||||
onCancel: () {
|
||||
|
|
@ -376,89 +259,4 @@ class _HomePageState extends State<HomePage> {
|
|||
},
|
||||
);
|
||||
}
|
||||
|
||||
void _onLogoutTap() {
|
||||
socket.emit("logout");
|
||||
}
|
||||
|
||||
void _onAccountDeletedHandler(dynamic data) {
|
||||
if (data[0]) {
|
||||
Get.back();
|
||||
Get.offAllNamed("/auth");
|
||||
} else {
|
||||
Get.snackbar("Error", "Failed to delete account:\n${data[1]}");
|
||||
}
|
||||
socket.off("deleteAccountResponse", _onAccountDeletedHandler);
|
||||
}
|
||||
|
||||
void _onDeleteAccountTap() async {
|
||||
final textEditingController = TextEditingController();
|
||||
bool ok = await Get.defaultDialog(
|
||||
title: "Delete game",
|
||||
content: [
|
||||
const Text(
|
||||
"Are you sure you want to delete your account? This action is irreversible.",
|
||||
),
|
||||
const Text("Enter your password to confirm:"),
|
||||
TextField(
|
||||
controller: textEditingController,
|
||||
obscureText: true,
|
||||
),
|
||||
].toColumn(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
),
|
||||
textConfirm: "Delete",
|
||||
onConfirm: () {
|
||||
Get.back(result: true);
|
||||
},
|
||||
textCancel: "Cancel",
|
||||
onCancel: () {
|
||||
Get.back(result: false);
|
||||
},
|
||||
);
|
||||
final password = textEditingController.text;
|
||||
if (!ok || password.isEmpty) return;
|
||||
|
||||
socket.on("deleteAccountResponse", _onAccountDeletedHandler);
|
||||
socket.emit("deleteAccount", password);
|
||||
}
|
||||
|
||||
void _openProfile() {
|
||||
Get.bottomSheet(BottomSheet(
|
||||
onClosing: () {},
|
||||
clipBehavior: Clip.antiAliasWithSaveLayer,
|
||||
builder: (context) => _buildBottomSheetProfileContent(),
|
||||
));
|
||||
}
|
||||
|
||||
Widget _buildBottomSheetProfileContent() {
|
||||
page({required Widget child}) => Styled.widget(child: child)
|
||||
.padding(vertical: 30, horizontal: 20)
|
||||
.scrollable();
|
||||
|
||||
return [
|
||||
const Text(
|
||||
'Your account',
|
||||
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 32),
|
||||
).alignment(Alignment.center).padding(bottom: 20),
|
||||
UserCard(authData: authData, userData: userData),
|
||||
Settings(settingsItems: [
|
||||
SettingsItemModel(
|
||||
icon: Icons.logout,
|
||||
color: Colors.purpleAccent.shade200,
|
||||
title: "Logout",
|
||||
description: "We will miss you",
|
||||
onTap: _onLogoutTap,
|
||||
),
|
||||
SettingsItemModel(
|
||||
icon: Icons.dangerous,
|
||||
color: Colors.redAccent,
|
||||
title: "Delete my account",
|
||||
description: "Beware - this action is irreversible",
|
||||
onTap: _onDeleteAccountTap,
|
||||
),
|
||||
]),
|
||||
].toColumn(mainAxisSize: MainAxisSize.min).parent(page);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class TestingGroundsPage extends StatefulWidget {
|
|||
|
||||
class _TestingGroundsPageState extends State<TestingGroundsPage> {
|
||||
final availableGames = <AvailableGame>[].obs;
|
||||
final AuthData authData = const AuthData("123", "nuark", "123");
|
||||
final AuthData authData = const AuthData("nuark", "123"); //Get.find();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:huacu_mobile/models/settings_item_model.dart';
|
||||
import 'package:huacu_mobile/ui/widgets/settings_item.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
class Settings extends StatelessWidget {
|
||||
final List<SettingsItemModel> settingsItems;
|
||||
|
||||
const Settings({super.key, required this.settingsItems});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) => settingsItems
|
||||
.map((settingsItem) => SettingsItem(
|
||||
icon: settingsItem.icon,
|
||||
iconBgColor: settingsItem.color,
|
||||
title: settingsItem.title,
|
||||
description: settingsItem.description,
|
||||
onTap: settingsItem.onTap,
|
||||
))
|
||||
.toList()
|
||||
.toColumn();
|
||||
}
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
class SettingsItem extends StatefulWidget {
|
||||
final IconData icon;
|
||||
final Color iconBgColor;
|
||||
final String title;
|
||||
final String description;
|
||||
final VoidCallback? onTap;
|
||||
|
||||
const SettingsItem({
|
||||
super.key,
|
||||
required this.icon,
|
||||
required this.iconBgColor,
|
||||
required this.title,
|
||||
required this.description,
|
||||
this.onTap,
|
||||
});
|
||||
|
||||
@override
|
||||
State<SettingsItem> createState() => _SettingsItemState();
|
||||
}
|
||||
|
||||
class _SettingsItemState extends State<SettingsItem> {
|
||||
bool pressed = false;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final Widget icon = Icon(widget.icon, size: 20, color: Colors.white)
|
||||
.padding(all: 12)
|
||||
.decorated(
|
||||
color: widget.iconBgColor,
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
)
|
||||
.padding(left: 15, right: 10);
|
||||
|
||||
final Widget title = Text(
|
||||
widget.title,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 16,
|
||||
),
|
||||
).padding(bottom: 5);
|
||||
|
||||
final Widget description = Text(
|
||||
widget.description,
|
||||
style: const TextStyle(
|
||||
color: Colors.white60,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 12,
|
||||
),
|
||||
);
|
||||
|
||||
return settingsItem(
|
||||
child: <Widget>[
|
||||
icon,
|
||||
<Widget>[
|
||||
title,
|
||||
description,
|
||||
].toColumn(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
),
|
||||
].toRow(),
|
||||
);
|
||||
}
|
||||
|
||||
Widget settingsItem({required Widget child}) => Styled.widget(child: child)
|
||||
.alignment(Alignment.center)
|
||||
.borderRadius(all: 15)
|
||||
.ripple()
|
||||
.backgroundColor(Colors.grey.shade900, animate: true)
|
||||
.clipRRect(all: 25) // clip ripple
|
||||
.borderRadius(all: 25, animate: true)
|
||||
.elevation(
|
||||
pressed ? 0 : 20,
|
||||
borderRadius: BorderRadius.circular(25),
|
||||
shadowColor: const Color(0x30000000),
|
||||
) // shadow borderRadius
|
||||
.constrained(height: 80)
|
||||
.padding(vertical: 12) // margin
|
||||
.gestures(
|
||||
onTapChange: (tapStatus) => setState(() => pressed = tapStatus),
|
||||
onTap: widget.onTap,
|
||||
)
|
||||
.scale(all: pressed ? 0.95 : 1.0, animate: true)
|
||||
.animate(const Duration(milliseconds: 150), Curves.easeOut);
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:huacu_mobile/game_pallete.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
class StaticColorPlate extends StatelessWidget {
|
||||
final String plateName;
|
||||
|
|
@ -27,15 +26,6 @@ class StaticColorPlate extends StatelessWidget {
|
|||
),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
child: Text(plateName)
|
||||
// .textColor( // NOTE: This is much simpler
|
||||
// pallete[plateName]!.computeLuminance() > 0.5
|
||||
// ? Colors.black
|
||||
// : Colors.white,
|
||||
// )
|
||||
.textColor(labelColorForComputedLightness[plateName])
|
||||
.fontSize(24),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,72 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_boring_avatars/flutter_boring_avatars.dart';
|
||||
import 'package:huacu_mobile/game_pallete.dart';
|
||||
import 'package:huacu_mobile/models/auth_data.dart';
|
||||
import 'package:huacu_mobile/models/user_data.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
|
||||
class UserCard extends StatelessWidget {
|
||||
final AuthData authData;
|
||||
final UserData userData;
|
||||
|
||||
const UserCard({Key? key, required this.authData, required this.userData})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return [_buildUserRow(), _buildUserStats()]
|
||||
.toColumn(mainAxisAlignment: MainAxisAlignment.spaceAround)
|
||||
.padding(horizontal: 20)
|
||||
.decorated(
|
||||
color: Colors.blueAccent.shade400,
|
||||
borderRadius: BorderRadius.circular(20))
|
||||
.elevation(
|
||||
5,
|
||||
shadowColor: Colors.blueAccent.shade400,
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
)
|
||||
.height(175)
|
||||
.alignment(Alignment.topCenter);
|
||||
}
|
||||
|
||||
Widget _buildUserRow() {
|
||||
return [
|
||||
BoringAvatars(
|
||||
name: authData.id,
|
||||
colors: avatarColors,
|
||||
type: BoringAvatarsType.beam,
|
||||
).constrained(height: 50, width: 50).padding(right: 10),
|
||||
[
|
||||
Text(
|
||||
authData.login,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
).padding(bottom: 5),
|
||||
Text(
|
||||
"Our one of the best player",
|
||||
style: TextStyle(
|
||||
color: Colors.white.withOpacity(0.6),
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
].toColumn(crossAxisAlignment: CrossAxisAlignment.start),
|
||||
].toRow();
|
||||
}
|
||||
|
||||
Widget _buildUserStatsItem(String value, String text) => <Widget>[
|
||||
Text(value).fontSize(20).textColor(Colors.white).padding(bottom: 5),
|
||||
Text(text).textColor(Colors.white.withOpacity(0.6)).fontSize(12),
|
||||
].toColumn();
|
||||
|
||||
Widget _buildUserStats() {
|
||||
return [
|
||||
_buildUserStatsItem(userData.gamesWon.toString(), 'Wins'),
|
||||
_buildUserStatsItem(userData.gamesLost.toString(), 'Losses'),
|
||||
]
|
||||
.toRow(mainAxisAlignment: MainAxisAlignment.spaceAround)
|
||||
.padding(vertical: 10);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,68 +1,68 @@
|
|||
{
|
||||
"images": [
|
||||
"images" : [
|
||||
{
|
||||
"filename": "app_icon_16.png",
|
||||
"idiom": "mac",
|
||||
"scale": "1x",
|
||||
"size": "16x16"
|
||||
"size" : "16x16",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_16.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename": "app_icon_32.png",
|
||||
"idiom": "mac",
|
||||
"scale": "2x",
|
||||
"size": "16x16"
|
||||
"size" : "16x16",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_32.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename": "app_icon_32.png",
|
||||
"idiom": "mac",
|
||||
"scale": "1x",
|
||||
"size": "32x32"
|
||||
"size" : "32x32",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_32.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename": "app_icon_64.png",
|
||||
"idiom": "mac",
|
||||
"scale": "2x",
|
||||
"size": "32x32"
|
||||
"size" : "32x32",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_64.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename": "app_icon_128.png",
|
||||
"idiom": "mac",
|
||||
"scale": "1x",
|
||||
"size": "128x128"
|
||||
"size" : "128x128",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_128.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename": "app_icon_256.png",
|
||||
"idiom": "mac",
|
||||
"scale": "2x",
|
||||
"size": "128x128"
|
||||
"size" : "128x128",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_256.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename": "app_icon_256.png",
|
||||
"idiom": "mac",
|
||||
"scale": "1x",
|
||||
"size": "256x256"
|
||||
"size" : "256x256",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_256.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename": "app_icon_512.png",
|
||||
"idiom": "mac",
|
||||
"scale": "2x",
|
||||
"size": "256x256"
|
||||
"size" : "256x256",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_512.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename": "app_icon_512.png",
|
||||
"idiom": "mac",
|
||||
"scale": "1x",
|
||||
"size": "512x512"
|
||||
"size" : "512x512",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_512.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename": "app_icon_1024.png",
|
||||
"idiom": "mac",
|
||||
"scale": "2x",
|
||||
"size": "512x512"
|
||||
"size" : "512x512",
|
||||
"idiom" : "mac",
|
||||
"filename" : "app_icon_1024.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info": {
|
||||
"author": "icons_launcher",
|
||||
"version": 1
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 101 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 720 B After Width: | Height: | Size: 520 B |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 933 B After Width: | Height: | Size: 1 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.2 KiB |
131
pubspec.lock
|
|
@ -1,22 +1,6 @@
|
|||
# Generated by pub
|
||||
# See https://dart.dev/tools/pub/glossary#lockfile
|
||||
packages:
|
||||
archive:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: archive
|
||||
sha256: d6347d54a2d8028e0437e3c099f66fdb8ae02c4720c1e7534c9f24c10351f85d
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.3.6"
|
||||
args:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: args
|
||||
sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -57,22 +41,14 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.17.1"
|
||||
convert:
|
||||
dependency: transitive
|
||||
cupertino_icons:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: convert
|
||||
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
|
||||
name: cupertino_icons
|
||||
sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.1"
|
||||
crypto:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: crypto
|
||||
sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.2"
|
||||
version: "1.0.5"
|
||||
fake_async:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -86,14 +62,6 @@ packages:
|
|||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_boring_avatars:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_boring_avatars
|
||||
sha256: "6b4a5e913b7b580ef372761c4134167a832c4054b1f409ddd6812b477d4183d7"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.1"
|
||||
flutter_lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
|
@ -115,22 +83,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.6.5"
|
||||
icons_launcher:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: icons_launcher
|
||||
sha256: f8ccfb80b56856b6eac586980bdd9c14f5ec24fb87127514055445ceb9424f4c
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
image:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image
|
||||
sha256: "483a389d6ccb292b570c31b3a193779b1b0178e7eb571986d9a49904b6861227"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "4.0.15"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -139,14 +91,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.6.7"
|
||||
lint:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: lint
|
||||
sha256: "4a539aa34ec5721a2c7574ae2ca0336738ea4adc2a34887d54b7596310b33c85"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.10.0"
|
||||
lints:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -195,22 +139,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.8.3"
|
||||
petitparser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: petitparser
|
||||
sha256: a9346a3fbba7546a28374bdbcd7f54ea48bb47772bf3a7ab4bfaadc40bc8b8c6
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.3.0"
|
||||
pointycastle:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pointycastle
|
||||
sha256: db7306cf0249f838d1a24af52b5a5887c5bf7f31d8bb4e827d071dc0939ad346
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.6.2"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
|
|
@ -264,22 +192,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
styled_widget:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: styled_widget
|
||||
sha256: "4d439802919b6ccf10d1488798656da8804633b03012682dd1c8ca70a084aa84"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.4.1"
|
||||
svg_path_parser:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: svg_path_parser
|
||||
sha256: c0864f85efd1024e9f667ddcda10601b1199e3980fb07d63701f9b9a047bdab3
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
term_glyph:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -296,22 +208,6 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.4.18"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: typed_data
|
||||
sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.3.1"
|
||||
universal_io:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: universal_io
|
||||
sha256: "06866290206d196064fd61df4c7aea1ffe9a4e7c4ccaa8fcded42dd41948005d"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
@ -320,22 +216,5 @@ packages:
|
|||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.1.4"
|
||||
xml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: xml
|
||||
sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.2.2"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: yaml
|
||||
sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.1.1"
|
||||
sdks:
|
||||
dart: ">=2.19.0 <4.0.0"
|
||||
flutter: ">=1.17.0"
|
||||
|
|
|
|||
122
pubspec.yaml
|
|
@ -1,59 +1,91 @@
|
|||
name: huacu_mobile
|
||||
description: HUACU Game
|
||||
description: A new Flutter project.
|
||||
|
||||
publish_to: "none"
|
||||
# The following line prevents the package from being accidentally published to
|
||||
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
||||
publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||
|
||||
version: 1.0.1+2
|
||||
# The following defines the version and build number for your application.
|
||||
# A version number is three numbers separated by dots, like 1.2.43
|
||||
# followed by an optional build number separated by a +.
|
||||
# Both the version and the builder number may be overridden in flutter
|
||||
# build by specifying --build-name and --build-number, respectively.
|
||||
# In Android, build-name is used as versionName while build-number used as versionCode.
|
||||
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
|
||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.0.0+1
|
||||
|
||||
environment:
|
||||
sdk: ">=2.18.5 <3.0.0"
|
||||
sdk: ">=2.18.5 <3.0.0"
|
||||
|
||||
# Dependencies specify other packages that your package needs in order to work.
|
||||
# To automatically upgrade your package dependencies to the latest versions
|
||||
# consider running `flutter pub upgrade --major-versions`. Alternatively,
|
||||
# dependencies can be manually updated by changing the version numbers below to
|
||||
# the latest version available on pub.dev. To see which dependencies have newer
|
||||
# versions available, run `flutter pub outdated`.
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
socket_io_client: ^2.0.1
|
||||
get: ^4.6.5
|
||||
styled_widget: ^0.4.1
|
||||
flutter_boring_avatars: ^1.0.1
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
cupertino_icons: ^1.0.2
|
||||
socket_io_client: ^2.0.1
|
||||
get: ^4.6.5
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
||||
flutter_lints: ^2.0.0
|
||||
# flutter_app_name: ^0.1.1
|
||||
icons_launcher: ^2.1.0
|
||||
# The "flutter_lints" package below contains a set of recommended lints to
|
||||
# encourage good coding practices. The lint set provided by the package is
|
||||
# activated in the `analysis_options.yaml` file located at the root of your
|
||||
# package. See that file for information about deactivating specific lint
|
||||
# rules and activating additional ones.
|
||||
flutter_lints: ^2.0.0
|
||||
|
||||
flutter_app_name:
|
||||
name: "HUACU"
|
||||
|
||||
icons_launcher:
|
||||
image_path: "assets/ic_logo_border.png"
|
||||
platforms:
|
||||
android:
|
||||
enable: true
|
||||
image_path: "assets/ic_logo_border.png"
|
||||
adaptive_background_image: "assets/ic_background.png"
|
||||
adaptive_foreground_image: "assets/ic_foreground.png"
|
||||
adaptive_round_image: "assets/ic_logo_round.png"
|
||||
adaptive_monochrome_image: "assets/ic_logo_monochrome.png"
|
||||
ios:
|
||||
enable: true
|
||||
image_path: "assets/ic_logo_rectangle.png"
|
||||
web:
|
||||
enable: true
|
||||
image_path: "assets/ic_logo_border.png"
|
||||
favicon_path: "assets/ic_logo_round.png"
|
||||
macos:
|
||||
enable: true
|
||||
image_path: "assets/ic_logo_border.png"
|
||||
windows:
|
||||
enable: true
|
||||
image_path: "assets/ic_logo_border.png"
|
||||
linux:
|
||||
enable: true
|
||||
image_path: "assets/ic_logo_border.png"
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
||||
# The following section is specific to Flutter packages.
|
||||
flutter:
|
||||
uses-material-design: true
|
||||
# The following line ensures that the Material Icons font is
|
||||
# included with your application, so that you can use the icons in
|
||||
# the material Icons class.
|
||||
uses-material-design: true
|
||||
|
||||
# To add assets to your application, add an assets section, like this:
|
||||
# assets:
|
||||
# - images/a_dot_burr.jpeg
|
||||
# - images/a_dot_ham.jpeg
|
||||
|
||||
# An image asset can refer to one or more resolution-specific "variants", see
|
||||
# https://flutter.dev/assets-and-images/#resolution-aware
|
||||
|
||||
# For details regarding adding assets from package dependencies, see
|
||||
# https://flutter.dev/assets-and-images/#from-packages
|
||||
|
||||
# To add custom fonts to your application, add a fonts section here,
|
||||
# in this "flutter" section. Each entry in this list should have a
|
||||
# "family" key with the font family name, and a "fonts" key with a
|
||||
# list giving the asset and other descriptors for the font. For
|
||||
# example:
|
||||
# fonts:
|
||||
# - family: Schyler
|
||||
# fonts:
|
||||
# - asset: fonts/Schyler-Regular.ttf
|
||||
# - asset: fonts/Schyler-Italic.ttf
|
||||
# style: italic
|
||||
# - family: Trajan Pro
|
||||
# fonts:
|
||||
# - asset: fonts/TrajanPro.ttf
|
||||
# - asset: fonts/TrajanPro_Bold.ttf
|
||||
# weight: 700
|
||||
#
|
||||
# For details regarding fonts from package dependencies,
|
||||
# see https://flutter.dev/custom-fonts/#from-packages
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Name=Flutter Linux App
|
||||
Comment=Flutter Linux launcher icon
|
||||
Exec=app_icon
|
||||
Icon=app_icon.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Entertainment;
|
||||
|
Before Width: | Height: | Size: 4.3 KiB |
BIN
web/favicon.png
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 917 B |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 8.2 KiB After Width: | Height: | Size: 20 KiB |
58
web/index.html
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
If you are serving your web app in a path other than the root, change the
|
||||
href value below to reflect the base path you are serving from.
|
||||
|
||||
The path provided below has to start and end with a slash "/" in order for
|
||||
it to work correctly.
|
||||
|
||||
For more details:
|
||||
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
|
||||
|
||||
This is a placeholder for base href that will be replaced by the value of
|
||||
the `--base-href` argument provided to `flutter build`.
|
||||
-->
|
||||
<base href="$FLUTTER_BASE_HREF">
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
||||
<meta name="description" content="A new Flutter project.">
|
||||
|
||||
<!-- iOS meta tags & icons -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="huacu_mobile">
|
||||
<link rel="apple-touch-icon" href="icons/Icon-192.png">
|
||||
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" type="image/png" href="favicon.png"/>
|
||||
|
||||
<title>huacu_mobile</title>
|
||||
<link rel="manifest" href="manifest.json">
|
||||
|
||||
<script>
|
||||
// The value below is injected by flutter build, do not touch.
|
||||
var serviceWorkerVersion = null;
|
||||
</script>
|
||||
<!-- This script adds the flutter initialization JS code -->
|
||||
<script src="flutter.js" defer></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
window.addEventListener('load', function(ev) {
|
||||
// Download main.dart.js
|
||||
_flutter.loader.loadEntrypoint({
|
||||
serviceWorker: {
|
||||
serviceWorkerVersion: serviceWorkerVersion,
|
||||
}
|
||||
}).then(function(engineInitializer) {
|
||||
return engineInitializer.initializeEngine();
|
||||
}).then(function(appRunner) {
|
||||
return appRunner.runApp();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
35
web/manifest.json
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"name": "huacu_mobile",
|
||||
"short_name": "huacu_mobile",
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"background_color": "#0175C2",
|
||||
"theme_color": "#0175C2",
|
||||
"description": "A new Flutter project.",
|
||||
"orientation": "portrait-primary",
|
||||
"prefer_related_applications": false,
|
||||
"icons": [
|
||||
{
|
||||
"src": "icons/Icon-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/Icon-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "icons/Icon-maskable-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "icons/Icon-maskable-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 33 KiB |