Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: remove appflowy-board (#1819)

Nathan.fooo5004729b72f0
diff --git a/frontend/app_flowy/packages/appflowy_board/.gitignore b/frontend/app_flowy/packages/appflowy_board/.gitignore
deleted file mode 100644
index 96486fd930..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/.gitignore
+++ /dev/null
@@ -1,30 +0,0 @@
-# Miscellaneous
-*.class
-*.log
-*.pyc
-*.swp
-.DS_Store
-.atom/
-.buildlog/
-.history
-.svn/
-migrate_working_dir/
-
-# IntelliJ related
-*.iml
-*.ipr
-*.iws
-.idea/
-
-# The .vscode folder contains launch configuration and tasks you configure in
-# VS Code which you may wish to be included in version control, so this line
-# is commented out by default.
-#.vscode/
-
-# Flutter/Dart/Pub related
-# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
-/pubspec.lock
-**/doc/api/
-.dart_tool/
-.packages
-build/
diff --git a/frontend/app_flowy/packages/appflowy_board/.metadata b/frontend/app_flowy/packages/appflowy_board/.metadata
deleted file mode 100644
index e7011f64f3..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/.metadata
+++ /dev/null
@@ -1,10 +0,0 @@
-# This file tracks properties of this Flutter project.
-# Used by Flutter tool to assess capabilities and perform upgrades etc.
-#
-# This file should be version controlled and should not be manually edited.
-
-version:
- revision: f1875d570e39de09040c8f79aa13cc56baab8db1
- channel: stable
-
-project_type: package
diff --git a/frontend/app_flowy/packages/appflowy_board/CHANGELOG.md b/frontend/app_flowy/packages/appflowy_board/CHANGELOG.md
deleted file mode 100644
index a4d3ca722b..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/CHANGELOG.md
+++ /dev/null
@@ -1,36 +0,0 @@
-# 0.0.9
-* Enable slide to select text in card
-* Fix some bugs
-
-# 0.0.8
-* Enable drag and drop group
-
-# 0.0.7
-* Rename some classes
-* Add documentation
-
-# 0.0.6
-* Support scroll to bottom
-* Fix some bugs
-
-# 0.0.5
-* Optimize insert card animation
-* Enable insert card at the end of the group
-* Fix some bugs
-
-# 0.0.4
-* Fix some bugs
-
-# 0.0.3
-* Support customize UI
-* Update example
-* Add AppFlowy style widget
-
-# 0.0.2
-
-* Update documentation
-
-# 0.0.1
-
-* Support drag and drop group items from one to another
-
diff --git a/frontend/app_flowy/packages/appflowy_board/LICENSE b/frontend/app_flowy/packages/appflowy_board/LICENSE
deleted file mode 100644
index 0ad25db4bd..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/LICENSE
+++ /dev/null
@@ -1,661 +0,0 @@
- GNU AFFERO GENERAL PUBLIC LICENSE
- Version 3, 19 November 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU Affero General Public License is a free, copyleft license for
-software and other kinds of works, specifically designed to ensure
-cooperation with the community in the case of network server software.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-our General Public Licenses are intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- Developers that use our General Public Licenses protect your rights
-with two steps: (1) assert copyright on the software, and (2) offer
-you this License which gives you legal permission to copy, distribute
-and/or modify the software.
-
- A secondary benefit of defending all users' freedom is that
-improvements made in alternate versions of the program, if they
-receive widespread use, become available for other developers to
-incorporate. Many developers of free software are heartened and
-encouraged by the resulting cooperation. However, in the case of
-software used on network servers, this result may fail to come about.
-The GNU General Public License permits making a modified version and
-letting the public access it on a server without ever releasing its
-source code to the public.
-
- The GNU Affero General Public License is designed specifically to
-ensure that, in such cases, the modified source code becomes available
-to the community. It requires the operator of a network server to
-provide the source code of the modified version running there to the
-users of that server. Therefore, public use of a modified version, on
-a publicly accessible server, gives the public access to the source
-code of the modified version.
-
- An older license, called the Affero General Public License and
-published by Affero, was designed to accomplish similar goals. This is
-a different license, not a version of the Affero GPL, but Affero has
-released a new version of the Affero GPL which permits relicensing under
-this license.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU Affero General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Remote Network Interaction; Use with the GNU General Public License.
-
- Notwithstanding any other provision of this License, if you modify the
-Program, your modified version must prominently offer all users
-interacting with it remotely through a computer network (if your version
-supports such interaction) an opportunity to receive the Corresponding
-Source of your version by providing access to the Corresponding Source
-from a network server at no charge, through some standard or customary
-means of facilitating copying of software. This Corresponding Source
-shall include the Corresponding Source for any work covered by version 3
-of the GNU General Public License that is incorporated pursuant to the
-following paragraph.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the work with which it is combined will remain governed by version
-3 of the GNU General Public License.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU Affero General Public License from time to time. Such new versions
-will be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU Affero General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU Affero General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU Affero General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published
- by the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If your software can interact with users remotely through a computer
-network, you should also make sure that it provides a way for users to
-get its source. For example, if your program is a web application, its
-interface could display a "Source" link that leads users to an archive
-of the code. There are many ways you could offer source, and different
-solutions will be better for different programs; see section 13 for the
-specific requirements.
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU AGPL, see
-<https://www.gnu.org/licenses/>.
diff --git a/frontend/app_flowy/packages/appflowy_board/README.md b/frontend/app_flowy/packages/appflowy_board/README.md
deleted file mode 100644
index 7d879a491b..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/README.md
+++ /dev/null
@@ -1,140 +0,0 @@
-# appflowy_board
-
-<h1 align="center"><b>AppFlowy Board</b></h1>
-
-<p align="center">A customizable and draggable Kanban Board widget for Flutter</p>
-
-<p align="center">
- <a href="https://discord.gg/ZCCYN4Anzq"><b>Discord</b></a> •
- <a href="https://twitter.com/appflowy"><b>Twitter</b></a>
-</p>
-
-
-<p align="center">
-<img src="https://github.com/AppFlowy-IO/AppFlowy/blob/main/frontend/app_flowy/packages/appflowy_board/example/gifs/appflowy_board_video_1.gif?raw=true" width="680" title="AppFlowyBoard">
-</p>
-
-## Intro
-
-appflowy_board is a customizable and draggable Kanban Board widget for Flutter.
-You can use it to create a Kanban Board tool like those in Trello.
-
-Check out [AppFlowy](https://github.com/AppFlowy-IO/AppFlowy) to see how appflowy_board is used to build a BoardView database.
-<p align="center">
-<img src="https://github.com/AppFlowy-IO/AppFlowy/blob/main/frontend/app_flowy/packages/appflowy_board/example/gifs/appflowy_board_video_2.gif?raw=true" width="680" title="AppFlowyBoard">
-</p>
-
-
-## Getting Started
-Add the AppFlowy Board [Flutter package](https://docs.flutter.dev/development/packages-and-plugins/using-packages) to your environment.
-
-With Flutter:
-```dart
-flutter pub add appflowy_board
-flutter pub get
-```
-
-This will add a line like this to your package's pubspec.yaml:
-```dart
-dependencies:
- appflowy_board: ^0.0.6
-```
-
-## Create your first board
-
-Initialize an `AppFlowyBoardController` for the board. It contains the data used by the board. You can
-register callbacks to receive the changes of the board.
-
-```dart
-
-final AppFlowyBoardController controller = AppFlowyBoardController(
- onMoveGroup: (fromGroupId, fromIndex, toGroupId, toIndex) {
- debugPrint('Move item from $fromIndex to $toIndex');
- },
- onMoveGroupItem: (groupId, fromIndex, toIndex) {
- debugPrint('Move $groupId:$fromIndex to $groupId:$toIndex');
- },
- onMoveGroupItemToGroup: (fromGroupId, fromIndex, toGroupId, toIndex) {
- debugPrint('Move $fromGroupId:$fromIndex to $toGroupId:$toIndex');
- },
-);
-```
-
-Provide an initial value of the board by initializing the `AppFlowyGroupData`. It represents a group data and contains list of items. Each item displayed in the group requires to implement the `AppFlowyGroupItem` class.
-
-```dart
-
-void initState() {
- final group1 = AppFlowyGroupData(id: "To Do", items: [
- TextItem("Card 1"),
- TextItem("Card 2"),
- ]);
- final group2 = AppFlowyGroupData(id: "In Progress", items: [
- TextItem("Card 3"),
- TextItem("Card 4"),
- ]);
-
- final group3 = AppFlowyGroupData(id: "Done", items: []);
-
- controller.addGroup(group1);
- controller.addGroup(group2);
- controller.addGroup(group3);
- super.initState();
-}
-
-class TextItem extends AppFlowyGroupItem {
- final String s;
- TextItem(this.s);
-
- @override
- String get id => s;
-}
-
-```
-
-Finally, return a `AppFlowyBoard` widget in the build method.
-
-```dart
-
-@override
-Widget build(BuildContext context) {
- return AppFlowyBoard(
- controller: controller,
- cardBuilder: (context, group, groupItem) {
- final textItem = groupItem as TextItem;
- return AppFlowyGroupCard(
- key: ObjectKey(textItem),
- child: Text(textItem.s),
- );
- },
- groupConstraints: const BoxConstraints.tightFor(width: 240),
- );
-}
-
-```
-
-## Usage Example
-To quickly grasp how it can be used, look at the /example/lib folder.
-First, run main.dart to play with the demo.
-
-
-Second, let's delve into multi_board_list_example.dart to understand a few key components:
-* A Board widget is created via instantiating an `AppFlowyBoard` object.
-* In the `AppFlowyBoard` object, you can find the `AppFlowyBoardController`, which is defined in board_data.dart, is fed with pre-populated mock data. It also contains callback functions to materialize future user data.
-* Three builders: AppFlowyBoardHeaderBuilder, AppFlowyBoardFooterBuilder, AppFlowyBoardCardBuilder. See below image for what they are used for.
-
-
-<p>
-<img src="https://github.com/AppFlowy-IO/AppFlowy/blob/main/frontend/app_flowy/packages/appflowy_board/example/gifs/appflowy_board_builders.jpg?raw=true" width="200" title="AppFlowyBoard">
-</p>
-
-## Glossary
-Please refer to the API documentation.
-
-## Contributing
-Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
-
-Please look at [CONTRIBUTING.md](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/contributing-to-appflowy) for details.
-
-## License
-Distributed under the AGPLv3 License. See [LICENSE](https://github.com/AppFlowy-IO/AppFlowy-Docs/blob/main/LICENSE) for more information.
diff --git a/frontend/app_flowy/packages/appflowy_board/analysis_options.yaml b/frontend/app_flowy/packages/appflowy_board/analysis_options.yaml
deleted file mode 100644
index a5744c1cfb..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/analysis_options.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-include: package:flutter_lints/flutter.yaml
-
-# Additional information about this file can be found at
-# https://dart.dev/guides/language/analysis-options
diff --git a/frontend/app_flowy/packages/appflowy_board/example/.gitignore b/frontend/app_flowy/packages/appflowy_board/example/.gitignore
deleted file mode 100644
index 34802023f3..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/.gitignore
+++ /dev/null
@@ -1,49 +0,0 @@
-# Miscellaneous
-*.class
-*.log
-*.pyc
-*.swp
-.DS_Store
-.atom/
-.buildlog/
-.history
-.svn/
-migrate_working_dir/
-
-# IntelliJ related
-*.iml
-*.ipr
-*.iws
-.idea/
-
-# The .vscode folder contains launch configuration and tasks you configure in
-# VS Code which you may wish to be included in version control, so this line
-# is commented out by default.
-#.vscode/
-
-# Flutter/Dart/Pub related
-**/doc/api/
-**/ios/Flutter/.last_build_id
-.dart_tool/
-.flutter-plugins
-.flutter-plugins-dependencies
-.packages
-.pub-cache/
-.pub/
-/build/
-
-# Web related
-lib/generated_plugin_registrant.dart
-
-# Symbolication related
-app.*.symbols
-
-# Obfuscation related
-app.*.map.json
-
-# Android Studio will place build artifacts here
-/android/app/debug
-/android/app/profile
-/android/app/release
-
-.metadata
\ No newline at end of file
diff --git a/frontend/app_flowy/packages/appflowy_board/example/README.md b/frontend/app_flowy/packages/appflowy_board/example/README.md
deleted file mode 100644
index 2b3fce4c86..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# example
-
-A new Flutter project.
-
-## Getting Started
-
-This project is a starting point for a Flutter application.
-
-A few resources to get you started if this is your first Flutter project:
-
-- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
-- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
-
-For help getting started with Flutter development, view the
-[online documentation](https://docs.flutter.dev/), which offers tutorials,
-samples, guidance on mobile development, and a full API reference.
diff --git a/frontend/app_flowy/packages/appflowy_board/example/analysis_options.yaml b/frontend/app_flowy/packages/appflowy_board/example/analysis_options.yaml
deleted file mode 100644
index 61b6c4de17..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/analysis_options.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
-# This file configures the analyzer, which statically analyzes Dart code to
-# check for errors, warnings, and lints.
-#
-# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
-# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
-# invoked from the command line by running `flutter analyze`.
-
-# The following line activates a set of recommended lints for Flutter apps,
-# packages, and plugins designed to encourage good coding practices.
-include: package:flutter_lints/flutter.yaml
-
-linter:
- # The lint rules applied to this project can be customized in the
- # section below to disable rules from the `package:flutter_lints/flutter.yaml`
- # included above or to enable additional rules. A list of all available lints
- # and their documentation is published at
- # https://dart-lang.github.io/linter/lints/index.html.
- #
- # Instead of disabling a lint rule for the entire project in the
- # section below, it can also be suppressed for a single line of code
- # or a specific dart file by using the `// ignore: name_of_lint` and
- # `// ignore_for_file: name_of_lint` syntax on the line or in the file
- # producing the lint.
- rules:
- # avoid_print: false # Uncomment to disable the `avoid_print` rule
- # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
-
-# Additional information about this file can be found at
-# https://dart.dev/guides/language/analysis-options
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/.gitignore b/frontend/app_flowy/packages/appflowy_board/example/android/.gitignore
deleted file mode 100644
index 6f568019d3..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/android/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-gradle-wrapper.jar
-/.gradle
-/captures/
-/gradlew
-/gradlew.bat
-/local.properties
-GeneratedPluginRegistrant.java
-
-# Remember to never publicly share your keystore.
-# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
-key.properties
-**/*.keystore
-**/*.jks
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/app/build.gradle b/frontend/app_flowy/packages/appflowy_board/example/android/app/build.gradle
deleted file mode 100644
index 4466eba652..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/android/app/build.gradle
+++ /dev/null
@@ -1,71 +0,0 @@
-def localProperties = new Properties()
-def localPropertiesFile = rootProject.file('local.properties')
-if (localPropertiesFile.exists()) {
- localPropertiesFile.withReader('UTF-8') { reader ->
- localProperties.load(reader)
- }
-}
-
-def flutterRoot = localProperties.getProperty('flutter.sdk')
-if (flutterRoot == null) {
- throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
-}
-
-def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
-if (flutterVersionCode == null) {
- flutterVersionCode = '1'
-}
-
-def flutterVersionName = localProperties.getProperty('flutter.versionName')
-if (flutterVersionName == null) {
- flutterVersionName = '1.0'
-}
-
-apply plugin: 'com.android.application'
-apply plugin: 'kotlin-android'
-apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
-
-android {
- compileSdkVersion flutter.compileSdkVersion
- ndkVersion flutter.ndkVersion
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
-
- kotlinOptions {
- jvmTarget = '1.8'
- }
-
- sourceSets {
- main.java.srcDirs += 'src/main/kotlin'
- }
-
- defaultConfig {
- // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
- applicationId "com.appflowy.board.example"
- // 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
- targetSdkVersion flutter.targetSdkVersion
- versionCode flutterVersionCode.toInteger()
- versionName flutterVersionName
- }
-
- buildTypes {
- release {
- // TODO: Add your own signing config for the release build.
- // Signing with the debug keys for now, so `flutter run --release` works.
- signingConfig signingConfigs.debug
- }
- }
-}
-
-flutter {
- source '../..'
-}
-
-dependencies {
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/debug/AndroidManifest.xml b/frontend/app_flowy/packages/appflowy_board/example/android/app/src/debug/AndroidManifest.xml
deleted file mode 100644
index 95bcce0ae3..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/debug/AndroidManifest.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.appflowy.board.example">
- <!-- The INTERNET permission is required for development. Specifically,
- the Flutter tool needs it to communicate with the running application
- to allow setting breakpoints, to provide hot reload, etc.
- -->
- <uses-permission android:name="android.permission.INTERNET"/>
-</manifest>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/AndroidManifest.xml b/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/AndroidManifest.xml
deleted file mode 100644
index 07ba21884a..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.appflowy.board.example">
- <application
- android:label="example"
- android:name="${applicationName}"
- android:icon="@mipmap/ic_launcher">
- <activity
- android:name=".MainActivity"
- android:exported="true"
- android:launchMode="singleTop"
- android:theme="@style/LaunchTheme"
- android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
- android:hardwareAccelerated="true"
- android:windowSoftInputMode="adjustResize">
- <!-- Specifies an Android theme to apply to this Activity as soon as
- the Android process has started. This theme is visible to the user
- while the Flutter UI initializes. After that, this theme continues
- to determine the Window background behind the Flutter UI. -->
- <meta-data
- android:name="io.flutter.embedding.android.NormalTheme"
- android:resource="@style/NormalTheme"
- />
- <intent-filter>
- <action android:name="android.intent.action.MAIN"/>
- <category android:name="android.intent.category.LAUNCHER"/>
- </intent-filter>
- </activity>
- <!-- Don't delete the meta-data below.
- This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
- <meta-data
- android:name="flutterEmbedding"
- android:value="2" />
- </application>
-</manifest>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/kotlin/com/appflowy/board/example/MainActivity.kt b/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/kotlin/com/appflowy/board/example/MainActivity.kt
deleted file mode 100644
index 4cd6f28560..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/kotlin/com/appflowy/board/example/MainActivity.kt
+++ /dev/null
@@ -1,6 +0,0 @@
-package com.appflowy.board.example
-
-import io.flutter.embedding.android.FlutterActivity
-
-class MainActivity: FlutterActivity() {
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/drawable-v21/launch_background.xml b/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/drawable-v21/launch_background.xml
deleted file mode 100644
index f74085f3f6..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/drawable-v21/launch_background.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Modify this file to customize your launch splash screen -->
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="?android:colorBackground" />
-
- <!-- You can insert your own image assets here -->
- <!-- <item>
- <bitmap
- android:gravity="center"
- android:src="@mipmap/launch_image" />
- </item> -->
-</layer-list>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/drawable/launch_background.xml b/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/drawable/launch_background.xml
deleted file mode 100644
index 304732f884..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/drawable/launch_background.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Modify this file to customize your launch splash screen -->
-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:drawable="@android:color/white" />
-
- <!-- You can insert your own image assets here -->
- <!-- <item>
- <bitmap
- android:gravity="center"
- android:src="@mipmap/launch_image" />
- </item> -->
-</layer-list>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
deleted file mode 100644
index db77bb4b7b..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
deleted file mode 100644
index 17987b79bb..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
deleted file mode 100644
index 09d4391482..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
deleted file mode 100644
index d5f1c8d34e..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
deleted file mode 100644
index 4d6372eebd..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/values-night/styles.xml b/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/values-night/styles.xml
deleted file mode 100644
index 06952be745..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/values-night/styles.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
- <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
- <!-- Show a splash screen on the activity. Automatically removed when
- the Flutter engine draws its first frame -->
- <item name="android:windowBackground">@drawable/launch_background</item>
- </style>
- <!-- Theme applied to the Android Window as soon as the process has started.
- This theme determines the color of the Android Window while your
- Flutter UI initializes, as well as behind your Flutter UI while its
- running.
-
- This Theme is only used starting with V2 of Flutter's Android embedding. -->
- <style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
- <item name="android:windowBackground">?android:colorBackground</item>
- </style>
-</resources>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/values/styles.xml b/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/values/styles.xml
deleted file mode 100644
index cb1ef88056..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
- <!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
- <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
- <!-- Show a splash screen on the activity. Automatically removed when
- the Flutter engine draws its first frame -->
- <item name="android:windowBackground">@drawable/launch_background</item>
- </style>
- <!-- Theme applied to the Android Window as soon as the process has started.
- This theme determines the color of the Android Window while your
- Flutter UI initializes, as well as behind your Flutter UI while its
- running.
-
- This Theme is only used starting with V2 of Flutter's Android embedding. -->
- <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
- <item name="android:windowBackground">?android:colorBackground</item>
- </style>
-</resources>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/profile/AndroidManifest.xml b/frontend/app_flowy/packages/appflowy_board/example/android/app/src/profile/AndroidManifest.xml
deleted file mode 100644
index 95bcce0ae3..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/android/app/src/profile/AndroidManifest.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.appflowy.board.example">
- <!-- The INTERNET permission is required for development. Specifically,
- the Flutter tool needs it to communicate with the running application
- to allow setting breakpoints, to provide hot reload, etc.
- -->
- <uses-permission android:name="android.permission.INTERNET"/>
-</manifest>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/build.gradle b/frontend/app_flowy/packages/appflowy_board/example/android/build.gradle
deleted file mode 100644
index 83ae220041..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/android/build.gradle
+++ /dev/null
@@ -1,31 +0,0 @@
-buildscript {
- ext.kotlin_version = '1.6.10'
- repositories {
- google()
- mavenCentral()
- }
-
- dependencies {
- classpath 'com.android.tools.build:gradle:7.1.2'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- }
-}
-
-allprojects {
- repositories {
- google()
- mavenCentral()
- }
-}
-
-rootProject.buildDir = '../build'
-subprojects {
- project.buildDir = "${rootProject.buildDir}/${project.name}"
-}
-subprojects {
- project.evaluationDependsOn(':app')
-}
-
-task clean(type: Delete) {
- delete rootProject.buildDir
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/gradle.properties b/frontend/app_flowy/packages/appflowy_board/example/android/gradle.properties
deleted file mode 100644
index 94adc3a3f9..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/android/gradle.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-org.gradle.jvmargs=-Xmx1536M
-android.useAndroidX=true
-android.enableJetifier=true
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/gradle/wrapper/gradle-wrapper.properties b/frontend/app_flowy/packages/appflowy_board/example/android/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index cc5527d781..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/android/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Fri Jun 23 08:50:38 CEST 2017
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
diff --git a/frontend/app_flowy/packages/appflowy_board/example/android/settings.gradle b/frontend/app_flowy/packages/appflowy_board/example/android/settings.gradle
deleted file mode 100644
index 44e62bcf06..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/android/settings.gradle
+++ /dev/null
@@ -1,11 +0,0 @@
-include ':app'
-
-def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
-def properties = new Properties()
-
-assert localPropertiesFile.exists()
-localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
-
-def flutterSdkPath = properties.getProperty("flutter.sdk")
-assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
-apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
diff --git a/frontend/app_flowy/packages/appflowy_board/example/gifs/appflowy_board_builders.jpg b/frontend/app_flowy/packages/appflowy_board/example/gifs/appflowy_board_builders.jpg
deleted file mode 100644
index 76a9fb67f8..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/gifs/appflowy_board_builders.jpg and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/gifs/appflowy_board_video_1.gif b/frontend/app_flowy/packages/appflowy_board/example/gifs/appflowy_board_video_1.gif
deleted file mode 100644
index bf1345608e..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/gifs/appflowy_board_video_1.gif and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/gifs/appflowy_board_video_2.gif b/frontend/app_flowy/packages/appflowy_board/example/gifs/appflowy_board_video_2.gif
deleted file mode 100644
index d2a29020ed..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/gifs/appflowy_board_video_2.gif and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/.gitignore b/frontend/app_flowy/packages/appflowy_board/example/ios/.gitignore
deleted file mode 100644
index 7a7f9873ad..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/.gitignore
+++ /dev/null
@@ -1,34 +0,0 @@
-**/dgph
-*.mode1v3
-*.mode2v3
-*.moved-aside
-*.pbxuser
-*.perspectivev3
-**/*sync/
-.sconsign.dblite
-.tags*
-**/.vagrant/
-**/DerivedData/
-Icon?
-**/Pods/
-**/.symlinks/
-profile
-xcuserdata
-**/.generated/
-Flutter/App.framework
-Flutter/Flutter.framework
-Flutter/Flutter.podspec
-Flutter/Generated.xcconfig
-Flutter/ephemeral/
-Flutter/app.flx
-Flutter/app.zip
-Flutter/flutter_assets/
-Flutter/flutter_export_environment.sh
-ServiceDefinitions.json
-Runner/GeneratedPluginRegistrant.*
-
-# Exceptions to above rules.
-!default.mode1v3
-!default.mode2v3
-!default.pbxuser
-!default.perspectivev3
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Flutter/AppFrameworkInfo.plist b/frontend/app_flowy/packages/appflowy_board/example/ios/Flutter/AppFrameworkInfo.plist
deleted file mode 100644
index 8d4492f977..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Flutter/AppFrameworkInfo.plist
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>en</string>
- <key>CFBundleExecutable</key>
- <string>App</string>
- <key>CFBundleIdentifier</key>
- <string>io.flutter.flutter.app</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>App</string>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1.0</string>
- <key>MinimumOSVersion</key>
- <string>9.0</string>
-</dict>
-</plist>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Flutter/Debug.xcconfig b/frontend/app_flowy/packages/appflowy_board/example/ios/Flutter/Debug.xcconfig
deleted file mode 100644
index 592ceee85b..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Flutter/Debug.xcconfig
+++ /dev/null
@@ -1 +0,0 @@
-#include "Generated.xcconfig"
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Flutter/Release.xcconfig b/frontend/app_flowy/packages/appflowy_board/example/ios/Flutter/Release.xcconfig
deleted file mode 100644
index 592ceee85b..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Flutter/Release.xcconfig
+++ /dev/null
@@ -1 +0,0 @@
-#include "Generated.xcconfig"
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcodeproj/project.pbxproj b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcodeproj/project.pbxproj
deleted file mode 100644
index 74374c8530..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,481 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 50;
- objects = {
-
-/* Begin PBXBuildFile section */
- 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
- 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
- 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
- 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
- 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
- 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 10;
- files = (
- );
- name = "Embed Frameworks";
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
- 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
- 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
- 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
- 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
- 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
- 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
- 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
- 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
- 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
- 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
- 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
- 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 97C146EB1CF9000F007C117D /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 9740EEB11CF90186004384FC /* Flutter */ = {
- isa = PBXGroup;
- children = (
- 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
- 9740EEB21CF90195004384FC /* Debug.xcconfig */,
- 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
- 9740EEB31CF90195004384FC /* Generated.xcconfig */,
- );
- name = Flutter;
- sourceTree = "<group>";
- };
- 97C146E51CF9000F007C117D = {
- isa = PBXGroup;
- children = (
- 9740EEB11CF90186004384FC /* Flutter */,
- 97C146F01CF9000F007C117D /* Runner */,
- 97C146EF1CF9000F007C117D /* Products */,
- );
- sourceTree = "<group>";
- };
- 97C146EF1CF9000F007C117D /* Products */ = {
- isa = PBXGroup;
- children = (
- 97C146EE1CF9000F007C117D /* Runner.app */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- 97C146F01CF9000F007C117D /* Runner */ = {
- isa = PBXGroup;
- children = (
- 97C146FA1CF9000F007C117D /* Main.storyboard */,
- 97C146FD1CF9000F007C117D /* Assets.xcassets */,
- 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
- 97C147021CF9000F007C117D /* Info.plist */,
- 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
- 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
- 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
- 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
- );
- path = Runner;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 97C146ED1CF9000F007C117D /* Runner */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
- buildPhases = (
- 9740EEB61CF901F6004384FC /* Run Script */,
- 97C146EA1CF9000F007C117D /* Sources */,
- 97C146EB1CF9000F007C117D /* Frameworks */,
- 97C146EC1CF9000F007C117D /* Resources */,
- 9705A1C41CF9048500538489 /* Embed Frameworks */,
- 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = Runner;
- productName = Runner;
- productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 97C146E61CF9000F007C117D /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastUpgradeCheck = 1300;
- ORGANIZATIONNAME = "";
- TargetAttributes = {
- 97C146ED1CF9000F007C117D = {
- CreatedOnToolsVersion = 7.3.1;
- LastSwiftMigration = 1100;
- };
- };
- };
- buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
- compatibilityVersion = "Xcode 9.3";
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = 97C146E51CF9000F007C117D;
- productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 97C146ED1CF9000F007C117D /* Runner */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 97C146EC1CF9000F007C117D /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
- 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
- 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
- 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
- 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Thin Binary";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
- };
- 9740EEB61CF901F6004384FC /* Run Script */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "Run Script";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
- };
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 97C146EA1CF9000F007C117D /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
- 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXVariantGroup section */
- 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- 97C146FB1CF9000F007C117D /* Base */,
- );
- name = Main.storyboard;
- sourceTree = "<group>";
- };
- 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
- isa = PBXVariantGroup;
- children = (
- 97C147001CF9000F007C117D /* Base */,
- );
- name = LaunchScreen.storyboard;
- sourceTree = "<group>";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- 249021D3217E4FDB00AE95B9 /* Profile */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = iphoneos;
- SUPPORTED_PLATFORMS = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- VALIDATE_PRODUCT = YES;
- };
- name = Profile;
- };
- 249021D4217E4FDB00AE95B9 /* Profile */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- ENABLE_BITCODE = NO;
- INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.appflowy.board.example;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
- SWIFT_VERSION = 5.0;
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Profile;
- };
- 97C147031CF9000F007C117D /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = iphoneos;
- TARGETED_DEVICE_FAMILY = "1,2";
- };
- name = Debug;
- };
- 97C147041CF9000F007C117D /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_COMMA = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_STRICT_PROTOTYPES = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CLANG_WARN_UNREACHABLE_CODE = YES;
- CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNDECLARED_SELECTOR = YES;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 9.0;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = iphoneos;
- SUPPORTED_PLATFORMS = iphoneos;
- SWIFT_COMPILATION_MODE = wholemodule;
- SWIFT_OPTIMIZATION_LEVEL = "-O";
- TARGETED_DEVICE_FAMILY = "1,2";
- VALIDATE_PRODUCT = YES;
- };
- name = Release;
- };
- 97C147061CF9000F007C117D /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- ENABLE_BITCODE = NO;
- INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.appflowy.board.example;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 5.0;
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Debug;
- };
- 97C147071CF9000F007C117D /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
- ENABLE_BITCODE = NO;
- INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/Frameworks",
- );
- PRODUCT_BUNDLE_IDENTIFIER = com.appflowy.board.example;
- PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
- SWIFT_VERSION = 5.0;
- VERSIONING_SYSTEM = "apple-generic";
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 97C147031CF9000F007C117D /* Debug */,
- 97C147041CF9000F007C117D /* Release */,
- 249021D3217E4FDB00AE95B9 /* Profile */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 97C147061CF9000F007C117D /* Debug */,
- 97C147071CF9000F007C117D /* Release */,
- 249021D4217E4FDB00AE95B9 /* Profile */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 97C146E61CF9000F007C117D /* Project object */;
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 919434a625..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Workspace
- version = "1.0">
- <FileRef
- location = "self:">
- </FileRef>
-</Workspace>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d981003d..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IDEDidComputeMac32BitWarning</key>
- <true/>
-</dict>
-</plist>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
deleted file mode 100644
index f9b0d7c5ea..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>PreviewsEnabled</key>
- <false/>
-</dict>
-</plist>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
deleted file mode 100644
index c87d15a335..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
- LastUpgradeVersion = "1300"
- version = "1.3">
- <BuildAction
- parallelizeBuildables = "YES"
- buildImplicitDependencies = "YES">
- <BuildActionEntries>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "97C146ED1CF9000F007C117D"
- BuildableName = "Runner.app"
- BlueprintName = "Runner"
- ReferencedContainer = "container:Runner.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- </BuildActionEntries>
- </BuildAction>
- <TestAction
- buildConfiguration = "Debug"
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- shouldUseLaunchSchemeArgsEnv = "YES">
- <MacroExpansion>
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "97C146ED1CF9000F007C117D"
- BuildableName = "Runner.app"
- BlueprintName = "Runner"
- ReferencedContainer = "container:Runner.xcodeproj">
- </BuildableReference>
- </MacroExpansion>
- <Testables>
- </Testables>
- </TestAction>
- <LaunchAction
- buildConfiguration = "Debug"
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- launchStyle = "0"
- useCustomWorkingDirectory = "NO"
- ignoresPersistentStateOnLaunch = "NO"
- debugDocumentVersioning = "YES"
- debugServiceExtension = "internal"
- allowLocationSimulation = "YES">
- <BuildableProductRunnable
- runnableDebuggingMode = "0">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "97C146ED1CF9000F007C117D"
- BuildableName = "Runner.app"
- BlueprintName = "Runner"
- ReferencedContainer = "container:Runner.xcodeproj">
- </BuildableReference>
- </BuildableProductRunnable>
- </LaunchAction>
- <ProfileAction
- buildConfiguration = "Profile"
- shouldUseLaunchSchemeArgsEnv = "YES"
- savedToolIdentifier = ""
- useCustomWorkingDirectory = "NO"
- debugDocumentVersioning = "YES">
- <BuildableProductRunnable
- runnableDebuggingMode = "0">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "97C146ED1CF9000F007C117D"
- BuildableName = "Runner.app"
- BlueprintName = "Runner"
- ReferencedContainer = "container:Runner.xcodeproj">
- </BuildableReference>
- </BuildableProductRunnable>
- </ProfileAction>
- <AnalyzeAction
- buildConfiguration = "Debug">
- </AnalyzeAction>
- <ArchiveAction
- buildConfiguration = "Release"
- revealArchiveInOrganizer = "YES">
- </ArchiveAction>
-</Scheme>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 1d526a16ed..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Workspace
- version = "1.0">
- <FileRef
- location = "group:Runner.xcodeproj">
- </FileRef>
-</Workspace>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d981003d..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IDEDidComputeMac32BitWarning</key>
- <true/>
-</dict>
-</plist>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
deleted file mode 100644
index f9b0d7c5ea..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>PreviewsEnabled</key>
- <false/>
-</dict>
-</plist>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/AppDelegate.swift b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/AppDelegate.swift
deleted file mode 100644
index 70693e4a8c..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/AppDelegate.swift
+++ /dev/null
@@ -1,13 +0,0 @@
-import UIKit
-import Flutter
-
-@UIApplicationMain
-@objc class AppDelegate: FlutterAppDelegate {
- override func application(
- _ application: UIApplication,
- didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
- ) -> Bool {
- GeneratedPluginRegistrant.register(with: self)
- return super.application(application, didFinishLaunchingWithOptions: launchOptions)
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index d36b1fab2d..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,122 +0,0 @@
-{
- "images" : [
- {
- "size" : "20x20",
- "idiom" : "iphone",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "size" : "20x20",
- "idiom" : "iphone",
- "filename" : "[email protected]",
- "scale" : "3x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "[email protected]",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "iphone",
- "filename" : "[email protected]",
- "scale" : "3x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "iphone",
- "filename" : "[email protected]",
- "scale" : "3x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "size" : "60x60",
- "idiom" : "iphone",
- "filename" : "[email protected]",
- "scale" : "3x"
- },
- {
- "size" : "20x20",
- "idiom" : "ipad",
- "filename" : "[email protected]",
- "scale" : "1x"
- },
- {
- "size" : "20x20",
- "idiom" : "ipad",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "[email protected]",
- "scale" : "1x"
- },
- {
- "size" : "29x29",
- "idiom" : "ipad",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "[email protected]",
- "scale" : "1x"
- },
- {
- "size" : "40x40",
- "idiom" : "ipad",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "[email protected]",
- "scale" : "1x"
- },
- {
- "size" : "76x76",
- "idiom" : "ipad",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "size" : "83.5x83.5",
- "idiom" : "ipad",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "size" : "1024x1024",
- "idiom" : "ios-marketing",
- "filename" : "[email protected]",
- "scale" : "1x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index dc9ada4725..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index 28c6bf0301..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index 2ccbfd967d..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index f091b6b0bc..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index 4cde12118d..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index d0ef06e7ed..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index dcdc2306c2..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index 2ccbfd967d..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index c8f9ed8f5c..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index a6d6b8609d..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index a6d6b8609d..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index 75b2d164a5..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index c4df70d39d..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index 6a84f41e14..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected]
deleted file mode 100644
index d0e1f58536..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
deleted file mode 100644
index 0bedcf2fd4..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "filename" : "LaunchImage.png",
- "scale" : "1x"
- },
- {
- "idiom" : "universal",
- "filename" : "[email protected]",
- "scale" : "2x"
- },
- {
- "idiom" : "universal",
- "filename" : "[email protected]",
- "scale" : "3x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
deleted file mode 100644
index 9da19eacad..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
deleted file mode 100644
index 9da19eacad..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected]
deleted file mode 100644
index 9da19eacad..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/[email protected] and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
deleted file mode 100644
index 89c2725b70..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Launch Screen Assets
-
-You can customize the launch screen with your own desired assets by replacing the image files in this directory.
-
-You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
deleted file mode 100644
index f2e259c7c9..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
- <dependencies>
- <deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
- </dependencies>
- <scenes>
- <!--View Controller-->
- <scene sceneID="EHf-IW-A2E">
- <objects>
- <viewController id="01J-lp-oVM" sceneMemberID="viewController">
- <layoutGuides>
- <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
- <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
- </layoutGuides>
- <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <subviews>
- <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
- </imageView>
- </subviews>
- <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
- <constraints>
- <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
- <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
- </constraints>
- </view>
- </viewController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
- </objects>
- <point key="canvasLocation" x="53" y="375"/>
- </scene>
- </scenes>
- <resources>
- <image name="LaunchImage" width="168" height="185"/>
- </resources>
-</document>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Base.lproj/Main.storyboard b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Base.lproj/Main.storyboard
deleted file mode 100644
index f3c28516fb..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Base.lproj/Main.storyboard
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
- <dependencies>
- <deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
- </dependencies>
- <scenes>
- <!--Flutter View Controller-->
- <scene sceneID="tne-QT-ifu">
- <objects>
- <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
- <layoutGuides>
- <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
- <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
- </layoutGuides>
- <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
- <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
- <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
- <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
- </view>
- </viewController>
- <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
- </objects>
- </scene>
- </scenes>
-</document>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Info.plist b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Info.plist
deleted file mode 100644
index 907f329fe0..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Info.plist
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>$(DEVELOPMENT_LANGUAGE)</string>
- <key>CFBundleDisplayName</key>
- <string>Example</string>
- <key>CFBundleExecutable</key>
- <string>$(EXECUTABLE_NAME)</string>
- <key>CFBundleIdentifier</key>
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>example</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>$(FLUTTER_BUILD_NAME)</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>$(FLUTTER_BUILD_NUMBER)</string>
- <key>LSRequiresIPhoneOS</key>
- <true/>
- <key>UILaunchStoryboardName</key>
- <string>LaunchScreen</string>
- <key>UIMainStoryboardFile</key>
- <string>Main</string>
- <key>UISupportedInterfaceOrientations</key>
- <array>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- </array>
- <key>UISupportedInterfaceOrientations~ipad</key>
- <array>
- <string>UIInterfaceOrientationPortrait</string>
- <string>UIInterfaceOrientationPortraitUpsideDown</string>
- <string>UIInterfaceOrientationLandscapeLeft</string>
- <string>UIInterfaceOrientationLandscapeRight</string>
- </array>
- <key>UIViewControllerBasedStatusBarAppearance</key>
- <false/>
- <key>CADisableMinimumFrameDurationOnPhone</key>
- <true/>
-</dict>
-</plist>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Runner-Bridging-Header.h b/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Runner-Bridging-Header.h
deleted file mode 100644
index 308a2a560b..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/ios/Runner/Runner-Bridging-Header.h
+++ /dev/null
@@ -1 +0,0 @@
-#import "GeneratedPluginRegistrant.h"
diff --git a/frontend/app_flowy/packages/appflowy_board/example/lib/main.dart b/frontend/app_flowy/packages/appflowy_board/example/lib/main.dart
deleted file mode 100644
index 9e42611e7e..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/lib/main.dart
+++ /dev/null
@@ -1,59 +0,0 @@
-import 'package:flutter/material.dart';
-import 'single_board_list_example.dart';
-import 'multi_board_list_example.dart';
-
-void main() {
- runApp(const MyApp());
-}
-
-class MyApp extends StatefulWidget {
- const MyApp({Key? key}) : super(key: key);
-
- @override
- State<MyApp> createState() => _MyAppState();
-}
-
-class _MyAppState extends State<MyApp> {
- int _currentIndex = 0;
- final _bottomNavigationColor = Colors.blue;
-
- final List<Widget> _examples = [
- const MultiBoardListExample(),
- const SingleBoardListExample(),
- ];
-
- @override
- void initState() {
- super.initState();
- }
-
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- home: Scaffold(
- appBar: AppBar(
- title: const Text('AppFlowy Board'),
- ),
- body: Container(color: Colors.white, child: _examples[_currentIndex]),
- bottomNavigationBar: BottomNavigationBar(
- fixedColor: _bottomNavigationColor,
- showSelectedLabels: true,
- showUnselectedLabels: false,
- currentIndex: _currentIndex,
- items: [
- BottomNavigationBarItem(
- icon: Icon(Icons.grid_on, color: _bottomNavigationColor),
- label: "MultiColumn"),
- BottomNavigationBarItem(
- icon: Icon(Icons.grid_on, color: _bottomNavigationColor),
- label: "SingleColumn"),
- ],
- onTap: (int index) {
- setState(() {
- _currentIndex = index;
- });
- },
- )),
- );
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/lib/multi_board_list_example.dart b/frontend/app_flowy/packages/appflowy_board/example/lib/multi_board_list_example.dart
deleted file mode 100644
index cad906e755..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/lib/multi_board_list_example.dart
+++ /dev/null
@@ -1,199 +0,0 @@
-import 'package:appflowy_board/appflowy_board.dart';
-import 'package:flutter/material.dart';
-
-class MultiBoardListExample extends StatefulWidget {
- const MultiBoardListExample({Key? key}) : super(key: key);
-
- @override
- State<MultiBoardListExample> createState() => _MultiBoardListExampleState();
-}
-
-class _MultiBoardListExampleState extends State<MultiBoardListExample> {
- final AppFlowyBoardController controller = AppFlowyBoardController(
- onMoveGroup: (fromGroupId, fromIndex, toGroupId, toIndex) {
- debugPrint('Move item from $fromIndex to $toIndex');
- },
- onMoveGroupItem: (groupId, fromIndex, toIndex) {
- debugPrint('Move $groupId:$fromIndex to $groupId:$toIndex');
- },
- onMoveGroupItemToGroup: (fromGroupId, fromIndex, toGroupId, toIndex) {
- debugPrint('Move $fromGroupId:$fromIndex to $toGroupId:$toIndex');
- },
- );
-
- late AppFlowyBoardScrollController boardController;
-
- @override
- void initState() {
- boardController = AppFlowyBoardScrollController();
- final group1 = AppFlowyGroupData(id: "To Do", name: "To Do", items: [
- TextItem("Card 1"),
- TextItem("Card 2"),
- RichTextItem(title: "Card 3", subtitle: 'Aug 1, 2020 4:05 PM'),
- TextItem("Card 4"),
- TextItem("Card 5"),
- TextItem("Card 6"),
- RichTextItem(title: "Card 7", subtitle: 'Aug 1, 2020 4:05 PM'),
- RichTextItem(title: "Card 8", subtitle: 'Aug 1, 2020 4:05 PM'),
- TextItem("Card 9"),
- ]);
-
- final group2 = AppFlowyGroupData(
- id: "In Progress",
- name: "In Progress",
- items: <AppFlowyGroupItem>[
- RichTextItem(title: "Card 10", subtitle: 'Aug 1, 2020 4:05 PM'),
- TextItem("Card 11"),
- ],
- );
-
- final group3 = AppFlowyGroupData(
- id: "Done", name: "Done", items: <AppFlowyGroupItem>[]);
-
- controller.addGroup(group1);
- controller.addGroup(group2);
- controller.addGroup(group3);
-
- super.initState();
- }
-
- @override
- Widget build(BuildContext context) {
- final config = AppFlowyBoardConfig(
- groupBackgroundColor: HexColor.fromHex('#F7F8FC'),
- stretchGroupHeight: false,
- );
- return AppFlowyBoard(
- controller: controller,
- cardBuilder: (context, group, groupItem) {
- return AppFlowyGroupCard(
- key: ValueKey(groupItem.id),
- child: _buildCard(groupItem),
- );
- },
- boardScrollController: boardController,
- footerBuilder: (context, columnData) {
- return AppFlowyGroupFooter(
- icon: const Icon(Icons.add, size: 20),
- title: const Text('New'),
- height: 50,
- margin: config.groupItemPadding,
- onAddButtonClick: () {
- boardController.scrollToBottom(columnData.id);
- },
- );
- },
- headerBuilder: (context, columnData) {
- return AppFlowyGroupHeader(
- icon: const Icon(Icons.lightbulb_circle),
- title: SizedBox(
- width: 60,
- child: TextField(
- controller: TextEditingController()
- ..text = columnData.headerData.groupName,
- onSubmitted: (val) {
- controller
- .getGroupController(columnData.headerData.groupId)!
- .updateGroupName(val);
- },
- ),
- ),
- addIcon: const Icon(Icons.add, size: 20),
- moreIcon: const Icon(Icons.more_horiz, size: 20),
- height: 50,
- margin: config.groupItemPadding,
- );
- },
- groupConstraints: const BoxConstraints.tightFor(width: 240),
- config: config);
- }
-
- Widget _buildCard(AppFlowyGroupItem item) {
- if (item is TextItem) {
- return Align(
- alignment: Alignment.centerLeft,
- child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 30),
- child: Text(item.s),
- ),
- );
- }
-
- if (item is RichTextItem) {
- return RichTextCard(item: item);
- }
-
- throw UnimplementedError();
- }
-}
-
-class RichTextCard extends StatefulWidget {
- final RichTextItem item;
- const RichTextCard({
- required this.item,
- Key? key,
- }) : super(key: key);
-
- @override
- State<RichTextCard> createState() => _RichTextCardState();
-}
-
-class _RichTextCardState extends State<RichTextCard> {
- @override
- void initState() {
- super.initState();
- }
-
- @override
- Widget build(BuildContext context) {
- return Align(
- alignment: Alignment.centerLeft,
- child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 20),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- widget.item.title,
- style: const TextStyle(fontSize: 14),
- textAlign: TextAlign.left,
- ),
- const SizedBox(height: 10),
- Text(
- widget.item.subtitle,
- style: const TextStyle(fontSize: 12, color: Colors.grey),
- )
- ],
- ),
- ),
- );
- }
-}
-
-class TextItem extends AppFlowyGroupItem {
- final String s;
-
- TextItem(this.s);
-
- @override
- String get id => s;
-}
-
-class RichTextItem extends AppFlowyGroupItem {
- final String title;
- final String subtitle;
-
- RichTextItem({required this.title, required this.subtitle});
-
- @override
- String get id => title;
-}
-
-extension HexColor on Color {
- static Color fromHex(String hexString) {
- final buffer = StringBuffer();
- if (hexString.length == 6 || hexString.length == 7) buffer.write('ff');
- buffer.write(hexString.replaceFirst('#', ''));
- return Color(int.parse(buffer.toString(), radix: 16));
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/lib/single_board_list_example.dart b/frontend/app_flowy/packages/appflowy_board/example/lib/single_board_list_example.dart
deleted file mode 100644
index c222856efa..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/lib/single_board_list_example.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-import 'package:flutter/material.dart';
-import 'package:appflowy_board/appflowy_board.dart';
-
-class SingleBoardListExample extends StatefulWidget {
- const SingleBoardListExample({Key? key}) : super(key: key);
-
- @override
- State<SingleBoardListExample> createState() => _SingleBoardListExampleState();
-}
-
-class _SingleBoardListExampleState extends State<SingleBoardListExample> {
- final AppFlowyBoardController boardData = AppFlowyBoardController();
-
- @override
- void initState() {
- final column = AppFlowyGroupData(
- id: "1",
- name: "1",
- items: [
- TextItem("a"),
- TextItem("b"),
- TextItem("c"),
- TextItem("d"),
- ],
- );
-
- boardData.addGroup(column);
- super.initState();
- }
-
- @override
- Widget build(BuildContext context) {
- return AppFlowyBoard(
- controller: boardData,
- cardBuilder: (context, column, columnItem) {
- return _RowWidget(
- item: columnItem as TextItem, key: ObjectKey(columnItem));
- },
- );
- }
-}
-
-class _RowWidget extends StatelessWidget {
- final TextItem item;
- const _RowWidget({Key? key, required this.item}) : super(key: key);
-
- @override
- Widget build(BuildContext context) {
- return Container(
- key: ObjectKey(item),
- height: 60,
- color: Colors.green,
- child: Center(child: Text(item.s)),
- );
- }
-}
-
-class TextItem extends AppFlowyGroupItem {
- final String s;
-
- TextItem(this.s);
-
- @override
- String get id => s;
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/linux/.gitignore b/frontend/app_flowy/packages/appflowy_board/example/linux/.gitignore
deleted file mode 100644
index d3896c9844..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/linux/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-flutter/ephemeral
diff --git a/frontend/app_flowy/packages/appflowy_board/example/linux/CMakeLists.txt b/frontend/app_flowy/packages/appflowy_board/example/linux/CMakeLists.txt
deleted file mode 100644
index 697a9f905a..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/linux/CMakeLists.txt
+++ /dev/null
@@ -1,138 +0,0 @@
-# Project-level configuration.
-cmake_minimum_required(VERSION 3.10)
-project(runner LANGUAGES CXX)
-
-# The name of the executable created for the application. Change this to change
-# the on-disk name of your application.
-set(BINARY_NAME "example")
-# The unique GTK application identifier for this application. See:
-# https://wiki.gnome.org/HowDoI/ChooseApplicationID
-set(APPLICATION_ID "com.appflowy.board.example")
-
-# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
-# versions of CMake.
-cmake_policy(SET CMP0063 NEW)
-
-# Load bundled libraries from the lib/ directory relative to the binary.
-set(CMAKE_INSTALL_RPATH "$ORIGIN/lib")
-
-# Root filesystem for cross-building.
-if(FLUTTER_TARGET_PLATFORM_SYSROOT)
- set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT})
- set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
- set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
- set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
- set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
- set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
-endif()
-
-# Define build configuration options.
-if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
- set(CMAKE_BUILD_TYPE "Debug" CACHE
- STRING "Flutter build mode" FORCE)
- set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
- "Debug" "Profile" "Release")
-endif()
-
-# Compilation settings that should be applied to most targets.
-#
-# Be cautious about adding new options here, as plugins use this function by
-# default. In most cases, you should add new options to specific targets instead
-# of modifying this function.
-function(APPLY_STANDARD_SETTINGS TARGET)
- target_compile_features(${TARGET} PUBLIC cxx_std_14)
- target_compile_options(${TARGET} PRIVATE -Wall -Werror)
- target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>")
- target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>")
-endfunction()
-
-# Flutter library and tool build rules.
-set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
-add_subdirectory(${FLUTTER_MANAGED_DIR})
-
-# System-level dependencies.
-find_package(PkgConfig REQUIRED)
-pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
-
-add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
-
-# Define the application target. To change its name, change BINARY_NAME above,
-# not the value here, or `flutter run` will no longer work.
-#
-# Any new source files that you add to the application should be added here.
-add_executable(${BINARY_NAME}
- "main.cc"
- "my_application.cc"
- "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
-)
-
-# Apply the standard set of build settings. This can be removed for applications
-# that need different build settings.
-apply_standard_settings(${BINARY_NAME})
-
-# Add dependency libraries. Add any application-specific dependencies here.
-target_link_libraries(${BINARY_NAME} PRIVATE flutter)
-target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK)
-
-# Run the Flutter tool portions of the build. This must not be removed.
-add_dependencies(${BINARY_NAME} flutter_assemble)
-
-# Only the install-generated bundle's copy of the executable will launch
-# correctly, since the resources must in the right relative locations. To avoid
-# people trying to run the unbundled copy, put it in a subdirectory instead of
-# the default top-level location.
-set_target_properties(${BINARY_NAME}
- PROPERTIES
- RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run"
-)
-
-# Generated plugin build rules, which manage building the plugins and adding
-# them to the application.
-include(flutter/generated_plugins.cmake)
-
-
-# === Installation ===
-# By default, "installing" just makes a relocatable bundle in the build
-# directory.
-set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle")
-if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
-endif()
-
-# Start with a clean build bundle directory every time.
-install(CODE "
- file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\")
- " COMPONENT Runtime)
-
-set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
-set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib")
-
-install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
- COMPONENT Runtime)
-
-install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
- COMPONENT Runtime)
-
-install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
- COMPONENT Runtime)
-
-foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES})
- install(FILES "${bundled_library}"
- DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
- COMPONENT Runtime)
-endforeach(bundled_library)
-
-# Fully re-copy the assets directory on each build to avoid having stale files
-# from a previous install.
-set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
-install(CODE "
- file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
- " COMPONENT Runtime)
-install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
- DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
-
-# Install the AOT library on non-Debug builds only.
-if(NOT CMAKE_BUILD_TYPE MATCHES "Debug")
- install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
- COMPONENT Runtime)
-endif()
diff --git a/frontend/app_flowy/packages/appflowy_board/example/linux/flutter/CMakeLists.txt b/frontend/app_flowy/packages/appflowy_board/example/linux/flutter/CMakeLists.txt
deleted file mode 100644
index d5bd01648a..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/linux/flutter/CMakeLists.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-# This file controls Flutter-level build steps. It should not be edited.
-cmake_minimum_required(VERSION 3.10)
-
-set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
-
-# Configuration provided via flutter tool.
-include(${EPHEMERAL_DIR}/generated_config.cmake)
-
-# TODO: Move the rest of this into files in ephemeral. See
-# https://github.com/flutter/flutter/issues/57146.
-
-# Serves the same purpose as list(TRANSFORM ... PREPEND ...),
-# which isn't available in 3.10.
-function(list_prepend LIST_NAME PREFIX)
- set(NEW_LIST "")
- foreach(element ${${LIST_NAME}})
- list(APPEND NEW_LIST "${PREFIX}${element}")
- endforeach(element)
- set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
-endfunction()
-
-# === Flutter Library ===
-# System-level dependencies.
-find_package(PkgConfig REQUIRED)
-pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
-pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
-pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
-
-set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
-
-# Published to parent scope for install step.
-set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
-set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
-set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
-set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
-
-list(APPEND FLUTTER_LIBRARY_HEADERS
- "fl_basic_message_channel.h"
- "fl_binary_codec.h"
- "fl_binary_messenger.h"
- "fl_dart_project.h"
- "fl_engine.h"
- "fl_json_message_codec.h"
- "fl_json_method_codec.h"
- "fl_message_codec.h"
- "fl_method_call.h"
- "fl_method_channel.h"
- "fl_method_codec.h"
- "fl_method_response.h"
- "fl_plugin_registrar.h"
- "fl_plugin_registry.h"
- "fl_standard_message_codec.h"
- "fl_standard_method_codec.h"
- "fl_string_codec.h"
- "fl_value.h"
- "fl_view.h"
- "flutter_linux.h"
-)
-list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
-add_library(flutter INTERFACE)
-target_include_directories(flutter INTERFACE
- "${EPHEMERAL_DIR}"
-)
-target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
-target_link_libraries(flutter INTERFACE
- PkgConfig::GTK
- PkgConfig::GLIB
- PkgConfig::GIO
-)
-add_dependencies(flutter flutter_assemble)
-
-# === Flutter tool backend ===
-# _phony_ is a non-existent file to force this command to run every time,
-# since currently there's no way to get a full input/output list from the
-# flutter tool.
-add_custom_command(
- OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
- ${CMAKE_CURRENT_BINARY_DIR}/_phony_
- COMMAND ${CMAKE_COMMAND} -E env
- ${FLUTTER_TOOL_ENVIRONMENT}
- "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
- ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
- VERBATIM
-)
-add_custom_target(flutter_assemble DEPENDS
- "${FLUTTER_LIBRARY}"
- ${FLUTTER_LIBRARY_HEADERS}
-)
diff --git a/frontend/app_flowy/packages/appflowy_board/example/linux/flutter/generated_plugin_registrant.cc b/frontend/app_flowy/packages/appflowy_board/example/linux/flutter/generated_plugin_registrant.cc
deleted file mode 100644
index e71a16d23d..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/linux/flutter/generated_plugin_registrant.cc
+++ /dev/null
@@ -1,11 +0,0 @@
-//
-// Generated file. Do not edit.
-//
-
-// clang-format off
-
-#include "generated_plugin_registrant.h"
-
-
-void fl_register_plugins(FlPluginRegistry* registry) {
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/linux/flutter/generated_plugin_registrant.h b/frontend/app_flowy/packages/appflowy_board/example/linux/flutter/generated_plugin_registrant.h
deleted file mode 100644
index e0f0a47bc0..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/linux/flutter/generated_plugin_registrant.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// Generated file. Do not edit.
-//
-
-// clang-format off
-
-#ifndef GENERATED_PLUGIN_REGISTRANT_
-#define GENERATED_PLUGIN_REGISTRANT_
-
-#include <flutter_linux/flutter_linux.h>
-
-// Registers Flutter plugins.
-void fl_register_plugins(FlPluginRegistry* registry);
-
-#endif // GENERATED_PLUGIN_REGISTRANT_
diff --git a/frontend/app_flowy/packages/appflowy_board/example/linux/flutter/generated_plugins.cmake b/frontend/app_flowy/packages/appflowy_board/example/linux/flutter/generated_plugins.cmake
deleted file mode 100644
index 2e1de87a7e..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/linux/flutter/generated_plugins.cmake
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Generated file, do not edit.
-#
-
-list(APPEND FLUTTER_PLUGIN_LIST
-)
-
-list(APPEND FLUTTER_FFI_PLUGIN_LIST
-)
-
-set(PLUGIN_BUNDLED_LIBRARIES)
-
-foreach(plugin ${FLUTTER_PLUGIN_LIST})
- add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
- target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
- list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
- list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
-endforeach(plugin)
-
-foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
- add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
- list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
-endforeach(ffi_plugin)
diff --git a/frontend/app_flowy/packages/appflowy_board/example/linux/main.cc b/frontend/app_flowy/packages/appflowy_board/example/linux/main.cc
deleted file mode 100644
index e7c5c54370..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/linux/main.cc
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "my_application.h"
-
-int main(int argc, char** argv) {
- g_autoptr(MyApplication) app = my_application_new();
- return g_application_run(G_APPLICATION(app), argc, argv);
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/linux/my_application.cc b/frontend/app_flowy/packages/appflowy_board/example/linux/my_application.cc
deleted file mode 100644
index 0ba8f43096..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/linux/my_application.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-#include "my_application.h"
-
-#include <flutter_linux/flutter_linux.h>
-#ifdef GDK_WINDOWING_X11
-#include <gdk/gdkx.h>
-#endif
-
-#include "flutter/generated_plugin_registrant.h"
-
-struct _MyApplication {
- GtkApplication parent_instance;
- char** dart_entrypoint_arguments;
-};
-
-G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
-
-// Implements GApplication::activate.
-static void my_application_activate(GApplication* application) {
- MyApplication* self = MY_APPLICATION(application);
- GtkWindow* window =
- GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
-
- // Use a header bar when running in GNOME as this is the common style used
- // by applications and is the setup most users will be using (e.g. Ubuntu
- // desktop).
- // If running on X and not using GNOME then just use a traditional title bar
- // in case the window manager does more exotic layout, e.g. tiling.
- // If running on Wayland assume the header bar will work (may need changing
- // if future cases occur).
- gboolean use_header_bar = TRUE;
-#ifdef GDK_WINDOWING_X11
- GdkScreen* screen = gtk_window_get_screen(window);
- if (GDK_IS_X11_SCREEN(screen)) {
- const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
- if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
- use_header_bar = FALSE;
- }
- }
-#endif
- if (use_header_bar) {
- GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
- gtk_widget_show(GTK_WIDGET(header_bar));
- gtk_header_bar_set_title(header_bar, "example");
- gtk_header_bar_set_show_close_button(header_bar, TRUE);
- gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
- } else {
- gtk_window_set_title(window, "example");
- }
-
- gtk_window_set_default_size(window, 1280, 720);
- gtk_widget_show(GTK_WIDGET(window));
-
- g_autoptr(FlDartProject) project = fl_dart_project_new();
- fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
-
- FlView* view = fl_view_new(project);
- gtk_widget_show(GTK_WIDGET(view));
- gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
-
- fl_register_plugins(FL_PLUGIN_REGISTRY(view));
-
- gtk_widget_grab_focus(GTK_WIDGET(view));
-}
-
-// Implements GApplication::local_command_line.
-static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) {
- MyApplication* self = MY_APPLICATION(application);
- // Strip out the first argument as it is the binary name.
- self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
-
- g_autoptr(GError) error = nullptr;
- if (!g_application_register(application, nullptr, &error)) {
- g_warning("Failed to register: %s", error->message);
- *exit_status = 1;
- return TRUE;
- }
-
- g_application_activate(application);
- *exit_status = 0;
-
- return TRUE;
-}
-
-// Implements GObject::dispose.
-static void my_application_dispose(GObject* object) {
- MyApplication* self = MY_APPLICATION(object);
- g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
- G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
-}
-
-static void my_application_class_init(MyApplicationClass* klass) {
- G_APPLICATION_CLASS(klass)->activate = my_application_activate;
- G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;
- G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
-}
-
-static void my_application_init(MyApplication* self) {}
-
-MyApplication* my_application_new() {
- return MY_APPLICATION(g_object_new(my_application_get_type(),
- "application-id", APPLICATION_ID,
- "flags", G_APPLICATION_NON_UNIQUE,
- nullptr));
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/linux/my_application.h b/frontend/app_flowy/packages/appflowy_board/example/linux/my_application.h
deleted file mode 100644
index 72271d5e41..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/linux/my_application.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef FLUTTER_MY_APPLICATION_H_
-#define FLUTTER_MY_APPLICATION_H_
-
-#include <gtk/gtk.h>
-
-G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
- GtkApplication)
-
-/**
- * my_application_new:
- *
- * Creates a new Flutter-based application.
- *
- * Returns: a new #MyApplication.
- */
-MyApplication* my_application_new();
-
-#endif // FLUTTER_MY_APPLICATION_H_
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/.gitignore b/frontend/app_flowy/packages/appflowy_board/example/macos/.gitignore
deleted file mode 100644
index 746adbb6b9..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-# Flutter-related
-**/Flutter/ephemeral/
-**/Pods/
-
-# Xcode-related
-**/dgph
-**/xcuserdata/
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Flutter/Flutter-Debug.xcconfig b/frontend/app_flowy/packages/appflowy_board/example/macos/Flutter/Flutter-Debug.xcconfig
deleted file mode 100644
index c2efd0b608..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Flutter/Flutter-Debug.xcconfig
+++ /dev/null
@@ -1 +0,0 @@
-#include "ephemeral/Flutter-Generated.xcconfig"
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Flutter/Flutter-Release.xcconfig b/frontend/app_flowy/packages/appflowy_board/example/macos/Flutter/Flutter-Release.xcconfig
deleted file mode 100644
index c2efd0b608..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Flutter/Flutter-Release.xcconfig
+++ /dev/null
@@ -1 +0,0 @@
-#include "ephemeral/Flutter-Generated.xcconfig"
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Flutter/GeneratedPluginRegistrant.swift b/frontend/app_flowy/packages/appflowy_board/example/macos/Flutter/GeneratedPluginRegistrant.swift
deleted file mode 100644
index cccf817a52..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Flutter/GeneratedPluginRegistrant.swift
+++ /dev/null
@@ -1,10 +0,0 @@
-//
-// Generated file. Do not edit.
-//
-
-import FlutterMacOS
-import Foundation
-
-
-func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner.xcodeproj/project.pbxproj b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner.xcodeproj/project.pbxproj
deleted file mode 100644
index c84862c675..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,572 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 51;
- objects = {
-
-/* Begin PBXAggregateTarget section */
- 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = {
- isa = PBXAggregateTarget;
- buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */;
- buildPhases = (
- 33CC111E2044C6BF0003C045 /* ShellScript */,
- );
- dependencies = (
- );
- name = "Flutter Assemble";
- productName = FLX;
- };
-/* End PBXAggregateTarget section */
-
-/* Begin PBXBuildFile section */
- 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; };
- 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; };
- 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
- 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
- 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
- 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 33CC10E52044A3C60003C045 /* Project object */;
- proxyType = 1;
- remoteGlobalIDString = 33CC111A2044C6BA0003C045;
- remoteInfo = FLX;
- };
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 33CC110E2044A8840003C045 /* Bundle Framework */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 2147483647;
- dstPath = "";
- dstSubfolderSpec = 10;
- files = (
- );
- name = "Bundle Framework";
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
- 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
- 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
- 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
- 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
- 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
- 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = "<group>"; };
- 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = "<group>"; };
- 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = "<group>"; };
- 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = "<group>"; };
- 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = "<group>"; };
- 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
- 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
- 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
- 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
- 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 33CC10EA2044A3C60003C045 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 33BA886A226E78AF003329D5 /* Configs */ = {
- isa = PBXGroup;
- children = (
- 33E5194F232828860026EE4D /* AppInfo.xcconfig */,
- 9740EEB21CF90195004384FC /* Debug.xcconfig */,
- 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
- 333000ED22D3DE5D00554162 /* Warnings.xcconfig */,
- );
- path = Configs;
- sourceTree = "<group>";
- };
- 33CC10E42044A3C60003C045 = {
- isa = PBXGroup;
- children = (
- 33FAB671232836740065AC1E /* Runner */,
- 33CEB47122A05771004F2AC0 /* Flutter */,
- 33CC10EE2044A3C60003C045 /* Products */,
- D73912EC22F37F3D000D13A0 /* Frameworks */,
- );
- sourceTree = "<group>";
- };
- 33CC10EE2044A3C60003C045 /* Products */ = {
- isa = PBXGroup;
- children = (
- 33CC10ED2044A3C60003C045 /* example.app */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- 33CC11242044D66E0003C045 /* Resources */ = {
- isa = PBXGroup;
- children = (
- 33CC10F22044A3C60003C045 /* Assets.xcassets */,
- 33CC10F42044A3C60003C045 /* MainMenu.xib */,
- 33CC10F72044A3C60003C045 /* Info.plist */,
- );
- name = Resources;
- path = ..;
- sourceTree = "<group>";
- };
- 33CEB47122A05771004F2AC0 /* Flutter */ = {
- isa = PBXGroup;
- children = (
- 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */,
- 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */,
- 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */,
- 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */,
- );
- path = Flutter;
- sourceTree = "<group>";
- };
- 33FAB671232836740065AC1E /* Runner */ = {
- isa = PBXGroup;
- children = (
- 33CC10F02044A3C60003C045 /* AppDelegate.swift */,
- 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */,
- 33E51913231747F40026EE4D /* DebugProfile.entitlements */,
- 33E51914231749380026EE4D /* Release.entitlements */,
- 33CC11242044D66E0003C045 /* Resources */,
- 33BA886A226E78AF003329D5 /* Configs */,
- );
- path = Runner;
- sourceTree = "<group>";
- };
- D73912EC22F37F3D000D13A0 /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- );
- name = Frameworks;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 33CC10EC2044A3C60003C045 /* Runner */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
- buildPhases = (
- 33CC10E92044A3C60003C045 /* Sources */,
- 33CC10EA2044A3C60003C045 /* Frameworks */,
- 33CC10EB2044A3C60003C045 /* Resources */,
- 33CC110E2044A8840003C045 /* Bundle Framework */,
- 3399D490228B24CF009A79C7 /* ShellScript */,
- );
- buildRules = (
- );
- dependencies = (
- 33CC11202044C79F0003C045 /* PBXTargetDependency */,
- );
- name = Runner;
- productName = Runner;
- productReference = 33CC10ED2044A3C60003C045 /* example.app */;
- productType = "com.apple.product-type.application";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 33CC10E52044A3C60003C045 /* Project object */ = {
- isa = PBXProject;
- attributes = {
- LastSwiftUpdateCheck = 0920;
- LastUpgradeCheck = 1300;
- ORGANIZATIONNAME = "";
- TargetAttributes = {
- 33CC10EC2044A3C60003C045 = {
- CreatedOnToolsVersion = 9.2;
- LastSwiftMigration = 1100;
- ProvisioningStyle = Automatic;
- SystemCapabilities = {
- com.apple.Sandbox = {
- enabled = 1;
- };
- };
- };
- 33CC111A2044C6BA0003C045 = {
- CreatedOnToolsVersion = 9.2;
- ProvisioningStyle = Manual;
- };
- };
- };
- buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */;
- compatibilityVersion = "Xcode 9.3";
- developmentRegion = en;
- hasScannedForEncodings = 0;
- knownRegions = (
- en,
- Base,
- );
- mainGroup = 33CC10E42044A3C60003C045;
- productRefGroup = 33CC10EE2044A3C60003C045 /* Products */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 33CC10EC2044A3C60003C045 /* Runner */,
- 33CC111A2044C6BA0003C045 /* Flutter Assemble */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 33CC10EB2044A3C60003C045 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */,
- 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXShellScriptBuildPhase section */
- 3399D490228B24CF009A79C7 /* ShellScript */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- );
- inputPaths = (
- );
- outputFileListPaths = (
- );
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n";
- };
- 33CC111E2044C6BF0003C045 /* ShellScript */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputFileListPaths = (
- Flutter/ephemeral/FlutterInputs.xcfilelist,
- );
- inputPaths = (
- Flutter/ephemeral/tripwire,
- );
- outputFileListPaths = (
- Flutter/ephemeral/FlutterOutputs.xcfilelist,
- );
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
- };
-/* End PBXShellScriptBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 33CC10E92044A3C60003C045 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */,
- 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */,
- 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin PBXTargetDependency section */
- 33CC11202044C79F0003C045 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */;
- targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */;
- };
-/* End PBXTargetDependency section */
-
-/* Begin PBXVariantGroup section */
- 33CC10F42044A3C60003C045 /* MainMenu.xib */ = {
- isa = PBXVariantGroup;
- children = (
- 33CC10F52044A3C60003C045 /* Base */,
- );
- name = MainMenu.xib;
- path = Runner;
- sourceTree = "<group>";
- };
-/* End PBXVariantGroup section */
-
-/* Begin XCBuildConfiguration section */
- 338D0CE9231458BD00FA5F75 /* Profile */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = macosx;
- SWIFT_COMPILATION_MODE = wholemodule;
- SWIFT_OPTIMIZATION_LEVEL = "-O";
- };
- name = Profile;
- };
- 338D0CEA231458BD00FA5F75 /* Profile */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
- CODE_SIGN_STYLE = Automatic;
- COMBINE_HIDPI_IMAGES = YES;
- INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/../Frameworks",
- );
- PROVISIONING_PROFILE_SPECIFIER = "";
- SWIFT_VERSION = 5.0;
- };
- name = Profile;
- };
- 338D0CEB231458BD00FA5F75 /* Profile */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CODE_SIGN_STYLE = Manual;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Profile;
- };
- 33CC10F92044A3C60003C045 /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = dwarf;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- ENABLE_TESTABILITY = YES;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_PREPROCESSOR_DEFINITIONS = (
- "DEBUG=1",
- "$(inherited)",
- );
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- MTL_ENABLE_DEBUG_INFO = YES;
- ONLY_ACTIVE_ARCH = YES;
- SDKROOT = macosx;
- SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- };
- name = Debug;
- };
- 33CC10FA2044A3C60003C045 /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- CLANG_ANALYZER_NONNULL = YES;
- CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
- CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
- CLANG_CXX_LIBRARY = "libc++";
- CLANG_ENABLE_MODULES = YES;
- CLANG_ENABLE_OBJC_ARC = YES;
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
- CLANG_WARN_BOOL_CONVERSION = YES;
- CLANG_WARN_CONSTANT_CONVERSION = YES;
- CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
- CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
- CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
- CLANG_WARN_EMPTY_BODY = YES;
- CLANG_WARN_ENUM_CONVERSION = YES;
- CLANG_WARN_INFINITE_RECURSION = YES;
- CLANG_WARN_INT_CONVERSION = YES;
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
- CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
- CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
- CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
- CLANG_WARN_SUSPICIOUS_MOVE = YES;
- CODE_SIGN_IDENTITY = "-";
- COPY_PHASE_STRIP = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- ENABLE_NS_ASSERTIONS = NO;
- ENABLE_STRICT_OBJC_MSGSEND = YES;
- GCC_C_LANGUAGE_STANDARD = gnu11;
- GCC_NO_COMMON_BLOCKS = YES;
- GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
- GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
- GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
- GCC_WARN_UNUSED_FUNCTION = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.11;
- MTL_ENABLE_DEBUG_INFO = NO;
- SDKROOT = macosx;
- SWIFT_COMPILATION_MODE = wholemodule;
- SWIFT_OPTIMIZATION_LEVEL = "-O";
- };
- name = Release;
- };
- 33CC10FC2044A3C60003C045 /* Debug */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements;
- CODE_SIGN_STYLE = Automatic;
- COMBINE_HIDPI_IMAGES = YES;
- INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/../Frameworks",
- );
- PROVISIONING_PROFILE_SPECIFIER = "";
- SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 5.0;
- };
- name = Debug;
- };
- 33CC10FD2044A3C60003C045 /* Release */ = {
- isa = XCBuildConfiguration;
- baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */;
- buildSettings = {
- ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
- CLANG_ENABLE_MODULES = YES;
- CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements;
- CODE_SIGN_STYLE = Automatic;
- COMBINE_HIDPI_IMAGES = YES;
- INFOPLIST_FILE = Runner/Info.plist;
- LD_RUNPATH_SEARCH_PATHS = (
- "$(inherited)",
- "@executable_path/../Frameworks",
- );
- PROVISIONING_PROFILE_SPECIFIER = "";
- SWIFT_VERSION = 5.0;
- };
- name = Release;
- };
- 33CC111C2044C6BA0003C045 /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CODE_SIGN_STYLE = Manual;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Debug;
- };
- 33CC111D2044C6BA0003C045 /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- CODE_SIGN_STYLE = Automatic;
- PRODUCT_NAME = "$(TARGET_NAME)";
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 33CC10F92044A3C60003C045 /* Debug */,
- 33CC10FA2044A3C60003C045 /* Release */,
- 338D0CE9231458BD00FA5F75 /* Profile */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 33CC10FC2044A3C60003C045 /* Debug */,
- 33CC10FD2044A3C60003C045 /* Release */,
- 338D0CEA231458BD00FA5F75 /* Profile */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 33CC111C2044C6BA0003C045 /* Debug */,
- 33CC111D2044C6BA0003C045 /* Release */,
- 338D0CEB231458BD00FA5F75 /* Profile */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 33CC10E52044A3C60003C045 /* Project object */;
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d981003d..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IDEDidComputeMac32BitWarning</key>
- <true/>
-</dict>
-</plist>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
deleted file mode 100644
index fb7259e177..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
- LastUpgradeVersion = "1300"
- version = "1.3">
- <BuildAction
- parallelizeBuildables = "YES"
- buildImplicitDependencies = "YES">
- <BuildActionEntries>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "33CC10EC2044A3C60003C045"
- BuildableName = "example.app"
- BlueprintName = "Runner"
- ReferencedContainer = "container:Runner.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- </BuildActionEntries>
- </BuildAction>
- <TestAction
- buildConfiguration = "Debug"
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- shouldUseLaunchSchemeArgsEnv = "YES">
- <MacroExpansion>
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "33CC10EC2044A3C60003C045"
- BuildableName = "example.app"
- BlueprintName = "Runner"
- ReferencedContainer = "container:Runner.xcodeproj">
- </BuildableReference>
- </MacroExpansion>
- <Testables>
- </Testables>
- </TestAction>
- <LaunchAction
- buildConfiguration = "Debug"
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- launchStyle = "0"
- useCustomWorkingDirectory = "NO"
- ignoresPersistentStateOnLaunch = "NO"
- debugDocumentVersioning = "YES"
- debugServiceExtension = "internal"
- allowLocationSimulation = "YES">
- <BuildableProductRunnable
- runnableDebuggingMode = "0">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "33CC10EC2044A3C60003C045"
- BuildableName = "example.app"
- BlueprintName = "Runner"
- ReferencedContainer = "container:Runner.xcodeproj">
- </BuildableReference>
- </BuildableProductRunnable>
- </LaunchAction>
- <ProfileAction
- buildConfiguration = "Profile"
- shouldUseLaunchSchemeArgsEnv = "YES"
- savedToolIdentifier = ""
- useCustomWorkingDirectory = "NO"
- debugDocumentVersioning = "YES">
- <BuildableProductRunnable
- runnableDebuggingMode = "0">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "33CC10EC2044A3C60003C045"
- BuildableName = "example.app"
- BlueprintName = "Runner"
- ReferencedContainer = "container:Runner.xcodeproj">
- </BuildableReference>
- </BuildableProductRunnable>
- </ProfileAction>
- <AnalyzeAction
- buildConfiguration = "Debug">
- </AnalyzeAction>
- <ArchiveAction
- buildConfiguration = "Release"
- revealArchiveInOrganizer = "YES">
- </ArchiveAction>
-</Scheme>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner.xcworkspace/contents.xcworkspacedata
deleted file mode 100644
index 1d526a16ed..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner.xcworkspace/contents.xcworkspacedata
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Workspace
- version = "1.0">
- <FileRef
- location = "group:Runner.xcodeproj">
- </FileRef>
-</Workspace>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
deleted file mode 100644
index 18d981003d..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>IDEDidComputeMac32BitWarning</key>
- <true/>
-</dict>
-</plist>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/AppDelegate.swift b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/AppDelegate.swift
deleted file mode 100644
index d53ef64377..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/AppDelegate.swift
+++ /dev/null
@@ -1,9 +0,0 @@
-import Cocoa
-import FlutterMacOS
-
-@NSApplicationMain
-class AppDelegate: FlutterAppDelegate {
- override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
- return true
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index a2ec33f19f..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "images" : [
- {
- "size" : "16x16",
- "idiom" : "mac",
- "filename" : "app_icon_16.png",
- "scale" : "1x"
- },
- {
- "size" : "16x16",
- "idiom" : "mac",
- "filename" : "app_icon_32.png",
- "scale" : "2x"
- },
- {
- "size" : "32x32",
- "idiom" : "mac",
- "filename" : "app_icon_32.png",
- "scale" : "1x"
- },
- {
- "size" : "32x32",
- "idiom" : "mac",
- "filename" : "app_icon_64.png",
- "scale" : "2x"
- },
- {
- "size" : "128x128",
- "idiom" : "mac",
- "filename" : "app_icon_128.png",
- "scale" : "1x"
- },
- {
- "size" : "128x128",
- "idiom" : "mac",
- "filename" : "app_icon_256.png",
- "scale" : "2x"
- },
- {
- "size" : "256x256",
- "idiom" : "mac",
- "filename" : "app_icon_256.png",
- "scale" : "1x"
- },
- {
- "size" : "256x256",
- "idiom" : "mac",
- "filename" : "app_icon_512.png",
- "scale" : "2x"
- },
- {
- "size" : "512x512",
- "idiom" : "mac",
- "filename" : "app_icon_512.png",
- "scale" : "1x"
- },
- {
- "size" : "512x512",
- "idiom" : "mac",
- "filename" : "app_icon_1024.png",
- "scale" : "2x"
- }
- ],
- "info" : {
- "version" : 1,
- "author" : "xcode"
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
deleted file mode 100644
index 3c4935a7ca..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
deleted file mode 100644
index ed4cc16421..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
deleted file mode 100644
index 483be61389..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
deleted file mode 100644
index bcbf36df2f..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
deleted file mode 100644
index 9c0a652864..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
deleted file mode 100644
index e71a726136..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
deleted file mode 100644
index 8a31fe2dd3..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Base.lproj/MainMenu.xib b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Base.lproj/MainMenu.xib
deleted file mode 100644
index 80e867a4e0..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Base.lproj/MainMenu.xib
+++ /dev/null
@@ -1,343 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
- <dependencies>
- <deployment identifier="macosx"/>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14490.70"/>
- <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
- </dependencies>
- <objects>
- <customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
- <connections>
- <outlet property="delegate" destination="Voe-Tx-rLC" id="GzC-gU-4Uq"/>
- </connections>
- </customObject>
- <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
- <customObject id="-3" userLabel="Application" customClass="NSObject"/>
- <customObject id="Voe-Tx-rLC" customClass="AppDelegate" customModule="Runner" customModuleProvider="target">
- <connections>
- <outlet property="applicationMenu" destination="uQy-DD-JDr" id="XBo-yE-nKs"/>
- <outlet property="mainFlutterWindow" destination="QvC-M9-y7g" id="gIp-Ho-8D9"/>
- </connections>
- </customObject>
- <customObject id="YLy-65-1bz" customClass="NSFontManager"/>
- <menu title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
- <items>
- <menuItem title="APP_NAME" id="1Xt-HY-uBw">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="APP_NAME" systemMenu="apple" id="uQy-DD-JDr">
- <items>
- <menuItem title="About APP_NAME" id="5kV-Vb-QxS">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="orderFrontStandardAboutPanel:" target="-1" id="Exp-CZ-Vem"/>
- </connections>
- </menuItem>
- <menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
- <menuItem title="Preferences…" keyEquivalent="," id="BOF-NM-1cW"/>
- <menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
- <menuItem title="Services" id="NMo-om-nkz">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
- </menuItem>
- <menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
- <menuItem title="Hide APP_NAME" keyEquivalent="h" id="Olw-nP-bQN">
- <connections>
- <action selector="hide:" target="-1" id="PnN-Uc-m68"/>
- </connections>
- </menuItem>
- <menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
- <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
- <connections>
- <action selector="hideOtherApplications:" target="-1" id="VT4-aY-XCT"/>
- </connections>
- </menuItem>
- <menuItem title="Show All" id="Kd2-mp-pUS">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="unhideAllApplications:" target="-1" id="Dhg-Le-xox"/>
- </connections>
- </menuItem>
- <menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
- <menuItem title="Quit APP_NAME" keyEquivalent="q" id="4sb-4s-VLi">
- <connections>
- <action selector="terminate:" target="-1" id="Te7-pn-YzF"/>
- </connections>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- <menuItem title="Edit" id="5QF-Oa-p0T">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="Edit" id="W48-6f-4Dl">
- <items>
- <menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
- <connections>
- <action selector="undo:" target="-1" id="M6e-cu-g7V"/>
- </connections>
- </menuItem>
- <menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
- <connections>
- <action selector="redo:" target="-1" id="oIA-Rs-6OD"/>
- </connections>
- </menuItem>
- <menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
- <menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
- <connections>
- <action selector="cut:" target="-1" id="YJe-68-I9s"/>
- </connections>
- </menuItem>
- <menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
- <connections>
- <action selector="copy:" target="-1" id="G1f-GL-Joy"/>
- </connections>
- </menuItem>
- <menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
- <connections>
- <action selector="paste:" target="-1" id="UvS-8e-Qdg"/>
- </connections>
- </menuItem>
- <menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
- <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
- <connections>
- <action selector="pasteAsPlainText:" target="-1" id="cEh-KX-wJQ"/>
- </connections>
- </menuItem>
- <menuItem title="Delete" id="pa3-QI-u2k">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="delete:" target="-1" id="0Mk-Ml-PaM"/>
- </connections>
- </menuItem>
- <menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
- <connections>
- <action selector="selectAll:" target="-1" id="VNm-Mi-diN"/>
- </connections>
- </menuItem>
- <menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
- <menuItem title="Find" id="4EN-yA-p0u">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="Find" id="1b7-l0-nxx">
- <items>
- <menuItem title="Find…" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
- <connections>
- <action selector="performFindPanelAction:" target="-1" id="cD7-Qs-BN4"/>
- </connections>
- </menuItem>
- <menuItem title="Find and Replace…" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
- <modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
- <connections>
- <action selector="performFindPanelAction:" target="-1" id="WD3-Gg-5AJ"/>
- </connections>
- </menuItem>
- <menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
- <connections>
- <action selector="performFindPanelAction:" target="-1" id="NDo-RZ-v9R"/>
- </connections>
- </menuItem>
- <menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
- <connections>
- <action selector="performFindPanelAction:" target="-1" id="HOh-sY-3ay"/>
- </connections>
- </menuItem>
- <menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
- <connections>
- <action selector="performFindPanelAction:" target="-1" id="U76-nv-p5D"/>
- </connections>
- </menuItem>
- <menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
- <connections>
- <action selector="centerSelectionInVisibleArea:" target="-1" id="IOG-6D-g5B"/>
- </connections>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- <menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
- <items>
- <menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
- <connections>
- <action selector="showGuessPanel:" target="-1" id="vFj-Ks-hy3"/>
- </connections>
- </menuItem>
- <menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
- <connections>
- <action selector="checkSpelling:" target="-1" id="fz7-VC-reM"/>
- </connections>
- </menuItem>
- <menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
- <menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="toggleContinuousSpellChecking:" target="-1" id="7w6-Qz-0kB"/>
- </connections>
- </menuItem>
- <menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="toggleGrammarChecking:" target="-1" id="muD-Qn-j4w"/>
- </connections>
- </menuItem>
- <menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="toggleAutomaticSpellingCorrection:" target="-1" id="2lM-Qi-WAP"/>
- </connections>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- <menuItem title="Substitutions" id="9ic-FL-obx">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
- <items>
- <menuItem title="Show Substitutions" id="z6F-FW-3nz">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="orderFrontSubstitutionsPanel:" target="-1" id="oku-mr-iSq"/>
- </connections>
- </menuItem>
- <menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
- <menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="toggleSmartInsertDelete:" target="-1" id="3IJ-Se-DZD"/>
- </connections>
- </menuItem>
- <menuItem title="Smart Quotes" id="hQb-2v-fYv">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="ptq-xd-QOA"/>
- </connections>
- </menuItem>
- <menuItem title="Smart Dashes" id="rgM-f4-ycn">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="toggleAutomaticDashSubstitution:" target="-1" id="oCt-pO-9gS"/>
- </connections>
- </menuItem>
- <menuItem title="Smart Links" id="cwL-P1-jid">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="toggleAutomaticLinkDetection:" target="-1" id="Gip-E3-Fov"/>
- </connections>
- </menuItem>
- <menuItem title="Data Detectors" id="tRr-pd-1PS">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="toggleAutomaticDataDetection:" target="-1" id="R1I-Nq-Kbl"/>
- </connections>
- </menuItem>
- <menuItem title="Text Replacement" id="HFQ-gK-NFA">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="toggleAutomaticTextReplacement:" target="-1" id="DvP-Fe-Py6"/>
- </connections>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- <menuItem title="Transformations" id="2oI-Rn-ZJC">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="Transformations" id="c8a-y6-VQd">
- <items>
- <menuItem title="Make Upper Case" id="vmV-6d-7jI">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="uppercaseWord:" target="-1" id="sPh-Tk-edu"/>
- </connections>
- </menuItem>
- <menuItem title="Make Lower Case" id="d9M-CD-aMd">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="lowercaseWord:" target="-1" id="iUZ-b5-hil"/>
- </connections>
- </menuItem>
- <menuItem title="Capitalize" id="UEZ-Bs-lqG">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="capitalizeWord:" target="-1" id="26H-TL-nsh"/>
- </connections>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- <menuItem title="Speech" id="xrE-MZ-jX0">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="Speech" id="3rS-ZA-NoH">
- <items>
- <menuItem title="Start Speaking" id="Ynk-f8-cLZ">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="startSpeaking:" target="-1" id="654-Ng-kyl"/>
- </connections>
- </menuItem>
- <menuItem title="Stop Speaking" id="Oyz-dy-DGm">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="stopSpeaking:" target="-1" id="dX8-6p-jy9"/>
- </connections>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- <menuItem title="View" id="H8h-7b-M4v">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="View" id="HyV-fh-RgO">
- <items>
- <menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
- <modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
- <connections>
- <action selector="toggleFullScreen:" target="-1" id="dU3-MA-1Rq"/>
- </connections>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- <menuItem title="Window" id="aUF-d1-5bR">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
- <items>
- <menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
- <connections>
- <action selector="performMiniaturize:" target="-1" id="VwT-WD-YPe"/>
- </connections>
- </menuItem>
- <menuItem title="Zoom" id="R4o-n2-Eq4">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="performZoom:" target="-1" id="DIl-cC-cCs"/>
- </connections>
- </menuItem>
- <menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
- <menuItem title="Bring All to Front" id="LE2-aR-0XJ">
- <modifierMask key="keyEquivalentModifierMask"/>
- <connections>
- <action selector="arrangeInFront:" target="-1" id="DRN-fu-gQh"/>
- </connections>
- </menuItem>
- </items>
- </menu>
- </menuItem>
- <menuItem title="Help" id="EPT-qC-fAb">
- <modifierMask key="keyEquivalentModifierMask"/>
- <menu key="submenu" title="Help" systemMenu="help" id="rJ0-wn-3NY"/>
- </menuItem>
- </items>
- <point key="canvasLocation" x="142" y="-258"/>
- </menu>
- <window title="APP_NAME" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="QvC-M9-y7g" customClass="MainFlutterWindow" customModule="Runner" customModuleProvider="target">
- <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
- <rect key="contentRect" x="335" y="390" width="800" height="600"/>
- <rect key="screenRect" x="0.0" y="0.0" width="2560" height="1577"/>
- <view key="contentView" wantsLayer="YES" id="EiT-Mj-1SZ">
- <rect key="frame" x="0.0" y="0.0" width="800" height="600"/>
- <autoresizingMask key="autoresizingMask"/>
- </view>
- </window>
- </objects>
-</document>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Configs/AppInfo.xcconfig b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Configs/AppInfo.xcconfig
deleted file mode 100644
index e379d4a333..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Configs/AppInfo.xcconfig
+++ /dev/null
@@ -1,14 +0,0 @@
-// Application-level settings for the Runner target.
-//
-// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
-// future. If not, the values below would default to using the project name when this becomes a
-// 'flutter create' template.
-
-// The application's name. By default this is also the title of the Flutter window.
-PRODUCT_NAME = example
-
-// The application's bundle identifier
-PRODUCT_BUNDLE_IDENTIFIER = com.appflowy.board.example
-
-// The copyright displayed in application information
-PRODUCT_COPYRIGHT = Copyright © 2022 com.appflowy.board. All rights reserved.
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Configs/Debug.xcconfig b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Configs/Debug.xcconfig
deleted file mode 100644
index 36b0fd9464..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Configs/Debug.xcconfig
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "../../Flutter/Flutter-Debug.xcconfig"
-#include "Warnings.xcconfig"
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Configs/Release.xcconfig b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Configs/Release.xcconfig
deleted file mode 100644
index dff4f49561..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Configs/Release.xcconfig
+++ /dev/null
@@ -1,2 +0,0 @@
-#include "../../Flutter/Flutter-Release.xcconfig"
-#include "Warnings.xcconfig"
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Configs/Warnings.xcconfig b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Configs/Warnings.xcconfig
deleted file mode 100644
index 42bcbf4780..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Configs/Warnings.xcconfig
+++ /dev/null
@@ -1,13 +0,0 @@
-WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
-GCC_WARN_UNDECLARED_SELECTOR = YES
-CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
-CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
-CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
-CLANG_WARN_PRAGMA_PACK = YES
-CLANG_WARN_STRICT_PROTOTYPES = YES
-CLANG_WARN_COMMA = YES
-GCC_WARN_STRICT_SELECTOR_MATCH = YES
-CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
-CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
-GCC_WARN_SHADOW = YES
-CLANG_WARN_UNREACHABLE_CODE = YES
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/DebugProfile.entitlements b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/DebugProfile.entitlements
deleted file mode 100644
index dddb8a30c8..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/DebugProfile.entitlements
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>com.apple.security.app-sandbox</key>
- <true/>
- <key>com.apple.security.cs.allow-jit</key>
- <true/>
- <key>com.apple.security.network.server</key>
- <true/>
-</dict>
-</plist>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Info.plist b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Info.plist
deleted file mode 100644
index 4789daa6a4..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Info.plist
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDevelopmentRegion</key>
- <string>$(DEVELOPMENT_LANGUAGE)</string>
- <key>CFBundleExecutable</key>
- <string>$(EXECUTABLE_NAME)</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleName</key>
- <string>$(PRODUCT_NAME)</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleShortVersionString</key>
- <string>$(FLUTTER_BUILD_NAME)</string>
- <key>CFBundleVersion</key>
- <string>$(FLUTTER_BUILD_NUMBER)</string>
- <key>LSMinimumSystemVersion</key>
- <string>$(MACOSX_DEPLOYMENT_TARGET)</string>
- <key>NSHumanReadableCopyright</key>
- <string>$(PRODUCT_COPYRIGHT)</string>
- <key>NSMainNibFile</key>
- <string>MainMenu</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
-</dict>
-</plist>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/MainFlutterWindow.swift b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/MainFlutterWindow.swift
deleted file mode 100644
index 2722837ec9..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/MainFlutterWindow.swift
+++ /dev/null
@@ -1,15 +0,0 @@
-import Cocoa
-import FlutterMacOS
-
-class MainFlutterWindow: NSWindow {
- override func awakeFromNib() {
- let flutterViewController = FlutterViewController.init()
- let windowFrame = self.frame
- self.contentViewController = flutterViewController
- self.setFrame(windowFrame, display: true)
-
- RegisterGeneratedPlugins(registry: flutterViewController)
-
- super.awakeFromNib()
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Release.entitlements b/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Release.entitlements
deleted file mode 100644
index 852fa1a472..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/macos/Runner/Release.entitlements
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>com.apple.security.app-sandbox</key>
- <true/>
-</dict>
-</plist>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/pubspec.yaml b/frontend/app_flowy/packages/appflowy_board/example/pubspec.yaml
deleted file mode 100644
index e6ef2c7013..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/pubspec.yaml
+++ /dev/null
@@ -1,91 +0,0 @@
-name: example
-description: A new Flutter project.
-
-# 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
-
-# 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 used as CFBundleVersion.
-# Read more about iOS versioning at
-# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
-version: 1.0.0+1
-
-environment:
- sdk: ">=2.17.0 <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
- appflowy_board:
- path: ../
-
-
- # The following adds the Cupertino Icons font to your application.
- # Use with the CupertinoIcons class for iOS style icons.
- cupertino_icons: ^1.0.2
-
-dev_dependencies:
- flutter_test:
- sdk: flutter
-
- # 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.1
-
-# 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:
-
- # 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
diff --git a/frontend/app_flowy/packages/appflowy_board/example/test/widget_test.dart b/frontend/app_flowy/packages/appflowy_board/example/test/widget_test.dart
deleted file mode 100644
index 29cad86982..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/test/widget_test.dart
+++ /dev/null
@@ -1,7 +0,0 @@
-// This is a basic Flutter widget test.
-//
-// To perform an interaction with a widget in your test, use the WidgetTester
-// utility in the flutter_test package. For example, you can send tap and scroll
-// gestures. You can also use WidgetTester to find child widgets in the widget
-// tree, read text, and verify that the values of widget properties are correct.
-void main() {}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/web/favicon.png b/frontend/app_flowy/packages/appflowy_board/example/web/favicon.png
deleted file mode 100644
index 8aaa46ac1a..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/web/favicon.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/web/icons/Icon-192.png b/frontend/app_flowy/packages/appflowy_board/example/web/icons/Icon-192.png
deleted file mode 100644
index b749bfef07..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/web/icons/Icon-192.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/web/icons/Icon-512.png b/frontend/app_flowy/packages/appflowy_board/example/web/icons/Icon-512.png
deleted file mode 100644
index 88cfd48dff..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/web/icons/Icon-512.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/web/icons/Icon-maskable-192.png b/frontend/app_flowy/packages/appflowy_board/example/web/icons/Icon-maskable-192.png
deleted file mode 100644
index eb9b4d76e5..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/web/icons/Icon-maskable-192.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/web/icons/Icon-maskable-512.png b/frontend/app_flowy/packages/appflowy_board/example/web/icons/Icon-maskable-512.png
deleted file mode 100644
index d69c56691f..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/web/icons/Icon-maskable-512.png and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/web/index.html b/frontend/app_flowy/packages/appflowy_board/example/web/index.html
deleted file mode 100644
index 41b3bc336f..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/web/index.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!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="example">
- <link rel="apple-touch-icon" href="icons/Icon-192.png">
-
- <!-- Favicon -->
- <link rel="icon" type="image/png" href="favicon.png"/>
-
- <title>example</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>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/web/manifest.json b/frontend/app_flowy/packages/appflowy_board/example/web/manifest.json
deleted file mode 100644
index 096edf8fe4..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/web/manifest.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "example",
- "short_name": "example",
- "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"
- }
- ]
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/.gitignore b/frontend/app_flowy/packages/appflowy_board/example/windows/.gitignore
deleted file mode 100644
index d492d0d98c..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/.gitignore
+++ /dev/null
@@ -1,17 +0,0 @@
-flutter/ephemeral/
-
-# Visual Studio user-specific files.
-*.suo
-*.user
-*.userosscache
-*.sln.docstates
-
-# Visual Studio build-related files.
-x64/
-x86/
-
-# Visual Studio cache files
-# files ending in .cache can be ignored
-*.[Cc]ache
-# but keep track of directories ending in .cache
-!*.[Cc]ache/
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/CMakeLists.txt b/frontend/app_flowy/packages/appflowy_board/example/windows/CMakeLists.txt
deleted file mode 100644
index c0270746b1..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/CMakeLists.txt
+++ /dev/null
@@ -1,101 +0,0 @@
-# Project-level configuration.
-cmake_minimum_required(VERSION 3.14)
-project(example LANGUAGES CXX)
-
-# The name of the executable created for the application. Change this to change
-# the on-disk name of your application.
-set(BINARY_NAME "example")
-
-# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
-# versions of CMake.
-cmake_policy(SET CMP0063 NEW)
-
-# Define build configuration option.
-get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
-if(IS_MULTICONFIG)
- set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
- CACHE STRING "" FORCE)
-else()
- if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
- set(CMAKE_BUILD_TYPE "Debug" CACHE
- STRING "Flutter build mode" FORCE)
- set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
- "Debug" "Profile" "Release")
- endif()
-endif()
-# Define settings for the Profile build mode.
-set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
-set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
-set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
-set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
-
-# Use Unicode for all projects.
-add_definitions(-DUNICODE -D_UNICODE)
-
-# Compilation settings that should be applied to most targets.
-#
-# Be cautious about adding new options here, as plugins use this function by
-# default. In most cases, you should add new options to specific targets instead
-# of modifying this function.
-function(APPLY_STANDARD_SETTINGS TARGET)
- target_compile_features(${TARGET} PUBLIC cxx_std_17)
- target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
- target_compile_options(${TARGET} PRIVATE /EHsc)
- target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
- target_compile_definitions(${TARGET} PRIVATE "$<$<CONFIG:Debug>:_DEBUG>")
-endfunction()
-
-# Flutter library and tool build rules.
-set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
-add_subdirectory(${FLUTTER_MANAGED_DIR})
-
-# Application build; see runner/CMakeLists.txt.
-add_subdirectory("runner")
-
-# Generated plugin build rules, which manage building the plugins and adding
-# them to the application.
-include(flutter/generated_plugins.cmake)
-
-
-# === Installation ===
-# Support files are copied into place next to the executable, so that it can
-# run in place. This is done instead of making a separate bundle (as on Linux)
-# so that building and running from within Visual Studio will work.
-set(BUILD_BUNDLE_DIR "$<TARGET_FILE_DIR:${BINARY_NAME}>")
-# Make the "install" step default, as it's required to run.
-set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
-if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
-endif()
-
-set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
-set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
-
-install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
- COMPONENT Runtime)
-
-install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
- COMPONENT Runtime)
-
-install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
- COMPONENT Runtime)
-
-if(PLUGIN_BUNDLED_LIBRARIES)
- install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
- DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
- COMPONENT Runtime)
-endif()
-
-# Fully re-copy the assets directory on each build to avoid having stale files
-# from a previous install.
-set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
-install(CODE "
- file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
- " COMPONENT Runtime)
-install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
- DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
-
-# Install the AOT library on non-Debug builds only.
-install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
- CONFIGURATIONS Profile;Release
- COMPONENT Runtime)
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/flutter/CMakeLists.txt b/frontend/app_flowy/packages/appflowy_board/example/windows/flutter/CMakeLists.txt
deleted file mode 100644
index 930d2071a3..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/flutter/CMakeLists.txt
+++ /dev/null
@@ -1,104 +0,0 @@
-# This file controls Flutter-level build steps. It should not be edited.
-cmake_minimum_required(VERSION 3.14)
-
-set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
-
-# Configuration provided via flutter tool.
-include(${EPHEMERAL_DIR}/generated_config.cmake)
-
-# TODO: Move the rest of this into files in ephemeral. See
-# https://github.com/flutter/flutter/issues/57146.
-set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
-
-# === Flutter Library ===
-set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
-
-# Published to parent scope for install step.
-set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
-set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
-set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
-set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE)
-
-list(APPEND FLUTTER_LIBRARY_HEADERS
- "flutter_export.h"
- "flutter_windows.h"
- "flutter_messenger.h"
- "flutter_plugin_registrar.h"
- "flutter_texture_registrar.h"
-)
-list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/")
-add_library(flutter INTERFACE)
-target_include_directories(flutter INTERFACE
- "${EPHEMERAL_DIR}"
-)
-target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib")
-add_dependencies(flutter flutter_assemble)
-
-# === Wrapper ===
-list(APPEND CPP_WRAPPER_SOURCES_CORE
- "core_implementations.cc"
- "standard_codec.cc"
-)
-list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/")
-list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
- "plugin_registrar.cc"
-)
-list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
-list(APPEND CPP_WRAPPER_SOURCES_APP
- "flutter_engine.cc"
- "flutter_view_controller.cc"
-)
-list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")
-
-# Wrapper sources needed for a plugin.
-add_library(flutter_wrapper_plugin STATIC
- ${CPP_WRAPPER_SOURCES_CORE}
- ${CPP_WRAPPER_SOURCES_PLUGIN}
-)
-apply_standard_settings(flutter_wrapper_plugin)
-set_target_properties(flutter_wrapper_plugin PROPERTIES
- POSITION_INDEPENDENT_CODE ON)
-set_target_properties(flutter_wrapper_plugin PROPERTIES
- CXX_VISIBILITY_PRESET hidden)
-target_link_libraries(flutter_wrapper_plugin PUBLIC flutter)
-target_include_directories(flutter_wrapper_plugin PUBLIC
- "${WRAPPER_ROOT}/include"
-)
-add_dependencies(flutter_wrapper_plugin flutter_assemble)
-
-# Wrapper sources needed for the runner.
-add_library(flutter_wrapper_app STATIC
- ${CPP_WRAPPER_SOURCES_CORE}
- ${CPP_WRAPPER_SOURCES_APP}
-)
-apply_standard_settings(flutter_wrapper_app)
-target_link_libraries(flutter_wrapper_app PUBLIC flutter)
-target_include_directories(flutter_wrapper_app PUBLIC
- "${WRAPPER_ROOT}/include"
-)
-add_dependencies(flutter_wrapper_app flutter_assemble)
-
-# === Flutter tool backend ===
-# _phony_ is a non-existent file to force this command to run every time,
-# since currently there's no way to get a full input/output list from the
-# flutter tool.
-set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_")
-set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE)
-add_custom_command(
- OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
- ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}
- ${CPP_WRAPPER_SOURCES_APP}
- ${PHONY_OUTPUT}
- COMMAND ${CMAKE_COMMAND} -E env
- ${FLUTTER_TOOL_ENVIRONMENT}
- "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
- windows-x64 $<CONFIG>
- VERBATIM
-)
-add_custom_target(flutter_assemble DEPENDS
- "${FLUTTER_LIBRARY}"
- ${FLUTTER_LIBRARY_HEADERS}
- ${CPP_WRAPPER_SOURCES_CORE}
- ${CPP_WRAPPER_SOURCES_PLUGIN}
- ${CPP_WRAPPER_SOURCES_APP}
-)
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/flutter/generated_plugin_registrant.cc b/frontend/app_flowy/packages/appflowy_board/example/windows/flutter/generated_plugin_registrant.cc
deleted file mode 100644
index 8b6d4680af..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/flutter/generated_plugin_registrant.cc
+++ /dev/null
@@ -1,11 +0,0 @@
-//
-// Generated file. Do not edit.
-//
-
-// clang-format off
-
-#include "generated_plugin_registrant.h"
-
-
-void RegisterPlugins(flutter::PluginRegistry* registry) {
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/flutter/generated_plugin_registrant.h b/frontend/app_flowy/packages/appflowy_board/example/windows/flutter/generated_plugin_registrant.h
deleted file mode 100644
index dc139d85a9..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/flutter/generated_plugin_registrant.h
+++ /dev/null
@@ -1,15 +0,0 @@
-//
-// Generated file. Do not edit.
-//
-
-// clang-format off
-
-#ifndef GENERATED_PLUGIN_REGISTRANT_
-#define GENERATED_PLUGIN_REGISTRANT_
-
-#include <flutter/plugin_registry.h>
-
-// Registers Flutter plugins.
-void RegisterPlugins(flutter::PluginRegistry* registry);
-
-#endif // GENERATED_PLUGIN_REGISTRANT_
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/flutter/generated_plugins.cmake b/frontend/app_flowy/packages/appflowy_board/example/windows/flutter/generated_plugins.cmake
deleted file mode 100644
index b93c4c30c1..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/flutter/generated_plugins.cmake
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# Generated file, do not edit.
-#
-
-list(APPEND FLUTTER_PLUGIN_LIST
-)
-
-list(APPEND FLUTTER_FFI_PLUGIN_LIST
-)
-
-set(PLUGIN_BUNDLED_LIBRARIES)
-
-foreach(plugin ${FLUTTER_PLUGIN_LIST})
- add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
- target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
- list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>)
- list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
-endforeach(plugin)
-
-foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
- add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
- list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
-endforeach(ffi_plugin)
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/CMakeLists.txt b/frontend/app_flowy/packages/appflowy_board/example/windows/runner/CMakeLists.txt
deleted file mode 100644
index b9e550fba8..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/CMakeLists.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-cmake_minimum_required(VERSION 3.14)
-project(runner LANGUAGES CXX)
-
-# Define the application target. To change its name, change BINARY_NAME in the
-# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
-# work.
-#
-# Any new source files that you add to the application should be added here.
-add_executable(${BINARY_NAME} WIN32
- "flutter_window.cpp"
- "main.cpp"
- "utils.cpp"
- "win32_window.cpp"
- "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
- "Runner.rc"
- "runner.exe.manifest"
-)
-
-# Apply the standard set of build settings. This can be removed for applications
-# that need different build settings.
-apply_standard_settings(${BINARY_NAME})
-
-# Disable Windows macros that collide with C++ standard library functions.
-target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
-
-# Add dependency libraries and include directories. Add any application-specific
-# dependencies here.
-target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
-target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
-
-# Run the Flutter tool portions of the build. This must not be removed.
-add_dependencies(${BINARY_NAME} flutter_assemble)
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/Runner.rc b/frontend/app_flowy/packages/appflowy_board/example/windows/runner/Runner.rc
deleted file mode 100644
index 8949260514..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/Runner.rc
+++ /dev/null
@@ -1,121 +0,0 @@
-// Microsoft Visual C++ generated resource script.
-//
-#pragma code_page(65001)
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#include "winres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (United States) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE
-BEGIN
- "#include ""winres.h""\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_APP_ICON ICON "resources\\app_icon.ico"
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
-
-#ifdef FLUTTER_BUILD_NUMBER
-#define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER
-#else
-#define VERSION_AS_NUMBER 1,0,0
-#endif
-
-#ifdef FLUTTER_BUILD_NAME
-#define VERSION_AS_STRING #FLUTTER_BUILD_NAME
-#else
-#define VERSION_AS_STRING "1.0.0"
-#endif
-
-VS_VERSION_INFO VERSIONINFO
- FILEVERSION VERSION_AS_NUMBER
- PRODUCTVERSION VERSION_AS_NUMBER
- FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
-#ifdef _DEBUG
- FILEFLAGS VS_FF_DEBUG
-#else
- FILEFLAGS 0x0L
-#endif
- FILEOS VOS__WINDOWS32
- FILETYPE VFT_APP
- FILESUBTYPE 0x0L
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904e4"
- BEGIN
- VALUE "CompanyName", "com.appflowy.board" "\0"
- VALUE "FileDescription", "example" "\0"
- VALUE "FileVersion", VERSION_AS_STRING "\0"
- VALUE "InternalName", "example" "\0"
- VALUE "LegalCopyright", "Copyright (C) 2022 com.appflowy.board. All rights reserved." "\0"
- VALUE "OriginalFilename", "example.exe" "\0"
- VALUE "ProductName", "example" "\0"
- VALUE "ProductVersion", VERSION_AS_STRING "\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x409, 1252
- END
-END
-
-#endif // English (United States) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/flutter_window.cpp b/frontend/app_flowy/packages/appflowy_board/example/windows/runner/flutter_window.cpp
deleted file mode 100644
index b43b9095ea..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/flutter_window.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-#include "flutter_window.h"
-
-#include <optional>
-
-#include "flutter/generated_plugin_registrant.h"
-
-FlutterWindow::FlutterWindow(const flutter::DartProject& project)
- : project_(project) {}
-
-FlutterWindow::~FlutterWindow() {}
-
-bool FlutterWindow::OnCreate() {
- if (!Win32Window::OnCreate()) {
- return false;
- }
-
- RECT frame = GetClientArea();
-
- // The size here must match the window dimensions to avoid unnecessary surface
- // creation / destruction in the startup path.
- flutter_controller_ = std::make_unique<flutter::FlutterViewController>(
- frame.right - frame.left, frame.bottom - frame.top, project_);
- // Ensure that basic setup of the controller was successful.
- if (!flutter_controller_->engine() || !flutter_controller_->view()) {
- return false;
- }
- RegisterPlugins(flutter_controller_->engine());
- SetChildContent(flutter_controller_->view()->GetNativeWindow());
- return true;
-}
-
-void FlutterWindow::OnDestroy() {
- if (flutter_controller_) {
- flutter_controller_ = nullptr;
- }
-
- Win32Window::OnDestroy();
-}
-
-LRESULT
-FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
- WPARAM const wparam,
- LPARAM const lparam) noexcept {
- // Give Flutter, including plugins, an opportunity to handle window messages.
- if (flutter_controller_) {
- std::optional<LRESULT> result =
- flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,
- lparam);
- if (result) {
- return *result;
- }
- }
-
- switch (message) {
- case WM_FONTCHANGE:
- flutter_controller_->engine()->ReloadSystemFonts();
- break;
- }
-
- return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/flutter_window.h b/frontend/app_flowy/packages/appflowy_board/example/windows/runner/flutter_window.h
deleted file mode 100644
index 6da0652f05..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/flutter_window.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef RUNNER_FLUTTER_WINDOW_H_
-#define RUNNER_FLUTTER_WINDOW_H_
-
-#include <flutter/dart_project.h>
-#include <flutter/flutter_view_controller.h>
-
-#include <memory>
-
-#include "win32_window.h"
-
-// A window that does nothing but host a Flutter view.
-class FlutterWindow : public Win32Window {
- public:
- // Creates a new FlutterWindow hosting a Flutter view running |project|.
- explicit FlutterWindow(const flutter::DartProject& project);
- virtual ~FlutterWindow();
-
- protected:
- // Win32Window:
- bool OnCreate() override;
- void OnDestroy() override;
- LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
- LPARAM const lparam) noexcept override;
-
- private:
- // The project to run.
- flutter::DartProject project_;
-
- // The Flutter instance hosted by this window.
- std::unique_ptr<flutter::FlutterViewController> flutter_controller_;
-};
-
-#endif // RUNNER_FLUTTER_WINDOW_H_
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/main.cpp b/frontend/app_flowy/packages/appflowy_board/example/windows/runner/main.cpp
deleted file mode 100644
index bcb57b0e2a..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/main.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-#include <flutter/dart_project.h>
-#include <flutter/flutter_view_controller.h>
-#include <windows.h>
-
-#include "flutter_window.h"
-#include "utils.h"
-
-int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
- _In_ wchar_t *command_line, _In_ int show_command) {
- // Attach to console when present (e.g., 'flutter run') or create a
- // new console when running with a debugger.
- if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
- CreateAndAttachConsole();
- }
-
- // Initialize COM, so that it is available for use in the library and/or
- // plugins.
- ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
-
- flutter::DartProject project(L"data");
-
- std::vector<std::string> command_line_arguments =
- GetCommandLineArguments();
-
- project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
-
- FlutterWindow window(project);
- Win32Window::Point origin(10, 10);
- Win32Window::Size size(1280, 720);
- if (!window.CreateAndShow(L"example", origin, size)) {
- return EXIT_FAILURE;
- }
- window.SetQuitOnClose(true);
-
- ::MSG msg;
- while (::GetMessage(&msg, nullptr, 0, 0)) {
- ::TranslateMessage(&msg);
- ::DispatchMessage(&msg);
- }
-
- ::CoUninitialize();
- return EXIT_SUCCESS;
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/resource.h b/frontend/app_flowy/packages/appflowy_board/example/windows/runner/resource.h
deleted file mode 100644
index 66a65d1e4a..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/resource.h
+++ /dev/null
@@ -1,16 +0,0 @@
-//{{NO_DEPENDENCIES}}
-// Microsoft Visual C++ generated include file.
-// Used by Runner.rc
-//
-#define IDI_APP_ICON 101
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 102
-#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1001
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/resources/app_icon.ico b/frontend/app_flowy/packages/appflowy_board/example/windows/runner/resources/app_icon.ico
deleted file mode 100644
index c04e20caf6..0000000000
Binary files a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/resources/app_icon.ico and /dev/null differ
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/runner.exe.manifest b/frontend/app_flowy/packages/appflowy_board/example/windows/runner/runner.exe.manifest
deleted file mode 100644
index c977c4a425..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/runner.exe.manifest
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
- <application xmlns="urn:schemas-microsoft-com:asm.v3">
- <windowsSettings>
- <dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
- </windowsSettings>
- </application>
- <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
- <application>
- <!-- Windows 10 -->
- <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
- <!-- Windows 8.1 -->
- <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
- <!-- Windows 8 -->
- <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
- <!-- Windows 7 -->
- <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
- </application>
- </compatibility>
-</assembly>
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/utils.cpp b/frontend/app_flowy/packages/appflowy_board/example/windows/runner/utils.cpp
deleted file mode 100644
index f5bf9fa0f5..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/utils.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-#include "utils.h"
-
-#include <flutter_windows.h>
-#include <io.h>
-#include <stdio.h>
-#include <windows.h>
-
-#include <iostream>
-
-void CreateAndAttachConsole() {
- if (::AllocConsole()) {
- FILE *unused;
- if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
- _dup2(_fileno(stdout), 1);
- }
- if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
- _dup2(_fileno(stdout), 2);
- }
- std::ios::sync_with_stdio();
- FlutterDesktopResyncOutputStreams();
- }
-}
-
-std::vector<std::string> GetCommandLineArguments() {
- // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.
- int argc;
- wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
- if (argv == nullptr) {
- return std::vector<std::string>();
- }
-
- std::vector<std::string> command_line_arguments;
-
- // Skip the first argument as it's the binary name.
- for (int i = 1; i < argc; i++) {
- command_line_arguments.push_back(Utf8FromUtf16(argv[i]));
- }
-
- ::LocalFree(argv);
-
- return command_line_arguments;
-}
-
-std::string Utf8FromUtf16(const wchar_t* utf16_string) {
- if (utf16_string == nullptr) {
- return std::string();
- }
- int target_length = ::WideCharToMultiByte(
- CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
- -1, nullptr, 0, nullptr, nullptr);
- std::string utf8_string;
- if (target_length == 0 || target_length > utf8_string.max_size()) {
- return utf8_string;
- }
- utf8_string.resize(target_length);
- int converted_length = ::WideCharToMultiByte(
- CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
- -1, utf8_string.data(),
- target_length, nullptr, nullptr);
- if (converted_length == 0) {
- return std::string();
- }
- return utf8_string;
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/utils.h b/frontend/app_flowy/packages/appflowy_board/example/windows/runner/utils.h
deleted file mode 100644
index 3879d54755..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/utils.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef RUNNER_UTILS_H_
-#define RUNNER_UTILS_H_
-
-#include <string>
-#include <vector>
-
-// Creates a console for the process, and redirects stdout and stderr to
-// it for both the runner and the Flutter library.
-void CreateAndAttachConsole();
-
-// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string
-// encoded in UTF-8. Returns an empty std::string on failure.
-std::string Utf8FromUtf16(const wchar_t* utf16_string);
-
-// Gets the command line arguments passed in as a std::vector<std::string>,
-// encoded in UTF-8. Returns an empty std::vector<std::string> on failure.
-std::vector<std::string> GetCommandLineArguments();
-
-#endif // RUNNER_UTILS_H_
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/win32_window.cpp b/frontend/app_flowy/packages/appflowy_board/example/windows/runner/win32_window.cpp
deleted file mode 100644
index c10f08dc7d..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/win32_window.cpp
+++ /dev/null
@@ -1,245 +0,0 @@
-#include "win32_window.h"
-
-#include <flutter_windows.h>
-
-#include "resource.h"
-
-namespace {
-
-constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW";
-
-// The number of Win32Window objects that currently exist.
-static int g_active_window_count = 0;
-
-using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd);
-
-// Scale helper to convert logical scaler values to physical using passed in
-// scale factor
-int Scale(int source, double scale_factor) {
- return static_cast<int>(source * scale_factor);
-}
-
-// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module.
-// This API is only needed for PerMonitor V1 awareness mode.
-void EnableFullDpiSupportIfAvailable(HWND hwnd) {
- HMODULE user32_module = LoadLibraryA("User32.dll");
- if (!user32_module) {
- return;
- }
- auto enable_non_client_dpi_scaling =
- reinterpret_cast<EnableNonClientDpiScaling*>(
- GetProcAddress(user32_module, "EnableNonClientDpiScaling"));
- if (enable_non_client_dpi_scaling != nullptr) {
- enable_non_client_dpi_scaling(hwnd);
- FreeLibrary(user32_module);
- }
-}
-
-} // namespace
-
-// Manages the Win32Window's window class registration.
-class WindowClassRegistrar {
- public:
- ~WindowClassRegistrar() = default;
-
- // Returns the singleton registar instance.
- static WindowClassRegistrar* GetInstance() {
- if (!instance_) {
- instance_ = new WindowClassRegistrar();
- }
- return instance_;
- }
-
- // Returns the name of the window class, registering the class if it hasn't
- // previously been registered.
- const wchar_t* GetWindowClass();
-
- // Unregisters the window class. Should only be called if there are no
- // instances of the window.
- void UnregisterWindowClass();
-
- private:
- WindowClassRegistrar() = default;
-
- static WindowClassRegistrar* instance_;
-
- bool class_registered_ = false;
-};
-
-WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr;
-
-const wchar_t* WindowClassRegistrar::GetWindowClass() {
- if (!class_registered_) {
- WNDCLASS window_class{};
- window_class.hCursor = LoadCursor(nullptr, IDC_ARROW);
- window_class.lpszClassName = kWindowClassName;
- window_class.style = CS_HREDRAW | CS_VREDRAW;
- window_class.cbClsExtra = 0;
- window_class.cbWndExtra = 0;
- window_class.hInstance = GetModuleHandle(nullptr);
- window_class.hIcon =
- LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON));
- window_class.hbrBackground = 0;
- window_class.lpszMenuName = nullptr;
- window_class.lpfnWndProc = Win32Window::WndProc;
- RegisterClass(&window_class);
- class_registered_ = true;
- }
- return kWindowClassName;
-}
-
-void WindowClassRegistrar::UnregisterWindowClass() {
- UnregisterClass(kWindowClassName, nullptr);
- class_registered_ = false;
-}
-
-Win32Window::Win32Window() {
- ++g_active_window_count;
-}
-
-Win32Window::~Win32Window() {
- --g_active_window_count;
- Destroy();
-}
-
-bool Win32Window::CreateAndShow(const std::wstring& title,
- const Point& origin,
- const Size& size) {
- Destroy();
-
- const wchar_t* window_class =
- WindowClassRegistrar::GetInstance()->GetWindowClass();
-
- const POINT target_point = {static_cast<LONG>(origin.x),
- static_cast<LONG>(origin.y)};
- HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST);
- UINT dpi = FlutterDesktopGetDpiForMonitor(monitor);
- double scale_factor = dpi / 96.0;
-
- HWND window = CreateWindow(
- window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE,
- Scale(origin.x, scale_factor), Scale(origin.y, scale_factor),
- Scale(size.width, scale_factor), Scale(size.height, scale_factor),
- nullptr, nullptr, GetModuleHandle(nullptr), this);
-
- if (!window) {
- return false;
- }
-
- return OnCreate();
-}
-
-// static
-LRESULT CALLBACK Win32Window::WndProc(HWND const window,
- UINT const message,
- WPARAM const wparam,
- LPARAM const lparam) noexcept {
- if (message == WM_NCCREATE) {
- auto window_struct = reinterpret_cast<CREATESTRUCT*>(lparam);
- SetWindowLongPtr(window, GWLP_USERDATA,
- reinterpret_cast<LONG_PTR>(window_struct->lpCreateParams));
-
- auto that = static_cast<Win32Window*>(window_struct->lpCreateParams);
- EnableFullDpiSupportIfAvailable(window);
- that->window_handle_ = window;
- } else if (Win32Window* that = GetThisFromHandle(window)) {
- return that->MessageHandler(window, message, wparam, lparam);
- }
-
- return DefWindowProc(window, message, wparam, lparam);
-}
-
-LRESULT
-Win32Window::MessageHandler(HWND hwnd,
- UINT const message,
- WPARAM const wparam,
- LPARAM const lparam) noexcept {
- switch (message) {
- case WM_DESTROY:
- window_handle_ = nullptr;
- Destroy();
- if (quit_on_close_) {
- PostQuitMessage(0);
- }
- return 0;
-
- case WM_DPICHANGED: {
- auto newRectSize = reinterpret_cast<RECT*>(lparam);
- LONG newWidth = newRectSize->right - newRectSize->left;
- LONG newHeight = newRectSize->bottom - newRectSize->top;
-
- SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth,
- newHeight, SWP_NOZORDER | SWP_NOACTIVATE);
-
- return 0;
- }
- case WM_SIZE: {
- RECT rect = GetClientArea();
- if (child_content_ != nullptr) {
- // Size and position the child window.
- MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left,
- rect.bottom - rect.top, TRUE);
- }
- return 0;
- }
-
- case WM_ACTIVATE:
- if (child_content_ != nullptr) {
- SetFocus(child_content_);
- }
- return 0;
- }
-
- return DefWindowProc(window_handle_, message, wparam, lparam);
-}
-
-void Win32Window::Destroy() {
- OnDestroy();
-
- if (window_handle_) {
- DestroyWindow(window_handle_);
- window_handle_ = nullptr;
- }
- if (g_active_window_count == 0) {
- WindowClassRegistrar::GetInstance()->UnregisterWindowClass();
- }
-}
-
-Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept {
- return reinterpret_cast<Win32Window*>(
- GetWindowLongPtr(window, GWLP_USERDATA));
-}
-
-void Win32Window::SetChildContent(HWND content) {
- child_content_ = content;
- SetParent(content, window_handle_);
- RECT frame = GetClientArea();
-
- MoveWindow(content, frame.left, frame.top, frame.right - frame.left,
- frame.bottom - frame.top, true);
-
- SetFocus(child_content_);
-}
-
-RECT Win32Window::GetClientArea() {
- RECT frame;
- GetClientRect(window_handle_, &frame);
- return frame;
-}
-
-HWND Win32Window::GetHandle() {
- return window_handle_;
-}
-
-void Win32Window::SetQuitOnClose(bool quit_on_close) {
- quit_on_close_ = quit_on_close;
-}
-
-bool Win32Window::OnCreate() {
- // No-op; provided for subclasses.
- return true;
-}
-
-void Win32Window::OnDestroy() {
- // No-op; provided for subclasses.
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/win32_window.h b/frontend/app_flowy/packages/appflowy_board/example/windows/runner/win32_window.h
deleted file mode 100644
index 17ba431125..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/example/windows/runner/win32_window.h
+++ /dev/null
@@ -1,98 +0,0 @@
-#ifndef RUNNER_WIN32_WINDOW_H_
-#define RUNNER_WIN32_WINDOW_H_
-
-#include <windows.h>
-
-#include <functional>
-#include <memory>
-#include <string>
-
-// A class abstraction for a high DPI-aware Win32 Window. Intended to be
-// inherited from by classes that wish to specialize with custom
-// rendering and input handling
-class Win32Window {
- public:
- struct Point {
- unsigned int x;
- unsigned int y;
- Point(unsigned int x, unsigned int y) : x(x), y(y) {}
- };
-
- struct Size {
- unsigned int width;
- unsigned int height;
- Size(unsigned int width, unsigned int height)
- : width(width), height(height) {}
- };
-
- Win32Window();
- virtual ~Win32Window();
-
- // Creates and shows a win32 window with |title| and position and size using
- // |origin| and |size|. New windows are created on the default monitor. Window
- // sizes are specified to the OS in physical pixels, hence to ensure a
- // consistent size to will treat the width height passed in to this function
- // as logical pixels and scale to appropriate for the default monitor. Returns
- // true if the window was created successfully.
- bool CreateAndShow(const std::wstring& title,
- const Point& origin,
- const Size& size);
-
- // Release OS resources associated with window.
- void Destroy();
-
- // Inserts |content| into the window tree.
- void SetChildContent(HWND content);
-
- // Returns the backing Window handle to enable clients to set icon and other
- // window properties. Returns nullptr if the window has been destroyed.
- HWND GetHandle();
-
- // If true, closing this window will quit the application.
- void SetQuitOnClose(bool quit_on_close);
-
- // Return a RECT representing the bounds of the current client area.
- RECT GetClientArea();
-
- protected:
- // Processes and route salient window messages for mouse handling,
- // size change and DPI. Delegates handling of these to member overloads that
- // inheriting classes can handle.
- virtual LRESULT MessageHandler(HWND window,
- UINT const message,
- WPARAM const wparam,
- LPARAM const lparam) noexcept;
-
- // Called when CreateAndShow is called, allowing subclass window-related
- // setup. Subclasses should return false if setup fails.
- virtual bool OnCreate();
-
- // Called when Destroy is called.
- virtual void OnDestroy();
-
- private:
- friend class WindowClassRegistrar;
-
- // OS callback called by message pump. Handles the WM_NCCREATE message which
- // is passed when the non-client area is being created and enables automatic
- // non-client DPI scaling so that the non-client area automatically
- // responsponds to changes in DPI. All other messages are handled by
- // MessageHandler.
- static LRESULT CALLBACK WndProc(HWND const window,
- UINT const message,
- WPARAM const wparam,
- LPARAM const lparam) noexcept;
-
- // Retrieves a class instance pointer for |window|
- static Win32Window* GetThisFromHandle(HWND const window) noexcept;
-
- bool quit_on_close_ = false;
-
- // window handle for top level window.
- HWND window_handle_ = nullptr;
-
- // window handle for hosted content.
- HWND child_content_ = nullptr;
-};
-
-#endif // RUNNER_WIN32_WINDOW_H_
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/appflowy_board.dart b/frontend/app_flowy/packages/appflowy_board/lib/appflowy_board.dart
deleted file mode 100644
index 6125cf29e6..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/appflowy_board.dart
+++ /dev/null
@@ -1,7 +0,0 @@
-/// AppFlowyBoard library
-library appflowy_board;
-
-export 'src/widgets/board_group/group_data.dart';
-export 'src/widgets/board_data.dart';
-export 'src/widgets/styled_widgets/widgets.dart';
-export 'src/widgets/board.dart';
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/rendering/board_overlay.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/rendering/board_overlay.dart
deleted file mode 100644
index 7c069fa491..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/rendering/board_overlay.dart
+++ /dev/null
@@ -1,408 +0,0 @@
-import 'dart:collection';
-import 'package:flutter/material.dart';
-import 'package:flutter/rendering.dart';
-import 'package:flutter/scheduler.dart';
-
-class BoardOverlayEntry {
- /// This entry will include the widget built by this builder in the overlay at
- /// the entry's position.
- /// The builder will be called again after calling [markNeedsBuild] on this entry.
- final WidgetBuilder builder;
-
- /// Whether this entry occludes the entire overlay.
- ///
- /// If an entry claims to be opaque, then, for efficiency, the overlay will
- /// skip building entries below that entry.
- bool get opaque => _opaque;
- bool _opaque;
-
- BoardOverlayState? _overlay;
- final GlobalKey<_OverlayEntryWidgetState> _key =
- GlobalKey<_OverlayEntryWidgetState>();
-
- set opaque(bool value) {
- if (_opaque == value) return;
-
- _opaque = value;
- assert(_overlay != null);
- _overlay!._didChangeEntryOpacity();
- }
-
- BoardOverlayEntry({
- required this.builder,
- bool opaque = false,
- }) : _opaque = opaque;
-
- /// If this method is called while the [SchedulerBinding.schedulerPhase] is
- /// [SchedulerPhase.persistentCallbacks], i.e. during the build, layout, or
- /// paint phases (see [WidgetsBinding.drawFrame]), then the removal is
- /// delayed until the post-frame callbacks phase. Otherwise the removal is done synchronously.
- void remove() {
- assert(_overlay != null, 'Should only call once');
- final BoardOverlayState overlay = _overlay!;
- _overlay = null;
- if (SchedulerBinding.instance.schedulerPhase ==
- SchedulerPhase.persistentCallbacks) {
- SchedulerBinding.instance.addPostFrameCallback((Duration duration) {
- overlay._remove(this);
- });
- } else {
- overlay._remove(this);
- }
- }
-
- /// Cause this entry to rebuild during the next pipeline flush.
- /// You need to call this function if the output of [builder] has changed.
- void markNeedsBuild() {
- _key.currentState?._markNeedsBuild();
- }
-}
-
-/// A [Stack] of entries that can be managed independently.
-///
-/// Overlays let independent child widgets "float" visual elements on top of
-/// other widgets by inserting them into the overlay's [Stack]. The overlay lets
-/// each of these widgets manage their participation in the overlay using
-/// [OverlayEntry] objects.
-class BoardOverlay extends StatefulWidget {
- final List<BoardOverlayEntry> initialEntries;
-
- const BoardOverlay({
- this.initialEntries = const <BoardOverlayEntry>[],
- Key? key,
- }) : super(key: key);
-
- static BoardOverlayState of(BuildContext context,
- {Widget? debugRequiredFor}) {
- final BoardOverlayState? result =
- context.findAncestorStateOfType<BoardOverlayState>();
- assert(() {
- if (debugRequiredFor != null && result == null) {
- final String additional = context.widget != debugRequiredFor
- ? '\nThe context from which that widget was searching for an overlay was:\n $context'
- : '';
- throw FlutterError('No Overlay widget found.\n'
- '${debugRequiredFor.runtimeType} widgets require an Overlay widget ancestor for correct operation.\n'
- 'The most common way to add an Overlay to an application is to include a MaterialApp or Navigator widget in the runApp() call.\n'
- 'The specific widget that failed to find an overlay was:\n'
- ' $debugRequiredFor'
- '$additional');
- }
- return true;
- }());
- return result!;
- }
-
- @override
- BoardOverlayState createState() => BoardOverlayState();
-}
-
-class BoardOverlayState extends State<BoardOverlay>
- with TickerProviderStateMixin {
- final List<BoardOverlayEntry> _entries = <BoardOverlayEntry>[];
-
- @override
- void initState() {
- super.initState();
- insertAll(widget.initialEntries);
- }
-
- /// Insert the given entry into the overlay.
- ///
- /// If [above] is non-null, the entry is inserted just above [above].
- /// Otherwise, the entry is inserted on top.
- void insert(BoardOverlayEntry entry, {BoardOverlayEntry? above}) {
- assert(entry._overlay == null);
- assert(
- above == null || (above._overlay == this && _entries.contains(above)));
- entry._overlay = this;
- setState(() {
- final int index =
- above == null ? _entries.length : _entries.indexOf(above) + 1;
- _entries.insert(index, entry);
- });
- }
-
- /// Insert all the entries in the given iterable.
- ///
- /// If [above] is non-null, the entries are inserted just above [above].
- /// Otherwise, the entries are inserted on top.
- void insertAll(Iterable<BoardOverlayEntry> entries,
- {BoardOverlayEntry? above}) {
- assert(
- above == null || (above._overlay == this && _entries.contains(above)));
- if (entries.isEmpty) return;
- for (BoardOverlayEntry entry in entries) {
- assert(entry._overlay == null);
- entry._overlay = this;
- }
- setState(() {
- final int index =
- above == null ? _entries.length : _entries.indexOf(above) + 1;
- _entries.insertAll(index, entries);
- });
- }
-
- void _remove(BoardOverlayEntry entry) {
- if (mounted) {
- _entries.remove(entry);
- setState(() {
- /* entry was removed */
- });
- }
- }
-
- void _didChangeEntryOpacity() {
- setState(() {
- // We use the opacity of the entry in our build function, which means we
- // our state has changed.
- });
- }
-
- @override
- Widget build(BuildContext context) {
- // These lists are filled backwards. For the offstage children that
- // does not matter since they aren't rendered, but for the onstage
- // children we reverse the list below before adding it to the tree.
- final List<Widget> onstageChildren = <Widget>[];
- final List<Widget> offstageChildren = <Widget>[];
- bool onstage = true;
- for (int i = _entries.length - 1; i >= 0; i -= 1) {
- final BoardOverlayEntry entry = _entries[i];
- if (onstage) {
- onstageChildren.add(_OverlayEntryWidget(entry));
- if (entry.opaque) onstage = false;
- }
- }
- return _BoardStack(
- onstage: Stack(
- fit: StackFit.passthrough,
- //HanSheng changed it to passthrough so that this widget doesn't change layout constraints
- children: onstageChildren.reversed.toList(growable: false),
- ),
- offstage: offstageChildren,
- );
- }
-
- @override
- void debugFillProperties(DiagnosticPropertiesBuilder properties) {
- super.debugFillProperties(properties);
- properties
- .add(DiagnosticsProperty<List<BoardOverlayEntry>>('entries', _entries));
- }
-}
-
-class _OverlayEntryWidget extends StatefulWidget {
- _OverlayEntryWidget(this.entry) : super(key: entry._key);
-
- final BoardOverlayEntry entry;
-
- @override
- _OverlayEntryWidgetState createState() => _OverlayEntryWidgetState();
-}
-
-class _OverlayEntryWidgetState extends State<_OverlayEntryWidget> {
- @override
- Widget build(BuildContext context) {
- return widget.entry.builder(context);
- }
-
- void _markNeedsBuild() {
- setState(() {});
- }
-}
-
-/// A widget that has one [onstage] child which is visible, and one or more
-/// [offstage] widgets which are kept alive, and are built, but are not laid out
-/// or painted.
-///
-/// The onstage widget must be a Stack.
-///
-/// For convenience, it is legal to use [Positioned] widgets around the offstage
-/// widgets.
-class _BoardStack extends RenderObjectWidget {
- final Stack? onstage;
- final List<Widget> offstage;
-
- const _BoardStack({
- required this.offstage,
- this.onstage,
- });
-
- @override
- _BoardStackElement createElement() => _BoardStackElement(this);
-
- @override
- _RenderBoardObject createRenderObject(BuildContext context) =>
- _RenderBoardObject();
-}
-
-class _BoardStackElement extends RenderObjectElement {
- Element? _onstage;
- static final Object _onstageSlot = Object();
- late List<Element> _offstage;
- final Set<Element> _forgottenOffstageChildren = HashSet<Element>();
-
- _BoardStackElement(_BoardStack widget)
- : assert(!debugChildrenHaveDuplicateKeys(widget, widget.offstage)),
- super(widget);
-
- @override
- _BoardStack get widget => super.widget as _BoardStack;
-
- @override
- _RenderBoardObject get renderObject =>
- super.renderObject as _RenderBoardObject;
-
- @override
- void insertRenderObjectChild(RenderBox child, dynamic slot) {
- assert(renderObject.debugValidateChild(child));
- if (slot == _onstageSlot) {
- assert(child is RenderStack);
- renderObject.child = child as RenderStack?;
- } else {
- assert(slot == null || slot is Element);
- renderObject.insert(child, after: slot?.renderObject);
- }
- }
-
- @override
- void moveRenderObjectChild(RenderBox child, dynamic oldSlot, dynamic slot) {
- if (slot == _onstageSlot) {
- renderObject.remove(child);
- assert(child is RenderStack);
- renderObject.child = child as RenderStack?;
- } else {
- assert(slot == null || slot is Element);
- if (renderObject.child == child) {
- renderObject.child = null;
- renderObject.insert(child, after: slot?.renderObject);
- } else {
- renderObject.move(child, after: slot?.renderObject);
- }
- }
- }
-
- @override
- void removeRenderObjectChild(RenderBox child, dynamic slot) {
- if (renderObject.child == child) {
- renderObject.child = null;
- } else {
- renderObject.remove(child);
- }
- }
-
- @override
- void visitChildren(ElementVisitor visitor) {
- if (_onstage != null) visitor(_onstage!);
- for (Element child in _offstage) {
- if (!_forgottenOffstageChildren.contains(child)) visitor(child);
- }
- }
-
- @override
- void debugVisitOnstageChildren(ElementVisitor visitor) {
- if (_onstage != null) visitor(_onstage!);
- }
-
- @override
- void forgetChild(Element child) {
- if (child == _onstage) {
- _onstage = null;
- } else {
- assert(_offstage.contains(child));
- assert(!_forgottenOffstageChildren.contains(child));
- _forgottenOffstageChildren.add(child);
- }
- super.forgetChild(child);
- }
-
- @override
- void mount(Element? parent, dynamic newSlot) {
- super.mount(parent, newSlot);
- _onstage = updateChild(_onstage, widget.onstage, _onstageSlot);
- _offstage = [];
- }
-
- @override
- void update(_BoardStack newWidget) {
- super.update(newWidget);
- assert(widget == newWidget);
- _onstage = updateChild(_onstage, widget.onstage, _onstageSlot);
- _offstage = updateChildren(_offstage, widget.offstage,
- forgottenChildren: _forgottenOffstageChildren);
- _forgottenOffstageChildren.clear();
- }
-}
-
-// A render object which lays out and paints one subtree while keeping a list
-// of other subtrees alive but not laid out or painted.
-//
-// The subtree that is laid out and painted must be a [RenderStack].
-//
-// This class uses [StackParentData] objects for its parent data so that the
-// children of its primary subtree's stack can be moved to this object's list
-// of zombie children without changing their parent data objects.
-class _RenderBoardObject extends RenderBox
- with
- RenderObjectWithChildMixin<RenderStack>,
- RenderProxyBoxMixin<RenderStack>,
- ContainerRenderObjectMixin<RenderBox, StackParentData> {
- @override
- void setupParentData(RenderObject child) {
- if (child.parentData is! StackParentData) {
- child.parentData = StackParentData();
- }
- }
-
- @override
- void redepthChildren() {
- if (child != null) redepthChild(child!);
- super.redepthChildren();
- }
-
- @override
- void visitChildren(RenderObjectVisitor visitor) {
- if (child != null) visitor(child!);
- super.visitChildren(visitor);
- }
-
- @override
- List<DiagnosticsNode> debugDescribeChildren() {
- final List<DiagnosticsNode> children = <DiagnosticsNode>[];
-
- if (child != null) children.add(child!.toDiagnosticsNode(name: 'onstage'));
-
- if (firstChild != null) {
- RenderBox child = firstChild!;
-
- int count = 1;
- while (true) {
- children.add(
- child.toDiagnosticsNode(
- name: 'offstage $count',
- style: DiagnosticsTreeStyle.offstage,
- ),
- );
- if (child == lastChild) break;
- final StackParentData childParentData =
- child.parentData! as StackParentData;
- child = childParentData.nextSibling!;
- count += 1;
- }
- } else {
- children.add(
- DiagnosticsNode.message(
- 'no offstage children',
- style: DiagnosticsTreeStyle.offstage,
- ),
- );
- }
- return children;
- }
-
- @override
- void visitChildrenForSemantics(RenderObjectVisitor visitor) {
- if (child != null) visitor(child!);
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/utils/log.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/utils/log.dart
deleted file mode 100644
index b73d28eed2..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/utils/log.dart
+++ /dev/null
@@ -1,39 +0,0 @@
-import 'package:flutter/material.dart';
-
-// ignore: constant_identifier_names
-const DART_LOG = "Dart_LOG";
-
-class Log {
- static const enableLog = false;
-
- static void info(String? message) {
- if (enableLog) {
- debugPrint('AppFlowyBoard: ℹ️[Info]=> $message');
- }
- }
-
- static void debug(String? message) {
- if (enableLog) {
- debugPrint(
- 'AppFlowyBoard: 🐛[Debug] - ${DateTime.now().second}=> $message');
- }
- }
-
- static void warn(String? message) {
- if (enableLog) {
- debugPrint(
- 'AppFlowyBoard: 🐛[Warn] - ${DateTime.now().second} => $message');
- }
- }
-
- static void trace(String? message) {
- if (enableLog) {
- debugPrint(
- 'AppFlowyBoard: ❗️[Trace] - ${DateTime.now().second}=> $message');
- }
- }
-
- static void error(String? message) {
- debugPrint('AppFlowyBoard: ❌[Error] - ${DateTime.now().second}=> $message');
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/board.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/board.dart
deleted file mode 100644
index 49da466c8c..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/board.dart
+++ /dev/null
@@ -1,409 +0,0 @@
-import 'package:appflowy_board/src/utils/log.dart';
-import 'package:flutter/material.dart';
-import 'package:provider/provider.dart';
-import 'board_data.dart';
-import 'board_group/group.dart';
-import 'board_group/group_data.dart';
-import 'reorder_flex/drag_state.dart';
-import 'reorder_flex/drag_target_interceptor.dart';
-import 'reorder_flex/reorder_flex.dart';
-import 'reorder_phantom/phantom_controller.dart';
-import '../rendering/board_overlay.dart';
-
-class AppFlowyBoardScrollController {
- AppFlowyBoardState? _boardState;
-
- void scrollToBottom(String groupId,
- {void Function(BuildContext)? completed}) {
- _boardState?.reorderFlexActionMap[groupId]?.scrollToBottom(completed);
- }
-}
-
-class AppFlowyBoardConfig {
- final double cornerRadius;
- final EdgeInsets groupPadding;
- final EdgeInsets groupItemPadding;
- final EdgeInsets footerPadding;
- final EdgeInsets headerPadding;
- final EdgeInsets cardPadding;
- final Color groupBackgroundColor;
- final bool stretchGroupHeight;
-
- const AppFlowyBoardConfig({
- this.cornerRadius = 6.0,
- this.groupPadding = const EdgeInsets.symmetric(horizontal: 8),
- this.groupItemPadding = const EdgeInsets.symmetric(horizontal: 12),
- this.footerPadding = const EdgeInsets.symmetric(horizontal: 12),
- this.headerPadding = const EdgeInsets.symmetric(horizontal: 16),
- this.cardPadding = const EdgeInsets.symmetric(horizontal: 3, vertical: 4),
- this.groupBackgroundColor = Colors.transparent,
- this.stretchGroupHeight = true,
- });
-}
-
-class AppFlowyBoard extends StatelessWidget {
- /// The widget that will be rendered as the background of the board.
- final Widget? background;
-
- /// The [cardBuilder] function which will be invoked on each card build.
- /// The [cardBuilder] takes the [BuildContext],[AppFlowyGroupData] and
- /// the corresponding [AppFlowyGroupItem].
- ///
- /// must return a widget.
- final AppFlowyBoardCardBuilder cardBuilder;
-
- /// The [headerBuilder] function which will be invoked on each group build.
- /// The [headerBuilder] takes the [BuildContext] and [AppFlowyGroupData].
- ///
- /// must return a widget.
- final AppFlowyBoardHeaderBuilder? headerBuilder;
-
- /// The [footerBuilder] function which will be invoked on each group build.
- /// The [footerBuilder] takes the [BuildContext] and [AppFlowyGroupData].
- ///
- /// must return a widget.
- final AppFlowyBoardFooterBuilder? footerBuilder;
-
- /// A controller for [AppFlowyBoard] widget.
- ///
- /// A [AppFlowyBoardController] can be used to provide an initial value of
- /// the board by calling `addGroup` method with the passed in parameter
- /// [AppFlowyGroupData]. A [AppFlowyGroupData] represents one
- /// group data. Whenever the user modifies the board, this controller will
- /// update the corresponding group data.
- ///
- /// Also, you can register the callbacks that receive the changes. Check out
- /// the [AppFlowyBoardController] for more information.
- ///
- final AppFlowyBoardController controller;
-
- /// A constraints applied to [AppFlowyBoardGroup] widget.
- final BoxConstraints groupConstraints;
-
- /// A controller is used by the [ReorderFlex].
- ///
- /// The [ReorderFlex] will used the primary scrollController of the current
- /// [BuildContext] by using PrimaryScrollController.of(context).
- /// If the primary scrollController is null, we will assign a new [ScrollController].
- final ScrollController? scrollController;
-
- ///
- final AppFlowyBoardConfig config;
-
- /// A controller is used to control each group scroll actions.
- ///
- final AppFlowyBoardScrollController? boardScrollController;
-
- const AppFlowyBoard({
- required this.controller,
- required this.cardBuilder,
- this.background,
- this.footerBuilder,
- this.headerBuilder,
- this.scrollController,
- this.boardScrollController,
- this.groupConstraints = const BoxConstraints(maxWidth: 200),
- this.config = const AppFlowyBoardConfig(),
- Key? key,
- }) : super(key: key);
-
- @override
- Widget build(BuildContext context) {
- return ChangeNotifierProvider.value(
- value: controller,
- child: Consumer<AppFlowyBoardController>(
- builder: (context, notifier, child) {
- final boardState = AppFlowyBoardState();
- BoardPhantomController phantomController = BoardPhantomController(
- delegate: controller,
- groupsState: boardState,
- );
-
- if (boardScrollController != null) {
- boardScrollController!._boardState = boardState;
- }
-
- return _AppFlowyBoardContent(
- config: config,
- dataController: controller,
- scrollController: scrollController,
- scrollManager: boardScrollController,
- boardState: boardState,
- background: background,
- delegate: phantomController,
- groupConstraints: groupConstraints,
- cardBuilder: cardBuilder,
- footerBuilder: footerBuilder,
- headerBuilder: headerBuilder,
- phantomController: phantomController,
- onReorder: controller.moveGroup,
- );
- },
- ),
- );
- }
-}
-
-class _AppFlowyBoardContent extends StatefulWidget {
- final ScrollController? scrollController;
- final OnReorder onReorder;
- final AppFlowyBoardController dataController;
- final Widget? background;
- final AppFlowyBoardConfig config;
- final ReorderFlexConfig reorderFlexConfig;
- final BoxConstraints groupConstraints;
- final AppFlowyBoardScrollController? scrollManager;
- final AppFlowyBoardState boardState;
- final AppFlowyBoardCardBuilder cardBuilder;
- final AppFlowyBoardHeaderBuilder? headerBuilder;
- final AppFlowyBoardFooterBuilder? footerBuilder;
- final OverlapDragTargetDelegate delegate;
- final BoardPhantomController phantomController;
-
- const _AppFlowyBoardContent({
- required this.config,
- required this.onReorder,
- required this.delegate,
- required this.dataController,
- required this.scrollManager,
- required this.boardState,
- this.scrollController,
- this.background,
- required this.groupConstraints,
- required this.cardBuilder,
- this.footerBuilder,
- this.headerBuilder,
- required this.phantomController,
- Key? key,
- }) : reorderFlexConfig = const ReorderFlexConfig(
- direction: Axis.horizontal,
- dragDirection: Axis.horizontal,
- ),
- super(key: key);
-
- @override
- State<_AppFlowyBoardContent> createState() => _AppFlowyBoardContentState();
-}
-
-class _AppFlowyBoardContentState extends State<_AppFlowyBoardContent> {
- final GlobalKey _boardContentKey =
- GlobalKey(debugLabel: '$_AppFlowyBoardContent overlay key');
- late BoardOverlayEntry _overlayEntry;
-
- @override
- void initState() {
- _overlayEntry = BoardOverlayEntry(
- builder: (BuildContext context) {
- final interceptor = OverlappingDragTargetInterceptor(
- reorderFlexId: widget.dataController.identifier,
- acceptedReorderFlexId: widget.dataController.groupIds,
- delegate: widget.delegate,
- columnsState: widget.boardState,
- );
-
- final reorderFlex = ReorderFlex(
- config: widget.reorderFlexConfig,
- scrollController: widget.scrollController,
- onReorder: widget.onReorder,
- dataSource: widget.dataController,
- interceptor: interceptor,
- children: _buildColumns(),
- );
-
- return Stack(
- alignment: AlignmentDirectional.topStart,
- children: [
- if (widget.background != null)
- Container(
- clipBehavior: Clip.hardEdge,
- decoration: BoxDecoration(
- borderRadius:
- BorderRadius.circular(widget.config.cornerRadius),
- ),
- child: widget.background,
- ),
- reorderFlex,
- ],
- );
- },
- opaque: false,
- );
- super.initState();
- }
-
- @override
- Widget build(BuildContext context) {
- return BoardOverlay(
- key: _boardContentKey,
- initialEntries: [_overlayEntry],
- );
- }
-
- List<Widget> _buildColumns() {
- final List<Widget> children =
- widget.dataController.groupDatas.asMap().entries.map(
- (item) {
- final columnData = item.value;
- final columnIndex = item.key;
-
- final dataSource = _BoardGroupDataSourceImpl(
- groupId: columnData.id,
- dataController: widget.dataController,
- );
-
- final reorderFlexAction = ReorderFlexActionImpl();
- widget.boardState.reorderFlexActionMap[columnData.id] =
- reorderFlexAction;
-
- return ChangeNotifierProvider.value(
- key: ValueKey(columnData.id),
- value: widget.dataController.getGroupController(columnData.id),
- child: Consumer<AppFlowyGroupController>(
- builder: (context, value, child) {
- final boardColumn = AppFlowyBoardGroup(
- // key: PageStorageKey<String>(columnData.id),
- margin: _marginFromIndex(columnIndex),
- itemMargin: widget.config.groupItemPadding,
- headerBuilder: _buildHeader,
- footerBuilder: widget.footerBuilder,
- cardBuilder: widget.cardBuilder,
- dataSource: dataSource,
- scrollController: ScrollController(),
- phantomController: widget.phantomController,
- onReorder: widget.dataController.moveGroupItem,
- cornerRadius: widget.config.cornerRadius,
- backgroundColor: widget.config.groupBackgroundColor,
- dragStateStorage: widget.boardState,
- dragTargetKeys: widget.boardState,
- reorderFlexAction: reorderFlexAction,
- stretchGroupHeight: widget.config.stretchGroupHeight,
- );
-
- return ConstrainedBox(
- constraints: widget.groupConstraints,
- child: boardColumn,
- );
- },
- ),
- );
- },
- ).toList();
-
- return children;
- }
-
- Widget? _buildHeader(
- BuildContext context,
- AppFlowyGroupData groupData,
- ) {
- if (widget.headerBuilder == null) {
- return null;
- }
- return Selector<AppFlowyGroupController, AppFlowyGroupHeaderData>(
- selector: (context, controller) => controller.groupData.headerData,
- builder: (context, headerData, _) {
- return widget.headerBuilder!(context, groupData)!;
- },
- );
- }
-
- EdgeInsets _marginFromIndex(int index) {
- if (widget.dataController.groupDatas.isEmpty) {
- return widget.config.groupPadding;
- }
-
- if (index == 0) {
- return EdgeInsets.only(right: widget.config.groupPadding.right);
- }
-
- if (index == widget.dataController.groupDatas.length - 1) {
- return EdgeInsets.only(left: widget.config.groupPadding.left);
- }
-
- return widget.config.groupPadding;
- }
-}
-
-class _BoardGroupDataSourceImpl extends AppFlowyGroupDataDataSource {
- String groupId;
- final AppFlowyBoardController dataController;
-
- _BoardGroupDataSourceImpl({
- required this.groupId,
- required this.dataController,
- });
-
- @override
- AppFlowyGroupData get groupData =>
- dataController.getGroupController(groupId)!.groupData;
-
- @override
- List<String> get acceptedGroupIds => dataController.groupIds;
-}
-
-/// A context contains the group states including the draggingState.
-///
-/// [draggingState] represents the dragging state of the group.
-class AppFlowyGroupContext {
- DraggingState? draggingState;
-}
-
-class AppFlowyBoardState extends DraggingStateStorage
- with ReorderDragTargeKeys {
- final Map<String, DraggingState> groupDragStates = {};
- final Map<String, Map<String, GlobalObjectKey>> groupDragTargetKeys = {};
-
- /// Quick access to the [AppFlowyBoardGroup], the [GlobalKey] is bind to the
- /// AppFlowyBoardGroup's [ReorderFlex] widget.
- final Map<String, ReorderFlexActionImpl> reorderFlexActionMap = {};
-
- @override
- DraggingState? readState(String reorderFlexId) {
- return groupDragStates[reorderFlexId];
- }
-
- @override
- void insertState(String reorderFlexId, DraggingState state) {
- Log.trace('$reorderFlexId Write dragging state: $state');
- groupDragStates[reorderFlexId] = state;
- }
-
- @override
- void removeState(String reorderFlexId) {
- groupDragStates.remove(reorderFlexId);
- }
-
- @override
- void insertDragTarget(
- String reorderFlexId,
- String key,
- GlobalObjectKey<State<StatefulWidget>> value,
- ) {
- Map<String, GlobalObjectKey>? group = groupDragTargetKeys[reorderFlexId];
- if (group == null) {
- group = {};
- groupDragTargetKeys[reorderFlexId] = group;
- }
- group[key] = value;
- }
-
- @override
- GlobalObjectKey<State<StatefulWidget>>? getDragTarget(
- String reorderFlexId,
- String key,
- ) {
- Map<String, GlobalObjectKey>? group = groupDragTargetKeys[reorderFlexId];
- if (group != null) {
- return group[key];
- } else {
- return null;
- }
- }
-
- @override
- void removeDragTarget(String reorderFlexId) {
- groupDragTargetKeys.remove(reorderFlexId);
- }
-}
-
-class ReorderFlexActionImpl extends ReorderFlexAction {}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/board_data.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/board_data.dart
deleted file mode 100644
index 43dd9728fc..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/board_data.dart
+++ /dev/null
@@ -1,304 +0,0 @@
-import 'dart:collection';
-
-import 'package:appflowy_board/src/widgets/board_group/group_data.dart';
-import 'package:equatable/equatable.dart';
-
-import '../utils/log.dart';
-import 'reorder_flex/reorder_flex.dart';
-import 'package:flutter/material.dart';
-import 'reorder_phantom/phantom_controller.dart';
-
-typedef OnMoveGroup = void Function(
- String fromGroupId,
- int fromIndex,
- String toGroupId,
- int toIndex,
-);
-
-typedef OnMoveGroupItem = void Function(
- String groupId,
- int fromIndex,
- int toIndex,
-);
-
-typedef OnMoveGroupItemToGroup = void Function(
- String fromGroupId,
- int fromIndex,
- String toGroupId,
- int toIndex,
-);
-
-/// A controller for [AppFlowyBoard] widget.
-///
-/// A [AppFlowyBoardController] can be used to provide an initial value of
-/// the board by calling `addGroup` method with the passed in parameter
-/// [AppFlowyGroupData]. A [AppFlowyGroupData] represents one
-/// group data. Whenever the user modifies the board, this controller will
-/// update the corresponding group data.
-///
-/// Also, you can register the callbacks that receive the changes.
-/// [onMoveGroup] will get called when moving the group from one position to
-/// another.
-///
-/// [onMoveGroupItem] will get called when moving the group's items.
-///
-/// [onMoveGroupItemToGroup] will get called when moving the group's item from
-/// one group to another group.
-class AppFlowyBoardController extends ChangeNotifier
- with EquatableMixin, BoardPhantomControllerDelegate, ReoderFlexDataSource {
- final List<AppFlowyGroupData> _groupDatas = [];
-
- /// [onMoveGroup] will get called when moving the group from one position to
- /// another.
- final OnMoveGroup? onMoveGroup;
-
- /// [onMoveGroupItem] will get called when moving the group's items.
- final OnMoveGroupItem? onMoveGroupItem;
-
- /// [onMoveGroupItemToGroup] will get called when moving the group's item from
- /// one group to another group.
- final OnMoveGroupItemToGroup? onMoveGroupItemToGroup;
-
- /// Returns the unmodifiable list of [AppFlowyGroupData]
- UnmodifiableListView<AppFlowyGroupData> get groupDatas =>
- UnmodifiableListView(_groupDatas);
-
- /// Returns list of group id
- List<String> get groupIds =>
- _groupDatas.map((groupData) => groupData.id).toList();
-
- final LinkedHashMap<String, AppFlowyGroupController> _groupControllers =
- LinkedHashMap();
-
- AppFlowyBoardController({
- this.onMoveGroup,
- this.onMoveGroupItem,
- this.onMoveGroupItemToGroup,
- });
-
- /// Adds a new group to the end of the current group list.
- ///
- /// If you don't want to notify the listener after adding a new group, the
- /// [notify] should set to false. Default value is true.
- void addGroup(AppFlowyGroupData groupData, {bool notify = true}) {
- if (_groupControllers[groupData.id] != null) return;
-
- final controller = AppFlowyGroupController(groupData: groupData);
- _groupDatas.add(groupData);
- _groupControllers[groupData.id] = controller;
- if (notify) notifyListeners();
- }
-
- /// Adds a list of groups to the end of the current group list.
- ///
- /// If you don't want to notify the listener after adding the groups, the
- /// [notify] should set to false. Default value is true.
- void addGroups(List<AppFlowyGroupData> groups, {bool notify = true}) {
- for (final column in groups) {
- addGroup(column, notify: false);
- }
-
- if (groups.isNotEmpty && notify) notifyListeners();
- }
-
- /// Removes the group with id [groupId]
- ///
- /// If you don't want to notify the listener after removing the group, the
- /// [notify] should set to false. Default value is true.
- void removeGroup(String groupId, {bool notify = true}) {
- final index = _groupDatas.indexWhere((group) => group.id == groupId);
- if (index == -1) {
- Log.warn(
- 'Try to remove Group:[$groupId] failed. Group:[$groupId] not exist');
- }
-
- if (index != -1) {
- _groupDatas.removeAt(index);
- _groupControllers.remove(groupId);
-
- if (notify) notifyListeners();
- }
- }
-
- /// Removes a list of groups
- ///
- /// If you don't want to notify the listener after removing the groups, the
- /// [notify] should set to false. Default value is true.
- void removeGroups(List<String> groupIds, {bool notify = true}) {
- for (final groupId in groupIds) {
- removeGroup(groupId, notify: false);
- }
-
- if (groupIds.isNotEmpty && notify) notifyListeners();
- }
-
- /// Remove all the groups controller.
- ///
- /// This method should get called when you want to remove all the current
- /// groups or get ready to reinitialize the [AppFlowyBoard].
- void clear() {
- _groupDatas.clear();
- for (final group in _groupControllers.values) {
- group.dispose();
- }
- _groupControllers.clear();
-
- notifyListeners();
- }
-
- /// Returns the [AppFlowyGroupController] with id [groupId].
- AppFlowyGroupController? getGroupController(String groupId) {
- final groupController = _groupControllers[groupId];
- if (groupController == null) {
- Log.warn('Group:[$groupId] \'s controller is not exist');
- }
-
- return groupController;
- }
-
- /// Moves the group controller from [fromIndex] to [toIndex] and notify the
- /// listeners.
- ///
- /// If you don't want to notify the listener after moving the group, the
- /// [notify] should set to false. Default value is true.
- void moveGroup(int fromIndex, int toIndex, {bool notify = true}) {
- final toGroupData = _groupDatas[toIndex];
- final fromGroupData = _groupDatas.removeAt(fromIndex);
-
- _groupDatas.insert(toIndex, fromGroupData);
- onMoveGroup?.call(fromGroupData.id, fromIndex, toGroupData.id, toIndex);
- if (notify) notifyListeners();
- }
-
- /// Moves the group's item from [fromIndex] to [toIndex]
- /// If the group with id [groupId] is not exist, this method will do nothing.
- void moveGroupItem(String groupId, int fromIndex, int toIndex) {
- if (getGroupController(groupId)?.move(fromIndex, toIndex) ?? false) {
- onMoveGroupItem?.call(groupId, fromIndex, toIndex);
- }
- }
-
- /// Adds the [AppFlowyGroupItem] to the end of the group
- ///
- /// If the group with id [groupId] is not exist, this method will do nothing.
- void addGroupItem(String groupId, AppFlowyGroupItem item) {
- getGroupController(groupId)?.add(item);
- }
-
- /// Inserts the [AppFlowyGroupItem] at [index] in the group
- ///
- /// It will do nothing if the group with id [groupId] is not exist
- void insertGroupItem(String groupId, int index, AppFlowyGroupItem item) {
- getGroupController(groupId)?.insert(index, item);
- }
-
- /// Removes the item with id [itemId] from the group
- ///
- /// It will do nothing if the group with id [groupId] is not exist
- void removeGroupItem(String groupId, String itemId) {
- getGroupController(groupId)?.removeWhere((item) => item.id == itemId);
- }
-
- /// Replaces or inserts the [AppFlowyGroupItem] to the end of the group.
- ///
- /// If the group with id [groupId] is not exist, this method will do nothing.
- void updateGroupItem(String groupId, AppFlowyGroupItem item) {
- getGroupController(groupId)?.replaceOrInsertItem(item);
- }
-
- void enableGroupDragging(bool isEnable) {
- for (var groupController in _groupControllers.values) {
- groupController.enableDragging(isEnable);
- }
-
- notifyListeners();
- }
-
- /// Moves the item at [fromGroupIndex] in group with id [fromGroupId] to
- /// group with id [toGroupId] at [toGroupIndex]
- @override
- @protected
- void moveGroupItemToAnotherGroup(
- String fromGroupId,
- int fromGroupIndex,
- String toGroupId,
- int toGroupIndex,
- ) {
- final fromGroupController = getGroupController(fromGroupId)!;
- final toGroupController = getGroupController(toGroupId)!;
- final fromGroupItem = fromGroupController.removeAt(fromGroupIndex);
- if (fromGroupItem == null) return;
-
- if (toGroupController.items.length > toGroupIndex) {
- assert(toGroupController.items[toGroupIndex] is PhantomGroupItem);
-
- toGroupController.replace(toGroupIndex, fromGroupItem);
- onMoveGroupItemToGroup?.call(
- fromGroupId,
- fromGroupIndex,
- toGroupId,
- toGroupIndex,
- );
- }
- }
-
- @override
- List<Object?> get props {
- return [_groupDatas];
- }
-
- @override
- AppFlowyGroupController? controller(String groupId) {
- return _groupControllers[groupId];
- }
-
- @override
- String get identifier => '$AppFlowyBoardController';
-
- @override
- UnmodifiableListView<ReoderFlexItem> get items =>
- UnmodifiableListView(_groupDatas);
-
- @override
- @protected
- bool removePhantom(String groupId) {
- final groupController = getGroupController(groupId);
- if (groupController == null) {
- Log.warn('Can not find the group controller with groupId: $groupId');
- return false;
- }
- final index = groupController.items.indexWhere((item) => item.isPhantom);
- final isExist = index != -1;
- if (isExist) {
- groupController.removeAt(index);
-
- Log.debug(
- '[$AppFlowyBoardController] Group:[$groupId] remove phantom, current count: ${groupController.items.length}');
- }
- return isExist;
- }
-
- @override
- @protected
- void updatePhantom(String groupId, int newIndex) {
- final groupController = getGroupController(groupId)!;
- final index = groupController.items.indexWhere((item) => item.isPhantom);
-
- if (index != -1) {
- if (index != newIndex) {
- Log.trace(
- '[$BoardPhantomController] update $groupId:$index to $groupId:$newIndex');
- final item = groupController.removeAt(index, notify: false);
- if (item != null) {
- groupController.insert(newIndex, item, notify: false);
- }
- }
- }
- }
-
- @override
- @protected
- void insertPhantom(String groupId, int index, PhantomGroupItem item) {
- getGroupController(groupId)!.insert(index, item);
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/board_group/group.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/board_group/group.dart
deleted file mode 100644
index a3acb0a2f1..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/board_group/group.dart
+++ /dev/null
@@ -1,225 +0,0 @@
-import 'dart:collection';
-
-import 'package:appflowy_board/src/widgets/reorder_flex/drag_state.dart';
-import 'package:flutter/material.dart';
-import '../../rendering/board_overlay.dart';
-import '../../utils/log.dart';
-import '../reorder_phantom/phantom_controller.dart';
-import '../reorder_flex/reorder_flex.dart';
-import '../reorder_flex/drag_target_interceptor.dart';
-import 'group_data.dart';
-
-typedef OnGroupDragStarted = void Function(int index);
-
-typedef OnGroupDragEnded = void Function(String groupId);
-
-typedef OnGroupReorder = void Function(
- String groupId,
- int fromIndex,
- int toIndex,
-);
-
-typedef OnGroupDeleted = void Function(String groupId, int deletedIndex);
-
-typedef OnGroupInserted = void Function(String groupId, int insertedIndex);
-
-typedef AppFlowyBoardCardBuilder = Widget Function(
- BuildContext context,
- AppFlowyGroupData groupData,
- AppFlowyGroupItem item,
-);
-
-typedef AppFlowyBoardHeaderBuilder = Widget? Function(
- BuildContext context,
- AppFlowyGroupData groupData,
-);
-
-typedef AppFlowyBoardFooterBuilder = Widget Function(
- BuildContext context,
- AppFlowyGroupData groupData,
-);
-
-abstract class AppFlowyGroupDataDataSource extends ReoderFlexDataSource {
- AppFlowyGroupData get groupData;
-
- List<String> get acceptedGroupIds;
-
- @override
- String get identifier => groupData.id;
-
- @override
- UnmodifiableListView<AppFlowyGroupItem> get items => groupData.items;
-
- void debugPrint() {
- String msg = '[$AppFlowyGroupDataDataSource] $groupData data: ';
- for (var element in items) {
- msg = '$msg$element,';
- }
-
- Log.debug(msg);
- }
-}
-
-/// A [AppFlowyBoardGroup] represents the group UI of the Board.
-///
-class AppFlowyBoardGroup extends StatefulWidget {
- final AppFlowyGroupDataDataSource dataSource;
- final ScrollController? scrollController;
- final ReorderFlexConfig config;
- final OnGroupDragStarted? onDragStarted;
- final OnGroupReorder onReorder;
- final OnGroupDragEnded? onDragEnded;
-
- final BoardPhantomController phantomController;
-
- String get groupId => dataSource.groupData.id;
-
- final AppFlowyBoardCardBuilder cardBuilder;
-
- final AppFlowyBoardHeaderBuilder? headerBuilder;
-
- final AppFlowyBoardFooterBuilder? footerBuilder;
-
- final EdgeInsets margin;
-
- final EdgeInsets itemMargin;
-
- final double cornerRadius;
-
- final Color backgroundColor;
-
- final bool stretchGroupHeight;
-
- final DraggingStateStorage? dragStateStorage;
-
- final ReorderDragTargeKeys? dragTargetKeys;
-
- final ReorderFlexAction? reorderFlexAction;
-
- const AppFlowyBoardGroup({
- Key? key,
- this.headerBuilder,
- this.footerBuilder,
- required this.cardBuilder,
- required this.onReorder,
- required this.dataSource,
- required this.phantomController,
- this.reorderFlexAction,
- this.dragStateStorage,
- this.dragTargetKeys,
- this.scrollController,
- this.onDragStarted,
- this.onDragEnded,
- this.margin = EdgeInsets.zero,
- this.itemMargin = EdgeInsets.zero,
- this.cornerRadius = 0.0,
- this.backgroundColor = Colors.transparent,
- this.stretchGroupHeight = true,
- }) : config = const ReorderFlexConfig(),
- super(key: key);
-
- @override
- State<AppFlowyBoardGroup> createState() => _AppFlowyBoardGroupState();
-}
-
-class _AppFlowyBoardGroupState extends State<AppFlowyBoardGroup> {
- final GlobalKey _columnOverlayKey =
- GlobalKey(debugLabel: '$AppFlowyBoardGroup overlay key');
- late BoardOverlayEntry _overlayEntry;
-
- @override
- void initState() {
- _overlayEntry = BoardOverlayEntry(
- builder: (BuildContext context) {
- final children = widget.dataSource.groupData.items
- .map((item) => _buildWidget(context, item))
- .toList();
-
- final header =
- widget.headerBuilder?.call(context, widget.dataSource.groupData);
-
- final footer =
- widget.footerBuilder?.call(context, widget.dataSource.groupData);
-
- final interceptor = CrossReorderFlexDragTargetInterceptor(
- reorderFlexId: widget.groupId,
- delegate: widget.phantomController,
- acceptedReorderFlexIds: widget.dataSource.acceptedGroupIds,
- draggableTargetBuilder: PhantomDraggableBuilder(),
- );
-
- Widget reorderFlex = ReorderFlex(
- key: ValueKey(widget.groupId),
- dragStateStorage: widget.dragStateStorage,
- dragTargetKeys: widget.dragTargetKeys,
- scrollController: widget.scrollController,
- config: widget.config,
- onDragStarted: (index) {
- widget.phantomController.groupStartDragging(widget.groupId);
- widget.onDragStarted?.call(index);
- },
- onReorder: ((fromIndex, toIndex) {
- if (widget.phantomController.shouldReorder(widget.groupId)) {
- widget.onReorder(widget.groupId, fromIndex, toIndex);
- widget.phantomController.updateIndex(fromIndex, toIndex);
- }
- }),
- onDragEnded: () {
- widget.phantomController.groupEndDragging(widget.groupId);
- widget.onDragEnded?.call(widget.groupId);
- widget.dataSource.debugPrint();
- },
- dataSource: widget.dataSource,
- interceptor: interceptor,
- reorderFlexAction: widget.reorderFlexAction,
- children: children,
- );
-
- reorderFlex = Flexible(
- fit: widget.stretchGroupHeight ? FlexFit.tight : FlexFit.loose,
- child: Padding(padding: widget.itemMargin, child: reorderFlex),
- );
-
- return Container(
- margin: widget.margin,
- clipBehavior: Clip.hardEdge,
- decoration: BoxDecoration(
- color: widget.backgroundColor,
- borderRadius: BorderRadius.circular(widget.cornerRadius),
- ),
- child: Flex(
- direction: Axis.vertical,
- mainAxisSize: MainAxisSize.min,
- children: [
- if (header != null) header,
- reorderFlex,
- if (footer != null) footer,
- ],
- ),
- );
- },
- opaque: false,
- );
- super.initState();
- }
-
- @override
- Widget build(BuildContext context) {
- return BoardOverlay(
- key: _columnOverlayKey,
- initialEntries: [_overlayEntry],
- );
- }
-
- Widget _buildWidget(BuildContext context, AppFlowyGroupItem item) {
- if (item is PhantomGroupItem) {
- return PassthroughPhantomWidget(
- key: UniqueKey(),
- opacity: widget.config.draggingWidgetOpacity,
- passthroughPhantomContext: item.phantomContext,
- );
- } else {
- return widget.cardBuilder(context, widget.dataSource.groupData, item);
- }
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/board_group/group_data.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/board_group/group_data.dart
deleted file mode 100644
index 659e87fadd..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/board_group/group_data.dart
+++ /dev/null
@@ -1,225 +0,0 @@
-import 'dart:collection';
-
-import 'package:appflowy_board/src/utils/log.dart';
-import 'package:appflowy_board/src/widgets/reorder_flex/reorder_flex.dart';
-import 'package:equatable/equatable.dart';
-import 'package:flutter/material.dart';
-
-typedef IsDraggable = bool;
-
-/// A item represents the generic data model of each group card.
-///
-/// Each item displayed in the group required to implement this class.
-abstract class AppFlowyGroupItem extends ReoderFlexItem {
- bool get isPhantom => false;
-
- @override
- String toString() => id;
-}
-
-/// [AppFlowyGroupController] is used to handle the [AppFlowyGroupData].
-///
-/// * Remove an item by calling [removeAt] method.
-/// * Move item to another position by calling [move] method.
-/// * Insert item to index by calling [insert] method
-/// * Replace item at index by calling [replace] method.
-///
-/// All there operations will notify listeners by default.
-///
-class AppFlowyGroupController extends ChangeNotifier with EquatableMixin {
- final AppFlowyGroupData groupData;
-
- AppFlowyGroupController({
- required this.groupData,
- });
-
- @override
- List<Object?> get props => groupData.props;
-
- /// Returns the readonly List<AppFlowyGroupItem>
- UnmodifiableListView<AppFlowyGroupItem> get items =>
- UnmodifiableListView(groupData.items);
-
- void updateGroupName(String newName) {
- if (groupData.headerData.groupName != newName) {
- groupData.headerData.groupName = newName;
- _notify();
- }
- }
-
- /// Remove the item at [index].
- /// * [index] the index of the item you want to remove
- /// * [notify] the default value of [notify] is true, it will notify the
- /// listener. Set to false if you do not want to notify the listeners.
- ///
- AppFlowyGroupItem? removeAt(int index, {bool notify = true}) {
- if (groupData._items.length <= index) {
- Log.error(
- 'Fatal error, index is out of bounds. Index: $index, len: ${groupData._items.length}');
- return null;
- }
-
- if (index < 0) {
- Log.error('Invalid index:$index');
- return null;
- }
-
- Log.debug('[$AppFlowyGroupController] $groupData remove item at $index');
- final item = groupData._items.removeAt(index);
- if (notify) {
- _notify();
- }
- return item;
- }
-
- void removeWhere(bool Function(AppFlowyGroupItem) condition) {
- final index = items.indexWhere(condition);
- if (index != -1) {
- removeAt(index);
- }
- }
-
- /// Move the item from [fromIndex] to [toIndex]. It will do nothing if the
- /// [fromIndex] equal to the [toIndex].
- bool move(int fromIndex, int toIndex) {
- assert(toIndex >= 0);
- if (groupData._items.length < fromIndex) {
- Log.error(
- 'Out of bounds error. index: $fromIndex should not greater than ${groupData._items.length}');
- return false;
- }
-
- if (fromIndex == toIndex) {
- return false;
- }
-
- Log.debug(
- '[$AppFlowyGroupController] $groupData move item from $fromIndex to $toIndex');
- final item = groupData._items.removeAt(fromIndex);
- groupData._items.insert(toIndex, item);
- _notify();
- return true;
- }
-
- /// Insert an item to [index] and notify the listen if the value of [notify]
- /// is true.
- ///
- /// The default value of [notify] is true.
- bool insert(int index, AppFlowyGroupItem item, {bool notify = true}) {
- assert(index >= 0);
- Log.debug('[$AppFlowyGroupController] $groupData insert $item at $index');
-
- if (_containsItem(item)) {
- return false;
- } else {
- if (groupData._items.length > index) {
- groupData._items.insert(index, item);
- } else {
- groupData._items.add(item);
- }
-
- if (notify) _notify();
- return true;
- }
- }
-
- bool add(AppFlowyGroupItem item, {bool notify = true}) {
- if (_containsItem(item)) {
- return false;
- } else {
- groupData._items.add(item);
- if (notify) _notify();
- return true;
- }
- }
-
- /// Replace the item at index with the [newItem].
- void replace(int index, AppFlowyGroupItem newItem) {
- if (groupData._items.isEmpty) {
- groupData._items.add(newItem);
- Log.debug('[$AppFlowyGroupController] $groupData add $newItem');
- } else {
- if (index >= groupData._items.length) {
- Log.error(
- '[$AppFlowyGroupController] unexpected items length, index should less than the count of the items. Index: $index, items count: ${items.length}');
- return;
- }
-
- final removedItem = groupData._items.removeAt(index);
- groupData._items.insert(index, newItem);
- Log.debug(
- '[$AppFlowyGroupController] $groupData replace $removedItem with $newItem at $index');
- }
-
- _notify();
- }
-
- void replaceOrInsertItem(AppFlowyGroupItem newItem) {
- final index = groupData._items.indexWhere((item) => item.id == newItem.id);
- if (index != -1) {
- groupData._items.removeAt(index);
- groupData._items.insert(index, newItem);
- _notify();
- } else {
- groupData._items.add(newItem);
- _notify();
- }
- }
-
- bool _containsItem(AppFlowyGroupItem item) {
- return groupData._items.indexWhere((element) => element.id == item.id) !=
- -1;
- }
-
- void enableDragging(bool isEnable) {
- groupData.draggable = isEnable;
-
- for (var item in groupData._items) {
- item.draggable = isEnable;
- }
- _notify();
- }
-
- void _notify() {
- notifyListeners();
- }
-}
-
-/// [AppFlowyGroupData] represents the data of each group of the Board.
-class AppFlowyGroupData<CustomData> extends ReoderFlexItem with EquatableMixin {
- @override
- final String id;
- AppFlowyGroupHeaderData headerData;
- final List<AppFlowyGroupItem> _items;
- final CustomData? customData;
-
- AppFlowyGroupData({
- this.customData,
- required this.id,
- required String name,
- List<AppFlowyGroupItem> items = const [],
- }) : _items = items,
- headerData = AppFlowyGroupHeaderData(
- groupId: id,
- groupName: name,
- );
-
- /// Returns the readonly List<AppFlowyGroupItem>
- UnmodifiableListView<AppFlowyGroupItem> get items =>
- UnmodifiableListView([..._items]);
-
- @override
- List<Object?> get props => [id, ..._items];
-
- @override
- String toString() {
- return 'Group:[$id]';
- }
-}
-
-class AppFlowyGroupHeaderData {
- String groupId;
- String groupName;
-
- AppFlowyGroupHeaderData({required this.groupId, required this.groupName});
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/drag_state.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/drag_state.dart
deleted file mode 100644
index d24c99bfbd..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/drag_state.dart
+++ /dev/null
@@ -1,214 +0,0 @@
-import 'package:flutter/material.dart';
-
-import '../../utils/log.dart';
-import 'drag_target.dart';
-import 'reorder_flex.dart';
-
-/// [FlexDragTargetData] is used to store the custom dragging data.
-///
-/// * [draggingIndex] the index of the dragTarget that is being dragged.
-/// * [draggingWidget] the widget of the dragTarget that is being dragged.
-/// * [reorderFlexId] the id of the [ReorderFlex]
-/// * [reorderFlexItem] the item of the [ReorderFlex]
-///
-class FlexDragTargetData extends DragTargetData {
- /// The index of the dragging target in the boardList.
- @override
- final int draggingIndex;
-
- final DraggingState _draggingState;
-
- Widget? get draggingWidget => _draggingState.draggingWidget;
-
- Size? get feedbackSize => _draggingState.feedbackSize;
-
- bool get isDragging => _draggingState.isDragging();
-
- final String dragTargetId;
-
- Offset dragTargetOffset = Offset.zero;
-
- final GlobalObjectKey dragTargetIndexKey;
-
- final String reorderFlexId;
-
- final ReoderFlexItem reorderFlexItem;
-
- FlexDragTargetData({
- required this.dragTargetId,
- required this.draggingIndex,
- required this.reorderFlexId,
- required this.reorderFlexItem,
- required this.dragTargetIndexKey,
- required DraggingState draggingState,
- }) : _draggingState = draggingState;
-
- @override
- String toString() {
- return 'ReorderFlexId: $reorderFlexId, dragTargetId: $dragTargetId';
- }
-
- bool isOverlapWithWidgets(List<GlobalObjectKey> widgetKeys) {
- final renderBox = dragTargetIndexKey.currentContext?.findRenderObject();
- if (renderBox == null) return false;
- if (renderBox is! RenderBox) return false;
- final size = feedbackSize ?? Size.zero;
-
- final Rect dragTargetRect = renderBox.localToGlobal(Offset.zero) & size;
- for (final widgetKey in widgetKeys) {
- final renderObject = widgetKey.currentContext?.findRenderObject();
- if (renderObject != null && renderObject is RenderBox) {
- Rect widgetRect =
- renderObject.localToGlobal(Offset.zero) & renderObject.size;
- return dragTargetRect.overlaps(widgetRect);
- }
- }
-
- return false;
- }
-}
-
-abstract class DraggingStateStorage {
- void insertState(String reorderFlexId, DraggingState state);
- void removeState(String reorderFlexId);
- DraggingState? readState(String reorderFlexId);
-}
-
-class DraggingState {
- final String reorderFlexId;
-
- /// The member of widget.children currently being dragged.
- Widget? _draggingWidget;
-
- Widget? get draggingWidget => _draggingWidget;
-
- /// The last computed size of the feedback widget being dragged.
- Size? feedbackSize = Size.zero;
-
- /// The location that the dragging widget occupied before it started to drag.
- int dragStartIndex = -1;
-
- /// The index that the dragging widget most recently left.
- /// This is used to show an animation of the widget's position.
- int phantomIndex = -1;
-
- /// The index that the dragging widget currently occupies.
- int currentIndex = -1;
-
- /// The widget to move the dragging widget too after the current index.
- int nextIndex = -1;
-
- /// Whether or not we are currently scrolling this view to show a widget.
- bool scrolling = false;
-
- /// The additional margin to place around a computed drop area.
- static const double _dropAreaMargin = 0.0;
-
- DraggingState(this.reorderFlexId);
-
- Size get dropAreaSize {
- if (feedbackSize == null) {
- return Size.zero;
- }
- return feedbackSize! + const Offset(_dropAreaMargin, _dropAreaMargin);
- }
-
- void startDragging(
- Widget draggingWidget,
- int draggingWidgetIndex,
- Size? draggingWidgetSize,
- ) {
- ///
- assert(draggingWidgetIndex >= 0);
-
- _draggingWidget = draggingWidget;
- phantomIndex = draggingWidgetIndex;
- dragStartIndex = draggingWidgetIndex;
- currentIndex = draggingWidgetIndex;
- feedbackSize = draggingWidgetSize;
- }
-
- void endDragging() {
- dragStartIndex = -1;
- phantomIndex = -1;
- currentIndex = -1;
- nextIndex = -1;
- _draggingWidget = null;
- }
-
- /// When the phantomIndex and currentIndex are the same, it means the dragging
- /// widget did move to the destination location.
- void removePhantom() {
- phantomIndex = currentIndex;
- }
-
- /// The dragging widget overlaps with the phantom widget.
- bool isOverlapWithPhantom() {
- return currentIndex != phantomIndex;
- }
-
- bool isPhantomAboveDragTarget() {
- return currentIndex > phantomIndex;
- }
-
- bool isPhantomBelowDragTarget() {
- return currentIndex < phantomIndex;
- }
-
- bool didDragTargetMoveToNext() {
- return currentIndex == nextIndex;
- }
-
- /// Set the currentIndex to nextIndex
- void moveDragTargetToNext() {
- Log.debug('$reorderFlexId updateCurrentIndex: $nextIndex');
- currentIndex = nextIndex;
- }
-
- void updateNextIndex(int index) {
- Log.debug('$reorderFlexId updateNextIndex: $index');
- nextIndex = index;
- }
-
- void setStartDraggingIndex(int index) {
- Log.debug('$reorderFlexId setDragIndex: $index');
- dragStartIndex = index;
- phantomIndex = index;
- currentIndex = index;
- nextIndex = index;
- }
-
- bool isNotDragging() {
- return dragStartIndex == -1;
- }
-
- bool isDragging() {
- return !isNotDragging();
- }
-
- /// When the _dragStartIndex less than the _currentIndex, it means the
- /// dragTarget is going down to the end of the list.
- bool isDragTargetMovingDown() {
- return dragStartIndex < currentIndex;
- }
-
- /// The index represents the widget original index of the list.
- int calculateShiftedIndex(int index) {
- int shiftedIndex = index;
- if (index == dragStartIndex) {
- shiftedIndex = phantomIndex;
- } else if (index > dragStartIndex && index <= phantomIndex) {
- /// phantom move up
- shiftedIndex--;
- } else if (index < dragStartIndex && index >= phantomIndex) {
- /// phantom move down
- shiftedIndex++;
- }
- return shiftedIndex;
- }
-
- @override
- String toString() {
- return 'DragStartIndex: $dragStartIndex, PhantomIndex: $phantomIndex, CurrentIndex: $currentIndex, NextIndex: $nextIndex';
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/drag_target.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/drag_target.dart
deleted file mode 100644
index 7482eb36e0..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/drag_target.dart
+++ /dev/null
@@ -1,550 +0,0 @@
-import 'package:appflowy_board/appflowy_board.dart';
-import 'package:appflowy_board/src/utils/log.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter/scheduler.dart';
-import 'package:provider/provider.dart';
-import '../transitions.dart';
-
-abstract class DragTargetData {
- int get draggingIndex;
-}
-
-abstract class ReorderFlexDraggableTargetBuilder {
- Widget? build<T extends DragTargetData>(
- BuildContext context,
- Widget child,
- DragTargetOnStarted onDragStarted,
- DragTargetOnEnded<T> onDragEnded,
- DragTargetWillAccepted<T> onWillAccept,
- AnimationController insertAnimationController,
- AnimationController deleteAnimationController,
- );
-}
-
-///
-typedef DragTargetWillAccepted<T extends DragTargetData> = bool Function(
- T dragTargetData);
-
-///
-typedef DragTargetOnStarted = void Function(Widget, int, Size?);
-
-typedef DragTargetOnMove<T extends DragTargetData> = void Function(
- T dragTargetData,
- Offset offset,
-);
-
-///
-typedef DragTargetOnEnded<T extends DragTargetData> = void Function(
- T dragTargetData);
-
-/// [ReorderDragTarget] is a [DragTarget] that carries the index information of
-/// the child. You could check out this link for more information.
-///
-/// The size of the [ReorderDragTarget] will become zero when it start dragging.
-///
-class ReorderDragTarget<T extends DragTargetData> extends StatefulWidget {
- final Widget child;
- final T dragTargetData;
-
- final GlobalObjectKey indexGlobalKey;
-
- /// Called when dragTarget is being dragging.
- final DragTargetOnStarted onDragStarted;
-
- final DragTargetOnEnded<T> onDragEnded;
-
- final DragTargetOnMove<T> onDragMoved;
-
- /// Called to determine whether this widget is interested in receiving a given
- /// piece of data being dragged over this drag target.
- ///
- /// [toAccept] represents the dragTarget index, which is the value passed in
- /// when creating the [ReorderDragTarget].
- final DragTargetWillAccepted<T> onWillAccept;
-
- /// Called when an acceptable piece of data was dropped over this drag target.
- ///
- /// Equivalent to [onAcceptWithDetails], but only includes the data.
- final void Function(T dragTargetData)? onAccept;
-
- /// Called when a given piece of data being dragged over this target leaves
- /// the target.
- final void Function(T dragTargetData)? onLeave;
-
- final ReorderFlexDraggableTargetBuilder? draggableTargetBuilder;
-
- final AnimationController insertAnimationController;
-
- final AnimationController deleteAnimationController;
-
- final bool useMoveAnimation;
-
- final IsDraggable draggable;
-
- final double draggingOpacity;
-
- final Axis? dragDirection;
-
- const ReorderDragTarget({
- Key? key,
- required this.child,
- required this.indexGlobalKey,
- required this.dragTargetData,
- required this.onDragStarted,
- required this.onDragMoved,
- required this.onDragEnded,
- required this.onWillAccept,
- required this.insertAnimationController,
- required this.deleteAnimationController,
- required this.useMoveAnimation,
- required this.draggable,
- this.onAccept,
- this.onLeave,
- this.draggableTargetBuilder,
- this.draggingOpacity = 0.3,
- this.dragDirection,
- }) : super(key: key);
-
- @override
- State<ReorderDragTarget<T>> createState() => _ReorderDragTargetState<T>();
-}
-
-class _ReorderDragTargetState<T extends DragTargetData>
- extends State<ReorderDragTarget<T>> {
- /// Returns the dragTarget's size
- Size? _draggingFeedbackSize = Size.zero;
-
- @override
- Widget build(BuildContext context) {
- Widget dragTarget = DragTarget<T>(
- builder: _buildDraggableWidget,
- onWillAccept: (dragTargetData) {
- if (dragTargetData == null) {
- return false;
- }
-
- return widget.onWillAccept(dragTargetData);
- },
- onAccept: widget.onAccept,
- onMove: (detail) {
- widget.onDragMoved(detail.data, detail.offset);
- },
- onLeave: (dragTargetData) {
- assert(dragTargetData != null);
- if (dragTargetData != null) {
- widget.onLeave?.call(dragTargetData);
- }
- },
- );
-
- dragTarget = KeyedSubtree(key: widget.indexGlobalKey, child: dragTarget);
- return dragTarget;
- }
-
- Widget _buildDraggableWidget(
- BuildContext context,
- List<T?> acceptedCandidates,
- List<dynamic> rejectedCandidates,
- ) {
- Widget feedbackBuilder = Builder(builder: (BuildContext context) {
- BoxConstraints contentSizeConstraints =
- BoxConstraints.loose(_draggingFeedbackSize!);
- return _buildDraggableFeedback(
- context,
- contentSizeConstraints,
- widget.child,
- );
- });
-
- final draggableWidget = widget.draggableTargetBuilder?.build(
- context,
- widget.child,
- widget.onDragStarted,
- widget.onDragEnded,
- widget.onWillAccept,
- widget.insertAnimationController,
- widget.deleteAnimationController,
- ) ??
- Draggable<DragTargetData>(
- axis: widget.dragDirection,
- maxSimultaneousDrags: widget.draggable ? 1 : 0,
- data: widget.dragTargetData,
- ignoringFeedbackSemantics: false,
- feedback: feedbackBuilder,
- childWhenDragging: IgnorePointerWidget(
- useIntrinsicSize: !widget.useMoveAnimation,
- opacity: widget.draggingOpacity,
- child: widget.child,
- ),
- onDragStarted: () {
- _draggingFeedbackSize = widget.indexGlobalKey.currentContext?.size;
- widget.onDragStarted(
- widget.child,
- widget.dragTargetData.draggingIndex,
- _draggingFeedbackSize,
- );
- },
- dragAnchorStrategy: childDragAnchorStrategy,
-
- /// When the drag ends inside a DragTarget widget, the drag
- /// succeeds, and we reorder the widget into position appropriately.
- onDragCompleted: () {
- widget.onDragEnded(widget.dragTargetData);
- },
-
- /// When the drag does not end inside a DragTarget widget, the
- /// drag fails, but we still reorder the widget to the last position it
- /// had been dragged to.
- onDraggableCanceled: (Velocity velocity, Offset offset) {
- widget.onDragEnded(widget.dragTargetData);
- },
- child: widget.child,
- );
-
- return draggableWidget;
- }
-
- Widget _buildDraggableFeedback(
- BuildContext context,
- BoxConstraints constraints,
- Widget child,
- ) {
- return Transform(
- transform: Matrix4.rotationZ(0),
- alignment: FractionalOffset.topLeft,
- child: Material(
- color: Colors.transparent,
- borderRadius: BorderRadius.zero,
- clipBehavior: Clip.hardEdge,
- child: ConstrainedBox(
- constraints: constraints,
- child: Opacity(opacity: widget.draggingOpacity, child: child),
- ),
- ),
- );
- }
-}
-
-class DragTargetAnimation {
- // How long an animation to reorder an element in the list takes.
- final Duration reorderAnimationDuration;
-
- // This controls the entrance of the dragging widget into a new place.
- late AnimationController entranceController;
-
- // This controls the 'phantom' of the dragging widget, which is left behind
- // where the widget used to be.
- late AnimationController phantomController;
-
- // Uses to simulate the insert animation when card was moved from on group to
- // another group. Check out the [FakeDragTarget].
- late AnimationController insertController;
-
- // Used to remove the phantom
- late AnimationController deleteController;
-
- DragTargetAnimation({
- required this.reorderAnimationDuration,
- required TickerProvider vsync,
- required void Function(AnimationStatus) entranceAnimateStatusChanged,
- }) {
- entranceController = AnimationController(
- value: 1.0, vsync: vsync, duration: reorderAnimationDuration);
- entranceController.addStatusListener(entranceAnimateStatusChanged);
-
- phantomController = AnimationController(
- value: 0, vsync: vsync, duration: reorderAnimationDuration);
-
- insertController = AnimationController(
- value: 0.0, vsync: vsync, duration: const Duration(milliseconds: 100));
-
- deleteController = AnimationController(
- value: 0.0, vsync: vsync, duration: const Duration(milliseconds: 1));
- }
-
- void startDragging() {
- entranceController.value = 1.0;
- }
-
- void animateToNext() {
- phantomController.reverse(from: 1.0);
- entranceController.forward(from: 0.0);
- }
-
- void reverseAnimation() {
- phantomController.reverse(from: 0.1);
- entranceController.reverse(from: 0.0);
- }
-
- void dispose() {
- entranceController.dispose();
- phantomController.dispose();
- insertController.dispose();
- deleteController.dispose();
- }
-}
-
-class IgnorePointerWidget extends StatelessWidget {
- final Widget? child;
- final bool useIntrinsicSize;
- final double opacity;
-
- const IgnorePointerWidget({
- required this.child,
- required this.opacity,
- this.useIntrinsicSize = false,
- Key? key,
- }) : super(key: key);
-
- @override
- Widget build(BuildContext context) {
- final sizedChild = useIntrinsicSize
- ? child
- : SizedBox(width: 0.0, height: 0.0, child: child);
-
- return IgnorePointer(
- ignoring: true,
- child: Opacity(
- opacity: useIntrinsicSize ? opacity : 0.0,
- child: sizedChild,
- ),
- );
- }
-}
-
-class AbsorbPointerWidget extends StatelessWidget {
- final Widget? child;
- final bool useIntrinsicSize;
- final double opacity;
- const AbsorbPointerWidget({
- required this.child,
- required this.opacity,
- this.useIntrinsicSize = false,
- Key? key,
- }) : super(key: key);
-
- @override
- Widget build(BuildContext context) {
- final sizedChild = useIntrinsicSize
- ? child
- : SizedBox(width: 0.0, height: 0.0, child: child);
-
- return AbsorbPointer(
- child: Opacity(
- opacity: useIntrinsicSize ? opacity : 0.0,
- child: sizedChild,
- ),
- );
- }
-}
-
-class PhantomWidget extends StatelessWidget {
- final Widget? child;
- final double opacity;
- const PhantomWidget({
- this.child,
- this.opacity = 1.0,
- Key? key,
- }) : super(key: key);
-
- @override
- Widget build(BuildContext context) {
- return Opacity(
- opacity: opacity,
- child: child,
- );
- }
-}
-
-abstract class DragTargetMovePlaceholderDelegate {
- void registerPlaceholder(
- int dragTargetIndex,
- void Function(int currentDragTargetIndex) callback,
- );
-
- void unregisterPlaceholder(int dragTargetIndex);
-}
-
-class DragTargeMovePlaceholder extends StatefulWidget {
- final double height;
- final Color color;
- final Color highlightColor;
- final int dragTargetIndex;
- final DragTargetMovePlaceholderDelegate delegate;
-
- const DragTargeMovePlaceholder({
- required this.delegate,
- required this.dragTargetIndex,
- this.height = 4,
- this.color = Colors.transparent,
- this.highlightColor = Colors.lightBlue,
- Key? key,
- }) : super(key: key);
-
- @override
- State<DragTargeMovePlaceholder> createState() =>
- _DragTargeMovePlaceholderState();
-}
-
-class _DragTargeMovePlaceholderState extends State<DragTargeMovePlaceholder> {
- ValueNotifier<bool> isHighlight = ValueNotifier(false);
-
- @override
- void initState() {
- widget.delegate.registerPlaceholder(
- widget.dragTargetIndex,
- (currentDragTargetIndex) {
- if (!mounted) return;
-
- SchedulerBinding.instance.addPostFrameCallback((Duration duration) {
- if (currentDragTargetIndex == -1) {
- isHighlight.value = false;
- } else {
- isHighlight.value =
- widget.dragTargetIndex == currentDragTargetIndex;
- }
- });
- },
- );
- super.initState();
- }
-
- @override
- void dispose() {
- isHighlight.dispose();
- widget.delegate.unregisterPlaceholder(widget.dragTargetIndex);
- super.dispose();
- }
-
- @override
- Widget build(BuildContext context) {
- return ChangeNotifierProvider.value(
- value: isHighlight,
- child: Consumer<ValueNotifier<bool>>(
- builder: (context, notifier, child) {
- return Container(
- height: widget.height,
- color: notifier.value ? widget.highlightColor : widget.color,
- );
- },
- ),
- );
- }
-}
-
-abstract class FakeDragTargetEventTrigger {
- void fakeOnDragStart(void Function(int?) callback);
- void fakeOnDragEnded(VoidCallback callback);
-}
-
-abstract class FakeDragTargetEventData {
- Size? get feedbackSize;
- int get index;
- DragTargetData get dragTargetData;
-}
-
-class FakeDragTarget<T extends DragTargetData> extends StatefulWidget {
- final FakeDragTargetEventTrigger eventTrigger;
- final FakeDragTargetEventData eventData;
- final DragTargetOnStarted onDragStarted;
- final DragTargetOnEnded<T> onDragEnded;
- final DragTargetWillAccepted<T> onWillAccept;
- final Widget child;
- final AnimationController insertAnimationController;
- final AnimationController deleteAnimationController;
- const FakeDragTarget({
- Key? key,
- required this.eventTrigger,
- required this.eventData,
- required this.onDragStarted,
- required this.onDragEnded,
- required this.onWillAccept,
- required this.insertAnimationController,
- required this.deleteAnimationController,
- required this.child,
- }) : super(key: key);
-
- @override
- State<FakeDragTarget<T>> createState() => _FakeDragTargetState<T>();
-}
-
-class _FakeDragTargetState<T extends DragTargetData>
- extends State<FakeDragTarget<T>>
- with TickerProviderStateMixin<FakeDragTarget<T>> {
- bool simulateDragging = false;
-
- @override
- void initState() {
- widget.insertAnimationController.addStatusListener(
- _onInsertedAnimationStatusChanged,
- );
-
- /// Start insert animation
- widget.insertAnimationController.forward(from: 0.0);
-
- // widget.eventTrigger.fakeOnDragStart((insertIndex) {
- // Log.trace("[$FakeDragTarget] on drag $insertIndex");
- // });
-
- widget.eventTrigger.fakeOnDragEnded(() {
- Log.trace("[$FakeDragTarget] on drag end");
- WidgetsBinding.instance.addPostFrameCallback((_) {
- widget.onDragEnded(widget.eventData.dragTargetData as T);
- });
- });
-
- super.initState();
- }
-
- @override
- void dispose() {
- widget.insertAnimationController
- .removeStatusListener(_onInsertedAnimationStatusChanged);
- super.dispose();
- }
-
- @override
- Widget build(BuildContext context) {
- if (simulateDragging) {
- return SizeTransitionWithIntrinsicSize(
- sizeFactor: widget.deleteAnimationController,
- axis: Axis.vertical,
- child: AbsorbPointerWidget(
- opacity: 0.3,
- child: widget.child,
- ),
- );
- } else {
- return SizeTransitionWithIntrinsicSize(
- sizeFactor: widget.insertAnimationController,
- axis: Axis.vertical,
- child: AbsorbPointerWidget(
- useIntrinsicSize: true,
- opacity: 0.3,
- child: widget.child,
- ),
- );
- }
- }
-
- void _onInsertedAnimationStatusChanged(AnimationStatus status) {
- if (status != AnimationStatus.completed) return;
- WidgetsBinding.instance.addPostFrameCallback((_) {
- if (!mounted) return;
- setState(() {
- if (widget.onWillAccept(widget.eventData.dragTargetData as T)) {
- Log.trace("[$FakeDragTarget] on drag start");
- simulateDragging = true;
- widget.deleteAnimationController.reverse(from: 1.0);
- widget.onDragStarted(
- widget.child,
- widget.eventData.index,
- widget.eventData.feedbackSize,
- );
- } else {
- Log.trace("[$FakeDragTarget] cancel start drag");
- }
- });
- });
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/drag_target_interceptor.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/drag_target_interceptor.dart
deleted file mode 100644
index 21a67a3c7d..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/drag_target_interceptor.dart
+++ /dev/null
@@ -1,201 +0,0 @@
-import 'dart:async';
-
-import 'package:appflowy_board/src/widgets/board.dart';
-import 'package:flutter/material.dart';
-import '../../utils/log.dart';
-import 'drag_state.dart';
-import 'drag_target.dart';
-import 'reorder_flex.dart';
-
-/// [DragTargetInterceptor] is used to intercept the [DragTarget]'s
-/// [onWillAccept], [OnAccept], and [onLeave] event.
-abstract class DragTargetInterceptor {
- String get reorderFlexId;
-
- /// Returns [yes] to receive the [DragTarget]'s event.
- bool canHandler(FlexDragTargetData dragTargetData);
-
- /// Handle the [DragTarget]'s [onWillAccept] event.
- bool onWillAccept({
- required BuildContext context,
- required ReorderFlexState reorderFlexState,
- required FlexDragTargetData dragTargetData,
- required String dragTargetId,
- required int dragTargetIndex,
- });
-
- /// Handle the [DragTarget]'s [onAccept] event.
- void onAccept(FlexDragTargetData dragTargetData) {}
-
- /// Handle the [DragTarget]'s [onLeave] event.
- void onLeave(FlexDragTargetData dragTargetData) {}
-
- ReorderFlexDraggableTargetBuilder? get draggableTargetBuilder => null;
-}
-
-abstract class OverlapDragTargetDelegate {
- void cancel();
- void dragTargetDidMoveToReorderFlex(
- String reorderFlexId,
- FlexDragTargetData dragTargetData,
- int dragTargetIndex,
- );
-
- int getInsertedIndex(String dragTargetId);
-}
-
-/// [OverlappingDragTargetInterceptor] is used to receive the overlapping
-/// [DragTarget] event. If a [DragTarget] child is [DragTarget], it will
-/// receive the [DragTarget] event when being dragged.
-///
-/// Receive the [DragTarget] event if the [acceptedReorderFlexId] contains
-/// the passed in dragTarget' reorderFlexId.
-class OverlappingDragTargetInterceptor extends DragTargetInterceptor {
- @override
- final String reorderFlexId;
- final List<String> acceptedReorderFlexId;
- final OverlapDragTargetDelegate delegate;
- final AppFlowyBoardState columnsState;
- Timer? _delayOperation;
-
- OverlappingDragTargetInterceptor({
- required this.delegate,
- required this.reorderFlexId,
- required this.acceptedReorderFlexId,
- required this.columnsState,
- });
-
- @override
- bool canHandler(FlexDragTargetData dragTargetData) {
- return acceptedReorderFlexId.contains(dragTargetData.reorderFlexId);
- }
-
- @override
- bool onWillAccept(
- {required BuildContext context,
- required ReorderFlexState reorderFlexState,
- required FlexDragTargetData dragTargetData,
- required String dragTargetId,
- required int dragTargetIndex}) {
- if (dragTargetId == dragTargetData.reorderFlexId) {
- delegate.cancel();
- } else {
- // Ignore the event if the dragTarget overlaps with the other column's dragTargets.
- final columnKeys = columnsState.groupDragTargetKeys[dragTargetId];
- if (columnKeys != null) {
- final keys = columnKeys.values.toList();
- if (dragTargetData.isOverlapWithWidgets(keys)) {
- _delayOperation?.cancel();
- return true;
- }
- }
-
- /// The priority of the column interactions is high than the cross column.
- /// Workaround: delay 100 milliseconds to lower the cross column event priority.
- ///
- _delayOperation?.cancel();
- _delayOperation = Timer(const Duration(milliseconds: 100), () {
- final index = delegate.getInsertedIndex(dragTargetId);
- if (index != -1) {
- Log.trace(
- '[$OverlappingDragTargetInterceptor] move to $dragTargetId at $index');
- delegate.dragTargetDidMoveToReorderFlex(
- dragTargetId, dragTargetData, index);
-
- columnsState.reorderFlexActionMap[dragTargetId]
- ?.resetDragTargetIndex(index);
- }
- });
- }
-
- return true;
- }
-}
-
-abstract class CrossReorderFlexDragTargetDelegate {
- /// * [reorderFlexId] is the id that the [ReorderFlex] passed in.
- bool acceptNewDragTargetData(
- String reorderFlexId,
- FlexDragTargetData dragTargetData,
- int dragTargetIndex,
- );
-
- void updateDragTargetData(
- String reorderFlexId,
- int dragTargetIndex,
- );
-}
-
-class CrossReorderFlexDragTargetInterceptor extends DragTargetInterceptor {
- @override
- final String reorderFlexId;
- final List<String> acceptedReorderFlexIds;
- final CrossReorderFlexDragTargetDelegate delegate;
-
- @override
- final ReorderFlexDraggableTargetBuilder? draggableTargetBuilder;
-
- CrossReorderFlexDragTargetInterceptor({
- required this.reorderFlexId,
- required this.delegate,
- required this.acceptedReorderFlexIds,
- this.draggableTargetBuilder,
- });
-
- @override
- bool canHandler(FlexDragTargetData dragTargetData) {
- if (acceptedReorderFlexIds.isEmpty) {
- return false;
- }
-
- if (acceptedReorderFlexIds.contains(dragTargetData.reorderFlexId)) {
- /// If the columnId equal to the dragTargetData's columnId,
- /// it means the dragTarget is dragging on the top of its own list.
- /// Otherwise, it means the dargTarget was moved to another list.
- Log.trace(
- "[$CrossReorderFlexDragTargetInterceptor] $reorderFlexId should accept ${dragTargetData.reorderFlexId} : ${reorderFlexId != dragTargetData.reorderFlexId}");
- return reorderFlexId != dragTargetData.reorderFlexId;
- } else {
- Log.trace(
- "[$CrossReorderFlexDragTargetInterceptor] not accept ${dragTargetData.reorderFlexId}");
- return false;
- }
- }
-
- @override
- void onAccept(FlexDragTargetData dragTargetData) {
- Log.trace(
- '[$CrossReorderFlexDragTargetInterceptor] Group:[$reorderFlexId] on onAccept');
- }
-
- @override
- void onLeave(FlexDragTargetData dragTargetData) {
- Log.trace(
- '[$CrossReorderFlexDragTargetInterceptor] Group:[$reorderFlexId] on leave');
- }
-
- @override
- bool onWillAccept({
- required BuildContext context,
- required ReorderFlexState reorderFlexState,
- required FlexDragTargetData dragTargetData,
- required String dragTargetId,
- required int dragTargetIndex,
- }) {
- final isNewDragTarget = delegate.acceptNewDragTargetData(
- reorderFlexId,
- dragTargetData,
- dragTargetIndex,
- );
-
- Log.debug(
- '[$CrossReorderFlexDragTargetInterceptor] isNewDragTarget: $isNewDragTarget, dargTargetIndex: $dragTargetIndex, reorderFlexId: $reorderFlexId');
-
- if (isNewDragTarget == false) {
- delegate.updateDragTargetData(reorderFlexId, dragTargetIndex);
- reorderFlexState.handleOnWillAccept(context, dragTargetIndex);
- }
-
- return true;
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/reorder_flex.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/reorder_flex.dart
deleted file mode 100644
index f79533b2c5..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/reorder_flex.dart
+++ /dev/null
@@ -1,729 +0,0 @@
-import 'dart:collection';
-import 'dart:math';
-
-import 'package:appflowy_board/appflowy_board.dart';
-import 'package:flutter/material.dart';
-import 'package:flutter/rendering.dart';
-import '../../utils/log.dart';
-import 'reorder_mixin.dart';
-import 'drag_target.dart';
-import 'drag_state.dart';
-import 'drag_target_interceptor.dart';
-
-typedef OnDragStarted = void Function(int index);
-typedef OnDragEnded = void Function();
-typedef OnReorder = void Function(int fromIndex, int toIndex);
-typedef OnDeleted = void Function(int deletedIndex);
-typedef OnInserted = void Function(int insertedIndex);
-typedef OnReceivePassedInPhantom = void Function(
- FlexDragTargetData dragTargetData, int phantomIndex);
-
-abstract class ReoderFlexDataSource {
- /// [identifier] represents the id the [ReorderFlex]. It must be unique.
- String get identifier;
-
- /// The number of [ReoderFlexItem]s will be displayed in the [ReorderFlex].
- UnmodifiableListView<ReoderFlexItem> get items;
-}
-
-/// Each item displayed in the [ReorderFlex] required to implement the [ReoderFlexItem].
-abstract class ReoderFlexItem {
- /// [id] is used to identify the item. It must be unique.
- String get id;
-
- IsDraggable draggable = true;
-}
-
-/// Cache each dragTarget's key.
-/// For the moment, the key is used to locate the render object that will
-/// be passed in the [ScrollPosition]'s [ensureVisible] function.
-///
-abstract class ReorderDragTargeKeys {
- void insertDragTarget(
- String reorderFlexId,
- String key,
- GlobalObjectKey value,
- );
-
- GlobalObjectKey? getDragTarget(
- String reorderFlexId,
- String key,
- );
-
- void removeDragTarget(String reorderFlexId);
-}
-
-abstract class ReorderFlexAction {
- void Function(void Function(BuildContext)?)? _scrollToBottom;
- void Function(void Function(BuildContext)?) get scrollToBottom =>
- _scrollToBottom!;
-
- void Function(int)? _resetDragTargetIndex;
- void Function(int) get resetDragTargetIndex => _resetDragTargetIndex!;
-}
-
-class ReorderFlexConfig {
- /// The opacity of the dragging widget
- final double draggingWidgetOpacity = 0.4;
-
- // How long an animation to reorder an element
- final Duration reorderAnimationDuration = const Duration(milliseconds: 200);
-
- // How long an animation to scroll to an off-screen element
- final Duration scrollAnimationDuration = const Duration(milliseconds: 200);
-
- final bool useMoveAnimation;
-
- final bool useMovePlaceholder;
-
- /// [direction] How to place the children, default is Axis.vertical
- final Axis direction;
-
- final Axis? dragDirection;
-
- const ReorderFlexConfig({
- this.useMoveAnimation = true,
- this.direction = Axis.vertical,
- this.dragDirection,
- }) : useMovePlaceholder = !useMoveAnimation;
-}
-
-class ReorderFlex extends StatefulWidget {
- final ReorderFlexConfig config;
- final List<Widget> children;
-
- final MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start;
-
- final ScrollController? scrollController;
-
- /// [onDragStarted] is called when start dragging
- final OnDragStarted? onDragStarted;
-
- /// [onReorder] is called when dragTarget did end dragging
- final OnReorder onReorder;
-
- /// [onDragEnded] is called when dragTarget did end dragging
- final OnDragEnded? onDragEnded;
-
- final ReoderFlexDataSource dataSource;
-
- final DragTargetInterceptor? interceptor;
-
- /// Save the [DraggingState] if the current [ReorderFlex] get reinitialize.
- final DraggingStateStorage? dragStateStorage;
-
- final ReorderDragTargeKeys? dragTargetKeys;
-
- final ReorderFlexAction? reorderFlexAction;
-
- ReorderFlex({
- Key? key,
- this.scrollController,
- required this.dataSource,
- required this.children,
- required this.config,
- required this.onReorder,
- this.dragStateStorage,
- this.dragTargetKeys,
- this.onDragStarted,
- this.onDragEnded,
- this.interceptor,
- this.reorderFlexAction,
- }) : assert(children.every((Widget w) => w.key != null),
- 'All child must have a key.'),
- super(key: key);
-
- @override
- State<ReorderFlex> createState() => ReorderFlexState();
-
- String get reorderFlexId => dataSource.identifier;
-}
-
-class ReorderFlexState extends State<ReorderFlex>
- with ReorderFlexMixin, TickerProviderStateMixin<ReorderFlex> {
- /// Controls scrolls and measures scroll progress.
- late ScrollController _scrollController;
-
- /// Records the position of the [Scrollable]
- ScrollPosition? _attachedScrollPosition;
-
- /// Whether or not we are currently scrolling this view to show a widget.
- bool _scrolling = false;
-
- /// [draggingState] records the dragging state including dragStartIndex, and phantomIndex, etc.
- late DraggingState draggingState;
-
- /// [_animation] controls the dragging animations
- late DragTargetAnimation _animation;
-
- late ReorderFlexNotifier _notifier;
-
- @override
- void initState() {
- _notifier = ReorderFlexNotifier();
- final flexId = widget.reorderFlexId;
- draggingState = widget.dragStateStorage?.readState(flexId) ??
- DraggingState(widget.reorderFlexId);
- Log.trace('[DragTarget] init dragState: $draggingState');
-
- widget.dragStateStorage?.removeState(flexId);
-
- _animation = DragTargetAnimation(
- reorderAnimationDuration: widget.config.reorderAnimationDuration,
- entranceAnimateStatusChanged: (status) {
- if (status == AnimationStatus.completed) {
- if (draggingState.nextIndex == -1) return;
- setState(() => _requestAnimationToNextIndex());
- }
- },
- vsync: this,
- );
-
- widget.reorderFlexAction?._scrollToBottom = (fn) {
- scrollToBottom(fn);
- };
-
- widget.reorderFlexAction?._resetDragTargetIndex = (index) {
- resetDragTargetIndex(index);
- };
-
- super.initState();
- }
-
- @override
- void didChangeDependencies() {
- if (_attachedScrollPosition != null) {
- _scrollController.detach(_attachedScrollPosition!);
- _attachedScrollPosition = null;
- }
-
- _scrollController = widget.scrollController ??
- PrimaryScrollController.of(context) ??
- ScrollController();
-
- if (_scrollController.hasClients) {
- _attachedScrollPosition = Scrollable.of(context)?.position;
- } else {
- _attachedScrollPosition = null;
- }
-
- if (_attachedScrollPosition != null) {
- _scrollController.attach(_attachedScrollPosition!);
- }
- super.didChangeDependencies();
- }
-
- @override
- Widget build(BuildContext context) {
- final List<Widget> children = [];
-
- for (int i = 0; i < widget.children.length; i += 1) {
- Widget child = widget.children[i];
- final ReoderFlexItem item = widget.dataSource.items[i];
-
- final indexKey = GlobalObjectKey(child.key!);
- // Save the index key for quick access
- widget.dragTargetKeys?.insertDragTarget(
- widget.reorderFlexId,
- item.id,
- indexKey,
- );
-
- children.add(_wrap(child, i, indexKey, item.draggable));
-
- // if (widget.config.useMovePlaceholder) {
- // children.add(DragTargeMovePlaceholder(
- // dragTargetIndex: i,
- // delegate: _notifier,
- // ));
- // }
- }
-
- final child = _wrapContainer(children);
- return _wrapScrollView(child: child);
- }
-
- @override
- void dispose() {
- if (_attachedScrollPosition != null) {
- _scrollController.detach(_attachedScrollPosition!);
- _attachedScrollPosition = null;
- }
-
- _animation.dispose();
- super.dispose();
- }
-
- void _requestAnimationToNextIndex({bool isAcceptingNewTarget = false}) {
- /// Update the dragState and animate to the next index if the current
- /// dragging animation is completed. Otherwise, it will get called again
- /// when the animation finish.
-
- if (_animation.entranceController.isCompleted) {
- draggingState.removePhantom();
-
- if (!isAcceptingNewTarget && draggingState.didDragTargetMoveToNext()) {
- return;
- }
-
- draggingState.moveDragTargetToNext();
- _animation.animateToNext();
- }
- }
-
- /// [child]: the child will be wrapped with dartTarget
- /// [childIndex]: the index of the child in a list
- Widget _wrap(
- Widget child,
- int childIndex,
- GlobalObjectKey indexKey,
- IsDraggable draggable,
- ) {
- return Builder(builder: (context) {
- final ReorderDragTarget dragTarget = _buildDragTarget(
- context,
- child,
- childIndex,
- indexKey,
- draggable,
- );
- int shiftedIndex = childIndex;
-
- if (draggingState.isOverlapWithPhantom()) {
- shiftedIndex = draggingState.calculateShiftedIndex(childIndex);
- }
-
- Log.trace(
- 'Rebuild: Group:[${draggingState.reorderFlexId}] ${draggingState.toString()}, childIndex: $childIndex shiftedIndex: $shiftedIndex');
- final currentIndex = draggingState.currentIndex;
- final dragPhantomIndex = draggingState.phantomIndex;
-
- if (shiftedIndex == currentIndex || childIndex == dragPhantomIndex) {
- Widget dragSpace;
- if (draggingState.draggingWidget != null) {
- if (draggingState.draggingWidget is PhantomWidget) {
- dragSpace = draggingState.draggingWidget!;
- } else {
- dragSpace = PhantomWidget(
- opacity: widget.config.draggingWidgetOpacity,
- child: draggingState.draggingWidget,
- );
- }
- } else {
- dragSpace = SizedBox.fromSize(size: draggingState.dropAreaSize);
- }
-
- /// Returns the dragTarget it is not start dragging. The size of the
- /// dragTarget is the same as the the passed in child.
- ///
- if (draggingState.isNotDragging()) {
- return _buildDraggingContainer(children: [dragTarget]);
- }
-
- /// Determine the size of the drop area to show under the dragging widget.
- Size? feedbackSize = Size.zero;
- if (widget.config.useMoveAnimation) {
- feedbackSize = draggingState.feedbackSize;
- }
-
- Widget appearSpace = _makeAppearSpace(dragSpace, feedbackSize);
- Widget disappearSpace = _makeDisappearSpace(dragSpace, feedbackSize);
-
- /// When start dragging, the dragTarget, [ReorderDragTarget], will
- /// return a [IgnorePointerWidget] which size is zero.
- if (draggingState.isPhantomAboveDragTarget()) {
- _notifier.updateDragTargetIndex(currentIndex);
- if (shiftedIndex == currentIndex && childIndex == dragPhantomIndex) {
- return _buildDraggingContainer(children: [
- disappearSpace,
- dragTarget,
- appearSpace,
- ]);
- } else if (shiftedIndex == currentIndex) {
- return _buildDraggingContainer(children: [
- dragTarget,
- appearSpace,
- ]);
- } else if (childIndex == dragPhantomIndex) {
- return _buildDraggingContainer(
- children: shiftedIndex <= childIndex
- ? [dragTarget, disappearSpace]
- : [disappearSpace, dragTarget]);
- }
- }
-
- ///
- if (draggingState.isPhantomBelowDragTarget()) {
- _notifier.updateDragTargetIndex(currentIndex);
- if (shiftedIndex == currentIndex && childIndex == dragPhantomIndex) {
- return _buildDraggingContainer(children: [
- appearSpace,
- dragTarget,
- disappearSpace,
- ]);
- } else if (shiftedIndex == currentIndex) {
- return _buildDraggingContainer(children: [
- appearSpace,
- dragTarget,
- ]);
- } else if (childIndex == dragPhantomIndex) {
- return _buildDraggingContainer(
- children: shiftedIndex >= childIndex
- ? [disappearSpace, dragTarget]
- : [dragTarget, disappearSpace]);
- }
- }
-
- assert(!draggingState.isOverlapWithPhantom());
-
- List<Widget> children = [];
- if (draggingState.isDragTargetMovingDown()) {
- children.addAll([dragTarget, appearSpace]);
- } else {
- children.addAll([appearSpace, dragTarget]);
- }
- return _buildDraggingContainer(children: children);
- }
-
- /// We still wrap dragTarget with a container so that widget's depths are
- /// the same and it prevent's layout alignment issue
- return _buildDraggingContainer(children: [dragTarget]);
- });
- }
-
- static ReorderFlexState of(BuildContext context) {
- if (context is StatefulElement && context.state is ReorderFlexState) {
- return context.state as ReorderFlexState;
- }
- final ReorderFlexState? result =
- context.findAncestorStateOfType<ReorderFlexState>();
- return result!;
- }
-
- ReorderDragTarget _buildDragTarget(
- BuildContext builderContext,
- Widget child,
- int dragTargetIndex,
- GlobalObjectKey indexKey,
- IsDraggable draggable,
- ) {
- final reorderFlexItem = widget.dataSource.items[dragTargetIndex];
- return ReorderDragTarget<FlexDragTargetData>(
- indexGlobalKey: indexKey,
- draggable: draggable,
- dragTargetData: FlexDragTargetData(
- draggingIndex: dragTargetIndex,
- reorderFlexId: widget.reorderFlexId,
- reorderFlexItem: reorderFlexItem,
- draggingState: draggingState,
- dragTargetId: reorderFlexItem.id,
- dragTargetIndexKey: indexKey,
- ),
- onDragStarted: (draggingWidget, draggingIndex, size) {
- Log.debug(
- "[DragTarget] Group:[${widget.dataSource.identifier}] start dragging item at $draggingIndex");
- _startDragging(draggingWidget, draggingIndex, size);
- widget.onDragStarted?.call(draggingIndex);
- widget.dragStateStorage?.removeState(widget.reorderFlexId);
- },
- onDragMoved: (dragTargetData, offset) {
- dragTargetData.dragTargetOffset = offset;
- },
- onDragEnded: (dragTargetData) {
- if (!mounted) {
- Log.warn(
- "[DragTarget]: Group:[${widget.dataSource.identifier}] end dragging but current widget was unmounted");
- return;
- }
- Log.debug(
- "[DragTarget]: Group:[${widget.dataSource.identifier}] end dragging");
-
- _notifier.updateDragTargetIndex(-1);
- _animation.insertController.stop();
-
- setState(() {
- if (dragTargetData.reorderFlexId == widget.reorderFlexId) {
- _onReordered(
- draggingState.dragStartIndex,
- draggingState.currentIndex,
- );
- }
- draggingState.endDragging();
- widget.onDragEnded?.call();
- });
- },
- onWillAccept: (FlexDragTargetData dragTargetData) {
- // Do not receive any events if the Insert item is animating.
- if (_animation.insertController.isAnimating) {
- return false;
- }
-
- if (dragTargetData.isDragging) {
- assert(widget.dataSource.items.length > dragTargetIndex);
- if (_interceptDragTarget(dragTargetData, (interceptor) {
- interceptor.onWillAccept(
- context: builderContext,
- reorderFlexState: this,
- dragTargetData: dragTargetData,
- dragTargetId: reorderFlexItem.id,
- dragTargetIndex: dragTargetIndex,
- );
- })) {
- return true;
- } else {
- return handleOnWillAccept(builderContext, dragTargetIndex);
- }
- } else {
- return false;
- }
- },
- onAccept: (dragTargetData) {
- _interceptDragTarget(
- dragTargetData,
- (interceptor) => interceptor.onAccept(dragTargetData),
- );
- },
- onLeave: (dragTargetData) {
- _notifier.updateDragTargetIndex(-1);
- _interceptDragTarget(
- dragTargetData,
- (interceptor) => interceptor.onLeave(dragTargetData),
- );
- },
- insertAnimationController: _animation.insertController,
- deleteAnimationController: _animation.deleteController,
- draggableTargetBuilder: widget.interceptor?.draggableTargetBuilder,
- useMoveAnimation: widget.config.useMoveAnimation,
- draggingOpacity: widget.config.draggingWidgetOpacity,
- dragDirection: widget.config.dragDirection,
- child: child,
- );
- }
-
- bool _interceptDragTarget(
- FlexDragTargetData dragTargetData,
- void Function(DragTargetInterceptor) callback,
- ) {
- final interceptor = widget.interceptor;
- if (interceptor != null && interceptor.canHandler(dragTargetData)) {
- callback(interceptor);
- return true;
- } else {
- return false;
- }
- }
-
- Widget _makeAppearSpace(Widget child, Size? feedbackSize) {
- return makeAppearingWidget(
- child,
- _animation.entranceController,
- feedbackSize,
- widget.config.direction,
- );
- }
-
- Widget _makeDisappearSpace(Widget child, Size? feedbackSize) {
- return makeDisappearingWidget(
- child,
- _animation.phantomController,
- feedbackSize,
- widget.config.direction,
- );
- }
-
- void _startDragging(
- Widget draggingWidget,
- int dragIndex,
- Size? feedbackSize,
- ) {
- setState(() {
- draggingState.startDragging(draggingWidget, dragIndex, feedbackSize);
- _animation.startDragging();
- });
- }
-
- void resetDragTargetIndex(int dragTargetIndex) {
- if (dragTargetIndex > widget.dataSource.items.length) {
- return;
- }
-
- draggingState.setStartDraggingIndex(dragTargetIndex);
- widget.dragStateStorage?.insertState(
- widget.reorderFlexId,
- draggingState,
- );
- }
-
- bool handleOnWillAccept(BuildContext context, int dragTargetIndex) {
- final dragIndex = draggingState.dragStartIndex;
-
- /// The [willAccept] will be true if the dargTarget is the widget that gets
- /// dragged and it is dragged on top of the other dragTargets.
- ///
-
- bool willAccept = draggingState.dragStartIndex == dragIndex &&
- dragIndex != dragTargetIndex;
- setState(() {
- if (willAccept) {
- int shiftedIndex = draggingState.calculateShiftedIndex(dragTargetIndex);
- draggingState.updateNextIndex(shiftedIndex);
- } else {
- draggingState.updateNextIndex(dragTargetIndex);
- }
- _requestAnimationToNextIndex(isAcceptingNewTarget: true);
- });
-
- Log.trace(
- '[$ReorderDragTarget] ${widget.reorderFlexId} dragging state: $draggingState}');
-
- _scrollTo(context);
-
- /// If the target is not the original starting point, then we will accept the drop.
- return willAccept;
- }
-
- void _onReordered(int fromIndex, int toIndex) {
- if (toIndex == -1) return;
- if (fromIndex == -1) return;
-
- if (fromIndex != toIndex) {
- widget.onReorder.call(fromIndex, toIndex);
- }
-
- _animation.reverseAnimation();
- }
-
- Widget _wrapScrollView({required Widget child}) {
- if (widget.scrollController != null &&
- PrimaryScrollController.of(context) == null) {
- return child;
- } else {
- return SingleChildScrollView(
- scrollDirection: widget.config.direction,
- controller: _scrollController,
- child: child,
- );
- }
- }
-
- Widget _wrapContainer(List<Widget> children) {
- switch (widget.config.direction) {
- case Axis.horizontal:
- return Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisAlignment: widget.mainAxisAlignment,
- children: children,
- );
- case Axis.vertical:
- default:
- return Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisAlignment: widget.mainAxisAlignment,
- children: children,
- );
- }
- }
-
- Widget _buildDraggingContainer({required List<Widget> children}) {
- switch (widget.config.direction) {
- case Axis.horizontal:
- return Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisAlignment: widget.mainAxisAlignment,
- children: children,
- );
- case Axis.vertical:
- default:
- return Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- mainAxisAlignment: widget.mainAxisAlignment,
- children: children,
- );
- }
- }
-
- void scrollToBottom(void Function(BuildContext)? completed) {
- if (_scrolling) {
- completed?.call(context);
- return;
- }
-
- if (widget.dataSource.items.isNotEmpty) {
- final item = widget.dataSource.items.last;
- final dragTargetKey = widget.dragTargetKeys?.getDragTarget(
- widget.reorderFlexId,
- item.id,
- );
- if (dragTargetKey == null) {
- completed?.call(context);
- return;
- }
-
- final dragTargetContext = dragTargetKey.currentContext;
- if (dragTargetContext == null || _scrollController.hasClients == false) {
- completed?.call(context);
- return;
- }
-
- final dragTargetRenderObject = dragTargetContext.findRenderObject();
- if (dragTargetRenderObject != null) {
- _scrolling = true;
- _scrollController.position
- .ensureVisible(
- dragTargetRenderObject,
- alignment: 0.5,
- duration: const Duration(milliseconds: 120),
- )
- .then((value) {
- setState(() {
- _scrolling = false;
- completed?.call(context);
- });
- });
- } else {
- completed?.call(context);
- }
- }
- }
-
-// Scrolls to a target context if that context is not on the screen.
- void _scrollTo(BuildContext context) {
- if (_scrolling) return;
- final RenderObject contextObject = context.findRenderObject()!;
- final RenderAbstractViewport viewport =
- RenderAbstractViewport.of(contextObject)!;
- // If and only if the current scroll offset falls in-between the offsets
- // necessary to reveal the selected context at the top or bottom of the
- // screen, then it is already on-screen.
- final double margin = widget.config.direction == Axis.horizontal
- ? draggingState.dropAreaSize.width
- : draggingState.dropAreaSize.height / 2.0;
- if (_scrollController.hasClients) {
- final double scrollOffset = _scrollController.offset;
- final double topOffset = max(
- _scrollController.position.minScrollExtent,
- viewport.getOffsetToReveal(contextObject, 0.0).offset - margin,
- );
- final double bottomOffset = min(
- _scrollController.position.maxScrollExtent,
- viewport.getOffsetToReveal(contextObject, 1.0).offset + margin,
- );
- final bool onScreen =
- scrollOffset <= topOffset && scrollOffset >= bottomOffset;
-
- // If the context is off screen, then we request a scroll to make it visible.
- if (!onScreen) {
- _scrolling = true;
- _scrollController.position
- .animateTo(
- scrollOffset < bottomOffset ? bottomOffset : topOffset,
- duration: widget.config.scrollAnimationDuration,
- curve: Curves.easeInOut,
- )
- .then((void value) {
- setState(() => _scrolling = false);
- });
- }
- }
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/reorder_mixin.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/reorder_mixin.dart
deleted file mode 100644
index 742d5dd7a6..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_flex/reorder_mixin.dart
+++ /dev/null
@@ -1,142 +0,0 @@
-import 'package:flutter/widgets.dart';
-
-import '../transitions.dart';
-import 'drag_target.dart';
-
-mixin ReorderFlexMixin {
- @protected
- Widget makeAppearingWidget(
- Widget child,
- AnimationController animationController,
- Size? draggingFeedbackSize,
- Axis direction,
- ) {
- final sizeFactor = animationController.withLinearCurve();
- if (null == draggingFeedbackSize) {
- return SizeTransitionWithIntrinsicSize(
- sizeFactor: sizeFactor,
- axis: direction,
- child: FadeTransition(
- opacity: sizeFactor,
- child: child,
- ),
- );
- } else {
- var transition = SizeTransition(
- sizeFactor: sizeFactor,
- axis: direction,
- child: FadeTransition(opacity: animationController, child: child),
- );
-
- BoxConstraints contentSizeConstraints =
- BoxConstraints.loose(draggingFeedbackSize);
- return ConstrainedBox(
- constraints: contentSizeConstraints, child: transition);
- }
- }
-
- @protected
- Widget makeDisappearingWidget(
- Widget child,
- AnimationController animationController,
- Size? draggingFeedbackSize,
- Axis direction,
- ) {
- final sizeFactor = animationController.withLinearCurve();
- if (null == draggingFeedbackSize) {
- return SizeTransitionWithIntrinsicSize(
- sizeFactor: sizeFactor,
- axis: direction,
- child: FadeTransition(
- opacity: sizeFactor,
- child: child,
- ),
- );
- } else {
- var transition = SizeTransition(
- sizeFactor: sizeFactor,
- axis: direction,
- child: FadeTransition(opacity: animationController, child: child),
- );
-
- BoxConstraints contentSizeConstraints =
- BoxConstraints.loose(draggingFeedbackSize);
- return ConstrainedBox(
- constraints: contentSizeConstraints, child: transition);
- }
- }
-}
-
-Animation<double> withCurve(
- AnimationController animationController, Cubic curve) {
- return CurvedAnimation(
- parent: animationController,
- curve: curve,
- );
-}
-
-extension CurveAnimationController on AnimationController {
- Animation<double> withLinearCurve() {
- return withCurve(Curves.linear);
- }
-
- Animation<double> withCurve(Curve curve) {
- return CurvedAnimation(
- parent: this,
- curve: curve,
- );
- }
-}
-
-class ReorderFlexNotifier extends DragTargetMovePlaceholderDelegate {
- Map<int, DragTargetEventNotifier> dragTargeEventNotifier = {};
-
- void updateDragTargetIndex(int index) {
- for (var notifier in dragTargeEventNotifier.values) {
- notifier.setDragTargetIndex(index);
- }
- }
-
- DragTargetEventNotifier _notifierFromIndex(int dragTargetIndex) {
- DragTargetEventNotifier? notifier = dragTargeEventNotifier[dragTargetIndex];
- if (notifier == null) {
- final newNotifier = DragTargetEventNotifier();
- dragTargeEventNotifier[dragTargetIndex] = newNotifier;
- notifier = newNotifier;
- }
-
- return notifier;
- }
-
- void dispose() {
- for (var notifier in dragTargeEventNotifier.values) {
- notifier.dispose();
- }
- }
-
- @override
- void registerPlaceholder(
- int dragTargetIndex,
- void Function(int dragTargetIndex) callback,
- ) {
- _notifierFromIndex(dragTargetIndex).addListener(() {
- callback.call(_notifierFromIndex(dragTargetIndex).currentDragTargetIndex);
- });
- }
-
- @override
- void unregisterPlaceholder(int dragTargetIndex) {
- dragTargeEventNotifier.remove(dragTargetIndex);
- }
-}
-
-class DragTargetEventNotifier extends ChangeNotifier {
- int currentDragTargetIndex = -1;
-
- void setDragTargetIndex(int index) {
- if (currentDragTargetIndex != index) {
- currentDragTargetIndex = index;
- notifyListeners();
- }
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_phantom/phantom_controller.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_phantom/phantom_controller.dart
deleted file mode 100644
index 7e991b34cd..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_phantom/phantom_controller.dart
+++ /dev/null
@@ -1,378 +0,0 @@
-import 'package:appflowy_board/appflowy_board.dart';
-import 'package:flutter/widgets.dart';
-
-import '../../utils/log.dart';
-import '../reorder_flex/drag_state.dart';
-import '../reorder_flex/drag_target.dart';
-import '../reorder_flex/drag_target_interceptor.dart';
-import 'phantom_state.dart';
-
-abstract class BoardPhantomControllerDelegate {
- AppFlowyGroupController? controller(String groupId);
-
- bool removePhantom(String groupId);
-
- /// Insert the phantom into the group
- ///
- /// * [groupId] id of the group
- /// * [index] the phantom occupies index
- void insertPhantom(
- String groupId,
- int index,
- PhantomGroupItem item,
- );
-
- /// Update the group's phantom index if it exists.
- /// [toGroupId] the id of the group
- /// [newIndex] the index of the dragTarget
- void updatePhantom(String groupId, int newIndex);
-
- void moveGroupItemToAnotherGroup(
- String fromGroupId,
- int fromGroupIndex,
- String toGroupId,
- int toGroupIndex,
- );
-}
-
-class BoardPhantomController extends OverlapDragTargetDelegate
- with CrossReorderFlexDragTargetDelegate {
- PhantomRecord? phantomRecord;
- final BoardPhantomControllerDelegate delegate;
- final AppFlowyBoardState groupsState;
- final phantomState = GroupPhantomState();
- BoardPhantomController({
- required this.delegate,
- required this.groupsState,
- });
-
- /// Determines whether the group should perform reorder
- ///
- /// Returns `true` if the fromGroupId and toGroupId of the phantomRecord
- /// equal to the passed in groupId.
- ///
- /// Returns `true` if the phantomRecord is null
- ///
- bool shouldReorder(String groupId) {
- if (phantomRecord != null) {
- return phantomRecord!.toGroupId == groupId &&
- phantomRecord!.fromGroupId == groupId;
- } else {
- return true;
- }
- }
-
- void updateIndex(int fromIndex, int toIndex) {
- if (phantomRecord == null) {
- return;
- }
- assert(phantomRecord!.fromGroupIndex == fromIndex);
- phantomRecord?.updateFromGroupIndex(toIndex);
- }
-
- void groupStartDragging(String groupId) {
- phantomState.setGroupIsDragging(groupId, true);
- }
-
- /// Remove the phantom in the group when the group is end dragging.
- void groupEndDragging(String groupId) {
- phantomState.setGroupIsDragging(groupId, false);
- if (phantomRecord == null) return;
-
- final fromGroupId = phantomRecord!.fromGroupId;
- final toGroupId = phantomRecord!.toGroupId;
- if (fromGroupId == groupId) {
- phantomState.notifyDidRemovePhantom(toGroupId);
- }
-
- if (phantomRecord!.toGroupId == groupId) {
- delegate.moveGroupItemToAnotherGroup(
- fromGroupId,
- phantomRecord!.fromGroupIndex,
- toGroupId,
- phantomRecord!.toGroupIndex,
- );
-
- // Log.debug(
- // "[$BoardPhantomController] did move ${phantomRecord.toString()}");
- phantomRecord = null;
- }
- }
-
- /// Remove the phantom in the group if it contains phantom
- void _removePhantom(String groupId) {
- final didRemove = delegate.removePhantom(groupId);
- if (didRemove) {
- phantomState.notifyDidRemovePhantom(groupId);
- phantomState.removeGroupListener(groupId);
- }
- }
-
- void _insertPhantom(
- String toGroupId,
- FlexDragTargetData dragTargetData,
- int phantomIndex,
- ) {
- final phantomContext = PassthroughPhantomContext(
- index: phantomIndex,
- dragTargetData: dragTargetData,
- );
- phantomState.addGroupListener(toGroupId, phantomContext);
-
- delegate.insertPhantom(
- toGroupId,
- phantomIndex,
- PhantomGroupItem(phantomContext),
- );
-
- phantomState.notifyDidInsertPhantom(toGroupId, phantomIndex);
- }
-
- /// Reset or initial the [PhantomRecord]
- ///
- ///
- /// * [groupId] the id of the group
- /// * [dragTargetData]
- /// * [dragTargetIndex]
- ///
- void _resetPhantomRecord(
- String groupId,
- FlexDragTargetData dragTargetData,
- int dragTargetIndex,
- ) {
- // Log.debug(
- // '[$BoardPhantomController] move Group:[${dragTargetData.reorderFlexId}]:${dragTargetData.draggingIndex} '
- // 'to Group:[$groupId]:$dragTargetIndex');
-
- phantomRecord = PhantomRecord(
- toGroupId: groupId,
- toGroupIndex: dragTargetIndex,
- fromGroupId: dragTargetData.reorderFlexId,
- fromGroupIndex: dragTargetData.draggingIndex,
- );
- Log.debug('[$BoardPhantomController] will move: $phantomRecord');
- }
-
- @override
- bool acceptNewDragTargetData(
- String reorderFlexId,
- FlexDragTargetData dragTargetData,
- int dragTargetIndex,
- ) {
- if (phantomRecord == null) {
- _resetPhantomRecord(reorderFlexId, dragTargetData, dragTargetIndex);
- _insertPhantom(reorderFlexId, dragTargetData, dragTargetIndex);
-
- return true;
- }
-
- final isNewDragTarget = phantomRecord!.toGroupId != reorderFlexId;
- if (isNewDragTarget) {
- /// Remove the phantom when the dragTarget is moved from one group to another group.
- _removePhantom(phantomRecord!.toGroupId);
- _resetPhantomRecord(reorderFlexId, dragTargetData, dragTargetIndex);
- _insertPhantom(reorderFlexId, dragTargetData, dragTargetIndex);
- }
-
- return isNewDragTarget;
- }
-
- @override
- void updateDragTargetData(
- String reorderFlexId,
- int dragTargetIndex,
- ) {
- phantomRecord?.updateInsertedIndex(dragTargetIndex);
-
- assert(phantomRecord != null);
- if (phantomRecord!.toGroupId == reorderFlexId) {
- /// Update the existing phantom index
- delegate.updatePhantom(phantomRecord!.toGroupId, dragTargetIndex);
- }
- }
-
- @override
- void cancel() {
- if (phantomRecord == null) {
- return;
- }
-
- /// Remove the phantom when the dragTarge is go back to the original group.
- _removePhantom(phantomRecord!.toGroupId);
- phantomRecord = null;
- }
-
- @override
- void dragTargetDidMoveToReorderFlex(
- String reorderFlexId,
- FlexDragTargetData dragTargetData,
- int dragTargetIndex,
- ) {
- acceptNewDragTargetData(
- reorderFlexId,
- dragTargetData,
- dragTargetIndex,
- );
- }
-
- @override
- int getInsertedIndex(String dragTargetId) {
- if (phantomState.isDragging(dragTargetId)) {
- return -1;
- }
-
- final controller = delegate.controller(dragTargetId);
- if (controller != null) {
- return controller.groupData.items.length;
- } else {
- return 0;
- }
- }
-}
-
-/// Use [PhantomRecord] to record where to remove the group item and where to
-/// insert the group item.
-///
-/// [fromGroupId] the group that phantom comes from
-/// [fromGroupIndex] the index of the phantom from the original group
-/// [toGroupId] the group that the phantom moves into
-/// [toGroupIndex] the index of the phantom moves into the group
-///
-class PhantomRecord {
- final String fromGroupId;
- int fromGroupIndex;
-
- final String toGroupId;
- int toGroupIndex;
-
- PhantomRecord({
- required this.toGroupId,
- required this.toGroupIndex,
- required this.fromGroupId,
- required this.fromGroupIndex,
- });
-
- void updateFromGroupIndex(int index) {
- fromGroupIndex = index;
- }
-
- void updateInsertedIndex(int index) {
- if (toGroupIndex == index) {
- return;
- }
-
- Log.debug(
- '[$PhantomRecord] Group:[$toGroupId] update position $toGroupIndex -> $index');
- toGroupIndex = index;
- }
-
- @override
- String toString() {
- return 'Group:[$fromGroupId]:$fromGroupIndex to Group:[$toGroupId]:$toGroupIndex';
- }
-}
-
-class PhantomGroupItem extends AppFlowyGroupItem {
- final PassthroughPhantomContext phantomContext;
-
- PhantomGroupItem(PassthroughPhantomContext insertedPhantom)
- : phantomContext = insertedPhantom;
-
- @override
- bool get isPhantom => true;
-
- @override
- String get id => phantomContext.itemData.id;
-
- Size? get feedbackSize => phantomContext.feedbackSize;
-
- Widget get draggingWidget => phantomContext.draggingWidget == null
- ? const SizedBox()
- : phantomContext.draggingWidget!;
-
- @override
- String toString() {
- return 'phantom:$id';
- }
-}
-
-class PassthroughPhantomContext extends FakeDragTargetEventTrigger
- with FakeDragTargetEventData, PassthroughPhantomListener {
- @override
- int index;
-
- @override
- final FlexDragTargetData dragTargetData;
-
- @override
- Size? get feedbackSize => dragTargetData.feedbackSize;
-
- Widget? get draggingWidget => dragTargetData.draggingWidget;
-
- AppFlowyGroupItem get itemData =>
- dragTargetData.reorderFlexItem as AppFlowyGroupItem;
-
- @override
- void Function(int?)? onInserted;
-
- @override
- VoidCallback? onDragEnded;
-
- PassthroughPhantomContext({
- required this.index,
- required this.dragTargetData,
- });
-
- @override
- void fakeOnDragEnded(VoidCallback callback) {
- onDragEnded = callback;
- }
-
- @override
- void fakeOnDragStart(void Function(int? index) callback) {
- onInserted = callback;
- }
-}
-
-class PassthroughPhantomWidget extends PhantomWidget {
- final PassthroughPhantomContext passthroughPhantomContext;
-
- PassthroughPhantomWidget({
- required double opacity,
- required this.passthroughPhantomContext,
- Key? key,
- }) : super(
- child: passthroughPhantomContext.draggingWidget,
- opacity: opacity,
- key: key,
- );
-}
-
-class PhantomDraggableBuilder extends ReorderFlexDraggableTargetBuilder {
- PhantomDraggableBuilder();
- @override
- Widget? build<T extends DragTargetData>(
- BuildContext context,
- Widget child,
- DragTargetOnStarted onDragStarted,
- DragTargetOnEnded<T> onDragEnded,
- DragTargetWillAccepted<T> onWillAccept,
- AnimationController insertAnimationController,
- AnimationController deleteAnimationController,
- ) {
- if (child is PassthroughPhantomWidget) {
- return FakeDragTarget<T>(
- eventTrigger: child.passthroughPhantomContext,
- eventData: child.passthroughPhantomContext,
- onDragStarted: onDragStarted,
- onDragEnded: onDragEnded,
- onWillAccept: onWillAccept,
- insertAnimationController: insertAnimationController,
- deleteAnimationController: deleteAnimationController,
- child: child,
- );
- } else {
- return null;
- }
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_phantom/phantom_state.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_phantom/phantom_state.dart
deleted file mode 100644
index a00b1a2aa0..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/reorder_phantom/phantom_state.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-import 'package:appflowy_board/src/utils/log.dart';
-
-import 'phantom_controller.dart';
-import 'package:flutter/material.dart';
-
-class GroupPhantomState {
- final _groupStates = <String, GroupState>{};
- final _groupIsDragging = <String, bool>{};
-
- void setGroupIsDragging(String groupId, bool isDragging) {
- _groupIsDragging[groupId] = isDragging;
- }
-
- bool isDragging(String groupId) {
- return _groupIsDragging[groupId] ?? false;
- }
-
- void addGroupListener(String groupId, PassthroughPhantomListener listener) {
- if (_groupStates[groupId] == null) {
- Log.debug("[$GroupPhantomState] add group listener: $groupId");
- _groupStates[groupId] = GroupState();
- _groupStates[groupId]?.notifier.addListener(
- onInserted: (index) => listener.onInserted?.call(index),
- onDeleted: () => listener.onDragEnded?.call(),
- );
- }
- }
-
- void removeGroupListener(String groupId) {
- Log.debug("[$GroupPhantomState] remove group listener: $groupId");
- final groupState = _groupStates.remove(groupId);
- groupState?.dispose();
- }
-
- void notifyDidInsertPhantom(String groupId, int index) {
- _groupStates[groupId]?.notifier.insert(index);
- }
-
- void notifyDidRemovePhantom(String groupId) {
- Log.debug("[$GroupPhantomState] $groupId remove phantom");
- _groupStates[groupId]?.notifier.remove();
- }
-}
-
-class GroupState {
- bool isDragging = false;
- final notifier = PassthroughPhantomNotifier();
-
- void dispose() {
- notifier.dispose();
- }
-}
-
-abstract class PassthroughPhantomListener {
- void Function(int?)? get onInserted;
- VoidCallback? get onDragEnded;
-}
-
-class PassthroughPhantomNotifier {
- final insertNotifier = PhantomInsertNotifier();
-
- final removeNotifier = PhantomDeleteNotifier();
-
- void insert(int index) {
- insertNotifier.insert(index);
- }
-
- void remove() {
- removeNotifier.remove();
- }
-
- void addListener({
- void Function(int? insertedIndex)? onInserted,
- void Function()? onDeleted,
- }) {
- if (onInserted != null) {
- insertNotifier.addListener(() {
- onInserted(insertNotifier.insertedIndex);
- });
- }
-
- if (onDeleted != null) {
- removeNotifier.addListener(() {
- onDeleted();
- });
- }
- }
-
- void dispose() {
- insertNotifier.dispose();
- removeNotifier.dispose();
- }
-}
-
-class PhantomInsertNotifier extends ChangeNotifier {
- int insertedIndex = -1;
- PassthroughPhantomContext? insertedPhantom;
-
- void insert(int index) {
- insertedIndex = index;
- notifyListeners();
- }
-}
-
-class PhantomDeleteNotifier extends ChangeNotifier {
- void remove() {
- notifyListeners();
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/styled_widgets/card.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/styled_widgets/card.dart
deleted file mode 100644
index b3ae96b28e..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/styled_widgets/card.dart
+++ /dev/null
@@ -1,37 +0,0 @@
-import 'package:flutter/material.dart';
-
-class AppFlowyGroupCard extends StatefulWidget {
- final Widget? child;
- final EdgeInsets margin;
- final BoxConstraints boxConstraints;
- final BoxDecoration decoration;
-
- const AppFlowyGroupCard({
- this.child,
- this.margin = const EdgeInsets.all(4),
- this.decoration = const BoxDecoration(
- color: Colors.white,
- borderRadius: BorderRadius.zero,
- ),
- this.boxConstraints = const BoxConstraints(minHeight: 40),
- Key? key,
- }) : super(key: key);
-
- @override
- State<AppFlowyGroupCard> createState() => _AppFlowyGroupCardState();
-}
-
-class _AppFlowyGroupCardState extends State<AppFlowyGroupCard> {
- @override
- Widget build(BuildContext context) {
- return Padding(
- padding: widget.margin,
- child: Container(
- clipBehavior: Clip.hardEdge,
- constraints: widget.boxConstraints,
- decoration: widget.decoration,
- child: widget.child,
- ),
- );
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/styled_widgets/footer.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/styled_widgets/footer.dart
deleted file mode 100644
index b130f1e099..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/styled_widgets/footer.dart
+++ /dev/null
@@ -1,47 +0,0 @@
-import 'package:flutter/material.dart';
-
-typedef OnFooterAddButtonClick = void Function();
-
-class AppFlowyGroupFooter extends StatefulWidget {
- final double height;
- final Widget? icon;
- final Widget? title;
- final EdgeInsets margin;
- final OnFooterAddButtonClick? onAddButtonClick;
-
- const AppFlowyGroupFooter({
- this.icon,
- this.title,
- this.margin = const EdgeInsets.symmetric(horizontal: 12),
- required this.height,
- this.onAddButtonClick,
- Key? key,
- }) : super(key: key);
-
- @override
- State<AppFlowyGroupFooter> createState() => _AppFlowyGroupFooterState();
-}
-
-class _AppFlowyGroupFooterState extends State<AppFlowyGroupFooter> {
- @override
- Widget build(BuildContext context) {
- return InkWell(
- onTap: widget.onAddButtonClick,
- child: SizedBox(
- height: widget.height,
- child: Padding(
- padding: widget.margin,
- child: Row(
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- if (widget.icon != null) widget.icon!,
- const SizedBox(width: 8),
- if (widget.title != null) widget.title!,
- ],
- ),
- ),
- ),
- );
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/styled_widgets/header.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/styled_widgets/header.dart
deleted file mode 100644
index 9e17a340ee..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/styled_widgets/header.dart
+++ /dev/null
@@ -1,82 +0,0 @@
-import 'package:flutter/material.dart';
-
-typedef OnHeaderAddButtonClick = void Function();
-typedef OnHeaderMoreButtonClick = void Function();
-
-class AppFlowyGroupHeader extends StatefulWidget {
- final double height;
- final Widget? icon;
- final Widget? title;
- final Widget? addIcon;
- final Widget? moreIcon;
- final EdgeInsets margin;
- final OnHeaderAddButtonClick? onAddButtonClick;
- final OnHeaderMoreButtonClick? onMoreButtonClick;
-
- const AppFlowyGroupHeader({
- required this.height,
- this.icon,
- this.title,
- this.addIcon,
- this.moreIcon,
- this.margin = EdgeInsets.zero,
- this.onAddButtonClick,
- this.onMoreButtonClick,
- Key? key,
- }) : super(key: key);
-
- @override
- State<AppFlowyGroupHeader> createState() => _AppFlowyGroupHeaderState();
-}
-
-class _AppFlowyGroupHeaderState extends State<AppFlowyGroupHeader> {
- @override
- Widget build(BuildContext context) {
- List<Widget> children = [];
-
- if (widget.icon != null) {
- children.add(widget.icon!);
- children.add(_hSpace());
- }
-
- if (widget.title != null) {
- children.add(widget.title!);
- children.add(_hSpace());
- }
-
- if (widget.moreIcon != null) {
- // children.add(const Spacer());
- children.add(
- IconButton(
- onPressed: widget.onMoreButtonClick,
- icon: widget.moreIcon!,
- padding: const EdgeInsets.all(4),
- constraints: const BoxConstraints(),
- ),
- );
- }
-
- if (widget.addIcon != null) {
- children.add(
- IconButton(
- onPressed: widget.onAddButtonClick,
- icon: widget.addIcon!,
- padding: const EdgeInsets.all(4),
- constraints: const BoxConstraints(),
- ),
- );
- }
-
- return SizedBox(
- height: widget.height,
- child: Padding(
- padding: widget.margin,
- child: Row(children: children),
- ),
- );
- }
-
- Widget _hSpace() {
- return const SizedBox(width: 6);
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/styled_widgets/widgets.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/styled_widgets/widgets.dart
deleted file mode 100644
index b802d15dae..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/styled_widgets/widgets.dart
+++ /dev/null
@@ -1,3 +0,0 @@
-export 'card.dart';
-export 'footer.dart';
-export 'header.dart';
diff --git a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/transitions.dart b/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/transitions.dart
deleted file mode 100644
index d5cb1de26a..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/lib/src/widgets/transitions.dart
+++ /dev/null
@@ -1,112 +0,0 @@
-import 'package:flutter/widgets.dart';
-import 'package:flutter/rendering.dart';
-
-class SizeTransitionWithIntrinsicSize extends SingleChildRenderObjectWidget {
- /// Creates a size transition with its intrinsic width/height taking [sizeFactor]
- /// into account.
- ///
- /// The [axis] argument defaults to [Axis.vertical].
- /// The [axisAlignment] defaults to 0.0, which centers the child along the
- /// main axis during the transition.
- SizeTransitionWithIntrinsicSize({
- this.axis = Axis.vertical,
- required this.sizeFactor,
- double axisAlignment = 0.0,
- Widget? child,
- Key? key,
- }) : super(
- key: key,
- child: SizeTransition(
- axis: axis,
- sizeFactor: sizeFactor,
- axisAlignment: axisAlignment,
- child: child,
- ));
-
- final Axis axis;
- final Animation<double> sizeFactor;
-
- @override
- RenderSizeTransitionWithIntrinsicSize createRenderObject(
- BuildContext context) {
- return RenderSizeTransitionWithIntrinsicSize(
- axis: axis,
- sizeFactor: sizeFactor,
- );
- }
-
- @override
- void updateRenderObject(BuildContext context,
- RenderSizeTransitionWithIntrinsicSize renderObject) {
- renderObject
- ..axis = axis
- ..sizeFactor = sizeFactor;
- }
-
- @override
- void debugFillProperties(DiagnosticPropertiesBuilder properties) {
- super.debugFillProperties(properties);
- properties.add(DiagnosticsProperty<Axis>('axis', axis));
- properties
- .add(DiagnosticsProperty<Animation<double>>('sizeFactor', sizeFactor));
- }
-}
-
-class RenderSizeTransitionWithIntrinsicSize extends RenderProxyBox {
- Axis axis;
- Animation<double> sizeFactor;
-
- RenderSizeTransitionWithIntrinsicSize({
- this.axis = Axis.vertical,
- required this.sizeFactor,
- RenderBox? child,
- }) : super(child);
-
- @override
- double computeMinIntrinsicWidth(double height) {
- final child = this.child;
- if (child != null) {
- double childWidth = child.getMinIntrinsicWidth(height);
- return axis == Axis.horizontal
- ? childWidth * sizeFactor.value
- : childWidth;
- }
- return 0.0;
- }
-
- @override
- double computeMaxIntrinsicWidth(double height) {
- final child = this.child;
- if (child != null) {
- double childWidth = child.getMaxIntrinsicWidth(height);
- return axis == Axis.horizontal
- ? childWidth * sizeFactor.value
- : childWidth;
- }
- return 0.0;
- }
-
- @override
- double computeMinIntrinsicHeight(double width) {
- final child = this.child;
- if (child != null) {
- double childHeight = child.getMinIntrinsicHeight(width);
- return axis == Axis.vertical
- ? childHeight * sizeFactor.value
- : childHeight;
- }
- return 0.0;
- }
-
- @override
- double computeMaxIntrinsicHeight(double width) {
- final child = this.child;
- if (child != null) {
- double childHeight = child.getMaxIntrinsicHeight(width);
- return axis == Axis.vertical
- ? childHeight * sizeFactor.value
- : childHeight;
- }
- return 0.0;
- }
-}
diff --git a/frontend/app_flowy/packages/appflowy_board/pubspec.yaml b/frontend/app_flowy/packages/appflowy_board/pubspec.yaml
deleted file mode 100644
index 23c3b8be82..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/pubspec.yaml
+++ /dev/null
@@ -1,57 +0,0 @@
-name: appflowy_board
-description: AppFlowyBoard is a board-style widget that consists of multi-groups. It supports drag and drop between different groups.
-version: 0.0.9
-homepage: https://github.com/AppFlowy-IO/AppFlowy
-repository: https://github.com/AppFlowy-IO/AppFlowy/tree/main/frontend/app_flowy/packages/appflowy_board
-
-environment:
- sdk: ">=2.17.0 <3.0.0"
- flutter: ">=1.17.0"
-
-dependencies:
- flutter:
- sdk: flutter
- equatable: ^2.0.3
- provider: ^6.0.1
-
-dev_dependencies:
- flutter_test:
- sdk: flutter
- flutter_lints: ^2.0.1
-
-# 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:
-
- # To add assets to your package, add an assets section, like this:
- # assets:
- # - images/a_dot_burr.jpeg
- # - images/a_dot_ham.jpeg
- #
- # For details regarding assets in packages, see
- # https://flutter.dev/assets-and-images/#from-packages
- #
- # An image asset can refer to one or more resolution-specific "variants", see
- # https://flutter.dev/assets-and-images/#resolution-aware
-
- # To add custom fonts to your package, 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 in packages, see
- # https://flutter.dev/custom-fonts/#from-packages
diff --git a/frontend/app_flowy/packages/appflowy_board/test/appflowy_board_test.dart b/frontend/app_flowy/packages/appflowy_board/test/appflowy_board_test.dart
deleted file mode 100644
index ab73b3a234..0000000000
--- a/frontend/app_flowy/packages/appflowy_board/test/appflowy_board_test.dart
+++ /dev/null
@@ -1 +0,0 @@
-void main() {}
diff --git a/frontend/app_flowy/pubspec.lock b/frontend/app_flowy/pubspec.lock
index 5709286955..f2f8377f1a 100644
--- a/frontend/app_flowy/pubspec.lock
+++ b/frontend/app_flowy/pubspec.lock
@@ -32,9 +32,11 @@ packages:
appflowy_board:
dependency: "direct main"
description:
- path: "packages/appflowy_board"
- relative: true
- source: path
+ path: "."
+ ref: a183c57
+ resolved-ref: a183c57013071cb3192fcf3c9b1eeb89462179b7
+ url: "https://github.com/AppFlowy-IO/appflowy-board.git"
+ source: git
version: "0.0.9"
appflowy_editor:
dependency: "direct main"
diff --git a/frontend/app_flowy/pubspec.yaml b/frontend/app_flowy/pubspec.yaml
index bb5d68bc96..93f442e35a 100644
--- a/frontend/app_flowy/pubspec.yaml
+++ b/frontend/app_flowy/pubspec.yaml
@@ -38,7 +38,10 @@ dependencies:
flowy_infra:
path: packages/flowy_infra
appflowy_board:
- path: packages/appflowy_board
+ # path: packages/appflowy_board
+ git:
+ url: https://github.com/AppFlowy-IO/appflowy-board.git
+ ref: a183c57
appflowy_editor:
path: packages/appflowy_editor
appflowy_popover: