diff --git a/packages/smooth_app/assets/fonts/SmoothIcons.ttf b/packages/smooth_app/assets/fonts/SmoothIcons.ttf
index 0dc0d8aa687..5b3749be42c 100644
Binary files a/packages/smooth_app/assets/fonts/SmoothIcons.ttf and b/packages/smooth_app/assets/fonts/SmoothIcons.ttf differ
diff --git a/packages/smooth_app/assets/fonts/icons/add_to_list.svg b/packages/smooth_app/assets/fonts/icons/add_to_list.svg
index f2e5536aaac..3e3fe15e784 100644
--- a/packages/smooth_app/assets/fonts/icons/add_to_list.svg
+++ b/packages/smooth_app/assets/fonts/icons/add_to_list.svg
@@ -2,8 +2,9 @@
\ No newline at end of file
diff --git a/packages/smooth_app/assets/fonts/icons/add_to_list_1.svg b/packages/smooth_app/assets/fonts/icons/add_to_list_1.svg
new file mode 100644
index 00000000000..2c3a2d54cb5
--- /dev/null
+++ b/packages/smooth_app/assets/fonts/icons/add_to_list_1.svg
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/packages/smooth_app/assets/fonts/icons/add_to_list_2.svg b/packages/smooth_app/assets/fonts/icons/add_to_list_2.svg
new file mode 100644
index 00000000000..8bdbefde042
--- /dev/null
+++ b/packages/smooth_app/assets/fonts/icons/add_to_list_2.svg
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/packages/smooth_app/assets/fonts/icons/add_to_list_3.svg b/packages/smooth_app/assets/fonts/icons/add_to_list_3.svg
new file mode 100644
index 00000000000..eeabf98953b
--- /dev/null
+++ b/packages/smooth_app/assets/fonts/icons/add_to_list_3.svg
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/packages/smooth_app/assets/fonts/icons/add_to_list_4.svg b/packages/smooth_app/assets/fonts/icons/add_to_list_4.svg
new file mode 100644
index 00000000000..5c143003df9
--- /dev/null
+++ b/packages/smooth_app/assets/fonts/icons/add_to_list_4.svg
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/packages/smooth_app/assets/fonts/icons/add_to_list_5.svg b/packages/smooth_app/assets/fonts/icons/add_to_list_5.svg
new file mode 100644
index 00000000000..4eff79045f3
--- /dev/null
+++ b/packages/smooth_app/assets/fonts/icons/add_to_list_5.svg
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/packages/smooth_app/assets/fonts/icons/add_to_list_6.svg b/packages/smooth_app/assets/fonts/icons/add_to_list_6.svg
new file mode 100644
index 00000000000..a5cc9485115
--- /dev/null
+++ b/packages/smooth_app/assets/fonts/icons/add_to_list_6.svg
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/packages/smooth_app/assets/fonts/icons/add_to_list_7.svg b/packages/smooth_app/assets/fonts/icons/add_to_list_7.svg
new file mode 100644
index 00000000000..7b8e147d3d4
--- /dev/null
+++ b/packages/smooth_app/assets/fonts/icons/add_to_list_7.svg
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/packages/smooth_app/assets/fonts/icons/add_to_list_8.svg b/packages/smooth_app/assets/fonts/icons/add_to_list_8.svg
new file mode 100644
index 00000000000..7130c198151
--- /dev/null
+++ b/packages/smooth_app/assets/fonts/icons/add_to_list_8.svg
@@ -0,0 +1,11 @@
+
+
\ No newline at end of file
diff --git a/packages/smooth_app/assets/fonts/icons/add_to_list_9.svg b/packages/smooth_app/assets/fonts/icons/add_to_list_9.svg
new file mode 100644
index 00000000000..049ba4a93b7
--- /dev/null
+++ b/packages/smooth_app/assets/fonts/icons/add_to_list_9.svg
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/packages/smooth_app/assets/fonts/icons/add_to_list_9_plus.svg b/packages/smooth_app/assets/fonts/icons/add_to_list_9_plus.svg
new file mode 100644
index 00000000000..ae492a190c1
--- /dev/null
+++ b/packages/smooth_app/assets/fonts/icons/add_to_list_9_plus.svg
@@ -0,0 +1,10 @@
+
+
\ No newline at end of file
diff --git a/packages/smooth_app/assets/fonts/icons/compare_disabled.svg b/packages/smooth_app/assets/fonts/icons/compare_disabled.svg
new file mode 100644
index 00000000000..e26e018d167
--- /dev/null
+++ b/packages/smooth_app/assets/fonts/icons/compare_disabled.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/packages/smooth_app/assets/fonts/icons/config.json b/packages/smooth_app/assets/fonts/icons/config.json
index 51c08eaab6f..52d201bba87 100644
--- a/packages/smooth_app/assets/fonts/icons/config.json
+++ b/packages/smooth_app/assets/fonts/icons/config.json
@@ -978,20 +978,6 @@
"add_price_yen"
]
},
- {
- "uid": "b0e58b3559386c4d4ad1be10b5e11bb7",
- "css": "add_to_list",
- "code": 59463,
- "src": "custom_icons",
- "selected": true,
- "svg": {
- "path": "M1000 594.4C1000 619.5 979.6 639.9 954.5 639.9L227.3 639.9C202.2 639.9 181.8 619.5 181.8 594.4 181.8 569.3 202.2 549 227.3 549L954.5 549C979.6 549 1000 569.3 1000 594.4ZM1000 321.7L1000 321.7C1000 346.8 979.6 367.2 954.5 367.2L484.3 367.2 484.3 367.2C494.5 338.7 500 308.1 500 276.3L954.5 276.3C979.6 276.3 1000 296.6 1000 321.7ZM181.8 867.2C181.8 892.3 202.2 912.6 227.3 912.6L954.5 912.6C979.6 912.6 1000 892.3 1000 867.2 1000 842.1 979.6 821.7 954.5 821.7L227.3 821.7C202.2 821.7 181.8 842.1 181.8 867.2ZM227.3 49C352.8 49 454.5 150.7 454.5 276.3 454.5 401.8 352.8 503.5 227.3 503.5 101.8 503.5 0 401.8 0 276.3 0 150.7 101.8 49 227.3 49ZM227.3 136.4L222.6 136.7C206 138.9 193.2 153.2 193.2 170.5L193.2 238.6 125 238.6C106.2 238.6 90.9 253.9 90.9 272.7L91.2 277.4C93.5 294 107.7 306.8 125 306.8L193.2 306.8 193.2 375C193.2 393.8 208.5 409.1 227.3 409.1L231.9 408.8C248.5 406.5 261.4 392.2 261.4 375L261.4 306.8 329.5 306.8C348.4 306.8 363.6 291.5 363.6 272.7L363.3 268.1C361.1 251.5 346.8 238.6 329.5 238.6L261.4 238.6 261.4 170.5C261.4 151.6 246.1 136.4 227.3 136.4Z",
- "width": 1000
- },
- "search": [
- "add_to_list"
- ]
- },
{
"uid": "c15b5b49cdbc8bc7f84fb6aed59250cb",
"css": "eye_visible",
@@ -1397,6 +1383,174 @@
"search": [
"hamburger_menu"
]
+ },
+ {
+ "uid": "751d03d738c50f6db6e56cd5a0013b44",
+ "css": "add_to_list_2",
+ "code": 59496,
+ "src": "custom_icons",
+ "selected": true,
+ "svg": {
+ "path": "M1000 639.9C1000 665 979.6 685.4 954.5 685.4L227.3 685.4C202.2 685.4 181.8 665 181.8 639.9 181.8 614.8 202.2 594.4 227.3 594.4L954.5 594.4C979.6 594.4 1000 614.8 1000 639.9ZM181.8 912.6C181.8 937.7 202.2 958.1 227.3 958.1L954.5 958.1C979.6 958.1 1000 937.7 1000 912.6 1000 887.5 979.6 867.2 954.5 867.2L227.3 867.2C202.2 867.2 181.8 887.5 181.8 912.6ZM227.3 3.5C352.8 3.5 454.5 105.3 454.5 230.8 454.5 356.3 352.8 458.1 227.3 458.1 101.8 458.1 0 356.3 0 230.8 0 105.3 101.8 3.5 227.3 3.5ZM231.1 95.5C174.3 95.5 151.5 133.8 151.5 148.5 151.5 163.1 163.4 175 178 175 189.4 175 198.9 167.8 202.7 157.8 207.7 143.6 219.4 137.3 231.1 137.3 244.6 137.3 254.2 148.4 256.9 160.6 257.4 163.3 257.7 166.1 257.8 168.9 257.9 180.4 253.7 192.4 248.1 201.9 243.4 209.9 178.2 292.1 157.6 317.5 153.6 322.4 151.5 328.5 151.5 334.8 151.5 341.2 153.5 360.6 178 360.6L289.7 360.6C301.2 360.6 310.6 351.2 310.6 339.7 310.6 328.1 301.2 318.7 289.7 318.7L220.9 318.7C220.9 318.7 284 231.7 293 219.7 305.5 202.8 310.6 182.6 310.6 169.6 310.6 146 303.1 127.8 288.2 114.9 273.3 101.9 258 95.5 231.1 95.5ZM954.5 321.7C979.7 321.7 1000 342.1 1000 367.2 1000 392.3 979.7 412.6 954.5 412.6L457.3 412.7C479 385.8 496.1 355.1 507.3 321.7L954.5 321.7Z",
+ "width": 1000
+ },
+ "search": [
+ "add_to_list_2"
+ ]
+ },
+ {
+ "uid": "98d722da31bd2ea5027220d93284917e",
+ "css": "add_to_list_3",
+ "code": 59495,
+ "src": "custom_icons",
+ "selected": true,
+ "svg": {
+ "path": "M1000 639.9C1000 665 979.6 685.4 954.5 685.4L227.3 685.4C202.2 685.4 181.8 665 181.8 639.9 181.8 614.8 202.2 594.4 227.3 594.4L954.5 594.4C979.6 594.4 1000 614.8 1000 639.9ZM181.8 912.6C181.8 937.7 202.2 958.1 227.3 958.1L954.5 958.1C979.6 958.1 1000 937.7 1000 912.6 1000 887.5 979.6 867.2 954.5 867.2L227.3 867.2C202.2 867.2 181.8 887.5 181.8 912.6ZM227.3 3.5C352.8 3.5 454.5 105.3 454.5 230.8 454.5 356.3 352.8 458.1 227.3 458.1 101.8 458.1 0 356.3 0 230.8 0 105.3 101.8 3.5 227.3 3.5ZM224.7 101C196.2 101 168 117.7 156.7 147.4 151.3 161.5 162.5 176.8 177.7 176.8L181.5 176.4C189 175.1 195.3 169.9 198.2 162.6 202.9 151.1 213 140.9 227.3 140.9 234.8 140.9 260.1 143.6 260.1 172.8 260.1 204.7 237.4 207.3 224.7 207.3 208.2 207.3 202 213.8 202 227.3 202.1 239.4 209.4 244.5 222.2 244.4 227.3 244.4 257.6 241.9 257.6 279.1 257.6 279.4 257.6 279.9 257.6 280.4L257.6 284.3C257.3 294.4 253.9 313.7 227.3 313.7 211.1 313.7 202.4 303.1 198.7 293.2 195.3 284.1 187.3 277.8 177.7 277.8L176.7 277.8C161.7 277.8 150.5 292.7 155.7 306.8 164.1 330.1 185.5 353.5 227.3 353.5 252.5 353.5 303 341.6 303 281.8 303 241.9 280.3 228.6 267.7 223.3 272.7 220.6 303 204.7 303 170.1 303 151.5 295.5 101 224.7 101ZM954.5 321.7C979.7 321.7 1000 342.1 1000 367.2 1000 392.3 979.7 412.6 954.5 412.6L457.3 412.7C479 385.8 496.1 355.1 507.3 321.7L954.5 321.7Z",
+ "width": 1000
+ },
+ "search": [
+ "add_to_list_3"
+ ]
+ },
+ {
+ "uid": "df19bedc804c6bc892c23fbc4b52ec77",
+ "css": "add_to_list",
+ "code": 59445,
+ "src": "custom_icons",
+ "selected": true,
+ "svg": {
+ "path": "M1000 639.9C1000 665 979.6 685.4 954.5 685.4L227.3 685.4C202.2 685.4 181.8 665 181.8 639.9 181.8 614.8 202.2 594.4 227.3 594.4L954.5 594.4C979.6 594.4 1000 614.8 1000 639.9ZM181.8 912.6C181.8 937.7 202.2 958.1 227.3 958.1L954.5 958.1C979.6 958.1 1000 937.7 1000 912.6 1000 887.5 979.6 867.2 954.5 867.2L227.3 867.2C202.2 867.2 181.8 887.5 181.8 912.6ZM227.3 3.5C352.8 3.5 454.5 105.3 454.5 230.8 454.5 356.3 352.8 458.1 227.3 458.1 101.8 458.1 0 356.3 0 230.8 0 105.3 101.8 3.5 227.3 3.5ZM227.3 90.9L222.6 91.2C206 93.5 193.2 107.7 193.2 125L193.2 193.2 125 193.2C106.2 193.2 90.9 208.5 90.9 227.3L91.2 231.9C93.5 248.5 107.7 261.4 125 261.4L193.2 261.4 193.2 329.5C193.2 348.4 208.5 363.6 227.3 363.6L231.9 363.3C248.5 361.1 261.4 346.8 261.4 329.5L261.4 261.4 329.5 261.4C348.4 261.4 363.6 246.1 363.6 227.3L363.3 222.6C361.1 206 346.8 193.2 329.5 193.2L261.4 193.2 261.4 125C261.4 106.2 246.1 90.9 227.3 90.9ZM954.5 321.7C979.7 321.7 1000 342.1 1000 367.2 1000 392.3 979.7 412.6 954.5 412.6L457.3 412.7C479 385.8 496.1 355.1 507.3 321.7L954.5 321.7Z",
+ "width": 1000
+ },
+ "search": [
+ "add_to_list"
+ ]
+ },
+ {
+ "uid": "ed81fdeb1a9ab3f1611008c25594b70f",
+ "css": "add_to_list_5",
+ "code": 59463,
+ "src": "custom_icons",
+ "selected": true,
+ "svg": {
+ "path": "M1000 639.9C1000 665 979.6 685.4 954.5 685.4L227.3 685.4C202.2 685.4 181.8 665 181.8 639.9 181.8 614.8 202.2 594.4 227.3 594.4L954.5 594.4C979.6 594.4 1000 614.8 1000 639.9ZM181.8 912.6C181.8 937.7 202.2 958.1 227.3 958.1L954.5 958.1C979.6 958.1 1000 937.7 1000 912.6 1000 887.5 979.6 867.2 954.5 867.2L227.3 867.2C202.2 867.2 181.8 887.5 181.8 912.6ZM227.3 3.5C352.8 3.5 454.5 105.3 454.5 230.8 454.5 356.3 352.8 458.1 227.3 458.1 101.8 458.1 0 356.3 0 230.8 0 105.3 101.8 3.5 227.3 3.5ZM275.3 113.6L191.7 113.6C180 113.6 169.9 122 167.7 133.5L154 206.5C152.7 213.7 154.6 221 159.2 226.6 163.8 232.2 170.7 235.4 177.9 235.4L230.7 235.4C246.3 235.4 259.1 248.1 259.1 263.8 259.1 287.3 241.4 292.2 226.6 292.2 200.4 292.2 185.8 281.9 184.7 281.1 174.2 272.9 159.1 274.7 150.8 285.1 142.4 295.6 144.1 310.9 154.6 319.3 157.4 321.5 182.8 340.9 226.6 340.9 274.4 340.9 307.8 309.2 307.8 263.8 307.8 221.3 273.2 186.7 230.7 186.7L207.3 186.7 211.9 162.3 275.3 162.3C288.8 162.3 299.7 151.4 299.7 138 299.7 124.5 288.8 113.6 275.3 113.6ZM954.5 321.7C979.7 321.7 1000 342.1 1000 367.2 1000 392.3 979.7 412.6 954.5 412.6L457.3 412.7C479 385.8 496.1 355.1 507.3 321.7L954.5 321.7Z",
+ "width": 1000
+ },
+ "search": [
+ "add_to_list_5"
+ ]
+ },
+ {
+ "uid": "562584433e158926ba467f86f75a4273",
+ "css": "add_to_list_4",
+ "code": 59465,
+ "src": "custom_icons",
+ "selected": true,
+ "svg": {
+ "path": "M1000 639.9C1000 665 979.6 685.4 954.5 685.4L227.3 685.4C202.2 685.4 181.8 665 181.8 639.9 181.8 614.8 202.2 594.4 227.3 594.4L954.5 594.4C979.6 594.4 1000 614.8 1000 639.9ZM181.8 912.6C181.8 937.7 202.2 958.1 227.3 958.1L954.5 958.1C979.6 958.1 1000 937.7 1000 912.6 1000 887.5 979.6 867.2 954.5 867.2L227.3 867.2C202.2 867.2 181.8 887.5 181.8 912.6ZM227.3 3.5C352.8 3.5 454.5 105.3 454.5 230.8 454.5 356.3 352.8 458.1 227.3 458.1 101.8 458.1 0 356.3 0 230.8 0 105.3 101.8 3.5 227.3 3.5ZM277.8 118.2C263.5 118.2 252 129.7 252 143.9L252 238.4 183.3 238.4 183.3 143.9C183.3 129.7 171.8 118.2 157.6 118.2 143.3 118.2 131.8 129.7 131.8 143.9L131.8 264.1C131.8 278.4 143.3 289.9 157.6 289.9L252 289.9 252 332.8C252 347.1 263.5 358.6 277.8 358.6 292 358.6 303.5 347.1 303.5 332.8L303.5 143.9C303.5 129.7 292 118.2 277.8 118.2ZM954.5 321.7C979.7 321.7 1000 342.1 1000 367.2 1000 392.3 979.7 412.6 954.5 412.6L457.3 412.7C479 385.8 496.1 355.1 507.3 321.7L954.5 321.7Z",
+ "width": 1000
+ },
+ "search": [
+ "add_to_list_4"
+ ]
+ },
+ {
+ "uid": "7aeab382af3d3eecd2eb8362ae38cbe6",
+ "css": "add_to_list_1",
+ "code": 59483,
+ "src": "custom_icons",
+ "selected": true,
+ "svg": {
+ "path": "M1000 639.9C1000 665 979.6 685.4 954.5 685.4L227.3 685.4C202.2 685.4 181.8 665 181.8 639.9 181.8 614.8 202.2 594.4 227.3 594.4L954.5 594.4C979.6 594.4 1000 614.8 1000 639.9ZM181.8 912.6C181.8 937.7 202.2 958.1 227.3 958.1L954.5 958.1C979.6 958.1 1000 937.7 1000 912.6 1000 887.5 979.6 867.2 954.5 867.2L227.3 867.2C202.2 867.2 181.8 887.5 181.8 912.6ZM227.3 3.5C352.8 3.5 454.5 105.3 454.5 230.8 454.5 356.3 352.8 458.1 227.3 458.1 101.8 458.1 0 356.3 0 230.8 0 105.3 101.8 3.5 227.3 3.5ZM258.6 99.6C250.7 93.9 240.6 92.4 231.3 95.5L170.7 115.7C154.9 121 146.3 138.1 151.6 154 156.9 169.9 174 178.5 189.9 173.2L210.6 166.3 210.6 346.4C210.6 363.2 224.2 376.7 240.9 376.7 257.7 376.7 271.2 363.2 271.2 346.4L271.2 124.2C271.2 114.5 266.5 105.3 258.6 99.6ZM954.5 321.7C979.7 321.7 1000 342.1 1000 367.2 1000 392.3 979.7 412.6 954.5 412.6L457.3 412.7C479 385.8 496.1 355.1 507.3 321.7L954.5 321.7Z",
+ "width": 1000
+ },
+ "search": [
+ "add_to_list_1"
+ ]
+ },
+ {
+ "uid": "6920e457b7f7b8c64ea3bf5aa48c22ee",
+ "css": "add_to_list_6",
+ "code": 59497,
+ "src": "custom_icons",
+ "selected": true,
+ "svg": {
+ "path": "M1000 639.9C1000 665 979.6 685.4 954.5 685.4L227.3 685.4C202.2 685.4 181.8 665 181.8 639.9 181.8 614.8 202.2 594.4 227.3 594.4L954.5 594.4C979.6 594.4 1000 614.8 1000 639.9ZM954.5 867.2C979.6 867.2 1000 887.5 1000 912.6 1000 937.7 979.6 958.1 954.5 958.1L227.3 958.1C202.2 958.1 181.8 937.7 181.8 912.6 181.8 887.5 202.2 867.2 227.3 867.2ZM227.3 3.5C352.8 3.5 454.5 105.3 454.5 230.8 454.5 356.3 352.8 458.1 227.3 458.1 101.8 458.1 0 356.3 0 230.8 0 105.3 101.8 3.5 227.3 3.5ZM232 98.7C168.2 98.7 129.9 147.9 129.9 229.1 129.9 262.6 136.9 290.7 150.4 311.6 167.2 340.2 195.7 355.8 231.1 355.8 285.9 355.8 324.7 319.7 324.7 268.9 324.7 222.1 290.6 187.7 244.2 187.7 215.7 187.7 192.9 200.7 181.8 223.8L178.8 223.8C177.7 173.1 198.1 140.7 231.6 140.7 250.7 140.7 266 150.9 270.8 167L321.5 167C314.5 126.2 278.4 98.7 232 98.7ZM230.8 227.2C256.4 227.2 275 245.5 275 270.4 275 295 255.7 313.8 230.6 313.8 205.5 313.8 186.4 294.9 186.4 269.9 186.4 245.5 205.2 227.2 230.8 227.2ZM954.5 321.7C979.7 321.7 1000 342.1 1000 367.2 1000 392.3 979.7 412.6 954.5 412.6L457.3 412.7C479 385.8 496.1 355.1 507.3 321.7L954.5 321.7Z",
+ "width": 1000
+ },
+ "search": [
+ "add_to_list_6"
+ ]
+ },
+ {
+ "uid": "6a2dfbc46eb32d597bb243712e82c6eb",
+ "css": "add_to_list_7",
+ "code": 59499,
+ "src": "custom_icons",
+ "selected": true,
+ "svg": {
+ "path": "M1000 639.9C1000 665 979.6 685.4 954.5 685.4L227.3 685.4C202.2 685.4 181.8 665 181.8 639.9 181.8 614.8 202.2 594.4 227.3 594.4L954.5 594.4C979.6 594.4 1000 614.8 1000 639.9ZM181.8 912.6C181.8 937.7 202.2 958.1 227.3 958.1L954.5 958.1C979.6 958.1 1000 937.7 1000 912.6 1000 887.5 979.6 867.2 954.5 867.2L227.3 867.2C202.2 867.2 181.8 887.5 181.8 912.6ZM227.3 3.5C352.8 3.5 454.5 105.3 454.5 230.8 454.5 356.3 352.8 458.1 227.3 458.1 101.8 458.1 0 356.3 0 230.8 0 105.3 101.8 3.5 227.3 3.5ZM295.5 104.5L168.2 104.5C153.1 104.5 140.9 116.7 140.9 131.8 140.9 146.9 153.1 159.1 168.2 159.1L253.1 159.1 179.7 320.5C173.5 334.2 179.5 350.4 193.3 356.6 196.9 358.3 200.7 359.1 204.5 359.1 214.9 359.1 224.8 353.2 229.4 343.1L320.3 143.1C324.1 134.7 323.4 124.8 318.4 117.1 313.4 109.3 304.7 104.5 295.5 104.5ZM954.5 321.7C979.7 321.7 1000 342.1 1000 367.2 1000 392.3 979.7 412.6 954.5 412.6L457.3 412.7C479 385.8 496.1 355.1 507.3 321.7L954.5 321.7Z",
+ "width": 1000
+ },
+ "search": [
+ "add_to_list_7"
+ ]
+ },
+ {
+ "uid": "70d1343c4178d2df6caa1bc8397c8f92",
+ "css": "add_to_list_8",
+ "code": 59500,
+ "src": "custom_icons",
+ "selected": true,
+ "svg": {
+ "path": "M1000 639.9C1000 665 979.6 685.4 954.5 685.4L227.3 685.4C202.2 685.4 181.8 665 181.8 639.9 181.8 614.8 202.2 594.4 227.3 594.4L954.5 594.4C979.6 594.4 1000 614.8 1000 639.9ZM181.8 912.6C181.8 937.7 202.2 958.1 227.3 958.1L954.5 958.1C979.6 958.1 1000 937.7 1000 912.6 1000 887.5 979.6 867.2 954.5 867.2L227.3 867.2C202.2 867.2 181.8 887.5 181.8 912.6ZM227.3 3.5C352.8 3.5 454.5 105.3 454.5 230.8 454.5 356.3 352.8 458.1 227.3 458.1 101.8 458.1 0 356.3 0 230.8 0 105.3 101.8 3.5 227.3 3.5ZM222 100.4C187 100.4 158.6 128.9 158.6 163.8 158.6 180 164.8 194.6 174.7 205.8 157.2 219.7 145.9 241.2 145.9 265.3L145.9 278C145.9 320 180 354.1 222 354.1 264 354.1 298.1 320 298.1 278L298.1 265.3C298.1 241.2 286.8 219.7 269.2 205.8 279.2 194.6 285.4 180 285.4 163.8 285.4 128.9 257 100.4 222 100.4ZM222 227.3C243 227.3 260 244.3 260 265.3L260 278C260 299 243 316.1 222 316.1 201 316.1 183.9 299 183.9 278L183.9 265.3C183.9 244.3 201 227.3 222 227.3ZM222 138.5C236 138.5 247.4 149.8 247.4 163.8 247.4 177.9 236 189.2 222 189.2 208 189.2 196.6 177.9 196.6 163.8 196.6 149.8 208 138.5 222 138.5ZM954.5 321.7C979.7 321.7 1000 342.1 1000 367.2 1000 392.3 979.7 412.6 954.5 412.6L457.3 412.7C479 385.8 496.1 355.1 507.3 321.7L954.5 321.7Z",
+ "width": 1000
+ },
+ "search": [
+ "add_to_list_8"
+ ]
+ },
+ {
+ "uid": "b6f7b58706b2ac605dc39ef3c31db955",
+ "css": "add_to_list_9_plus",
+ "code": 59501,
+ "src": "custom_icons",
+ "selected": true,
+ "svg": {
+ "path": "M1000 639.9C1000 665 979.6 685.4 954.5 685.4L227.3 685.4C202.2 685.4 181.8 665 181.8 639.9 181.8 614.8 202.2 594.4 227.3 594.4L954.5 594.4C979.6 594.4 1000 614.8 1000 639.9ZM181.8 912.6C181.8 937.7 202.2 958.1 227.3 958.1L954.5 958.1C979.6 958.1 1000 937.7 1000 912.6 1000 887.5 979.6 867.2 954.5 867.2L227.3 867.2C202.2 867.2 181.8 887.5 181.8 912.6ZM227.3 3.5C352.8 3.5 454.5 105.3 454.5 230.8 454.5 356.3 352.8 458.1 227.3 458.1 101.8 458.1 0 356.3 0 230.8 0 105.3 101.8 3.5 227.3 3.5ZM186.4 113.6C148.8 113.6 118.2 144.2 118.2 181.8 118.2 219.4 148.8 250 186.4 250 198.8 250 210.4 246.6 220.5 240.8L220.5 272.7C220.5 291.5 205.2 306.8 186.4 306.8 167.6 306.8 152.3 291.5 152.3 272.7L152.3 267C152.3 257.6 144.6 250 135.2 250 125.8 250 118.2 257.6 118.2 267L118.2 272.7C118.2 310.3 148.8 340.9 186.4 340.9 224 340.9 254.5 310.3 254.5 272.7L254.5 181.8C254.5 144.2 224 113.6 186.4 113.6ZM327.3 181.8L324.7 182.1C319.6 183.3 315.9 187.8 315.9 193.2L315.9 215.9 293.2 215.9C286.9 215.9 281.8 221 281.8 227.3L282.1 229.9C283.3 234.9 287.8 238.6 293.2 238.6L315.9 238.6 315.9 261.4C315.9 267.6 321 272.7 327.3 272.7L329.9 272.4C334.9 271.2 338.6 266.7 338.6 261.4L338.6 238.6 361.4 238.6C367.6 238.6 372.7 233.5 372.7 227.3L372.4 224.7C371.2 219.6 366.7 215.9 361.4 215.9L338.6 215.9 338.6 193.2C338.6 186.9 333.5 181.8 327.3 181.8ZM186.4 147.7C205.2 147.7 220.5 163 220.5 181.8 220.5 200.6 205.2 215.9 186.4 215.9 167.5 215.9 152.3 200.6 152.3 181.8 152.3 163 167.5 147.7 186.4 147.7ZM954.5 321.7C979.7 321.7 1000 342.1 1000 367.2 1000 392.3 979.7 412.6 954.5 412.6L457.3 412.7C479 385.8 496.1 355.1 507.3 321.7L954.5 321.7Z",
+ "width": 1000
+ },
+ "search": [
+ "add_to_list_9_plus"
+ ]
+ },
+ {
+ "uid": "c0691d1e36270d128d139d79759db40c",
+ "css": "add_to_list_9",
+ "code": 59502,
+ "src": "custom_icons",
+ "selected": true,
+ "svg": {
+ "path": "M1000 639.9C1000 665 979.6 685.4 954.5 685.4L227.3 685.4C202.2 685.4 181.8 665 181.8 639.9 181.8 614.8 202.2 594.4 227.3 594.4L954.5 594.4C979.6 594.4 1000 614.8 1000 639.9ZM181.8 912.6C181.8 937.7 202.2 958.1 227.3 958.1L954.5 958.1C979.6 958.1 1000 937.7 1000 912.6 1000 887.5 979.6 867.2 954.5 867.2L227.3 867.2C202.2 867.2 181.8 887.5 181.8 912.6ZM227.3 3.5C352.8 3.5 454.5 105.3 454.5 230.8 454.5 356.3 352.8 458.1 227.3 458.1 101.8 458.1 0 356.3 0 230.8 0 105.3 101.8 3.5 227.3 3.5ZM222.7 90.9C177.6 90.9 140.9 127.6 140.9 172.7 140.9 217.8 177.6 254.5 222.7 254.5 237.6 254.5 251.6 250.5 263.6 243.5L263.6 281.8C263.6 304.4 245.3 322.7 222.7 322.7 200.2 322.7 181.8 304.4 181.8 281.8L181.8 275C181.8 263.7 172.7 254.5 161.4 254.5 150.1 254.5 140.9 263.7 140.9 275L140.9 281.8C140.9 326.9 177.6 363.6 222.7 363.6 267.8 363.6 304.5 326.9 304.5 281.8L304.5 172.7C304.5 127.6 267.8 90.9 222.7 90.9ZM222.7 131.8C245.3 131.8 263.6 150.1 263.6 172.7 263.6 195.3 245.3 213.6 222.7 213.6 200.1 213.6 181.8 195.3 181.8 172.7 181.8 150.1 200.1 131.8 222.7 131.8ZM954.5 321.7C979.7 321.7 1000 342.1 1000 367.2 1000 392.3 979.7 412.6 954.5 412.6L457.3 412.7C479 385.8 496.1 355.1 507.3 321.7L954.5 321.7Z",
+ "width": 1000
+ },
+ "search": [
+ "add_to_list_9"
+ ]
+ },
+ {
+ "uid": "5cbb79fcc24fb34a4305c747185ea06a",
+ "css": "compare_disabled",
+ "code": 59484,
+ "src": "custom_icons",
+ "selected": true,
+ "svg": {
+ "path": "M918.8 39.3L922.7 42.5C936.2 55.6 936.6 77.2 923.5 90.7L747.7 272.7 863.6 272.7C886.9 272.7 906.2 290.3 908.8 312.9L909.1 318.2C909.1 343.3 888.7 363.6 863.6 363.6L659.9 363.6 590.9 435.1 590.9 636.4C590.9 684.3 553.8 723.6 506.8 727L500 727.3 500 818.2 863.6 818.2C888.7 818.2 909.1 838.5 909.1 863.6 909.1 888.7 888.7 909.1 863.6 909.1L500 909.1C449.8 909.1 409.1 868.4 409.1 818.2L409.1 727.3 308.8 727.2 86.8 957.2C73.7 970.8 52.1 971.1 38.6 958.1 29 948.8 26 935.4 29.7 923.5L833.9 90.7C837.7 86.8 840.4 82.1 841.9 77.1L874.5 43.4C886.4 31.1 905.3 29.6 918.8 39.3ZM500 90.9C550.2 90.9 590.9 131.6 590.9 181.8L590.9 244.2 447 393.2 352.8 298.9C349.6 295.7 345.8 293.9 342 293.2 330.4 291.2 318.2 299.8 318.2 313.3L318.2 363.6 227.3 363.6C202.2 363.6 181.8 384 181.8 409.1 181.8 434.2 202.2 454.5 227.3 454.5L318.2 454.5 318.2 504.9C318.2 511.1 320.8 516.3 324.7 519.8L125.7 726C107.4 721.6 93.4 706.1 91.2 687.1L90.9 681.8 90.9 136.4C90.9 111.3 111.3 90.9 136.4 90.9L500 90.9ZM772.7 495L772.7 545.5 863.6 545.5C880 545.2 895.3 553.8 903.5 568 911.8 582.2 911.8 599.7 903.5 613.8 895.3 628 880 636.6 863.6 636.4L772.7 636.4 772.7 686.7C772.7 704.8 750.9 713.9 738.1 701.1L642.3 605.2C634.4 597.2 634.4 584.4 642.3 576.5L738.1 480.7C741.3 477.6 745.1 475.7 748.9 475.1 760.5 473.1 772.7 481.5 772.7 495Z",
+ "width": 1000
+ },
+ "search": [
+ "compare_disabled"
+ ]
}
]
}
\ No newline at end of file
diff --git a/packages/smooth_app/assets/fonts/icons/icons.sketch b/packages/smooth_app/assets/fonts/icons/icons.sketch
index a7837f83b99..2810780437f 100644
Binary files a/packages/smooth_app/assets/fonts/icons/icons.sketch and b/packages/smooth_app/assets/fonts/icons/icons.sketch differ
diff --git a/packages/smooth_app/lib/pages/product/product_list_helper.dart b/packages/smooth_app/lib/pages/product/product_list_helper.dart
index 5a8af8d19a8..2c3314db017 100644
--- a/packages/smooth_app/lib/pages/product/product_list_helper.dart
+++ b/packages/smooth_app/lib/pages/product/product_list_helper.dart
@@ -533,8 +533,10 @@ class _AddToProductListDividerPainter extends CustomPainter {
/// Logic for the user lists
class _ProductUserListsProvider extends ValueNotifier<_ProductUserListsState> {
- _ProductUserListsProvider(this.dao, this.barcode)
- : super(const _ProductUserListsLoadingState()) {
+ _ProductUserListsProvider(
+ this.dao,
+ this.barcode,
+ ) : super(const _ProductUserListsLoadingState()) {
reloadLists();
}
diff --git a/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer.dart b/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer.dart
index 5bb3091082c..3de41d13c18 100644
--- a/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer.dart
+++ b/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer.dart
@@ -14,6 +14,7 @@ import 'package:smooth_app/pages/product/product_page/footer/new_product_footer_
import 'package:smooth_app/pages/product/product_page/footer/new_product_footer_share.dart';
import 'package:smooth_app/pages/product/product_page/new_product_page.dart';
import 'package:smooth_app/resources/app_icons.dart' as icons;
+import 'package:smooth_app/themes/smooth_theme.dart';
import 'package:smooth_app/themes/smooth_theme_colors.dart';
import 'package:smooth_app/themes/theme_provider.dart';
@@ -82,7 +83,7 @@ class _ProductFooterButtonsBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
final SmoothColorsThemeExtension themeExtension =
- Theme.of(context).extension()!;
+ context.extension();
double bottomPadding = MediaQuery.viewPaddingOf(context).bottom;
// Add an extra padding (for Android)
@@ -238,20 +239,24 @@ class _ProductFooterFilledButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final SmoothColorsThemeExtension themeExtension =
- Theme.of(context).extension()!;
+ context.extension();
final ProductPageCompatibility compatibility =
context.watch();
+
+ final bool lightTheme = context.lightTheme();
final Color contentColor = compatibility.color != null
? compatibility.color!
- : context.lightTheme()
+ : lightTheme
? themeExtension.primaryBlack
: themeExtension.primarySemiDark;
- final Color mainColor =
- enabled ? contentColor : contentColor.withOpacity(0.5);
+ final Color backgroundColor = enabled
+ ? contentColor
+ : (lightTheme ? Colors.grey.shade500 : Colors.black12);
+ final Color foregroundColor = Colors.white.withOpacity(enabled ? 1.0 : 0.2);
final Widget child = IconTheme(
- data: const IconThemeData(
- color: Colors.white,
+ data: IconThemeData(
+ color: foregroundColor,
size: 18.0,
),
child: icon,
@@ -264,8 +269,8 @@ class _ProductFooterFilledButton extends StatelessWidget {
child: OutlinedButton(
onPressed: onTap,
style: OutlinedButton.styleFrom(
- foregroundColor: Colors.white,
- backgroundColor: mainColor,
+ foregroundColor: foregroundColor,
+ backgroundColor: backgroundColor,
side: BorderSide.none,
),
child: label == null
@@ -306,15 +311,18 @@ class _ProductFooterOutlinedButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
final SmoothColorsThemeExtension themeExtension =
- Theme.of(context).extension()!;
+ context.extension();
+
+ final bool lightTheme = context.lightTheme();
final Color contentColor =
- context.lightTheme() ? themeExtension.primaryBlack : Colors.white;
- final Color mainColor =
- enabled ? contentColor : contentColor.withOpacity(0.5);
+ lightTheme ? themeExtension.primaryBlack : Colors.white;
+ final Color foregroundColor = enabled
+ ? contentColor
+ : contentColor.withOpacity(lightTheme ? 0.4 : 0.2);
final Widget child = IconTheme(
data: IconThemeData(
- color: mainColor,
+ color: foregroundColor,
size: 18.0,
),
child: icon,
@@ -327,8 +335,10 @@ class _ProductFooterOutlinedButton extends StatelessWidget {
child: OutlinedButton(
onPressed: onTap,
style: OutlinedButton.styleFrom(
- foregroundColor: mainColor,
- backgroundColor: Colors.transparent,
+ foregroundColor: foregroundColor,
+ backgroundColor: enabled
+ ? Colors.transparent
+ : (lightTheme ? Colors.grey.shade300 : Colors.black12),
),
child: label == null
? child
diff --git a/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer_add_to_lists.dart b/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer_add_to_lists.dart
index 0a9d5bfd392..a4a6577e8d2 100644
--- a/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer_add_to_lists.dart
+++ b/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer_add_to_lists.dart
@@ -2,30 +2,51 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:openfoodfacts/openfoodfacts.dart';
import 'package:provider/provider.dart';
+import 'package:smooth_app/database/dao_product_list.dart';
+import 'package:smooth_app/database/local_database.dart';
import 'package:smooth_app/generic_lib/bottom_sheets/smooth_bottom_sheet.dart';
import 'package:smooth_app/pages/product/product_list_helper.dart';
import 'package:smooth_app/pages/product/product_page/footer/new_product_footer.dart';
import 'package:smooth_app/resources/app_icons.dart' as icons;
-class ProductFooterAddToListButton extends StatelessWidget {
+class ProductFooterAddToListButton extends StatefulWidget {
const ProductFooterAddToListButton();
+ @override
+ State createState() =>
+ _ProductFooterAddToListButtonState();
+}
+
+class _ProductFooterAddToListButtonState
+ extends State {
@override
Widget build(BuildContext context) {
final AppLocalizations appLocalizations = AppLocalizations.of(context);
- return ProductFooterButton(
- label: appLocalizations.user_list_button_add_product,
- vibrate: true,
- icon: const icons.AddToList(),
- onTap: () => _editList(context, context.read()),
+ return ChangeNotifierProvider<_ProductUserListsProvider>(
+ create: (BuildContext context) => _ProductUserListsProvider(
+ DaoProductList(context.read()),
+ context.read().barcode!,
+ ),
+ child: Consumer<_ProductUserListsProvider>(
+ builder: (BuildContext context, _ProductUserListsProvider provider, _) {
+ return ProductFooterButton(
+ label: appLocalizations.user_list_button_add_product,
+ vibrate: true,
+ icon: provider.value == 0
+ ? const icons.AddToList.symbol()
+ : icons.AddToList(count: provider.value),
+ onTap: () => _editList(context, context.read()),
+ );
+ },
+ ),
);
}
Future _editList(BuildContext context, Product product) async {
final AppLocalizations appLocalizations = AppLocalizations.of(context);
- showSmoothDraggableModalSheet(
+ await showSmoothDraggableModalSheet(
context: context,
header: SmoothModalSheetHeader(
prefix: const SmoothModalSheetHeaderPrefixIndicator(),
@@ -37,6 +58,26 @@ class ProductFooterAddToListButton extends StatelessWidget {
),
);
+ if (context.mounted) {
+ context.read<_ProductUserListsProvider>().reload();
+ }
+
return true;
}
}
+
+class _ProductUserListsProvider extends ValueNotifier {
+ _ProductUserListsProvider(
+ this.dao,
+ this.barcode,
+ ) : super(0) {
+ reload();
+ }
+
+ final DaoProductList dao;
+ final String barcode;
+
+ Future reload() async {
+ value = (await dao.getUserListsWithBarcodes([barcode])).length;
+ }
+}
diff --git a/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer_compare.dart b/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer_compare.dart
index 645a75c8a95..9247f41ef32 100644
--- a/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer_compare.dart
+++ b/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer_compare.dart
@@ -58,7 +58,7 @@ class ProductFooterCompareButton extends StatelessWidget {
return ProductFooterButton(
label: appLocalizations.product_search_same_category_short,
semanticsLabel: appLocalizations.product_search_same_category,
- icon: const icons.Compare(),
+ icon: enabled ? const icons.Compare() : const icons.Compare.disabled(),
enabled: enabled,
onTap: () => enabled
? _compareProduct(
diff --git a/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer_settings.dart b/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer_settings.dart
index 07c3c06e96c..8978c405e87 100644
--- a/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer_settings.dart
+++ b/packages/smooth_app/lib/pages/product/product_page/footer/new_product_footer_settings.dart
@@ -262,13 +262,14 @@ class _ProductActionBarModalItemEditorState
color: extension.primaryDark,
child: _icon,
),
- const SizedBox(width: VERY_LARGE_SPACE),
+ const SizedBox(width: LARGE_SPACE),
Expanded(
child: Padding(
padding: const EdgeInsetsDirectional.only(bottom: 0.5),
child: Text(
_text(AppLocalizations.of(context)),
maxLines: 1,
+ overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 15.0,
fontWeight: FontWeight.bold,
@@ -315,7 +316,7 @@ class _ProductActionBarModalItemEditorState
ProductFooterActionBar.addPrice => icons.AddPrice(off.Currency.USD),
ProductFooterActionBar.edit => const icons.Edit(),
ProductFooterActionBar.compare => const icons.Compare(),
- ProductFooterActionBar.addToList => const icons.AddToList(),
+ ProductFooterActionBar.addToList => const icons.AddToList.symbol(),
ProductFooterActionBar.share => icons.Share(),
ProductFooterActionBar.settings =>
throw Exception('This item should not be displayed'),
diff --git a/packages/smooth_app/lib/pages/product/product_page/new_product_footer.dart b/packages/smooth_app/lib/pages/product/product_page/new_product_footer.dart
deleted file mode 100644
index 2e55bcac574..00000000000
--- a/packages/smooth_app/lib/pages/product/product_page/new_product_footer.dart
+++ /dev/null
@@ -1,469 +0,0 @@
-import 'dart:io';
-
-import 'package:flutter/material.dart';
-import 'package:flutter_gen/gen_l10n/app_localizations.dart';
-import 'package:openfoodfacts/openfoodfacts.dart';
-import 'package:provider/provider.dart';
-import 'package:share_plus/share_plus.dart';
-import 'package:smooth_app/data_models/preferences/user_preferences.dart';
-import 'package:smooth_app/database/local_database.dart';
-import 'package:smooth_app/generic_lib/bottom_sheets/smooth_bottom_sheet.dart';
-import 'package:smooth_app/generic_lib/design_constants.dart';
-import 'package:smooth_app/generic_lib/widgets/smooth_snackbar.dart';
-import 'package:smooth_app/helpers/analytics_helper.dart';
-import 'package:smooth_app/helpers/provider_helper.dart';
-import 'package:smooth_app/pages/prices/price_meta_product.dart';
-import 'package:smooth_app/pages/prices/product_price_add_page.dart';
-import 'package:smooth_app/pages/product/common/product_query_page_helper.dart';
-import 'package:smooth_app/pages/product/edit_product_page.dart';
-import 'package:smooth_app/pages/product/product_list_helper.dart';
-import 'package:smooth_app/pages/product/product_page/new_product_page.dart';
-import 'package:smooth_app/query/category_product_query.dart';
-import 'package:smooth_app/query/product_query.dart';
-import 'package:smooth_app/resources/app_icons.dart' as icons;
-import 'package:smooth_app/themes/smooth_theme_colors.dart';
-import 'package:smooth_app/themes/theme_provider.dart';
-
-class ProductFooter extends StatelessWidget {
- const ProductFooter({super.key});
-
- static const double kHeight = 48.0;
-
- @override
- Widget build(BuildContext context) {
- return DecoratedBox(
- decoration: BoxDecoration(
- color: Theme.of(context).scaffoldBackgroundColor,
- boxShadow: [
- BoxShadow(
- color: Theme.of(context)
- .shadowColor
- .withOpacity(context.lightTheme() ? 0.25 : 0.6),
- blurRadius: 10.0,
- ),
- ],
- ),
- child: const _ProductFooterButtonsBar(),
- );
- }
-}
-
-class _ProductFooterButtonsBar extends StatelessWidget {
- const _ProductFooterButtonsBar();
-
- @override
- Widget build(BuildContext context) {
- final SmoothColorsThemeExtension themeExtension =
- Theme.of(context).extension()!;
-
- double bottomPadding = MediaQuery.viewPaddingOf(context).bottom;
- // Add an extra padding (for Android)
- if (Platform.isAndroid) {
- bottomPadding += MEDIUM_SPACE;
- }
-
- return SizedBox(
- height: ProductFooter.kHeight + LARGE_SPACE + bottomPadding,
- child: OutlinedButtonTheme(
- data: OutlinedButtonThemeData(
- style: OutlinedButton.styleFrom(
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(20.0),
- ),
- side: BorderSide(color: themeExtension.greyLight),
- padding: const EdgeInsetsDirectional.symmetric(
- horizontal: 19.0,
- ),
- ),
- ),
- child: ListView(
- padding: EdgeInsetsDirectional.only(
- start: SMALL_SPACE,
- end: SMALL_SPACE,
- top: LARGE_SPACE,
- bottom: bottomPadding,
- ),
- scrollDirection: Axis.horizontal,
- children: const [
- SizedBox(width: 10.0),
- _ProductAddPriceButton(),
- SizedBox(width: 10.0),
- _ProductEditButton(),
- SizedBox(width: 10.0),
- _ProductCompareButton(),
- SizedBox(width: 10.0),
- _ProductAddToListButton(),
- SizedBox(width: 10.0),
- _ProductShareButton(),
- ],
- ),
- ),
- );
- }
-}
-
-class _ProductAddToListButton extends StatelessWidget {
- const _ProductAddToListButton();
-
- @override
- Widget build(BuildContext context) {
- final AppLocalizations appLocalizations = AppLocalizations.of(context);
-
- return _ProductFooterOutlinedButton(
- label: appLocalizations.user_list_button_add_product,
- icon: const icons.AddToList(),
- onTap: () => _editList(context, context.read()),
- );
- }
-
- Future _editList(BuildContext context, Product product) async {
- final AppLocalizations appLocalizations = AppLocalizations.of(context);
-
- showSmoothDraggableModalSheet(
- context: context,
- header: SmoothModalSheetHeader(
- prefix: const SmoothModalSheetHeaderPrefixIndicator(),
- title: appLocalizations.user_list_title,
- suffix: const SmoothModalSheetHeaderCloseButton(),
- ),
- bodyBuilder: (BuildContext context) => AddProductToListContainer(
- barcode: product.barcode!,
- ),
- );
-
- return true;
- }
-}
-
-class _ProductAddPriceButton extends StatelessWidget {
- const _ProductAddPriceButton();
-
- @override
- Widget build(BuildContext context) {
- final AppLocalizations appLocalizations = AppLocalizations.of(context);
-
- return ConsumerFilter(
- buildWhen: (UserPreferences? previous, UserPreferences current) =>
- previous?.userCurrencyCode != current.userCurrencyCode,
- builder: (BuildContext context, UserPreferences userPreferences, _) {
- final Currency currency = Currency.values.firstWhere(
- (Currency currency) =>
- currency.name == userPreferences.userCurrencyCode,
- orElse: () => Currency.USD,
- );
-
- return _ProductFooterFilledButton(
- label: appLocalizations.prices_add_a_price,
- icon: icons.AddPrice(currency),
- onTap: () => _addAPrice(context, context.read()),
- );
- },
- );
- }
-
- Future _addAPrice(BuildContext context, Product product) {
- return ProductPriceAddPage.showProductPage(
- context: context,
- product: PriceMetaProduct.product(context.read()),
- proofType: ProofType.priceTag,
- );
- }
-}
-
-class _ProductEditButton extends StatelessWidget {
- const _ProductEditButton();
-
- @override
- Widget build(BuildContext context) {
- final AppLocalizations appLocalizations = AppLocalizations.of(context);
-
- return _ProductFooterOutlinedButton(
- label: appLocalizations.edit_product_label_short,
- semanticsLabel: appLocalizations.edit_product_label,
- icon: const icons.Edit(),
- onTap: () => _editProduct(context, context.read()),
- );
- }
-
- Future _editProduct(BuildContext context, Product product) async {
- ProductPageState.of(context).stopRobotoffQuestion();
-
- AnalyticsHelper.trackProductEvent(
- AnalyticsEvent.openProductEditPage,
- product: product,
- );
-
- await Navigator.push(
- context,
- MaterialPageRoute(
- builder: (BuildContext context) => EditProductPage(product),
- ),
- );
-
- if (context.mounted) {
- ProductPageState.of(context).startRobotoffQuestion();
- }
- }
-}
-
-class _ProductCompareButton extends StatelessWidget {
- const _ProductCompareButton();
-
- @override
- Widget build(BuildContext context) {
- final AppLocalizations appLocalizations = AppLocalizations.of(context);
- final Product product = context.read();
-
- const Set blackListedCategories = {
- 'fr:vegan',
- };
- String? categoryTag;
- String? categoryLabel;
- final List? labels =
- product.categoriesTagsInLanguages?[ProductQuery.getLanguage()];
- final List? tags = product.categoriesTags;
- if (tags != null &&
- labels != null &&
- tags.isNotEmpty &&
- tags.length == labels.length) {
- categoryTag = product.comparedToCategory;
- if (categoryTag != null) {
- for (int i = 0; i < tags.length; i++) {
- if (categoryTag == tags[i]) {
- categoryLabel = labels[i];
- break;
- }
- }
- }
- if (categoryLabel == null ||
- blackListedCategories.contains(categoryTag)) {
- // fallback algorithm
- int index = tags.length - 1;
- // cf. https://github.com/openfoodfacts/openfoodfacts-dart/pull/474
- // looking for the most detailed non blacklisted category
- categoryTag = tags[index];
- categoryLabel = labels[index];
- while (blackListedCategories.contains(categoryTag) && index > 0) {
- index--;
- categoryTag = tags[index];
- categoryLabel = labels[index];
- }
- }
- }
-
- final bool enabled = categoryTag != null && categoryLabel != null;
-
- return _ProductFooterOutlinedButton(
- label: appLocalizations.product_search_same_category_short,
- semanticsLabel: appLocalizations.product_search_same_category,
- icon: const icons.Compare(),
- enabled: enabled,
- onTap: () => enabled
- ? _compareProduct(
- context: context,
- product: product,
- categoryLabel: categoryLabel!,
- categoryTag: categoryTag!,
- )
- : _showFeatureDisabledDialog(context),
- );
- }
-
- Future _compareProduct({
- required BuildContext context,
- required Product product,
- required String categoryLabel,
- required String categoryTag,
- }) {
- return ProductQueryPageHelper.openBestChoice(
- name: categoryLabel,
- localDatabase: context.read(),
- productQuery: CategoryProductQuery(
- categoryTag,
- productType: product.productType ?? ProductType.food,
- ),
- context: context,
- searchResult: false,
- );
- }
-
- void _showFeatureDisabledDialog(BuildContext context) {
- final AppLocalizations appLocalizations = AppLocalizations.of(context);
- final ThemeData themeData = Theme.of(context);
-
- ScaffoldMessenger.of(context).showSnackBar(
- SmoothFloatingSnackbar(
- content: Row(
- children: [
- const ExcludeSemantics(
- child: icons.Warning(
- color: Colors.white,
- ),
- ),
- const SizedBox(width: LARGE_SPACE),
- Expanded(
- child:
- Text(appLocalizations.product_search_same_category_error)),
- ],
- ),
- backgroundColor: themeData.extension()!.red,
- action: SnackBarAction(
- label: appLocalizations.okay,
- onPressed: () {
- ScaffoldMessenger.of(context).hideCurrentSnackBar();
- },
- ),
- ),
- );
- }
-}
-
-class _ProductShareButton extends StatelessWidget {
- const _ProductShareButton();
-
- @override
- Widget build(BuildContext context) {
- final AppLocalizations appLocalizations = AppLocalizations.of(context);
-
- return _ProductFooterOutlinedButton(
- label: appLocalizations.share,
- icon: icons.Share(),
- onTap: () => _shareProduct(context, context.read()),
- );
- }
-
- Future _shareProduct(BuildContext context, Product product) async {
- final ProductType productType = product.productType ?? ProductType.food;
- AnalyticsHelper.trackProductEvent(
- AnalyticsEvent.shareProduct,
- product: product,
- );
- final AppLocalizations appLocalizations = AppLocalizations.of(context);
- // We need to provide a sharePositionOrigin to make the plugin work on ipad
- final RenderBox? box = context.findRenderObject() as RenderBox?;
- final String url = 'https://'
- '${ProductQuery.getCountry().offTag}.${productType.getDomain()}.org'
- '/product/${product.barcode}';
- Share.share(
- productType.getShareProductLabel(appLocalizations, url),
- sharePositionOrigin:
- box == null ? null : box.localToGlobal(Offset.zero) & box.size,
- );
- }
-}
-
-class _ProductFooterFilledButton extends StatelessWidget {
- const _ProductFooterFilledButton({
- required this.label,
- required this.icon,
- required this.onTap,
- // ignore: unused_element
- this.semanticsLabel,
- });
-
- final String label;
- final String? semanticsLabel;
- final icons.AppIcon icon;
- final VoidCallback onTap;
-
- @override
- Widget build(BuildContext context) {
- final SmoothColorsThemeExtension themeExtension =
- Theme.of(context).extension()!;
- final ProductPageCompatibility compatibility =
- context.watch();
-
- return Semantics(
- excludeSemantics: true,
- button: true,
- label: semanticsLabel,
- child: OutlinedButton(
- onPressed: onTap,
- style: OutlinedButton.styleFrom(
- foregroundColor: Colors.white,
- backgroundColor: compatibility.color ??
- (context.lightTheme()
- ? themeExtension.primaryBlack
- : themeExtension.primarySemiDark),
- side: BorderSide.none,
- ),
- child: Row(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- IconTheme(
- data: const IconThemeData(
- color: Colors.white,
- size: 18.0,
- ),
- child: icon,
- ),
- const SizedBox(width: 8.0),
- Text(
- label,
- style: const TextStyle(
- fontWeight: FontWeight.bold,
- ),
- ),
- ],
- ),
- ),
- );
- }
-}
-
-class _ProductFooterOutlinedButton extends StatelessWidget {
- const _ProductFooterOutlinedButton({
- required this.label,
- required this.icon,
- required this.onTap,
- this.enabled = true,
- this.semanticsLabel,
- });
-
- final String label;
- final String? semanticsLabel;
- final icons.AppIcon icon;
- final VoidCallback onTap;
- final bool enabled;
-
- @override
- Widget build(BuildContext context) {
- final SmoothColorsThemeExtension themeExtension =
- Theme.of(context).extension()!;
- final Color contentColor =
- context.lightTheme() ? themeExtension.primaryBlack : Colors.white;
- final Color mainColor =
- enabled ? contentColor : contentColor.withOpacity(0.5);
-
- return Semantics(
- label: semanticsLabel,
- excludeSemantics: true,
- button: true,
- child: OutlinedButton(
- onPressed: onTap,
- style: OutlinedButton.styleFrom(
- foregroundColor: mainColor,
- backgroundColor: Colors.transparent,
- ),
- child: Row(
- children: [
- IconTheme(
- data: IconThemeData(
- color: mainColor,
- size: 18.0,
- ),
- child: icon,
- ),
- const SizedBox(width: 8.0),
- Text(
- label,
- style: const TextStyle(
- fontWeight: FontWeight.bold,
- ),
- ),
- ],
- ),
- ),
- );
- }
-}
diff --git a/packages/smooth_app/lib/pages/product/product_page/new_product_header.dart b/packages/smooth_app/lib/pages/product/product_page/new_product_header.dart
index 6cd2e3ef5d0..4be04ddbbf3 100644
--- a/packages/smooth_app/lib/pages/product/product_page/new_product_header.dart
+++ b/packages/smooth_app/lib/pages/product/product_page/new_product_header.dart
@@ -30,6 +30,7 @@ class ProductHeader extends StatefulWidget {
class _ProductHeaderState extends State {
double _titleOpacity = 0.0;
double _compatibilityScoreOpacity = 0.0;
+ double _shadow = 0.0;
@override
Widget build(BuildContext context) {
@@ -46,13 +47,20 @@ class _ProductHeaderState extends State {
) =>
_onScroll(scrollController),
child: Consumer(
- builder: (BuildContext context,
- ProductPageCompatibility productCompatibility, _) {
+ builder: (
+ BuildContext context,
+ ProductPageCompatibility productCompatibility,
+ _,
+ ) {
+ final Color tintColor = productCompatibility.color ??
+ Theme.of(context)
+ .extension()!
+ .greyNormal;
+
return Material(
- color: productCompatibility.color ??
- Theme.of(context)
- .extension()!
- .greyNormal,
+ color: tintColor,
+ shadowColor: tintColor,
+ elevation: _shadow,
child: DefaultTextStyle.merge(
style: const TextStyle(color: Colors.white),
child: IconTheme(
@@ -103,11 +111,18 @@ class _ProductHeaderState extends State {
LARGE_SPACE + kToolbarHeight * 2,
1.0,
);
+ final double shadow = scrollController.offset.progressAndClamp(
+ 0.0,
+ kToolbarHeight / 2,
+ 2.0,
+ );
if (_titleOpacity != titleOpacity ||
- _compatibilityScoreOpacity != compatibilityScoreOpacity) {
+ _compatibilityScoreOpacity != compatibilityScoreOpacity ||
+ _shadow != shadow) {
_titleOpacity = titleOpacity;
_compatibilityScoreOpacity = compatibilityScoreOpacity;
+ _shadow = shadow;
// Calling setState() may already be in a build() call
SchedulerBinding.instance.addPostFrameCallback((_) {
diff --git a/packages/smooth_app/lib/resources/app_icons.dart b/packages/smooth_app/lib/resources/app_icons.dart
index 3e67592323e..b046634aec6 100644
--- a/packages/smooth_app/lib/resources/app_icons.dart
+++ b/packages/smooth_app/lib/resources/app_icons.dart
@@ -103,12 +103,61 @@ class AddPrice extends AppIcon {
}
class AddToList extends AppIcon {
- const AddToList({
+ factory AddToList({
+ required int count,
+ Color? color,
+ double? size,
+ Shadow? shadow,
+ Key? key,
+ }) {
+ return AddToList._count(
+ iconData: _getResource(count),
+ color: color,
+ size: size,
+ shadow: shadow,
+ key: key,
+ );
+ }
+
+ const AddToList._count({
+ required IconData iconData,
+ super.color,
+ super.size,
+ super.shadow,
+ super.key,
+ }) : super._(iconData);
+
+ const AddToList.symbol({
super.color,
super.size,
super.shadow,
super.key,
}) : super._(_IconsFont.add_to_list);
+
+ static IconData _getResource(int count) {
+ switch (count) {
+ case 1:
+ return _IconsFont.add_to_list_1;
+ case 2:
+ return _IconsFont.add_to_list_2;
+ case 3:
+ return _IconsFont.add_to_list_3;
+ case 4:
+ return _IconsFont.add_to_list_4;
+ case 5:
+ return _IconsFont.add_to_list_5;
+ case 6:
+ return _IconsFont.add_to_list_6;
+ case 7:
+ return _IconsFont.add_to_list_7;
+ case 8:
+ return _IconsFont.add_to_list_8;
+ case 9:
+ return _IconsFont.add_to_list_9;
+ default:
+ return _IconsFont.add_to_list_9_plus;
+ }
+ }
}
class AppStore extends AppIcon {
@@ -440,6 +489,13 @@ class Compare extends AppIcon {
super.shadow,
super.key,
}) : super._(_IconsFont.compare);
+
+ const Compare.disabled({
+ super.color,
+ super.size,
+ super.shadow,
+ super.key,
+ }) : super._(_IconsFont.compare_disabled);
}
class Contribute extends AppIcon {
diff --git a/packages/smooth_app/lib/resources/app_icons_font.dart b/packages/smooth_app/lib/resources/app_icons_font.dart
index 672fbadfe63..2c32d2b32ff 100644
--- a/packages/smooth_app/lib/resources/app_icons_font.dart
+++ b/packages/smooth_app/lib/resources/app_icons_font.dart
@@ -115,6 +115,8 @@ class _IconsFont {
IconData(0xe833, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData hamburger_menu =
IconData(0xe834, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData add_to_list =
+ IconData(0xe835, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData outdated =
IconData(0xe836, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData question_circled =
@@ -149,10 +151,12 @@ class _IconsFont {
IconData(0xe845, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData add_price_yen =
IconData(0xe846, fontFamily: _kFontFam, fontPackage: _kFontPkg);
- static const IconData add_to_list =
+ static const IconData add_to_list_5 =
IconData(0xe847, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData eye_visible =
IconData(0xe848, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData add_to_list_4 =
+ IconData(0xe849, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData delete_trash =
IconData(0xe84a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData image_check =
@@ -187,6 +191,10 @@ class _IconsFont {
IconData(0xe859, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData country =
IconData(0xe85a, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData add_to_list_1 =
+ IconData(0xe85b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData compare_disabled =
+ IconData(0xe85c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData password =
IconData(0xe85d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData incognito =
@@ -205,6 +213,20 @@ class _IconsFont {
IconData(0xe865, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData personalization_alt =
IconData(0xe866, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData add_to_list_3 =
+ IconData(0xe867, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData add_to_list_2 =
+ IconData(0xe868, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData add_to_list_6 =
+ IconData(0xe869, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData add_to_list_7 =
+ IconData(0xe86b, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData add_to_list_8 =
+ IconData(0xe86c, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData add_to_list_9_plus =
+ IconData(0xe86d, fontFamily: _kFontFam, fontPackage: _kFontPkg);
+ static const IconData add_to_list_9 =
+ IconData(0xe86e, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData share_cupertino =
IconData(0xe8a4, fontFamily: _kFontFam, fontPackage: _kFontPkg);
static const IconData share_material =