halkyon_app: instances, sign-in and sync plumbing for Halkyon's apps

What every Halkyon app's shell needs, taken from Halkyon Learn's and set
on halkyon_base's client: the instances a device keeps an account on,
the first start's tiles and where an instance keeps people's data, the
account switcher; signing in anonymously, with GitHub or an email code,
switching person and the start screen; the gates that build an app's
dependencies per instance and per person; and the sync service with its
status, Settings card and banner. Texts of its own in English and
German take the app's name; what only the app can say, it passes in.
Fakes for apps' tests are in testing.dart.

An instance's basics now name the app it serves (`app`, set by the
host's configuration), and an app accepts only an instance of its own.
SerialQueue and CoalescingRunner move into halkyon_core.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-19 15:18:49 +02:00
commit e23cc77f7c
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64
112 changed files with 10761 additions and 10 deletions

31
packages/halkyon_app/.gitignore vendored Normal file
View file

@ -0,0 +1,31 @@
# 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/
.flutter-plugins-dependencies
/build/
/coverage/

View file

@ -0,0 +1,8 @@
## 0.1.0
* Halkyon Learn's instances, sign-in and sync plumbing, for every Halkyon app,
on an instance's `halkyon_base`: `InstanceChoice` and the first start,
`InstanceGate`, `SessionGate` and `PersonScope` over an app's
`AppDependencies`, `ServerpodAuthGateway` with its blocs and the email
sheet, `SyncService` with its status and widgets, texts of their own in
English and German that name the app (`AppFrame`), and a `testing` library.

View file

@ -0,0 +1,235 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://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.
halkyon_shared
Copyright (C) 2026 project_halkyon
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 <http://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 <http://www.gnu.org/licenses/>.

View file

@ -0,0 +1,109 @@
# halkyon_app
What every Halkyon app (Learn, Todo, Train) is built around, on an instance's
`halkyon_base` module: the instances a device keeps an account on, signing in,
each person's data opened and closed, and syncing it. Taken from Halkyon Learn,
which it was written for, so it behaves as Learn's own did; the texts are in
British English, American English and German, and where they name the app,
they name yours.
Written as the apps are: Dart 3.13's primary constructors, Material from
`package:material_ui`, Lucide icons, blocs (`flutter_bloc`), LeanCode's lints.
## What it holds
- **Instances** (`lib/src/instance/`): `Instance` (an address as people type
it), `InstanceChoice` (those the device keeps an account on, one in use;
`FileInstanceStore`), `InstanceStorage` (each instance's people's folders and
session key), `InstanceChecker` (does an address answer, where does it keep
people's data; `ServerpodInstanceChecker` asks its `instance.basics()`),
`InstanceScope`. The screens: `FirstStartScreen` (the build's instance and
another, as tiles, `InstanceTile`), `InstanceStep` (an address, checked),
`showAccountSwitcher` and `AddAccountScreen`, and where an instance keeps
people's data, as a flag and words (`InstanceLocationBuilder`,
`InstanceFlag`, `instanceLocationWords`, countries named by the app's
`CountryNames`).
- **Gates** (`lib/src/app/`): `InstanceGate` opens the app's dependencies on
the instance in use (`AppDependencies`, handed down by `AppScope`), anew on
a switch, the previous ones closed first; `SessionGate` keeps a person
signed in, signing in anonymously at a first start and asking how to start
once signed out (`StartScreen`); `PersonScope` opens each person's own
dependencies and closes them when the person goes.
- **Signing in** (`lib/src/auth/`): `AuthRepository` on an `AuthGateway`;
`ServerpodAuthGateway` signs in anonymously, with GitHub (the system
browser and a loopback address on Linux and Windows, `LoopbackWebAuth`) and
with a code by mail, through the instance's `halkyon_base`; `SessionBloc`,
`GitHubSignInBloc`, `EmailSignInBloc` (with `showEmailSignInSheet`) and
`SignInWaysCubit`; `SignedOutMark`, `SignInAddresses`, `PersonFolders`.
- **Sync** (`lib/src/sync/`): `SyncService` (once at start, shortly after
local changes, on resume and every few minutes, one sync at a time, counting
the changes not on the server yet, `PendingChangesStore`), `AppCompatibility`
and `compatibleSync` (the instance's minimum app build, the engine's table
check), `SyncStatusBloc`, `syncAndWait`, and the widgets: `SyncStatusCard`,
`AppMismatchBanner`, `SyncTroubleBadge`.
- **A client of `halkyon_base` alone** (`BaseClient`): to ask an instance
about itself, and to sign in as another person than the app's client holds.
- **Testing** (`package:halkyon_app/testing.dart`): fakes of every boundary
(`FakeAuthGateway`, `FakeInstanceChecker`, the stores in memory), a frame
(`testFrame`), `testApp`, and `TestAppDependencies`.
## Using it in an app
1. **The server** includes `halkyon_base` with the nickname `base` (its
README), so the app's generated client has `client.modules.base`.
2. **Depend on it** by git, pinned to a signed commit of halkyon_shared's
main, as `halkyon_ui` (whose README shows the `pubspec_overrides.yaml` for
working on both at once):
```yaml
dependencies:
halkyon_app:
git:
url: https://code.halkyon.app/project-halkyon/halkyon_shared.git
path: packages/halkyon_app
ref: <signed commit>
```
3. **Texts**: add `HalkyonAppLocalizations.delegate` to every `MaterialApp`'s
delegates, beside `HalkyonUiLocalizations.delegate` and material_ui's
`GlobalMaterialLocalizations.delegates`.
4. **The frame** (`AppFrame`): the app's name and wordmark word, its icon, an
example address, its theme, delegates, languages and launch screen, and the
two sentences only it can say: what the first start's instance keeps of
the person's, and what a switch to another account leaves behind.
5. **The dependencies**: the app's composition root implements
`AppDependencies<P>` (`serverName`, `auth`, `signedOut`, `openPerson`,
`dispose`), its person's dependencies `Disposable`. Its `auth` is an
`AuthRepository` on `ServerpodAuthGateway(client, base:
client.modules.base, callbackScheme: …, appName: …)`; the scheme is the
app's own (`app.halkyon.learn`), registered with each platform and in the
instance's GitHub OAuth app, whose loopback address on Linux and Windows is
`http://127.0.0.1/github-callback` (port 43823 unless given).
6. **The tree**:
```dart
InstanceGate(
frame: frame,
choice: choice,
checker: ServerpodInstanceChecker(app: 'todo'),
countryNames: …,
readLook: …, // the device's theme mode and language
open: Dependencies.create,
app: SessionGate(
look: (context) => …,
app: (person) => PersonApp(person: person), // with PersonScope inside
),
)
```
A person's widgets find their dependencies with
`PersonScope.of<PersonDependencies>(context)` and the app's with
`AppScope.of<Dependencies>(context)`.
7. **Licences**: call `registerFlagIconsLicense()` once at startup, beside
halkyon_ui's `registerFontLicenses()`.
## Licence
GNU Affero General Public License 3.0 or later (`LICENSE`). The flags are
lipis' flag-icons, drawn by the `flag` package, under the MIT licence
(`assets/flags/LICENSE-flag-icons.txt`).

View file

@ -0,0 +1,11 @@
# The workspace's lint rules (see ../../analysis_options.yaml).
include: ../../analysis_options.yaml
analyzer:
exclude:
- build/**
# Generated by gen-l10n (see l10n.yaml).
- lib/l10n/halkyon_app_localizations*.dart
formatter:
trailing_commas: preserve

View file

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2013 Panayiotis Lipiridis
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -0,0 +1,14 @@
# Flutter's gen-l10n: the strings in lib/l10n/*.arb become HalkyonAppLocalizations,
# generated into lib/l10n/halkyon_app_localizations*.dart (committed, never edited or
# formatted by hand, as apps take this package by git). halkyon_app_en.arb, the
# template, is British English, also the fallback; halkyon_app_en_US.arb overrides
# what American English spells differently; halkyon_app_en_GB.arb is empty; German
# says "du". Where a text names the app, it takes the app's name as `{app}`.
arb-dir: lib/l10n
template-arb-file: halkyon_app_en.arb
output-dir: lib/l10n
output-localization-file: halkyon_app_localizations.dart
output-class: HalkyonAppLocalizations
# `HalkyonAppLocalizations.of(context).foo` without a `!`: apps install the
# delegate.
nullable-getter: false

View file

@ -0,0 +1,70 @@
/// What every Halkyon app is built around, on an instance's halkyon_base:
///
/// - **Instances**: the ones a device keeps an account on, one in use at a
/// time (`InstanceChoice`), chosen at first start (`FirstStartScreen`) or
/// added later (`showAccountSwitcher`), each checked before the app moves
/// there (`InstanceChecker`) and saying where it keeps people's data.
/// - **Gates**: `InstanceGate` opens the app's dependencies on the instance
/// in use (`AppDependencies`, `AppScope`); `SessionGate` keeps a person
/// signed in and asks how to start once signed out (`StartScreen`);
/// `PersonScope` opens each person's own dependencies.
/// - **Signing in**: anonymously, with GitHub or with a code by mail
/// (`AuthRepository` on `ServerpodAuthGateway`), and the blocs and sheet
/// that switch a device to another account.
/// - **Sync**: `SyncService` on triggers, the changes still waiting, and
/// where it stands (`SyncStatusBloc`, `SyncStatusCard`, `AppMismatchBanner`,
/// `SyncTroubleBadge`).
///
/// An app gives its name, look and own words as an `AppFrame`, and installs
/// `HalkyonAppLocalizations.delegate` beside its own.
library;
export 'l10n/halkyon_app_localizations.dart';
export 'src/app/app_frame.dart' show AppFrame, AppFrameScope, LookSettings;
export 'src/app/app_scope.dart';
export 'src/app/instance_gate.dart';
export 'src/app/person_scope.dart';
export 'src/auth/bloc/email_sign_in_bloc.dart';
export 'src/auth/bloc/github_sign_in_bloc.dart';
export 'src/auth/bloc/session_bloc.dart';
export 'src/auth/bloc/sign_in_ways_cubit.dart';
export 'src/auth/data/auth_gateway.dart';
export 'src/auth/data/auth_repository.dart';
export 'src/auth/data/loopback_web_auth.dart';
export 'src/auth/data/serverpod_auth_gateway.dart';
export 'src/auth/data/sign_in_addresses.dart';
export 'src/auth/data/signed_out_mark.dart';
export 'src/auth/model/auth_status.dart';
export 'src/auth/model/email_sign_in.dart';
export 'src/auth/model/github_link_outcome.dart';
export 'src/auth/model/github_sign_in.dart';
export 'src/auth/model/sign_in_ways.dart';
export 'src/auth/widget/email_sign_in_sheet.dart';
export 'src/auth/widget/session_gate.dart';
export 'src/auth/widget/start_screen.dart';
export 'src/base/base_client.dart';
export 'src/instance/country_names.dart';
export 'src/instance/flag_icons_license.dart';
export 'src/instance/instance.dart';
export 'src/instance/instance_checker.dart';
export 'src/instance/instance_choice.dart';
export 'src/instance/instance_locations.dart';
export 'src/instance/instance_scope.dart';
export 'src/instance/instance_storage.dart';
export 'src/instance/instance_store.dart';
export 'src/instance/widget/account_switcher_sheet.dart';
export 'src/instance/widget/first_start_screen.dart';
export 'src/instance/widget/instance_location.dart';
export 'src/instance/widget/instance_location_words.dart';
export 'src/instance/widget/instance_step.dart';
export 'src/instance/widget/instance_tile.dart';
export 'src/person/person_folders.dart';
export 'src/sync/app_compatibility.dart';
export 'src/sync/bloc/sync_status_bloc.dart';
export 'src/sync/pending_changes_store.dart';
export 'src/sync/sync_service.dart';
export 'src/sync/sync_status.dart';
export 'src/sync/widget/app_mismatch_banner.dart';
export 'src/sync/widget/sync_and_wait.dart';
export 'src/sync/widget/sync_status_card.dart';
export 'src/sync/widget/sync_trouble_badge.dart';

View file

@ -0,0 +1,78 @@
{
"@@locale": "de",
"tryAgain": "Erneut versuchen",
"instanceWelcome": "Willkommen bei {app}",
"instanceBuiltInTagline": "In der App voreingestellt",
"instanceAnother": "Andere Instanz",
"instanceAnotherTagline": "Gib ihre Adresse ein",
"instanceAddress": "Adresse der Instanz",
"instanceAddressInvalid": "Das ist keine Adresse.",
"instanceAddressRequired": "Gib die Adresse einer Instanz ein.",
"instanceContinue": "Weiter",
"instanceUnreachable": "Unter {name} antwortet keine Instanz von {app}.",
"instanceUseBuiltIn": "{name} verwenden",
"instanceOpenFailed": "Die App auf {name} konnte nicht geöffnet werden.",
"instanceDataAndBackupsIn": "Daten und Sicherungen: {place}",
"instanceDataIn": "Daten: {place}",
"instanceBackupsIn": "Sicherungen: {place}",
"instanceNoBackups": "Keine Sicherungen",
"instanceEuropeanUnion": "Europäische Union",
"accountsTitle": "Konten",
"accountAdd": "Konto hinzufügen",
"accountAddSubtitle": "Wähle die Instanz für das Konto, das du hinzufügst.",
"accountSignedIn": "Angemeldet",
"accountAnonymous": "Anonym",
"accountRemoveTooltip": "Konto entfernen",
"accountRemoveTitle": "Konto entfernen?",
"accountRemoveMessage": "Entfernt das Konto auf {name} von diesem Gerät, mit allem, was das Gerät davon hat. Was es synchronisiert hat, bleibt auf {name}: Melde dich dort wieder an, um es wiederzuhaben. In ein anonymes Konto kann man sich nicht wieder anmelden.",
"accountRemoveConfirm": "Entfernen",
"sessionUnreachable": "Der Server war nicht erreichbar.",
"personDataFailed": "Die Daten dieses Geräts konnten nicht geöffnet werden.",
"startSignedOut": "Abgemeldet",
"startOn": "Starte auf {instance}:",
"startWithGitHub": "Mit GitHub anmelden",
"startWithEmail": "Mit E-Mail fortfahren",
"startWithoutAccount": "Ohne Konto starten",
"startAnonymous": "Dein Fortschritt wird auf diesem Gerät gespeichert. Melde dich an, um ihn zu behalten.",
"startGitHubFailed": "Anmeldung mit GitHub fehlgeschlagen.",
"startNoGitHubAccount": "Noch kein Konto hier meldet sich mit diesem GitHub-Konto an. Starte ohne Konto und füge GitHub dann im Profil hinzu.",
"startOtherInstance": "Andere Instanz verwenden",
"emailSignInTitle": "Mit E-Mail fortfahren",
"emailSignInIntro": "Wir schicken dir einen Code zum Anmelden. Diese Instanz behält nur einen Fingerabdruck deiner Adresse, nie die Adresse selbst, und schreibt ihr nur, wenn du einen Code anforderst.",
"emailSignInAddress": "E-Mail-Adresse",
"emailSignInSend": "Code senden",
"emailSignInCodeSent": "Wir haben einen Code an {address} geschickt. Er gilt 15 Minuten.",
"emailSignInResent": "Ein neuer Code ist unterwegs.",
"emailSignInCode": "Code",
"emailSignInContinue": "Weiter",
"emailSignInResend": "Neuen Code senden",
"emailSignInOtherAddress": "Andere Adresse verwenden",
"emailSignInSwitchTitle": "Zum Konto von {address} wechseln?",
"emailSignInSwitchConfirm": "Wechseln",
"emailSignInSwitchStay": "Anonym bleiben",
"emailSignInTaken": "Mit {address} meldet sich schon ein anderes Konto an. Um zu ihm zu wechseln, melde dich zuerst ab.",
"emailSignInUnavailable": "Diese Instanz bietet keine Anmeldung mit E-Mail an.",
"emailSignInNotAnAddress": "Das ist keine E-Mail-Adresse.",
"emailSignInTooManyCodes": "Zu viele Codes in der letzten Stunde. Versuche es später noch einmal.",
"emailSignInWrongCode": "Dieser Code stimmt nicht.",
"emailSignInTooManyTries": "Zu viele falsche Codes. Fordere einen neuen an.",
"emailSignInCodeExpired": "Dieser Code gilt nicht mehr. Fordere einen neuen an.",
"emailSignInOtherAddressLinked": "Du meldest dich schon mit einer anderen Adresse an.",
"emailSignInMailFailed": "Die Instanz konnte die Mail nicht senden. Versuche es später noch einmal.",
"emailSignInFailed": "Die Instanz war nicht erreichbar. Versuche es noch einmal.",
"syncTitle": "Synchronisierung",
"syncNow": "Jetzt synchronisieren",
"syncStateSyncing": "Wird synchronisiert…",
"syncStateSynced": "Alles synchronisiert",
"syncStateFailing": "Synchronisierung schlägt fehl",
"syncStateNotYet": "Noch nicht synchronisiert",
"syncStateMismatch": "Diese App kann nicht mit {server} synchronisieren",
"syncMismatchDetail": "Aktualisiere die App. Ist sie schon aktuell, muss der Server aktualisiert werden. Was du bis dahin tust, bleibt auf diesem Gerät und wird danach synchronisiert.",
"syncLastCompleted": "Zuletzt abgeschlossen um {time}",
"syncLastFailed": "Letzter Versuch fehlgeschlagen um {time}",
"syncNoRunYet": "Seit dem Start der App wurde noch keine Synchronisierung abgeschlossen",
"syncPending": "{count, plural, =1{1 Änderung wartet auf die Synchronisierung} other{{count} Änderungen warten auf die Synchronisierung}}",
"syncTroubleLabel": "Synchronisierung benötigt Aufmerksamkeit",
"syncMismatchBanner": "Diese App kann nicht mehr mit {server} synchronisieren. Aktualisiere sie, um weiter zu synchronisieren.",
"syncMismatchMore": "Mehr"
}

View file

@ -0,0 +1,201 @@
{
"@@locale": "en",
"tryAgain": "Try again",
"instanceWelcome": "Welcome to {app}",
"@instanceWelcome": {
"description": "Screen readers hear it for the wordmark on the first start.",
"placeholders": {
"app": {
"type": "String"
}
}
},
"instanceBuiltInTagline": "Comes with the app",
"instanceAnother": "Another instance",
"instanceAnotherTagline": "Enter its address",
"instanceAddress": "Instance address",
"instanceAddressInvalid": "This isn't an address.",
"instanceAddressRequired": "Enter the address of an instance.",
"instanceContinue": "Continue",
"instanceUnreachable": "No instance of {app} answers at {name}.",
"@instanceUnreachable": {
"placeholders": {
"app": {
"type": "String"
},
"name": {
"type": "String"
}
}
},
"instanceUseBuiltIn": "Use {name}",
"@instanceUseBuiltIn": {
"placeholders": {
"name": {
"type": "String"
}
}
},
"instanceOpenFailed": "Couldn't open the app on {name}.",
"@instanceOpenFailed": {
"placeholders": {
"name": {
"type": "String"
}
}
},
"instanceDataAndBackupsIn": "Data and backups: {place}",
"@instanceDataAndBackupsIn": {
"placeholders": {
"place": {
"type": "String"
}
}
},
"instanceDataIn": "Data: {place}",
"@instanceDataIn": {
"placeholders": {
"place": {
"type": "String"
}
}
},
"instanceBackupsIn": "Backups: {place}",
"@instanceBackupsIn": {
"placeholders": {
"place": {
"type": "String"
}
}
},
"instanceNoBackups": "No backups",
"instanceEuropeanUnion": "European Union",
"accountsTitle": "Accounts",
"accountAdd": "Add account",
"accountAddSubtitle": "Choose the instance for the account to add.",
"accountSignedIn": "Signed in",
"accountAnonymous": "Anonymous",
"accountRemoveTooltip": "Remove account",
"accountRemoveTitle": "Remove account?",
"accountRemoveMessage": "Removes the account on {name} from this device, with all the device holds of it. What it synced stays on {name}: sign in there again to have it. An anonymous account can't be signed into again.",
"@accountRemoveMessage": {
"placeholders": {
"name": {
"type": "String"
}
}
},
"accountRemoveConfirm": "Remove",
"sessionUnreachable": "Couldn't reach the server.",
"personDataFailed": "Couldn't open this device's data.",
"startSignedOut": "Signed out",
"startOn": "Start on {instance}:",
"@startOn": {
"placeholders": {
"instance": {
"type": "String"
}
}
},
"startWithGitHub": "Sign in with GitHub",
"startWithEmail": "Continue with email",
"startWithoutAccount": "Start without an account",
"startAnonymous": "Progress is saved on this device. Sign in to keep it.",
"startGitHubFailed": "Couldn't sign in with GitHub.",
"startNoGitHubAccount": "No account here signs in with this GitHub account yet. Start without an account, then add GitHub in Profile.",
"startOtherInstance": "Use another instance",
"emailSignInTitle": "Continue with email",
"emailSignInIntro": "We mail you a code to sign in. This instance keeps only a fingerprint of your address, never the address itself, and writes to it only when you ask for a code.",
"emailSignInAddress": "Email address",
"emailSignInSend": "Send code",
"emailSignInCodeSent": "We mailed a code to {address}. It's valid for 15 minutes.",
"@emailSignInCodeSent": {
"placeholders": {
"address": {
"type": "String"
}
}
},
"emailSignInResent": "A new code is on its way.",
"emailSignInCode": "Code",
"emailSignInContinue": "Continue",
"emailSignInResend": "Send a new code",
"emailSignInOtherAddress": "Use another address",
"emailSignInSwitchTitle": "Switch to the account of {address}?",
"@emailSignInSwitchTitle": {
"placeholders": {
"address": {
"type": "String"
}
}
},
"emailSignInSwitchConfirm": "Switch",
"emailSignInSwitchStay": "Stay anonymous",
"emailSignInTaken": "{address} already signs in to another account. To switch to it, sign out first.",
"@emailSignInTaken": {
"placeholders": {
"address": {
"type": "String"
}
}
},
"emailSignInUnavailable": "This instance doesn't offer signing in with email.",
"emailSignInNotAnAddress": "This isn't an email address.",
"emailSignInTooManyCodes": "Too many codes in the last hour. Try again later.",
"emailSignInWrongCode": "That code isn't right.",
"emailSignInTooManyTries": "Too many wrong codes. Ask for a new one.",
"emailSignInCodeExpired": "This code is no longer valid. Ask for a new one.",
"emailSignInOtherAddressLinked": "You already sign in with another address.",
"emailSignInMailFailed": "The instance couldn't send the mail. Try again later.",
"emailSignInFailed": "Couldn't reach the instance. Try again.",
"syncTitle": "Sync",
"syncNow": "Sync now",
"syncStateSyncing": "Syncing…",
"syncStateSynced": "Everything synced",
"syncStateFailing": "Sync is failing",
"syncStateNotYet": "Not synced yet",
"syncStateMismatch": "This app can't sync with {server}",
"@syncStateMismatch": {
"placeholders": {
"server": {
"type": "String"
}
}
},
"syncMismatchDetail": "Update the app. If it is up to date, the server needs an update. What you do meanwhile stays on this device and syncs afterwards.",
"syncLastCompleted": "Last completed at {time}",
"@syncLastCompleted": {
"placeholders": {
"time": {
"type": "String"
}
}
},
"syncLastFailed": "Last attempt failed at {time}",
"@syncLastFailed": {
"placeholders": {
"time": {
"type": "String"
}
}
},
"syncNoRunYet": "No sync has completed since the app started",
"syncPending": "{count, plural, =1{1 change waits to sync} other{{count} changes wait to sync}}",
"@syncPending": {
"placeholders": {
"count": {
"type": "int"
}
}
},
"syncTroubleLabel": "Sync needs attention",
"syncMismatchBanner": "This app can't sync with {server} any more. Update it to keep syncing.",
"@syncMismatchBanner": {
"placeholders": {
"server": {
"type": "String"
}
}
},
"syncMismatchMore": "More"
}

View file

@ -0,0 +1,3 @@
{
"@@locale": "en_GB"
}

View file

@ -0,0 +1,3 @@
{
"@@locale": "en_US"
}

View file

@ -0,0 +1,605 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:intl/intl.dart' as intl;
import 'halkyon_app_localizations_de.dart';
import 'halkyon_app_localizations_en.dart';
// ignore_for_file: type=lint
/// Callers can lookup localized strings with an instance of HalkyonAppLocalizations
/// returned by `HalkyonAppLocalizations.of(context)`.
///
/// Applications need to include `HalkyonAppLocalizations.delegate()` in their app's
/// `localizationDelegates` list, and the locales they support in the app's
/// `supportedLocales` list. For example:
///
/// ```dart
/// import 'l10n/halkyon_app_localizations.dart';
///
/// return MaterialApp(
/// localizationsDelegates: HalkyonAppLocalizations.localizationsDelegates,
/// supportedLocales: HalkyonAppLocalizations.supportedLocales,
/// home: MyApplicationHome(),
/// );
/// ```
///
/// ## Update pubspec.yaml
///
/// Please make sure to update your pubspec.yaml to include the following
/// packages:
///
/// ```yaml
/// dependencies:
/// # Internationalization support.
/// flutter_localizations:
/// sdk: flutter
/// intl: any # Use the pinned version from flutter_localizations
///
/// # Rest of dependencies
/// ```
///
/// ## iOS Applications
///
/// iOS applications define key application metadata, including supported
/// locales, in an Info.plist file that is built into the application bundle.
/// To configure the locales supported by your app, you’ll need to edit this
/// file.
///
/// First, open your project’s ios/Runner.xcworkspace Xcode workspace file.
/// Then, in the Project Navigator, open the Info.plist file under the Runner
/// project’s Runner folder.
///
/// Next, select the Information Property List item, select Add Item from the
/// Editor menu, then select Localizations from the pop-up menu.
///
/// Select and expand the newly-created Localizations item then, for each
/// locale your application supports, add a new item and select the locale
/// you wish to add from the pop-up menu in the Value field. This list should
/// be consistent with the languages listed in the HalkyonAppLocalizations.supportedLocales
/// property.
abstract class HalkyonAppLocalizations {
HalkyonAppLocalizations(String locale)
: localeName = intl.Intl.canonicalizedLocale(locale.toString());
final String localeName;
static HalkyonAppLocalizations of(BuildContext context) {
return Localizations.of<HalkyonAppLocalizations>(
context,
HalkyonAppLocalizations,
)!;
}
static const LocalizationsDelegate<HalkyonAppLocalizations> delegate =
_HalkyonAppLocalizationsDelegate();
/// A list of this localizations delegate along with the default localizations
/// delegates.
///
/// Returns a list of localizations delegates containing this delegate along with
/// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
/// and GlobalWidgetsLocalizations.delegate.
///
/// Additional delegates can be added by appending to this list in
/// MaterialApp. This list does not have to be used at all if a custom list
/// of delegates is preferred or required.
static const List<LocalizationsDelegate<dynamic>> localizationsDelegates =
<LocalizationsDelegate<dynamic>>[
delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
];
/// A list of this localizations delegate's supported locales.
static const List<Locale> supportedLocales = <Locale>[
Locale('de'),
Locale('en'),
Locale('en', 'GB'),
Locale('en', 'US'),
];
/// No description provided for @tryAgain.
///
/// In en, this message translates to:
/// **'Try again'**
String get tryAgain;
/// Screen readers hear it for the wordmark on the first start.
///
/// In en, this message translates to:
/// **'Welcome to {app}'**
String instanceWelcome(String app);
/// No description provided for @instanceBuiltInTagline.
///
/// In en, this message translates to:
/// **'Comes with the app'**
String get instanceBuiltInTagline;
/// No description provided for @instanceAnother.
///
/// In en, this message translates to:
/// **'Another instance'**
String get instanceAnother;
/// No description provided for @instanceAnotherTagline.
///
/// In en, this message translates to:
/// **'Enter its address'**
String get instanceAnotherTagline;
/// No description provided for @instanceAddress.
///
/// In en, this message translates to:
/// **'Instance address'**
String get instanceAddress;
/// No description provided for @instanceAddressInvalid.
///
/// In en, this message translates to:
/// **'This isn\'t an address.'**
String get instanceAddressInvalid;
/// No description provided for @instanceAddressRequired.
///
/// In en, this message translates to:
/// **'Enter the address of an instance.'**
String get instanceAddressRequired;
/// No description provided for @instanceContinue.
///
/// In en, this message translates to:
/// **'Continue'**
String get instanceContinue;
/// No description provided for @instanceUnreachable.
///
/// In en, this message translates to:
/// **'No instance of {app} answers at {name}.'**
String instanceUnreachable(String app, String name);
/// No description provided for @instanceUseBuiltIn.
///
/// In en, this message translates to:
/// **'Use {name}'**
String instanceUseBuiltIn(String name);
/// No description provided for @instanceOpenFailed.
///
/// In en, this message translates to:
/// **'Couldn\'t open the app on {name}.'**
String instanceOpenFailed(String name);
/// No description provided for @instanceDataAndBackupsIn.
///
/// In en, this message translates to:
/// **'Data and backups: {place}'**
String instanceDataAndBackupsIn(String place);
/// No description provided for @instanceDataIn.
///
/// In en, this message translates to:
/// **'Data: {place}'**
String instanceDataIn(String place);
/// No description provided for @instanceBackupsIn.
///
/// In en, this message translates to:
/// **'Backups: {place}'**
String instanceBackupsIn(String place);
/// No description provided for @instanceNoBackups.
///
/// In en, this message translates to:
/// **'No backups'**
String get instanceNoBackups;
/// No description provided for @instanceEuropeanUnion.
///
/// In en, this message translates to:
/// **'European Union'**
String get instanceEuropeanUnion;
/// No description provided for @accountsTitle.
///
/// In en, this message translates to:
/// **'Accounts'**
String get accountsTitle;
/// No description provided for @accountAdd.
///
/// In en, this message translates to:
/// **'Add account'**
String get accountAdd;
/// No description provided for @accountAddSubtitle.
///
/// In en, this message translates to:
/// **'Choose the instance for the account to add.'**
String get accountAddSubtitle;
/// No description provided for @accountSignedIn.
///
/// In en, this message translates to:
/// **'Signed in'**
String get accountSignedIn;
/// No description provided for @accountAnonymous.
///
/// In en, this message translates to:
/// **'Anonymous'**
String get accountAnonymous;
/// No description provided for @accountRemoveTooltip.
///
/// In en, this message translates to:
/// **'Remove account'**
String get accountRemoveTooltip;
/// No description provided for @accountRemoveTitle.
///
/// In en, this message translates to:
/// **'Remove account?'**
String get accountRemoveTitle;
/// No description provided for @accountRemoveMessage.
///
/// In en, this message translates to:
/// **'Removes the account on {name} from this device, with all the device holds of it. What it synced stays on {name}: sign in there again to have it. An anonymous account can\'t be signed into again.'**
String accountRemoveMessage(String name);
/// No description provided for @accountRemoveConfirm.
///
/// In en, this message translates to:
/// **'Remove'**
String get accountRemoveConfirm;
/// No description provided for @sessionUnreachable.
///
/// In en, this message translates to:
/// **'Couldn\'t reach the server.'**
String get sessionUnreachable;
/// No description provided for @personDataFailed.
///
/// In en, this message translates to:
/// **'Couldn\'t open this device\'s data.'**
String get personDataFailed;
/// No description provided for @startSignedOut.
///
/// In en, this message translates to:
/// **'Signed out'**
String get startSignedOut;
/// No description provided for @startOn.
///
/// In en, this message translates to:
/// **'Start on {instance}:'**
String startOn(String instance);
/// No description provided for @startWithGitHub.
///
/// In en, this message translates to:
/// **'Sign in with GitHub'**
String get startWithGitHub;
/// No description provided for @startWithEmail.
///
/// In en, this message translates to:
/// **'Continue with email'**
String get startWithEmail;
/// No description provided for @startWithoutAccount.
///
/// In en, this message translates to:
/// **'Start without an account'**
String get startWithoutAccount;
/// No description provided for @startAnonymous.
///
/// In en, this message translates to:
/// **'Progress is saved on this device. Sign in to keep it.'**
String get startAnonymous;
/// No description provided for @startGitHubFailed.
///
/// In en, this message translates to:
/// **'Couldn\'t sign in with GitHub.'**
String get startGitHubFailed;
/// No description provided for @startNoGitHubAccount.
///
/// In en, this message translates to:
/// **'No account here signs in with this GitHub account yet. Start without an account, then add GitHub in Profile.'**
String get startNoGitHubAccount;
/// No description provided for @startOtherInstance.
///
/// In en, this message translates to:
/// **'Use another instance'**
String get startOtherInstance;
/// No description provided for @emailSignInTitle.
///
/// In en, this message translates to:
/// **'Continue with email'**
String get emailSignInTitle;
/// No description provided for @emailSignInIntro.
///
/// In en, this message translates to:
/// **'We mail you a code to sign in. This instance keeps only a fingerprint of your address, never the address itself, and writes to it only when you ask for a code.'**
String get emailSignInIntro;
/// No description provided for @emailSignInAddress.
///
/// In en, this message translates to:
/// **'Email address'**
String get emailSignInAddress;
/// No description provided for @emailSignInSend.
///
/// In en, this message translates to:
/// **'Send code'**
String get emailSignInSend;
/// No description provided for @emailSignInCodeSent.
///
/// In en, this message translates to:
/// **'We mailed a code to {address}. It\'s valid for 15 minutes.'**
String emailSignInCodeSent(String address);
/// No description provided for @emailSignInResent.
///
/// In en, this message translates to:
/// **'A new code is on its way.'**
String get emailSignInResent;
/// No description provided for @emailSignInCode.
///
/// In en, this message translates to:
/// **'Code'**
String get emailSignInCode;
/// No description provided for @emailSignInContinue.
///
/// In en, this message translates to:
/// **'Continue'**
String get emailSignInContinue;
/// No description provided for @emailSignInResend.
///
/// In en, this message translates to:
/// **'Send a new code'**
String get emailSignInResend;
/// No description provided for @emailSignInOtherAddress.
///
/// In en, this message translates to:
/// **'Use another address'**
String get emailSignInOtherAddress;
/// No description provided for @emailSignInSwitchTitle.
///
/// In en, this message translates to:
/// **'Switch to the account of {address}?'**
String emailSignInSwitchTitle(String address);
/// No description provided for @emailSignInSwitchConfirm.
///
/// In en, this message translates to:
/// **'Switch'**
String get emailSignInSwitchConfirm;
/// No description provided for @emailSignInSwitchStay.
///
/// In en, this message translates to:
/// **'Stay anonymous'**
String get emailSignInSwitchStay;
/// No description provided for @emailSignInTaken.
///
/// In en, this message translates to:
/// **'{address} already signs in to another account. To switch to it, sign out first.'**
String emailSignInTaken(String address);
/// No description provided for @emailSignInUnavailable.
///
/// In en, this message translates to:
/// **'This instance doesn\'t offer signing in with email.'**
String get emailSignInUnavailable;
/// No description provided for @emailSignInNotAnAddress.
///
/// In en, this message translates to:
/// **'This isn\'t an email address.'**
String get emailSignInNotAnAddress;
/// No description provided for @emailSignInTooManyCodes.
///
/// In en, this message translates to:
/// **'Too many codes in the last hour. Try again later.'**
String get emailSignInTooManyCodes;
/// No description provided for @emailSignInWrongCode.
///
/// In en, this message translates to:
/// **'That code isn\'t right.'**
String get emailSignInWrongCode;
/// No description provided for @emailSignInTooManyTries.
///
/// In en, this message translates to:
/// **'Too many wrong codes. Ask for a new one.'**
String get emailSignInTooManyTries;
/// No description provided for @emailSignInCodeExpired.
///
/// In en, this message translates to:
/// **'This code is no longer valid. Ask for a new one.'**
String get emailSignInCodeExpired;
/// No description provided for @emailSignInOtherAddressLinked.
///
/// In en, this message translates to:
/// **'You already sign in with another address.'**
String get emailSignInOtherAddressLinked;
/// No description provided for @emailSignInMailFailed.
///
/// In en, this message translates to:
/// **'The instance couldn\'t send the mail. Try again later.'**
String get emailSignInMailFailed;
/// No description provided for @emailSignInFailed.
///
/// In en, this message translates to:
/// **'Couldn\'t reach the instance. Try again.'**
String get emailSignInFailed;
/// No description provided for @syncTitle.
///
/// In en, this message translates to:
/// **'Sync'**
String get syncTitle;
/// No description provided for @syncNow.
///
/// In en, this message translates to:
/// **'Sync now'**
String get syncNow;
/// No description provided for @syncStateSyncing.
///
/// In en, this message translates to:
/// **'Syncing…'**
String get syncStateSyncing;
/// No description provided for @syncStateSynced.
///
/// In en, this message translates to:
/// **'Everything synced'**
String get syncStateSynced;
/// No description provided for @syncStateFailing.
///
/// In en, this message translates to:
/// **'Sync is failing'**
String get syncStateFailing;
/// No description provided for @syncStateNotYet.
///
/// In en, this message translates to:
/// **'Not synced yet'**
String get syncStateNotYet;
/// No description provided for @syncStateMismatch.
///
/// In en, this message translates to:
/// **'This app can\'t sync with {server}'**
String syncStateMismatch(String server);
/// No description provided for @syncMismatchDetail.
///
/// In en, this message translates to:
/// **'Update the app. If it is up to date, the server needs an update. What you do meanwhile stays on this device and syncs afterwards.'**
String get syncMismatchDetail;
/// No description provided for @syncLastCompleted.
///
/// In en, this message translates to:
/// **'Last completed at {time}'**
String syncLastCompleted(String time);
/// No description provided for @syncLastFailed.
///
/// In en, this message translates to:
/// **'Last attempt failed at {time}'**
String syncLastFailed(String time);
/// No description provided for @syncNoRunYet.
///
/// In en, this message translates to:
/// **'No sync has completed since the app started'**
String get syncNoRunYet;
/// No description provided for @syncPending.
///
/// In en, this message translates to:
/// **'{count, plural, =1{1 change waits to sync} other{{count} changes wait to sync}}'**
String syncPending(int count);
/// No description provided for @syncTroubleLabel.
///
/// In en, this message translates to:
/// **'Sync needs attention'**
String get syncTroubleLabel;
/// No description provided for @syncMismatchBanner.
///
/// In en, this message translates to:
/// **'This app can\'t sync with {server} any more. Update it to keep syncing.'**
String syncMismatchBanner(String server);
/// No description provided for @syncMismatchMore.
///
/// In en, this message translates to:
/// **'More'**
String get syncMismatchMore;
}
class _HalkyonAppLocalizationsDelegate
extends LocalizationsDelegate<HalkyonAppLocalizations> {
const _HalkyonAppLocalizationsDelegate();
@override
Future<HalkyonAppLocalizations> load(Locale locale) {
return SynchronousFuture<HalkyonAppLocalizations>(
lookupHalkyonAppLocalizations(locale),
);
}
@override
bool isSupported(Locale locale) =>
<String>['de', 'en'].contains(locale.languageCode);
@override
bool shouldReload(_HalkyonAppLocalizationsDelegate old) => false;
}
HalkyonAppLocalizations lookupHalkyonAppLocalizations(Locale locale) {
// Lookup logic when language+country codes are specified.
switch (locale.languageCode) {
case 'en':
{
switch (locale.countryCode) {
case 'GB':
return HalkyonAppLocalizationsEnGb();
case 'US':
return HalkyonAppLocalizationsEnUs();
}
break;
}
}
// Lookup logic when only language code is specified.
switch (locale.languageCode) {
case 'de':
return HalkyonAppLocalizationsDe();
case 'en':
return HalkyonAppLocalizationsEn();
}
throw FlutterError(
'HalkyonAppLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
'an issue with the localizations generation tool. Please file an issue '
'on GitHub with a reproducible sample app and the gen-l10n configuration '
'that was used.',
);
}

View file

@ -0,0 +1,290 @@
// ignore: unused_import
import 'package:intl/intl.dart' as intl;
import 'halkyon_app_localizations.dart';
// ignore_for_file: type=lint
/// The translations for German (`de`).
class HalkyonAppLocalizationsDe extends HalkyonAppLocalizations {
HalkyonAppLocalizationsDe([String locale = 'de']) : super(locale);
@override
String get tryAgain => 'Erneut versuchen';
@override
String instanceWelcome(String app) {
return 'Willkommen bei $app';
}
@override
String get instanceBuiltInTagline => 'In der App voreingestellt';
@override
String get instanceAnother => 'Andere Instanz';
@override
String get instanceAnotherTagline => 'Gib ihre Adresse ein';
@override
String get instanceAddress => 'Adresse der Instanz';
@override
String get instanceAddressInvalid => 'Das ist keine Adresse.';
@override
String get instanceAddressRequired => 'Gib die Adresse einer Instanz ein.';
@override
String get instanceContinue => 'Weiter';
@override
String instanceUnreachable(String app, String name) {
return 'Unter $name antwortet keine Instanz von $app.';
}
@override
String instanceUseBuiltIn(String name) {
return '$name verwenden';
}
@override
String instanceOpenFailed(String name) {
return 'Die App auf $name konnte nicht geöffnet werden.';
}
@override
String instanceDataAndBackupsIn(String place) {
return 'Daten und Sicherungen: $place';
}
@override
String instanceDataIn(String place) {
return 'Daten: $place';
}
@override
String instanceBackupsIn(String place) {
return 'Sicherungen: $place';
}
@override
String get instanceNoBackups => 'Keine Sicherungen';
@override
String get instanceEuropeanUnion => 'Europäische Union';
@override
String get accountsTitle => 'Konten';
@override
String get accountAdd => 'Konto hinzufügen';
@override
String get accountAddSubtitle =>
'Wähle die Instanz für das Konto, das du hinzufügst.';
@override
String get accountSignedIn => 'Angemeldet';
@override
String get accountAnonymous => 'Anonym';
@override
String get accountRemoveTooltip => 'Konto entfernen';
@override
String get accountRemoveTitle => 'Konto entfernen?';
@override
String accountRemoveMessage(String name) {
return 'Entfernt das Konto auf $name von diesem Gerät, mit allem, was das Gerät davon hat. Was es synchronisiert hat, bleibt auf $name: Melde dich dort wieder an, um es wiederzuhaben. In ein anonymes Konto kann man sich nicht wieder anmelden.';
}
@override
String get accountRemoveConfirm => 'Entfernen';
@override
String get sessionUnreachable => 'Der Server war nicht erreichbar.';
@override
String get personDataFailed =>
'Die Daten dieses Geräts konnten nicht geöffnet werden.';
@override
String get startSignedOut => 'Abgemeldet';
@override
String startOn(String instance) {
return 'Starte auf $instance:';
}
@override
String get startWithGitHub => 'Mit GitHub anmelden';
@override
String get startWithEmail => 'Mit E-Mail fortfahren';
@override
String get startWithoutAccount => 'Ohne Konto starten';
@override
String get startAnonymous =>
'Dein Fortschritt wird auf diesem Gerät gespeichert. Melde dich an, um ihn zu behalten.';
@override
String get startGitHubFailed => 'Anmeldung mit GitHub fehlgeschlagen.';
@override
String get startNoGitHubAccount =>
'Noch kein Konto hier meldet sich mit diesem GitHub-Konto an. Starte ohne Konto und füge GitHub dann im Profil hinzu.';
@override
String get startOtherInstance => 'Andere Instanz verwenden';
@override
String get emailSignInTitle => 'Mit E-Mail fortfahren';
@override
String get emailSignInIntro =>
'Wir schicken dir einen Code zum Anmelden. Diese Instanz behält nur einen Fingerabdruck deiner Adresse, nie die Adresse selbst, und schreibt ihr nur, wenn du einen Code anforderst.';
@override
String get emailSignInAddress => 'E-Mail-Adresse';
@override
String get emailSignInSend => 'Code senden';
@override
String emailSignInCodeSent(String address) {
return 'Wir haben einen Code an $address geschickt. Er gilt 15 Minuten.';
}
@override
String get emailSignInResent => 'Ein neuer Code ist unterwegs.';
@override
String get emailSignInCode => 'Code';
@override
String get emailSignInContinue => 'Weiter';
@override
String get emailSignInResend => 'Neuen Code senden';
@override
String get emailSignInOtherAddress => 'Andere Adresse verwenden';
@override
String emailSignInSwitchTitle(String address) {
return 'Zum Konto von $address wechseln?';
}
@override
String get emailSignInSwitchConfirm => 'Wechseln';
@override
String get emailSignInSwitchStay => 'Anonym bleiben';
@override
String emailSignInTaken(String address) {
return 'Mit $address meldet sich schon ein anderes Konto an. Um zu ihm zu wechseln, melde dich zuerst ab.';
}
@override
String get emailSignInUnavailable =>
'Diese Instanz bietet keine Anmeldung mit E-Mail an.';
@override
String get emailSignInNotAnAddress => 'Das ist keine E-Mail-Adresse.';
@override
String get emailSignInTooManyCodes =>
'Zu viele Codes in der letzten Stunde. Versuche es später noch einmal.';
@override
String get emailSignInWrongCode => 'Dieser Code stimmt nicht.';
@override
String get emailSignInTooManyTries =>
'Zu viele falsche Codes. Fordere einen neuen an.';
@override
String get emailSignInCodeExpired =>
'Dieser Code gilt nicht mehr. Fordere einen neuen an.';
@override
String get emailSignInOtherAddressLinked =>
'Du meldest dich schon mit einer anderen Adresse an.';
@override
String get emailSignInMailFailed =>
'Die Instanz konnte die Mail nicht senden. Versuche es später noch einmal.';
@override
String get emailSignInFailed =>
'Die Instanz war nicht erreichbar. Versuche es noch einmal.';
@override
String get syncTitle => 'Synchronisierung';
@override
String get syncNow => 'Jetzt synchronisieren';
@override
String get syncStateSyncing => 'Wird synchronisiert…';
@override
String get syncStateSynced => 'Alles synchronisiert';
@override
String get syncStateFailing => 'Synchronisierung schlägt fehl';
@override
String get syncStateNotYet => 'Noch nicht synchronisiert';
@override
String syncStateMismatch(String server) {
return 'Diese App kann nicht mit $server synchronisieren';
}
@override
String get syncMismatchDetail =>
'Aktualisiere die App. Ist sie schon aktuell, muss der Server aktualisiert werden. Was du bis dahin tust, bleibt auf diesem Gerät und wird danach synchronisiert.';
@override
String syncLastCompleted(String time) {
return 'Zuletzt abgeschlossen um $time';
}
@override
String syncLastFailed(String time) {
return 'Letzter Versuch fehlgeschlagen um $time';
}
@override
String get syncNoRunYet =>
'Seit dem Start der App wurde noch keine Synchronisierung abgeschlossen';
@override
String syncPending(int count) {
String _temp0 = intl.Intl.pluralLogic(
count,
locale: localeName,
other: '$count Änderungen warten auf die Synchronisierung',
one: '1 Änderung wartet auf die Synchronisierung',
);
return '$_temp0';
}
@override
String get syncTroubleLabel => 'Synchronisierung benötigt Aufmerksamkeit';
@override
String syncMismatchBanner(String server) {
return 'Diese App kann nicht mehr mit $server synchronisieren. Aktualisiere sie, um weiter zu synchronisieren.';
}
@override
String get syncMismatchMore => 'Mehr';
}

View file

@ -0,0 +1,297 @@
// ignore: unused_import
import 'package:intl/intl.dart' as intl;
import 'halkyon_app_localizations.dart';
// ignore_for_file: type=lint
/// The translations for English (`en`).
class HalkyonAppLocalizationsEn extends HalkyonAppLocalizations {
HalkyonAppLocalizationsEn([String locale = 'en']) : super(locale);
@override
String get tryAgain => 'Try again';
@override
String instanceWelcome(String app) {
return 'Welcome to $app';
}
@override
String get instanceBuiltInTagline => 'Comes with the app';
@override
String get instanceAnother => 'Another instance';
@override
String get instanceAnotherTagline => 'Enter its address';
@override
String get instanceAddress => 'Instance address';
@override
String get instanceAddressInvalid => 'This isn\'t an address.';
@override
String get instanceAddressRequired => 'Enter the address of an instance.';
@override
String get instanceContinue => 'Continue';
@override
String instanceUnreachable(String app, String name) {
return 'No instance of $app answers at $name.';
}
@override
String instanceUseBuiltIn(String name) {
return 'Use $name';
}
@override
String instanceOpenFailed(String name) {
return 'Couldn\'t open the app on $name.';
}
@override
String instanceDataAndBackupsIn(String place) {
return 'Data and backups: $place';
}
@override
String instanceDataIn(String place) {
return 'Data: $place';
}
@override
String instanceBackupsIn(String place) {
return 'Backups: $place';
}
@override
String get instanceNoBackups => 'No backups';
@override
String get instanceEuropeanUnion => 'European Union';
@override
String get accountsTitle => 'Accounts';
@override
String get accountAdd => 'Add account';
@override
String get accountAddSubtitle =>
'Choose the instance for the account to add.';
@override
String get accountSignedIn => 'Signed in';
@override
String get accountAnonymous => 'Anonymous';
@override
String get accountRemoveTooltip => 'Remove account';
@override
String get accountRemoveTitle => 'Remove account?';
@override
String accountRemoveMessage(String name) {
return 'Removes the account on $name from this device, with all the device holds of it. What it synced stays on $name: sign in there again to have it. An anonymous account can\'t be signed into again.';
}
@override
String get accountRemoveConfirm => 'Remove';
@override
String get sessionUnreachable => 'Couldn\'t reach the server.';
@override
String get personDataFailed => 'Couldn\'t open this device\'s data.';
@override
String get startSignedOut => 'Signed out';
@override
String startOn(String instance) {
return 'Start on $instance:';
}
@override
String get startWithGitHub => 'Sign in with GitHub';
@override
String get startWithEmail => 'Continue with email';
@override
String get startWithoutAccount => 'Start without an account';
@override
String get startAnonymous =>
'Progress is saved on this device. Sign in to keep it.';
@override
String get startGitHubFailed => 'Couldn\'t sign in with GitHub.';
@override
String get startNoGitHubAccount =>
'No account here signs in with this GitHub account yet. Start without an account, then add GitHub in Profile.';
@override
String get startOtherInstance => 'Use another instance';
@override
String get emailSignInTitle => 'Continue with email';
@override
String get emailSignInIntro =>
'We mail you a code to sign in. This instance keeps only a fingerprint of your address, never the address itself, and writes to it only when you ask for a code.';
@override
String get emailSignInAddress => 'Email address';
@override
String get emailSignInSend => 'Send code';
@override
String emailSignInCodeSent(String address) {
return 'We mailed a code to $address. It\'s valid for 15 minutes.';
}
@override
String get emailSignInResent => 'A new code is on its way.';
@override
String get emailSignInCode => 'Code';
@override
String get emailSignInContinue => 'Continue';
@override
String get emailSignInResend => 'Send a new code';
@override
String get emailSignInOtherAddress => 'Use another address';
@override
String emailSignInSwitchTitle(String address) {
return 'Switch to the account of $address?';
}
@override
String get emailSignInSwitchConfirm => 'Switch';
@override
String get emailSignInSwitchStay => 'Stay anonymous';
@override
String emailSignInTaken(String address) {
return '$address already signs in to another account. To switch to it, sign out first.';
}
@override
String get emailSignInUnavailable =>
'This instance doesn\'t offer signing in with email.';
@override
String get emailSignInNotAnAddress => 'This isn\'t an email address.';
@override
String get emailSignInTooManyCodes =>
'Too many codes in the last hour. Try again later.';
@override
String get emailSignInWrongCode => 'That code isn\'t right.';
@override
String get emailSignInTooManyTries =>
'Too many wrong codes. Ask for a new one.';
@override
String get emailSignInCodeExpired =>
'This code is no longer valid. Ask for a new one.';
@override
String get emailSignInOtherAddressLinked =>
'You already sign in with another address.';
@override
String get emailSignInMailFailed =>
'The instance couldn\'t send the mail. Try again later.';
@override
String get emailSignInFailed => 'Couldn\'t reach the instance. Try again.';
@override
String get syncTitle => 'Sync';
@override
String get syncNow => 'Sync now';
@override
String get syncStateSyncing => 'Syncing…';
@override
String get syncStateSynced => 'Everything synced';
@override
String get syncStateFailing => 'Sync is failing';
@override
String get syncStateNotYet => 'Not synced yet';
@override
String syncStateMismatch(String server) {
return 'This app can\'t sync with $server';
}
@override
String get syncMismatchDetail =>
'Update the app. If it is up to date, the server needs an update. What you do meanwhile stays on this device and syncs afterwards.';
@override
String syncLastCompleted(String time) {
return 'Last completed at $time';
}
@override
String syncLastFailed(String time) {
return 'Last attempt failed at $time';
}
@override
String get syncNoRunYet => 'No sync has completed since the app started';
@override
String syncPending(int count) {
String _temp0 = intl.Intl.pluralLogic(
count,
locale: localeName,
other: '$count changes wait to sync',
one: '1 change waits to sync',
);
return '$_temp0';
}
@override
String get syncTroubleLabel => 'Sync needs attention';
@override
String syncMismatchBanner(String server) {
return 'This app can\'t sync with $server any more. Update it to keep syncing.';
}
@override
String get syncMismatchMore => 'More';
}
/// The translations for English, as used in the United Kingdom (`en_GB`).
class HalkyonAppLocalizationsEnGb extends HalkyonAppLocalizationsEn {
HalkyonAppLocalizationsEnGb() : super('en_GB');
}
/// The translations for English, as used in the United States (`en_US`).
class HalkyonAppLocalizationsEnUs extends HalkyonAppLocalizationsEn {
HalkyonAppLocalizationsEnUs() : super('en_US');
}

View file

@ -0,0 +1,96 @@
import 'package:material_ui/material_ui.dart';
/// The device's choices this package's own screens follow while no person's
/// app shows: the theme mode, and the language (null: the system's).
typedef LookSettings = ({ThemeMode themeMode, Locale? locale});
/// What this package's own screens need to know of the app they are part
/// of: its name and look, and the few words only it can say. `InstanceGate`
/// hands it down ([AppFrameScope]) to every screen beneath, the person's
/// app included.
final class const AppFrame({
/// The app's name in the language of the context it is asked in ("Halkyon
/// Learn"): the window's title, and where this package's texts name the
/// app.
required final String Function(BuildContext context) name,
/// The app's word in its wordmark, under "Halkyon" ("Learn").
required final String Function(BuildContext context) product,
/// The app's icon, as the first start shows it on the tile of the
/// instance the build names.
required final ImageProvider icon,
/// An instance's address as the address field's hint shows it
/// (`learn.example.org`).
required final String exampleAddress,
/// What the first start says under the wordmark: what the instance chosen
/// keeps of the person's ("Choose the instance to keep your studysets
/// on.").
required final String Function(BuildContext context) firstStartSubtitle,
/// What switching this device to another account leaves behind, as the
/// email sign-in says before it switches ("The studysets on this device
/// can't be combined with it yet: if you switch, they are deleted.").
required final String Function(BuildContext context) switchLeavesBehind,
/// The app's theme in a [Brightness].
required final ThemeData Function(Brightness brightness) theme,
/// The app's localizations, this package's
/// (`HalkyonAppLocalizations.delegate`) and halkyon_ui's among them.
required final List<LocalizationsDelegate<Object?>> localizationsDelegates,
/// The languages the app speaks.
required final List<Locale> supportedLocales,
/// Picks the app's language from the device's, as its own `MaterialApp`
/// does.
final LocaleListResolutionCallback? localeListResolutionCallback,
/// What shows while the app opens.
required final Widget launchScreen,
});
/// Hands the [AppFrame] down to every screen beneath it.
class const AppFrameScope({
/// The app's frame.
required final AppFrame frame,
required super.child,
super.key,
}) extends InheritedWidget {
/// The frame above [context].
static AppFrame of(BuildContext context) {
final scope = context.getInheritedWidgetOfExactType<AppFrameScope>();
assert(scope != null, 'No AppFrameScope above this widget.');
return scope!.frame;
}
@override
bool updateShouldNotify(AppFrameScope oldWidget) => frame != oldWidget.frame;
}
/// The app's look around a single screen of this package's, while no
/// person's app shows, as [look] says.
class const PlainApp({
required final LookSettings look,
required final Widget home,
super.key,
}) extends StatelessWidget {
@override
Widget build(BuildContext context) {
final frame = AppFrameScope.of(context);
return MaterialApp(
onGenerateTitle: frame.name,
theme: frame.theme(Brightness.light),
darkTheme: frame.theme(Brightness.dark),
themeMode: look.themeMode,
locale: look.locale,
localeListResolutionCallback: frame.localeListResolutionCallback,
localizationsDelegates: frame.localizationsDelegates,
supportedLocales: frame.supportedLocales,
home: home,
);
}
}

View file

@ -0,0 +1,57 @@
import 'package:flutter/widgets.dart';
import 'package:halkyon_app/src/auth/data/auth_repository.dart';
import 'package:halkyon_app/src/auth/data/signed_out_mark.dart';
import 'package:halkyon_app/src/auth/model/auth_status.dart';
/// What can be closed once it is no longer needed: an app's dependencies on
/// an instance, or a person's.
abstract interface class Disposable() {
/// Closes it; nothing of it is used afterwards.
Future<void> dispose();
}
/// What this package needs of an app's dependencies on one instance (its
/// composition root), which `InstanceGate` opens for the instance in use and
/// [AppScope] hands down. An app's own class implements it beside its
/// features' repositories.
abstract interface class AppDependencies<P extends Disposable>()
implements Disposable {
/// The instance's name as people know it (its host), for messages about
/// it.
String get serverName;
/// Who is signed in, and signing in and out.
AuthRepository get auth;
/// Whether the person here signed out, so the app asks how to start.
SignedOutMark get signedOut;
/// Opens the dependencies of [person], once the previous person's have
/// closed; `PersonScope` disposes them when the person goes.
Future<P> openPerson(SignedIn person);
}
/// Hands an app's [dependencies] on the instance in use down the widget
/// tree; `InstanceGate` puts it above the app.
class const AppScope({
/// The app's dependencies.
required final AppDependencies<Disposable> dependencies,
required super.child,
super.key,
}) extends InheritedWidget {
/// The dependencies above [context], as the app's own type [D]
/// (`AppScope.of<Dependencies>(context)`), or as [AppDependencies] where
/// that is all that is needed.
///
/// Doesn't register [context] for rebuilds: the dependencies of one app run
/// never change.
static D of<D extends AppDependencies<Disposable>>(BuildContext context) {
final scope = context.getInheritedWidgetOfExactType<AppScope>();
assert(scope != null, 'No AppScope above this widget.');
return scope!.dependencies as D;
}
@override
bool updateShouldNotify(AppScope oldWidget) =>
dependencies != oldWidget.dependencies;
}

View file

@ -0,0 +1,184 @@
import 'dart:async';
import 'dart:developer';
import 'package:halkyon_app/l10n/halkyon_app_localizations.dart';
import 'package:halkyon_app/src/app/app_frame.dart';
import 'package:halkyon_app/src/app/app_scope.dart';
import 'package:halkyon_app/src/instance/country_names.dart';
import 'package:halkyon_app/src/instance/instance.dart';
import 'package:halkyon_app/src/instance/instance_checker.dart';
import 'package:halkyon_app/src/instance/instance_choice.dart';
import 'package:halkyon_app/src/instance/instance_scope.dart';
import 'package:halkyon_app/src/instance/widget/first_start_screen.dart';
import 'package:material_ui/material_ui.dart';
/// The app on the instance in use ([InstanceChoice]): on a new install
/// first the choice of instance ([FirstStartScreen]), then [app] on its
/// dependencies ([AppScope]), opened by [open] anew whenever the person
/// switches, the previous ones closed first. Above it all, [frame]
/// ([AppFrameScope]).
///
/// [app] is built anew for every instance (keyed by it), so nothing of one
/// instance's app reaches another's.
class const InstanceGate({
/// The app's name, look and own words, for this package's screens.
required final AppFrame frame,
required final InstanceChoice choice,
/// Checks an address before the app moves there.
required final InstanceChecker checker,
/// Names the countries instances keep their data in.
required final CountryNames countryNames,
/// The dependencies of the app on an instance.
required final Future<AppDependencies<Disposable>> Function(
Instance instance,
)
open,
/// Reads the device's theme mode and language, for the look while no
/// instance's app shows; read anew as each instance opens, as they may
/// have changed on another.
required final Future<LookSettings> Function() readLook,
/// The app on the instance in use.
required final Widget app,
super.key,
}) extends StatefulWidget {
@override
State<InstanceGate> createState() => _InstanceGateState();
}
class _InstanceGateState() extends State<InstanceGate> {
Instance? _opened;
AppDependencies<Disposable>? _dependencies;
var _failed = false;
LookSettings _look = (themeMode: ThemeMode.system, locale: null);
/// The last switch, which the next one waits for.
var _switching = Future<void>.value();
@override
void initState() {
super.initState();
widget.choice.addListener(_onChoice);
unawaited(_readLook());
_onChoice();
}
@override
void dispose() {
widget.choice.removeListener(_onChoice);
unawaited(_dependencies?.dispose());
super.dispose();
}
Future<void> _readLook() async {
final look = await widget.readLook();
if (mounted) {
setState(() => _look = look);
}
}
void _onChoice() {
final current = widget.choice.current;
if (current != _opened) {
_switching = _switching.then((_) => _open(current));
}
}
/// Closes what is open, then opens [instance]'s app; nothing when it is
/// open already, unless [again], after a failure.
Future<void> _open(Instance? instance, {bool again = false}) async {
if (!mounted || (instance == _opened && !again)) {
return;
}
final previous = _dependencies;
setState(() {
_opened = instance;
_dependencies = null;
_failed = false;
});
await previous?.dispose();
if (instance == null) {
return;
}
await _readLook();
try {
final dependencies = await widget.open(instance);
if (!mounted || _opened != instance) {
await dependencies.dispose();
return;
}
setState(() => _dependencies = dependencies);
} on Object catch (error, st) {
log(
'Opening $instance failed',
name: 'Instances',
error: error,
stackTrace: st,
);
if (mounted && _opened == instance) {
setState(() => _failed = true);
}
}
}
@override
Widget build(BuildContext context) {
final current = widget.choice.current;
final dependencies = _dependencies;
return AppFrameScope(
frame: widget.frame,
child: InstanceScope(
notifier: widget.choice,
checker: widget.checker,
countryNames: widget.countryNames,
child: switch (current) {
null => PlainApp(look: _look, home: const FirstStartScreen()),
final instance when dependencies != null && _opened == instance =>
AppScope(
key: ValueKey(instance),
dependencies: dependencies,
child: widget.app,
),
final instance when _failed && _opened == instance => PlainApp(
look: _look,
home: _OpenFailed(
instance: instance,
onRetry: () => _switching = _switching.then(
(_) => _open(instance, again: true),
),
),
),
// Opening, or closing the one before.
_ => PlainApp(look: _look, home: widget.frame.launchScreen),
},
),
);
}
}
class const _OpenFailed({
required final Instance instance,
required final VoidCallback onRetry,
}) extends StatelessWidget {
@override
Widget build(BuildContext context) {
final l10n = HalkyonAppLocalizations.of(context);
return Scaffold(
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(l10n.instanceOpenFailed(instance.name)),
const SizedBox(height: 16),
FilledButton(onPressed: onRetry, child: Text(l10n.tryAgain)),
],
),
),
);
}
}

View file

@ -0,0 +1,91 @@
import 'dart:async';
import 'package:halkyon_app/l10n/halkyon_app_localizations.dart';
import 'package:halkyon_app/src/app/app_frame.dart';
import 'package:halkyon_app/src/app/app_scope.dart';
import 'package:halkyon_app/src/auth/model/auth_status.dart';
import 'package:material_ui/material_ui.dart';
/// Opens [person]'s dependencies (`AppDependencies.openPerson`), shows
/// [child] with them, and disposes them when it goes away. `SessionGate`
/// gives every person a new `PersonScope`.
class const PersonScope({
/// Whose dependencies these are.
required final SignedIn person,
/// What the person sees.
required final Widget child,
super.key,
}) extends StatefulWidget {
/// The dependencies of the person signed in above [context], as the app's
/// own type [P] (`PersonScope.of<PersonDependencies>(context)`).
static P of<P extends Disposable>(BuildContext context) {
final scope = context
.getInheritedWidgetOfExactType<_PersonDependenciesScope>();
assert(scope != null, 'No PersonScope above this widget.');
return scope!.dependencies as P;
}
@override
State<PersonScope> createState() => _PersonScopeState();
}
class _PersonScopeState() extends State<PersonScope> {
Future<Disposable>? _opening;
@override
void didChangeDependencies() {
super.didChangeDependencies();
_opening ??= AppScope.of(context).openPerson(widget.person);
}
@override
void dispose() {
unawaited(
_opening?.then(
(dependencies) => dependencies.dispose(),
// Opening failed and said so on screen; there is nothing to close.
onError: (Object _) {},
),
);
super.dispose();
}
@override
Widget build(BuildContext context) => FutureBuilder(
future: _opening,
builder: (context, snapshot) => switch (snapshot) {
AsyncSnapshot(:final data?) => _PersonDependenciesScope(
dependencies: data,
child: widget.child,
),
AsyncSnapshot(hasError: true) => Scaffold(
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(HalkyonAppLocalizations.of(context).personDataFailed),
const SizedBox(height: 16),
FilledButton(
onPressed: () => setState(() {
_opening = AppScope.of(context).openPerson(widget.person);
}),
child: Text(HalkyonAppLocalizations.of(context).tryAgain),
),
],
),
),
),
_ => AppFrameScope.of(context).launchScreen,
},
);
}
class const _PersonDependenciesScope({
required final Disposable dependencies,
required super.child,
}) extends InheritedWidget {
@override
bool updateShouldNotify(_PersonDependenciesScope oldWidget) =>
dependencies != oldWidget.dependencies;
}

View file

@ -0,0 +1,258 @@
import 'package:equatable/equatable.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:halkyon_app/src/auth/data/auth_repository.dart';
import 'package:halkyon_app/src/auth/model/email_sign_in.dart';
/// Signs in with an email address, by a code mailed to it, as signing in
/// with GitHub does: a new address becomes the person's, who
/// keeps everything; an address that is another person's switches this
/// device to them, right away when it holds nothing
/// (`deviceHoldsContent`), otherwise once the person confirms that this
/// device's content stays behind. Someone identified is never switched:
/// they are told the address is another account's, as their own account
/// would otherwise be left.
class EmailSignInBloc(
final AuthRepository _auth, {
/// Whether this device holds content of the person signed in that a
/// switch would leave behind, as the app counts it (Halkyon Learn: its
/// studysets, those waiting in Recently deleted too).
required final Future<bool> Function() _deviceHoldsContent,
/// The language the mail is worded in (`en`, `de`).
required final String language,
}) extends Bloc<EmailSignInEvent, EmailSignInState> {
this : super(const EmailSignInStateAddress()) {
on<EmailSignInEventCodeRequested>(_onCodeRequested);
on<EmailSignInEventCodeEntered>(_onCodeEntered);
on<EmailSignInEventCodeResent>(_onCodeResent);
on<EmailSignInEventAddressReopened>(
(event, emit) => emit(const EmailSignInStateAddress()),
);
on<EmailSignInEventSwitchConfirmed>(_onSwitchConfirmed);
on<EmailSignInEventSwitchDeclined>(
(event, emit) => emit(const EmailSignInStateAddress()),
);
}
Future<void> _onCodeRequested(
EmailSignInEventCodeRequested event,
Emitter<EmailSignInState> emit,
) async {
// As the instance takes it, and as the person reads it back.
final address = event.address.trim().toLowerCase();
emit(const EmailSignInStateAddress(sending: true));
try {
emit(
EmailSignInStateCode(
address: address,
request: await _auth.sendEmailCode(address, language: language),
),
);
} on Exception catch (error, st) {
emit(EmailSignInStateAddress(problem: _problemOf(error, st)));
}
}
Future<void> _onCodeResent(
EmailSignInEventCodeResent event,
Emitter<EmailSignInState> emit,
) async {
if (state case final EmailSignInStateCode code) {
emit(code.checked());
try {
emit(
EmailSignInStateCode(
address: code.address,
request: await _auth.sendEmailCode(
code.address,
language: language,
),
resent: true,
),
);
} on Exception catch (error, st) {
emit(code.failed(_problemOf(error, st)));
}
}
}
Future<void> _onCodeEntered(
EmailSignInEventCodeEntered event,
Emitter<EmailSignInState> emit,
) async {
final code = state;
if (code is! EmailSignInStateCode) {
return;
}
emit(code.checked());
try {
switch (await _auth.verifyEmailCode(
code.request,
event.code,
address: code.address,
)) {
case EmailLinked():
emit(EmailSignInStateLinked(address: code.address));
case EmailTakenByAnotherPerson() when _auth.isIdentified:
emit(EmailSignInStateTaken(address: code.address));
case EmailTakenByAnotherPerson(:final switchToken):
if (await _deviceHoldsContent()) {
emit(
EmailSignInStateConfirmSwitch(
address: code.address,
switchToken: switchToken,
),
);
} else {
await _switch(code.address, switchToken, emit);
}
}
} on Exception catch (error, st) {
emit(code.failed(_problemOf(error, st)));
}
}
Future<void> _onSwitchConfirmed(
EmailSignInEventSwitchConfirmed event,
Emitter<EmailSignInState> emit,
) async {
if (state case EmailSignInStateConfirmSwitch(
:final address,
:final switchToken,
)) {
try {
await _switch(address, switchToken, emit);
} on Exception catch (error, st) {
emit(EmailSignInStateAddress(problem: _problemOf(error, st)));
}
}
}
// After a switch, the previous person's whole subtree goes away, this bloc
// with it, so nothing is emitted then.
Future<void> _switch(
String address,
String switchToken,
Emitter<EmailSignInState> emit,
) async {
emit(const EmailSignInStateSwitching());
await _auth.switchToEmail(switchToken, address: address);
}
EmailSignInProblem _problemOf(Exception error, StackTrace st) {
if (error is EmailSignInFailed) {
return error.problem;
}
addError(error, st);
return EmailSignInProblem.failed;
}
}
/// What happens to signing in with an email address.
sealed class const EmailSignInEvent() with Equatable {
@override
List<Object?> get props => const [];
}
/// Mail a code to [address].
final class const EmailSignInEventCodeRequested(final String address)
extends EmailSignInEvent {
@override
List<Object?> get props => [address];
}
/// The person typed [code], from the mail.
final class const EmailSignInEventCodeEntered(final String code)
extends EmailSignInEvent {
@override
List<Object?> get props => [code];
}
/// Mail a new code to the same address.
final class const EmailSignInEventCodeResent() extends EmailSignInEvent;
/// Type another address.
final class const EmailSignInEventAddressReopened() extends EmailSignInEvent;
/// Switch to the address's person; this device's content stays behind.
final class const EmailSignInEventSwitchConfirmed() extends EmailSignInEvent;
/// Stay anonymous.
final class const EmailSignInEventSwitchDeclined() extends EmailSignInEvent;
/// Signing in with an email address, as its sheet shows it.
sealed class const EmailSignInState() with Equatable {
@override
List<Object?> get props => const [];
}
/// Typing the address.
final class const EmailSignInStateAddress({
/// What went wrong the last time.
final EmailSignInProblem? problem,
/// Whether the code is being mailed.
final bool sending = false,
}) extends EmailSignInState {
@override
List<Object?> get props => [problem, sending];
}
/// Typing the code mailed to [address] for [request].
final class const EmailSignInStateCode({
required final String address,
required final String request,
/// What went wrong the last time.
final EmailSignInProblem? problem,
/// Whether the instance is being asked: about the code, or for a new one.
final bool checking = false,
/// Whether a new code was mailed on request.
final bool resent = false,
}) extends EmailSignInState {
/// This, while the instance is asked.
EmailSignInStateCode checked() =>
EmailSignInStateCode(address: address, request: request, checking: true);
/// This, once [problem] came back.
EmailSignInStateCode failed(EmailSignInProblem problem) =>
EmailSignInStateCode(
address: address,
request: request,
problem: problem,
);
@override
List<Object?> get props => [address, request, problem, checking, resent];
}
/// The address is another person's and this device holds content: switch
/// and leave it behind, or stay anonymous?
final class const EmailSignInStateConfirmSwitch({
required final String address,
required final String switchToken,
}) extends EmailSignInState {
@override
List<Object?> get props => [address, switchToken];
}
/// Switching this device to the address's person.
final class const EmailSignInStateSwitching() extends EmailSignInState;
/// The address is another account's, and the person signed in is
/// identified: nothing changed.
final class const EmailSignInStateTaken({required final String address})
extends EmailSignInState {
@override
List<Object?> get props => [address];
}
/// The address is now the person's.
final class const EmailSignInStateLinked({required final String address})
extends EmailSignInState {
@override
List<Object?> get props => [address];
}

Some files were not shown because too many files have changed in this diff Show more