Docs: Front page Images added

QueryBuilder & useQuery onData, onError not working bugfix
This commit is contained in:
Kingkor Roy Tirtho
2022-07-03 19:08:18 +06:00
parent 8a4f1f7545
commit 53fc86eac1
13 changed files with 274 additions and 42 deletions
+6 -6
View File
@@ -24,9 +24,9 @@
inkscape:deskcolor="#d1d1d1" inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm" inkscape:document-units="mm"
showgrid="false" showgrid="false"
inkscape:zoom="0.4788028" inkscape:zoom="0.1197007"
inkscape:cx="401.00016" inkscape:cx="401.00016"
inkscape:cy="536.75542" inkscape:cy="534.66688"
inkscape:window-width="1280" inkscape:window-width="1280"
inkscape:window-height="955" inkscape:window-height="955"
inkscape:window-x="0" inkscape:window-x="0"
@@ -60,13 +60,13 @@
cy="130.65985" cy="130.65985"
rx="58.309181" rx="58.309181"
ry="59.124962" /><rect ry="59.124962" /><rect
style="opacity:1;fill:#ffd94c;fill-opacity:1;stroke:#002c4b;stroke-width:5.20470192;stroke-dasharray:none;stroke-opacity:1" style="opacity:1;fill:#ffd94c;fill-opacity:1;stroke:#002c4b;stroke-width:5.2047;stroke-dasharray:none;stroke-opacity:1"
id="rect19171" id="rect19171"
width="29.379753" width="29.379753"
height="71.695152" height="71.695152"
x="6.2042341" x="-66.424156"
y="213.894" y="209.20107"
transform="matrix(0.83241568,-0.55415173,0.5397341,0.84183555,0,0)" transform="matrix(0.62830658,-0.77796584,0.76703009,0.64161113,0,0)"
ry="10.170691" /><g ry="10.170691" /><g
id="g20147" id="g20147"
transform="matrix(0.21704782,0,0,0.21704782,70.968773,95.919594)"><polygon transform="matrix(0.21704782,0,0,0.21704782,70.968773,95.919594)"><polygon

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

+1 -1
View File
@@ -2,7 +2,7 @@
sidebar_position: 1 sidebar_position: 1
--- ---
# Tutorial Intro # Getting Started
Let's discover **Docusaurus in less than 5 minutes**. Let's discover **Docusaurus in less than 5 minutes**.
+3 -3
View File
@@ -1,8 +1,8 @@
{ {
"label": "Tutorial - Basics", "label": "Basics",
"position": 2, "position": 2,
"link": { "link": {
"type": "generated-index", "type": "generated-index",
"description": "5 minutes to learn the most important Docusaurus concepts." "description": "Learn all the basic concepts of Fl-Query as well as the practical use-cases that can enhance your development experience"
} }
} }
+2 -2
View File
@@ -1,13 +1,13 @@
// @ts-check // @ts-check
// Note: type annotations allow type checking and IDEs autocompletion // Note: type annotations allow type checking and IDEs autocompletion
const lightCodeTheme = require('prism-react-renderer/themes/github'); const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula'); const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').Config} */ /** @type {import('@docusaurus/types').Config} */
const config = { const config = {
title: 'Fl-Query', title: 'Fl-Query',
tagline: 'Asynchronous data caching, refetching & invalidation library for Flutter', tagline: 'Async data manager for Flutter',
url: 'https://flquery.com', url: 'https://flquery.com',
baseUrl: '/', baseUrl: '/',
onBrokenLinks: 'throw', onBrokenLinks: 'throw',
@@ -1,17 +1,18 @@
import React from 'react'; import React, { ReactElement } from 'react';
import clsx from 'clsx'; import clsx from 'clsx';
import styles from './styles.module.css'; import styles from './styles.module.css';
type FeatureItem = { type FeatureItem = {
title: string; title: string;
Svg: React.ComponentType<React.ComponentProps<'svg'>>; Svg?: React.ComponentType<React.ComponentProps<'svg'>>;
Png?: string;
description: JSX.Element; description: JSX.Element;
}; };
const FeatureList: FeatureItem[] = [ const FeatureList: FeatureItem[] = [
{ {
title: 'No boilerplate & high code reusability', title: 'No boilerplate & high code reusability',
Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, Png: 'img/no_boilerplate_code.png',
description: ( description: (
<> <>
Fl-Query is designed to be less cluttering + reusable and lets you focus on only the logic you actually want to implement without handling hazard of cached data management Fl-Query is designed to be less cluttering + reusable and lets you focus on only the logic you actually want to implement without handling hazard of cached data management
@@ -20,7 +21,7 @@ const FeatureList: FeatureItem[] = [
}, },
{ {
title: 'Declarative & Easy to use', title: 'Declarative & Easy to use',
Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, Svg: require('@site/static/img/declarative_ui_icon.svg').default,
description: ( description: (
<> <>
Define your logic once and distribute it thousand times. By using Fl-Query you never have to write the same logic twice. It has an easy to understand API that you can learn in only 2-4 hours Define your logic once and distribute it thousand times. By using Fl-Query you never have to write the same logic twice. It has an easy to understand API that you can learn in only 2-4 hours
@@ -29,7 +30,7 @@ const FeatureList: FeatureItem[] = [
}, },
{ {
title: 'Optimistic data with smart refetching', title: 'Optimistic data with smart refetching',
Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, Svg: require('@site/static/img/optimistic_data.svg').default,
description: ( description: (
<> <>
The days of Loading Screen is over. Fetch and update your data transparently without disturbing the user with a Loading Indicator. Update your Data even before a data updates on the server and after finally getting the actual data, replace the predicted data with the real one The days of Loading Screen is over. Fetch and update your data transparently without disturbing the user with a Loading Indicator. Update your Data even before a data updates on the server and after finally getting the actual data, replace the predicted data with the real one
@@ -38,11 +39,12 @@ const FeatureList: FeatureItem[] = [
}, },
]; ];
function Feature({ title, Svg, description }: FeatureItem) { function Feature({ title, Svg, description, Png }: FeatureItem) {
return ( return (
<div className={clsx('col col--4')}> <div className={clsx('col col--4')}>
<div className="text--center"> <div className="text--center">
<Svg className={styles.featureSvg} role="img" /> {Svg && <Svg className={styles.featureSvg} role="img" />}
{Png && <img src={Png} />}
</div> </div>
<div className="text--center padding-horiz--md"> <div className="text--center padding-horiz--md">
<h3>{title}</h3> <h3>{title}</h3>
+3 -3
View File
@@ -8,9 +8,9 @@ import { FiGithub } from "react-icons/fi"
function HomepageHeader() { function HomepageHeader() {
const { siteConfig } = useDocusaurusContext(); const { siteConfig } = useDocusaurusContext();
return ( return (
<header className='flex flex-col space-y-5 h-[65vh] md:p-20' style={{ backgroundImage: "url('img/logo.svg')", backgroundSize: "60% auto", backgroundRepeat: "no-repeat", backgroundPosition: "125%" }}> <header className='flex flex-col space-y-5 h-[65vh] md:p-20' style={{ backgroundImage: "url('img/logo.svg')", backgroundSize: "50% auto", backgroundRepeat: "no-repeat", backgroundPosition: "105%" }}>
<h1 className="text-4xl flex items-center"> <h1 className="text-4xl flex items-center">
<img src="img/logo.svg" className='mt-2' width="40" alt="" /> <img src="img/logo.svg" className='mr-2' width="40" alt="" />
{siteConfig.title} {siteConfig.title}
</h1> </h1>
<p className="text-2xl max-w-[40%]">{siteConfig.tagline}</p> <p className="text-2xl max-w-[40%]">{siteConfig.tagline}</p>
@@ -36,7 +36,7 @@ export default function Home(): JSX.Element {
const { siteConfig } = useDocusaurusContext(); const { siteConfig } = useDocusaurusContext();
return ( return (
<Layout <Layout
title={`${siteConfig.title} - Flutter async data management couldn't anymore easier`} title={`${siteConfig.title} - Flutter async data management couldn't be anymore easier`}
description="Flutter Asynchronous data caching, invalidation, refetching library. React-Query for Flutter. swr for Flutter"> description="Flutter Asynchronous data caching, invalidation, refetching library. React-Query for Flutter. swr for Flutter">
<HomepageHeader /> <HomepageHeader />
<main> <main>
+159
View File
@@ -0,0 +1,159 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="146.80637mm"
height="146.5992mm"
viewBox="0 0 146.80637 146.5992"
version="1.1"
id="svg5"
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
sodipodi:docname="declarative_ui_icon.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#fff6ff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="0.84096521"
inkscape:cx="275.87348"
inkscape:cy="261.60416"
inkscape:window-width="1280"
inkscape:window-height="955"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2">
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Drop Shadow"
id="filter24269"
x="-0.12104988"
y="-0.078437174"
width="1.1994871"
height="1.1977944">
<feFlood
flood-opacity="0.498039"
flood-color="rgb(28,28,28)"
result="flood"
id="feFlood24259" />
<feComposite
in="flood"
in2="SourceGraphic"
operator="in"
result="composite1"
id="feComposite24261" />
<feGaussianBlur
in="composite1"
stdDeviation="4"
result="blur"
id="feGaussianBlur24263" />
<feOffset
dx="-5.21541"
dy="5.00824"
result="offset"
id="feOffset24265" />
<feComposite
in="SourceGraphic"
in2="offset"
operator="over"
result="composite2"
id="feComposite24267" />
</filter>
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-26.059784,-79.060846)">
<circle
style="fill:#ffffff;fill-opacity:1;stroke:#1e4b00;stroke-width:0;filter:url(#filter24269)"
id="path184"
cx="102.07067"
cy="149.85632"
r="61.195477" />
<rect
style="fill:none;fill-opacity:1;stroke:#252525;stroke-width:1.90008;stroke-dasharray:none;stroke-opacity:1"
id="rect1575"
width="65.712097"
height="62.333351"
x="68.547226"
y="120.45725"
ry="1.5667522" />
<path
style="fill:none;fill-opacity:1;stroke:#252525;stroke-width:2;stroke-dasharray:none;stroke-opacity:1"
d="m 68.363588,127.82274 65.954662,0.30681"
id="path8290" />
<path
style="fill:none;fill-opacity:1;stroke:#252525;stroke-width:1.39036;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 71.690101,124.2437 h 5.274696"
id="path9069" />
<path
style="fill:none;fill-opacity:1;stroke:#252525;stroke-width:1.39036;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 78.879933,124.19156 h 5.274696"
id="path9071" />
<path
style="fill:none;fill-opacity:1;stroke:#252525;stroke-width:1.39036;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 86.071503,124.08206 h 5.274696"
id="path9073" />
<rect
style="fill:none;fill-opacity:1;stroke:#252525;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
id="rect10527"
width="23.027994"
height="22.129612"
x="72.654785"
y="131.84364"
ry="1.7344097" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="M 76.342951,131.47065 76.2305,155.56048"
id="path10529" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 81.638622,131.47679 -0.112451,24.08983"
id="path11224" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="M 87.261816,131.16217 87.149365,155.252"
id="path11226" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stroke-opacity:1"
d="m 92.458554,131.00486 -0.112451,24.08983"
id="path11228" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 92.458554,131.00486 -0.112451,24.08983"
id="path11230" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 96.554127,135.2559 -24.08983,-0.11245"
id="path11328" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 96.554127,140.13251 -24.08983,-0.11245"
id="path11330" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 96.554127,145.32374 -24.08983,-0.11245"
id="path11332" />
<path
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 96.554127,150.04304 -24.08983,-0.11245"
id="path11334" />
<path
style="fill:#f86363;fill-opacity:1;stroke:#252525;stroke-width:2;stroke-linecap:square;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1"
d="m 93.305209,161.29344 3.87107,-3.81281 5.171101,5.1711 3.50171,-3.50171 -5.21368,-5.21368 3.70115,-3.70115 -14.794631,-3.72854 z"
id="path16454" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

+17 -16
View File
@@ -2,9 +2,9 @@
<!-- Created with Inkscape (http://www.inkscape.org/) --> <!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg <svg
width="210mm" width="176.92218mm"
height="297mm" height="219.67557mm"
viewBox="0 0 210 297" viewBox="0 0 176.92218 219.67557"
version="1.1" version="1.1"
id="svg5" id="svg5"
xml:space="preserve" xml:space="preserve"
@@ -24,9 +24,9 @@
inkscape:deskcolor="#d1d1d1" inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm" inkscape:document-units="mm"
showgrid="false" showgrid="false"
inkscape:zoom="0.33856471" inkscape:zoom="0.1197007"
inkscape:cx="321.94731" inkscape:cx="401.00016"
inkscape:cy="466.67592" inkscape:cy="534.66688"
inkscape:window-width="1280" inkscape:window-width="1280"
inkscape:window-height="955" inkscape:window-height="955"
inkscape:window-x="0" inkscape:window-x="0"
@@ -36,8 +36,9 @@
id="defs2" /><g id="defs2" /><g
inkscape:label="Layer 1" inkscape:label="Layer 1"
inkscape:groupmode="layer" inkscape:groupmode="layer"
id="layer1"><circle id="layer1"
style="opacity:1;fill:#ff4154;fill-opacity:1;stroke-width:5;stroke:#002c4b;stroke-opacity:1;stroke-dasharray:none" transform="translate(-16.673859,-16.357768)"><circle
style="opacity:1;fill:#ff4154;fill-opacity:1;stroke:#002c4b;stroke-width:5;stroke-dasharray:none;stroke-opacity:1"
id="path4799" id="path4799"
cx="105.13495" cx="105.13495"
cy="131.13918" cy="131.13918"
@@ -59,29 +60,29 @@
cy="130.65985" cy="130.65985"
rx="58.309181" rx="58.309181"
ry="59.124962" /><rect ry="59.124962" /><rect
style="opacity:1;fill:#ffd94c;fill-opacity:1;stroke:#002c4b;stroke-width:5.97667;stroke-dasharray:none;stroke-opacity:1" style="opacity:1;fill:#ffd94c;fill-opacity:1;stroke:#002c4b;stroke-width:5.2047;stroke-dasharray:none;stroke-opacity:1"
id="rect19171" id="rect19171"
width="29.379753" width="29.379753"
height="71.695152" height="71.695152"
x="6.2042341" x="-66.424156"
y="213.894" y="209.20107"
transform="matrix(0.83241568,-0.55415173,0.5397341,0.84183555,0,0)" transform="matrix(0.62830658,-0.77796584,0.76703009,0.64161113,0,0)"
ry="10.170691" /><g ry="10.170691" /><g
id="g20147" id="g20147"
transform="matrix(0.21704782,0,0,0.21704782,70.968773,95.919594)"><polygon transform="matrix(0.21704782,0,0,0.21704782,70.968773,95.919594)"><polygon
class="st0" class="st0"
points="48.8,206.47 255.27,0 157.67,0 0,157.67 " points="48.8,206.47 255.27,0 157.67,0 0,157.67 "
id="polygon20132" id="polygon20132"
style="fill:#ff4154;fill-opacity:1;stroke:#002c4b;stroke-opacity:1;stroke-width:11.51819908;stroke-dasharray:none" /><polygon style="fill:#ff4154;fill-opacity:1;stroke:#002c4b;stroke-width:11.5182;stroke-dasharray:none;stroke-opacity:1" /><polygon
class="st2" class="st2"
points="169.84,230.82 121.13,279.53 158.21,316.61 255.27,316.61 " points="169.84,230.82 121.13,279.53 158.21,316.61 255.27,316.61 "
id="polygon20136" id="polygon20136"
style="fill:#ffd94c;fill-opacity:1;stroke:#002c4b;stroke-width:11.5182;stroke-dasharray:none;stroke-opacity:1" style="fill:#ffd94c;fill-opacity:1;stroke:#002c4b;stroke-width:11.5182;stroke-dasharray:none;stroke-opacity:1"
transform="matrix(0.97207757,0,0,0.97207757,3.4664284,8.1704711)" /><polygon transform="matrix(0.97207757,0,0,0.97207757,3.4664284,8.1704711)" /><polygon
class="st0" class="st0"
points="72.15,229.82 121.13,279.53 169.84,230.82 255.27,145.4 156.57,145.4 " points="156.57,145.4 72.15,229.82 121.13,279.53 169.84,230.82 255.27,145.4 "
id="polygon20134" id="polygon20134"
style="fill:#ff4154;fill-opacity:1;stroke:#002c4b;stroke-opacity:1;stroke-width:11.51819908;stroke-dasharray:none" /><linearGradient style="fill:#ff4154;fill-opacity:1;stroke:#002c4b;stroke-width:11.5182;stroke-dasharray:none;stroke-opacity:1" /><linearGradient
id="SVGID_1_" id="SVGID_1_"
gradientUnits="userSpaceOnUse" gradientUnits="userSpaceOnUse"
x1="-173.6875" x1="-173.6875"
@@ -96,7 +97,7 @@
style="stop-color:#000000;stop-opacity:0" style="stop-color:#000000;stop-opacity:0"
id="stop20142" /></linearGradient><polygon id="stop20142" /></linearGradient><polygon
class="st1" class="st1"
points="121.13,279.53 161.69,266.07 165.72,234.94 " points="161.69,266.07 165.72,234.94 121.13,279.53 "
id="polygon20145" id="polygon20145"
style="fill:url(#SVGID_1_)" /></g></g><style style="fill:url(#SVGID_1_)" /></g></g><style
type="text/css" type="text/css"

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

+59
View File
@@ -0,0 +1,59 @@
<svg xmlns="http://www.w3.org/2000/svg" width="786.714" height="727.778" viewBox="0 0 786.714 727.778" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="Group_89" data-name="Group 89" transform="translate(-247.83 -75.611)">
<path id="Path_1321-436" data-name="Path 1321" d="M939.7,235.558h-4V126.013a63.4,63.4,0,0,0-63.4-63.4H640.213a63.4,63.4,0,0,0-63.4,63.4V726.987a63.4,63.4,0,0,0,63.4,63.4H872.3a63.4,63.4,0,0,0,63.4-63.4V313.534h4Z" transform="translate(-158.255 13)" fill="#e6e6e6"/>
<path id="Path_1322-437" data-name="Path 1322" d="M874.858,79.106H844.563A22.495,22.495,0,0,1,823.735,110.1H690.776a22.495,22.495,0,0,1-20.827-30.991h-28.3a47.348,47.348,0,0,0-47.348,47.348V726.546a47.348,47.348,0,0,0,47.348,47.348h233.2a47.348,47.348,0,0,0,47.348-47.348h0V126.454a47.348,47.348,0,0,0-47.348-47.348Z" transform="translate(-158.255 13)" fill="#fff"/>
<path id="Path_39-438" data-name="Path 39" d="M902.962,550.43H623.343a5.184,5.184,0,0,1-5.178-5.178V475.891a5.184,5.184,0,0,1,5.178-5.178H902.962a5.184,5.184,0,0,1,5.178,5.178v69.362A5.184,5.184,0,0,1,902.962,550.43ZM623.343,472.784a3.11,3.11,0,0,0-3.107,3.107v69.362a3.11,3.11,0,0,0,3.107,3.107H902.962a3.11,3.11,0,0,0,3.107-3.107V475.891a3.11,3.11,0,0,0-3.107-3.107Z" transform="translate(-158.255 13)" fill="#ccc"/>
<circle id="Ellipse_5" data-name="Ellipse 5" cx="21.748" cy="21.748" r="21.748" transform="translate(479.586 501.822)" fill="#ccc"/>
<path id="Path_40-439" data-name="Path 40" d="M709.817,496.073a3.625,3.625,0,1,0,0,7.249H880.7a3.625,3.625,0,1,0,.119-7.249h-171Z" transform="translate(-158.255 13)" fill="#e6e6e6"/>
<path id="Path_41-440" data-name="Path 41" d="M709.817,517.821a3.625,3.625,0,1,0,0,7.25H880.7a3.625,3.625,0,1,0,.119-7.249h-171Z" transform="translate(-158.255 13)" fill="#e6e6e6"/>
<path id="Path_42-441" data-name="Path 42" d="M902.962,666.42H623.343a5.184,5.184,0,0,1-5.178-5.178V591.881a5.184,5.184,0,0,1,5.178-5.178H902.962a5.184,5.184,0,0,1,5.178,5.178v69.362a5.184,5.184,0,0,1-5.178,5.177ZM623.343,588.774a3.11,3.11,0,0,0-3.107,3.107v69.362a3.11,3.11,0,0,0,3.107,3.107H902.962a3.11,3.11,0,0,0,3.107-3.107V591.881a3.11,3.11,0,0,0-3.107-3.107Z" transform="translate(-158.255 13)" fill="#ccc"/>
<circle id="Ellipse_6" data-name="Ellipse 6" cx="21.748" cy="21.748" r="21.748" transform="translate(479.586 617.813)" fill="#ccc"/>
<path id="Path_43-442" data-name="Path 43" d="M709.817,612.063a3.625,3.625,0,1,0,0,7.25H880.7a3.625,3.625,0,1,0,.119-7.249h-171Z" transform="translate(-158.255 13)" fill="#e6e6e6"/>
<path id="Path_44-443" data-name="Path 44" d="M709.817,633.811a3.625,3.625,0,1,0,0,7.25H880.7a3.625,3.625,0,1,0,.119-7.249h-171Z" transform="translate(-158.255 13)" fill="#e6e6e6"/>
<path id="Path_45-444" data-name="Path 45" d="M757.268,406.495a98.343,98.343,0,0,1-98.384-98.3v-.082c0-.206,0-.423.012-.629.3-53.879,44.432-97.756,98.372-97.756a98.384,98.384,0,1,1,.011,196.768h-.011Zm0-194.7a96.519,96.519,0,0,0-96.3,95.749c-.011.22-.011.4-.011.564a96.325,96.325,0,1,0,96.325-96.313Z" transform="translate(-158.255 13)" fill="#ccc"/>
<path id="Path_711-445" data-name="Path 711" d="M678.036,584.1H578.423a2.029,2.029,0,0,1-.372-.03l47.112-81.6a3.3,3.3,0,0,1,5.742,0l31.618,54.763,1.515,2.62Z" transform="translate(-28.044 -221.332)" fill="#ff4154"/>
<path id="Path_1265-446" data-name="Path 1265" d="M395.632,593.142a14.257,14.257,0,0,1-.289,2.868,21.322,21.322,0,0,1-16.65,0,14.262,14.262,0,0,1-.289-2.868c0-5.006,2.549-9.237,6.06-10.651a6.587,6.587,0,1,1,5.107,0C393.083,583.905,395.632,588.136,395.632,593.142Z" transform="translate(490.489 -361.041)" fill="#ff4154"/>
<path id="Path_1362-447" data-name="Path 1362" d="M517.266,138.016l82.121,82.769h38.77v1.3H598.844l-.191-.193-82.312-82.963Z" transform="translate(-193.821 308.484)" fill="#ccc"/>
<path id="Path_45-2-448" data-name="Path 45" d="M694.141,280.24a35.242,35.242,0,0,1-35.257-35.228v-.029c0-.074,0-.152,0-.225a35.257,35.257,0,1,1,35.257,35.482h0Zm0-69.773a34.589,34.589,0,0,0-34.51,34.313c0,.079,0,.143,0,.2a34.519,34.519,0,1,0,34.519-34.515Z" transform="translate(-397.884 181.512)" fill="#3f3d56"/>
<path id="Path_1363-449" data-name="Path 1363" d="M517.266,138.016l82.121,82.769h38.77v1.3H598.844l-.191-.193-82.312-82.962Z" transform="translate(-193.821 431.666)" fill="#ccc"/>
<path id="Path_45-3-450" data-name="Path 45" d="M694.141,209.726a35.242,35.242,0,0,0-35.257,35.228v.029c0,.074,0,.152,0,.225a35.257,35.257,0,1,0,35.257-35.482h0Zm0,69.773a34.589,34.589,0,0,1-34.51-34.313c0-.079,0-.143,0-.2A34.519,34.519,0,1,1,694.146,279.5Z" transform="translate(-397.884 303.775)" fill="#3f3d56"/>
<rect id="Rectangle_31" data-name="Rectangle 31" width="18.746" height="3.758" transform="translate(307.185 423.994) rotate(90)" fill="#ccc"/>
<rect id="Rectangle_32" data-name="Rectangle 32" width="32.493" height="3.758" transform="translate(298.138 410.25) rotate(90)" fill="#ff4154"/>
<rect id="Rectangle_38" data-name="Rectangle 38" width="24.397" height="3.758" transform="translate(289.091 418.346) rotate(90)" fill="#ff4154"/>
<circle id="Ellipse_193" data-name="Ellipse 193" cx="3.936" cy="3.936" r="3.936" transform="translate(281.209 544.822)" fill="#ff4154" opacity="0.8"/>
<circle id="Ellipse_194" data-name="Ellipse 194" cx="3.936" cy="3.936" r="3.936" transform="translate(303.437 544.822)" fill="#ff4154" opacity="0.4"/>
<g id="Group_86" data-name="Group 86" transform="matrix(0.914, -0.407, 0.407, 0.914, 329.877, 386.67)">
<path id="Path_1341-451" data-name="Path 1341" d="M406.822,411.073a1.377,1.377,0,0,0-1.375,1.375v16.046a1.377,1.377,0,0,0,1.375,1.375h27.966a1.377,1.377,0,0,0,1.375-1.375V412.448a1.377,1.377,0,0,0-1.375-1.375Z" transform="translate(0.7 0.389)" fill="#ff4154"/>
<path id="Path_1342-452" data-name="Path 1342" d="M435.439,422.174H413.432a.458.458,0,1,1,0-.917h22.006a.458.458,0,0,1,0,.917Z" transform="translate(-2.93 -4.523)" fill="#fff"/>
<path id="Path_1343-453" data-name="Path 1343" d="M435.439,429.259H413.432a.458.458,0,1,1,0-.917h22.006a.458.458,0,1,1,0,.917Z" transform="translate(-2.93 -7.94)" fill="#fff"/>
<path id="Path_1344-454" data-name="Path 1344" d="M435.439,436.343H413.433a.458.458,0,1,1,0-.917h22.006a.458.458,0,0,1,0,.917Z" transform="translate(-2.93 -11.357)" fill="#fff"/>
</g>
<circle id="Ellipse_195" data-name="Ellipse 195" cx="3.936" cy="3.936" r="3.936" transform="translate(292.323 544.822)" fill="#ff4154" opacity="0.6"/>
<g id="Group_85" data-name="Group 85" transform="translate(295.67 125.32)">
<path id="Path_1375-455" data-name="Path 1375" d="M295.905,535.2a9.138,9.138,0,0,1,5.678-12.81l1.757-32.425L316.9,500l-3.748,29.253a9.187,9.187,0,0,1-17.251,5.944Z" transform="translate(415.135 -72.141)" fill="#ffb7b7"/>
<path id="Path_1376-456" data-name="Path 1376" d="M436.142,541.231a9.138,9.138,0,0,0-3.636-13.532l3.263-32.308-14.949,7.827-.807,29.481a9.187,9.187,0,0,0,16.129,8.532Z" transform="translate(169.818 -72.141)" fill="#ffb7b7"/>
<path id="Path_1377-457" data-name="Path 1377" d="M225.135,591.715h-10.68l-5.082-41.2h15.764Z" transform="translate(460.604 76)" fill="#ffb7b7"/>
<path id="Path_1378-458" data-name="Path 1378" d="M372.985,736.368H351.95a13.405,13.405,0,0,0-13.4,13.4v.436h34.439Z" transform="translate(315.479 -72.141)" fill="#2f2e41"/>
<path id="Path_1379-459" data-name="Path 1379" d="M287.364,585.3l-10.444,2.238-13.6-39.219,15.414-3.3Z" transform="translate(344.431 76)" fill="#ffb7b7"/>
<path id="Path_1380-460" data-name="Path 1380" d="M421.548,729.46l-20.568,4.407h0a13.405,13.405,0,0,0-10.3,15.916l.091.426,33.675-7.215Z" transform="translate(212.181 -72.141)" fill="#2f2e41"/>
<path id="Path_1381-461" data-name="Path 1381" d="M437.648,504.094s11.363,35.119.235,74.833L426.556,626.5l-2.811,105.263L400.808,724.4l-9.345-160.557L348.422,636.9l22.654,87.5-26.052.849-28.132-94.627,24.734-88.3,4.531-21.521Z" transform="translate(267.349 -72.141)" fill="#2f2e41"/>
<path id="Path_1382-462" data-name="Path 1382" d="M330.288,387.463l22.814-13,39.468-2.281,27.377,14.373L408.821,462.88s21.22,30.454,13.483,50.745c-9.549,25.044-93.046,38.109-91.413,13.668,2.577-38.57,6.558-35.91,9.476-54.824,3.2-20.753-19.206-47.363-19.206-47.363Z" transform="translate(281.846 -72.141)" fill="#e6e6e6"/>
<path id="Path_1383-463" data-name="Path 1383" d="M288.136,394.079l2.543-11.022s10.849,1.4,18.368,22.405,20.884,65.272,20.884,65.272l-.7,16.083s5.151,5.951,1.6,8.669,6.419,6.4,1.369,10.266a14.493,14.493,0,0,0-5.293,14.829l-15.514-4.791,1.141-25.324-6.146-19.962-16.426-49.963Z" transform="translate(405.216 -72.141)" fill="#e6e6e6"/>
<path id="Path_1384-464" data-name="Path 1384" d="M442.4,395.958l-3.456-10.689s-6.364-2.6-11.062,12.072-6.928,51.815-6.928,51.815l-9.126,44.27s-3.41,5.638-1.6,7.254-7.963,3.888-2.281,6.882-.49-.645,1.633,6.181c1.394,4.483-.036,6.839-.036,6.839l17.567-3.534,4.791-22.693,10.867-42.191Z" transform="translate(178.091 -72.141)" fill="#e6e6e6"/>
<ellipse id="Ellipse_254" data-name="Ellipse 254" cx="30.298" cy="30.298" rx="30.298" ry="30.298" transform="translate(624.298 229.844)" fill="#2f2e41"/>
<path id="Path_1385-465" data-name="Path 1385" d="M294.261,313.427a63.528,63.528,0,0,1,23.113-14.946c5.587-2.07,11.668-3.349,17.509-2.173s11.365,5.216,12.995,10.947c1.332,4.686-.043,9.732-2.111,14.144s-4.829,8.5-6.5,13.078A29.85,29.85,0,0,0,369.3,374.505c-5.739.77-11.03,3.467-16.639,4.9s-12.231,1.338-16.4-2.681c-4.411-4.252-4.5-11.166-4.286-17.289l.951-27.306c.162-4.642.3-9.432-1.374-13.765s-5.652-8.126-10.3-8.087c-3.52.03-6.636,2.162-9.458,4.265s-5.811,4.347-9.317,4.659-7.509-2.282-7.247-5.792Z" transform="translate(363.447 -72.141)" fill="#2f2e41"/>
<ellipse id="Ellipse_255" data-name="Ellipse 255" cx="22.302" cy="22.302" rx="22.302" ry="22.302" transform="translate(642.678 301.545) rotate(-118.663)" fill="#ffb7b7"/>
<path id="Path_1386-466" data-name="Path 1386" d="M354.16,341.731h32.2l.33-4.624,1.651,4.624H393.3l.654-9.164,3.273,9.164h9.6v-.454a24.09,24.09,0,0,0-24.063-24.063h-4.54a24.09,24.09,0,0,0-24.063,24.063Z" transform="translate(266.023 -72.141)" fill="#2f2e41"/>
<path id="Path_1387-467" data-name="Path 1387" d="M357.5,358.351l11.76-11.773,1.983-26.061H345.282l.643.642C354.867,330.089,364.52,343.194,357.5,358.351Z" transform="translate(310.486 -72.141)" fill="#2f2e41"/>
</g>
<path id="Path_944-468" data-name="Path 944" d="M1006.459,659.044H237.982a1,1,0,1,1,0-2h768.477a1,1,0,1,1,0,2Z" transform="translate(10.882 144.346)" fill="#e6e6e6"/>
<g id="Group_58" data-name="Group 58" transform="translate(324.445 741.219)">
<path id="Path_438-469" data-name="Path 438" d="M264.378,626.53a12.8,12.8,0,0,0,12.364-2.178c4.33-3.635,5.688-9.623,6.793-15.168l3.268-16.4-6.841,4.711c-4.92,3.388-9.95,6.884-13.356,11.79s-4.893,11.6-2.156,16.914" transform="translate(-262.92 -592.784)" fill="#e6e6e6"/>
<path id="Path_439-470" data-name="Path 439" d="M266.983,697.106c-.861-6.273-1.747-12.627-1.143-18.967a29.832,29.832,0,0,1,5.752-15.64,26.018,26.018,0,0,1,6.675-6.049c.668-.421,1.282.637.617,1.056a24.735,24.735,0,0,0-9.784,11.805c-2.13,5.418-2.472,11.324-2.105,17.079.222,3.48.692,6.938,1.167,10.391a.634.634,0,0,1-.427.752.615.615,0,0,1-.752-.427Z" transform="translate(-264.469 -642.364)" fill="#f2f2f2"/>
<path id="Path_442-471" data-name="Path 442" d="M289.28,708.161a9.425,9.425,0,0,0,8.212,4.238c4.157-.2,7.623-3.1,10.743-5.853l9.228-8.147-6.107-.292c-4.392-.21-8.9-.406-13.08.948s-8.041,4.614-8.806,8.944" transform="translate(-280.568 -663.484)" fill="#e6e6e6"/>
<path id="Path_443-472" data-name="Path 443" d="M262.845,737.661c4.145-7.335,8.953-15.486,17.544-18.092a19.578,19.578,0,0,1,7.379-.762c.783.068.588,1.275-.194,1.208a18.188,18.188,0,0,0-11.776,3.116,30.61,30.61,0,0,0-8.094,8.735c-1.34,2.041-2.541,4.169-3.742,6.294C263.579,738.839,262.457,738.349,262.845,737.661Z" transform="translate(-262.765 -679.313)" fill="#f2f2f2"/>
</g>
<path id="Path_45-4-473" data-name="Path 45" d="M694.141,280.24a35.242,35.242,0,0,1-35.257-35.228v-.029c0-.074,0-.152,0-.225a35.257,35.257,0,1,1,35.257,35.482h0Zm0-69.773a34.589,34.589,0,0,0-34.51,34.313c0,.079,0,.143,0,.2a34.519,34.519,0,1,0,34.519-34.515Z" transform="translate(183.469 -22.258)" fill="#3f3d56"/>
<path id="Path_1414-474" data-name="Path 1414" d="M637.231,138.016l-82.121,82.769h-38.77v1.3h39.313l.191-.193,82.312-82.962Z" transform="translate(204.196 99.023)" fill="#ccc"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

@@ -62,6 +62,8 @@ Query<T, Outside> useQuery<T extends Object, Outside>({
}, []); }, []);
useEffect(() { useEffect(() {
final hasOnErrorChanged = oldOnError != onError && oldOnError != null;
final hasOnDataChanged = oldOnData != onData && oldOnData != null;
if (oldJob != null && oldJob.queryKey != job.queryKey) { if (oldJob != null && oldJob.queryKey != job.queryKey) {
disposeQuery(); disposeQuery();
query.value = Query.fromOptions( query.value = Query.fromOptions(
@@ -80,12 +82,14 @@ Query<T, Outside> useQuery<T extends Object, Outside>({
onError: onError, onError: onError,
key: uKey, key: uKey,
); );
if (hasOnDataChanged) query.value.onDataListeners.remove(oldOnData);
if (hasOnErrorChanged) query.value.onErrorListeners.remove(oldOnError);
} else { } else {
if (oldOnData != onData && oldOnData != null) { if (hasOnDataChanged) {
query.value.onDataListeners.remove(oldOnData); query.value.onDataListeners.remove(oldOnData);
if (onData != null) query.value.onDataListeners.add(onData); if (onData != null) query.value.onDataListeners.add(onData);
} }
if (oldOnError != onError && oldOnError != null) { if (hasOnErrorChanged) {
query.value.onErrorListeners.remove(oldOnError); query.value.onErrorListeners.remove(oldOnError);
if (onError != null) query.value.onErrorListeners.add(onError); if (onError != null) query.value.onErrorListeners.add(onError);
} }
+9 -2
View File
@@ -65,6 +65,11 @@ class _QueryBuilderState<T extends Object, Outside>
@override @override
void didUpdateWidget(covariant oldWidget) { void didUpdateWidget(covariant oldWidget) {
final hasOnErrorChanged =
oldWidget.onError != widget.onError && oldWidget.onError != null;
final hasOnDataChanged =
oldWidget.onData != widget.onData && oldWidget.onData != null;
// re-init the query-builder when new queryJob is appended // re-init the query-builder when new queryJob is appended
if (oldWidget.job.queryKey != widget.job.queryKey) { if (oldWidget.job.queryKey != widget.job.queryKey) {
_queryDispose(); _queryDispose();
@@ -79,12 +84,14 @@ class _QueryBuilderState<T extends Object, Outside>
onError: widget.onError, onError: widget.onError,
key: uKey, key: uKey,
); );
if (hasOnDataChanged) query?.onDataListeners.remove(oldWidget.onData);
if (hasOnErrorChanged) query?.onErrorListeners.remove(oldWidget.onError);
} else { } else {
if (oldWidget.onData != widget.onData && oldWidget.onData != null) { if (hasOnDataChanged) {
query?.onDataListeners.remove(oldWidget.onData); query?.onDataListeners.remove(oldWidget.onData);
if (widget.onData != null) query?.onDataListeners.add(widget.onData!); if (widget.onData != null) query?.onDataListeners.add(widget.onData!);
} }
if (oldWidget.onError != widget.onError && oldWidget.onError != null) { if (hasOnErrorChanged) {
query?.onErrorListeners.remove(oldWidget.onError); query?.onErrorListeners.remove(oldWidget.onError);
if (widget.onError != null) if (widget.onError != null)
query?.onErrorListeners.add(widget.onError!); query?.onErrorListeners.add(widget.onError!);