From 4045eff06faff7ae7989fe5328a5a87fe992a5d2 Mon Sep 17 00:00:00 2001 From: Trent Palmer Date: Thu, 27 Jun 2019 17:29:40 -0700 Subject: [PATCH] merge --squash devel, version 0.1.0 --- .gitignore | 2 + LICENSE | 674 +++++++++ README.md | 8 + android/app/build.gradle | 29 +- android/app/proguard-rules.pro | 7 + android/app/src/debug/AndroidManifest.xml | 2 +- android/app/src/main/AndroidManifest.xml | 9 +- android/app/src/main/gps_parser_graphic.png | Bin 0 -> 20559 bytes .../MainActivity.java | 2 +- .../main/libre_gps_parser_launcher-web.png | Bin 0 -> 18895 bytes .../drawable/libre_gps_parser_foreground.xml | 13 + .../libre_gps_parser_launcher.xml | 5 + .../libre_gps_parser_launcher_round.xml | 5 + .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 544 -> 0 bytes .../mipmap-hdpi/libre_gps_parser_launcher.png | Bin 0 -> 1454 bytes .../libre_gps_parser_launcher_round.png | Bin 0 -> 3206 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 442 -> 0 bytes .../mipmap-mdpi/libre_gps_parser_launcher.png | Bin 0 -> 1056 bytes .../libre_gps_parser_launcher_round.png | Bin 0 -> 1991 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 721 -> 0 bytes .../libre_gps_parser_launcher.png | Bin 0 -> 1936 bytes .../libre_gps_parser_launcher_round.png | Bin 0 -> 4536 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 1031 -> 0 bytes .../libre_gps_parser_launcher.png | Bin 0 -> 3295 bytes .../libre_gps_parser_launcher_round.png | Bin 0 -> 7575 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 1443 -> 0 bytes .../libre_gps_parser_launcher.png | Bin 0 -> 5053 bytes .../libre_gps_parser_launcher_round.png | Bin 0 -> 11326 bytes .../libre_gps_share_launcher_background.xml | 4 + android/app/src/profile/AndroidManifest.xml | 2 +- ios/Runner.xcodeproj/project.pbxproj | 6 +- ios/Runner/Info.plist | 2 +- lib/about.dart | 156 ++ lib/database_helper.dart | 182 ++- lib/default_plataea_notes.dart | 17 + lib/edit_notes.dart | 330 +++++ lib/elevation.dart | 155 ++ lib/global_helper_functions.dart | 417 ++++-- lib/lnl_dec.dart | 129 ++ lib/lnl_deg.dart | 108 ++ lib/location.dart | 218 +++ lib/main.dart | 1150 +++++++++++++-- lib/render_notes.dart | 296 ++++ lib/settings.dart | 296 ++-- lib/street_view.dart | 53 + lib/timezone.dart | 371 +++++ lib/timezones.dart | 48 + lib/weather.dart | 1261 ++++++++++++++++- lib/weather_forecast.dart | 1070 ++++++++++++++ pubspec.lock | 127 +- pubspec.yaml | 19 +- test/widget_test.dart | 2 +- 52 files changed, 6752 insertions(+), 423 deletions(-) create mode 100644 LICENSE create mode 100644 README.md create mode 100644 android/app/proguard-rules.pro create mode 100644 android/app/src/main/gps_parser_graphic.png rename android/app/src/main/java/org/trentpalmer/{lnl_share => libre_gps_parser}/MainActivity.java (97%) create mode 100644 android/app/src/main/libre_gps_parser_launcher-web.png create mode 100644 android/app/src/main/res/drawable/libre_gps_parser_foreground.xml create mode 100644 android/app/src/main/res/mipmap-anydpi-v26/libre_gps_parser_launcher.xml create mode 100644 android/app/src/main/res/mipmap-anydpi-v26/libre_gps_parser_launcher_round.xml delete mode 100644 android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-hdpi/libre_gps_parser_launcher.png create mode 100644 android/app/src/main/res/mipmap-hdpi/libre_gps_parser_launcher_round.png delete mode 100644 android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-mdpi/libre_gps_parser_launcher.png create mode 100644 android/app/src/main/res/mipmap-mdpi/libre_gps_parser_launcher_round.png delete mode 100644 android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-xhdpi/libre_gps_parser_launcher.png create mode 100644 android/app/src/main/res/mipmap-xhdpi/libre_gps_parser_launcher_round.png delete mode 100644 android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-xxhdpi/libre_gps_parser_launcher.png create mode 100644 android/app/src/main/res/mipmap-xxhdpi/libre_gps_parser_launcher_round.png delete mode 100644 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-xxxhdpi/libre_gps_parser_launcher.png create mode 100644 android/app/src/main/res/mipmap-xxxhdpi/libre_gps_parser_launcher_round.png create mode 100644 android/app/src/main/res/values/libre_gps_share_launcher_background.xml create mode 100644 lib/about.dart create mode 100644 lib/default_plataea_notes.dart create mode 100644 lib/edit_notes.dart create mode 100644 lib/elevation.dart create mode 100644 lib/lnl_dec.dart create mode 100644 lib/lnl_deg.dart create mode 100644 lib/location.dart create mode 100644 lib/render_notes.dart create mode 100644 lib/street_view.dart create mode 100644 lib/timezone.dart create mode 100644 lib/timezones.dart create mode 100644 lib/weather_forecast.dart diff --git a/.gitignore b/.gitignore index 07488ba..3740d21 100644 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,5 @@ !**/ios/**/default.pbxuser !**/ios/**/default.perspectivev3 !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages + +android/key.properties diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is 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. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + 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. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + 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 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. Use with the GNU Affero General Public License. + + 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 Affero 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 special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 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 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 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. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + 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 GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/README.md b/README.md new file mode 100644 index 0000000..ccced3d --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +## to be implemented +* move functions out of main.dart +* implement _stale_ notification for weather and weatherForecast +* manual refresh buttons for _stale_ +* look into unit testing +* set up apk download server +* +* add more things to be implemented diff --git a/android/app/build.gradle b/android/app/build.gradle index 14f7e54..4b66c22 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -24,6 +24,12 @@ if (flutterVersionName == null) { apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" +def keystoreProperties = new Properties() +def keystorePropertiesFile = rootProject.file('key.properties') +if (keystorePropertiesFile.exists()) { + keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) +} + android { compileSdkVersion 28 @@ -33,19 +39,34 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "org.trentpalmer.lnl_share" + applicationId "org.trentpalmer.libre_gps_parser" minSdkVersion 16 targetSdkVersion 28 versionCode flutterVersionCode.toInteger() versionName flutterVersionName + ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64' testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } + signingConfigs { + release { + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile file(keystoreProperties['storeFile']) + storePassword keystoreProperties['storePassword'] + } + } + buildTypes { release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + signingConfig signingConfigs.release + + // minifyEnabled true + // shrinkResources false + useProguard true + + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } } } diff --git a/android/app/proguard-rules.pro b/android/app/proguard-rules.pro new file mode 100644 index 0000000..239ec33 --- /dev/null +++ b/android/app/proguard-rules.pro @@ -0,0 +1,7 @@ +## Flutter wrapper +-keep class io.flutter.app.** { *; } +-keep class io.flutter.plugin.** { *; } +-keep class io.flutter.util.** { *; } +-keep class io.flutter.view.** { *; } +-keep class io.flutter.** { *; } +-keep class io.flutter.plugins.** { *; } diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index f0b1890..44bc99e 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="org.trentpalmer.libre_gps_parser"> diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index d9e7058..3c28c8a 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,9 @@ + package="org.trentpalmer.libre_gps_parser"> + + + + android:label="Libre Gps Parser" + android:icon="@mipmap/libre_gps_parser_launcher"> TT z<%jK=8m6sH$;~OEXT{$H3hi(7xuTVs=S*1YAG|m2_al1u_?_=hE>qpe$X^VggDbzV zJl`u$dhw!lL&P=3-tNy_ctU*}?xmr!1w)Gbq+Fo($=+CE~1k5HkHGG34`oDNh6!Pib zv!|Eo*;?d3>ZaVe&ORP~e0U6Oe$EqMME`mrUV)a*Y=r!jq`AIohhpAXQ-rLtS)`}^ z@y+qeYdY;mQf|q(t2e!gOZIY`jV|U&E0zjXt=#IXAT=@)7BnZXnIOWY-WZDpvcJ&k zSoS;M$K`VMd0lrc_G}c~cftX(^9vV99UZTHyu;?zy*!yx+=%ze?Vl#6Uw3||$EQw2 z5DT%1lEQPq+4)a;BO;1$=c?n2S1tem&%^USBKI6=H^NO4S49;$l6hkKD*&-%S#S;E z7OktCzN@T*y}dcu6(H+u{>IhZ>>kwG)#{#tqKdkn9~m_Oa1WsP{HeD4`1&ODHKoqi zgYD_=#?{8i3-{mMF?bfVM@A*{Df6{#KZLt?d=kQ4h$*o}Lm}KnB`f1)As_C2ctPIi z@AoMB(Ytq#9%UaGPD!U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E-(Ac&(CWMulf2PJ952?8B&g^&oM1<*y3yTcRjGen|V`7|G47j z;&PwZsld#T=G%V!s_5>Z>bq}dd<(g=x6(W8_!Ki+{k%OYKaUrNrl#hceRcPF^V_`< zd%s=W@h;uIl zQ=@wRe=UFf`Eh)Qr*@8w%i%TPI#w?G>(7IQS&4~mC)J@S*=#r6wb=aZhJVXCKLp?Zv`TH%?^jC-#4(tPH~7_Z;2*Cwhe z-`tnGzUTJ&y=wbRRd>J6{JTlC@c1Ut|F$bL@9CU-aao(KgMR^D3ZdpXoJF{eeWD( zR;=y5b?erR_+Z)4tJRBEtSGyN$rb7hqAyl2&wm4q!P9Be3feV2}Xm$8Hj^ zaR>woAOh4|g;|TlB&-j+5!m%Pfb4)S=Ot1fy615?8Ejtz*m&$#W9U-=D;^wPCDO@A k{zGCyQk?_XJ2k8RaXYH>G);`?jsOXGy85}Sb4q9e0G{|}L;wH) literal 0 HcmV?d00001 diff --git a/android/app/src/main/java/org/trentpalmer/lnl_share/MainActivity.java b/android/app/src/main/java/org/trentpalmer/libre_gps_parser/MainActivity.java similarity index 97% rename from android/app/src/main/java/org/trentpalmer/lnl_share/MainActivity.java rename to android/app/src/main/java/org/trentpalmer/libre_gps_parser/MainActivity.java index c1212c0..3b9eea7 100644 --- a/android/app/src/main/java/org/trentpalmer/lnl_share/MainActivity.java +++ b/android/app/src/main/java/org/trentpalmer/libre_gps_parser/MainActivity.java @@ -1,4 +1,4 @@ -package org.trentpalmer.lnl_share; +package org.trentpalmer.libre_gps_parser; import android.content.Intent; import android.os.Bundle; diff --git a/android/app/src/main/libre_gps_parser_launcher-web.png b/android/app/src/main/libre_gps_parser_launcher-web.png new file mode 100644 index 0000000000000000000000000000000000000000..609189f12bdf5db84886f18c70ae0d27025b5cb1 GIT binary patch literal 18895 zcmeHvc{r4B`}aNe%2o+kqLnBrWnV@rZMLkDy^wtu8Z%OqLJP@G_MI?xqarod>6i|KC5}ieP7FYo!5Dt=jU9md7-PV$+1^pF8}}>H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q4%IXYyBfjLl+AoVlWD?*frZSz0rEod*_80NL};2)1ZPk3_QR+onWf_ltC zF^AT|Oq8}mSk!HY6p$qozB}I3hpr5u$dPj3BkWBa>Yq+u|1AzK|Il09KvM_Rc+Vo~ z*R#4szW(K&&GZ9@gTGv3d8?)VNdZ(`-AAjFRFreS>MX6!Zv0d~9Q?5jZXG&aa>7=Z zKa3H8zZkSkh#y?z?f)f`(~~`^c~X|)$6vvIpkwW_EIqrScb7l-Bl~CSD-fDTt6r`6 zy6sfEU&2sES7=uZJ#Y`6-f;!ZyC^^R7f`OcejNXQ@n?u~7FKC6t$2a`Moe7bPp5#t O(R5Y&O3`JjC;taAKVFsq literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable/libre_gps_parser_foreground.xml b/android/app/src/main/res/drawable/libre_gps_parser_foreground.xml new file mode 100644 index 0000000..e4a682f --- /dev/null +++ b/android/app/src/main/res/drawable/libre_gps_parser_foreground.xml @@ -0,0 +1,13 @@ + + + + + diff --git a/android/app/src/main/res/mipmap-anydpi-v26/libre_gps_parser_launcher.xml b/android/app/src/main/res/mipmap-anydpi-v26/libre_gps_parser_launcher.xml new file mode 100644 index 0000000..4f48a83 --- /dev/null +++ b/android/app/src/main/res/mipmap-anydpi-v26/libre_gps_parser_launcher.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-anydpi-v26/libre_gps_parser_launcher_round.xml b/android/app/src/main/res/mipmap-anydpi-v26/libre_gps_parser_launcher_round.xml new file mode 100644 index 0000000..4f48a83 --- /dev/null +++ b/android/app/src/main/res/mipmap-anydpi-v26/libre_gps_parser_launcher_round.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7b0906d62b1847e87f15cdcacf6a4f29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ diff --git a/android/app/src/main/res/mipmap-hdpi/libre_gps_parser_launcher.png b/android/app/src/main/res/mipmap-hdpi/libre_gps_parser_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..7fc05e20a609c00979ad87d49034fc682e5432c9 GIT binary patch literal 1454 zcmV;f1yTBmP)z!TPRDYRAv!UKsCFc5~Y5?Qy|)#Ubi_KH;Rs??KXSk zR?*S8O;7aLXXZO%V6nsx(y*Y_*__Rko}B1tB#G>9{S%ABW_O>oI-S{CK?;sf2F@uc z6dZ29kw}VZRo!V8Vumv2XtD=I%rvp4VbK$C43Rl9Vi(?TtEneTNoAQl=2!q4Bh=Jw zF)Ba;0IF@E++~%Y1ZU|O0m`sdyLLZTmRNvT5v3^&YePs(aJ`daVgOl}RedQ9GYtS` zPN;Hxo(zCqZf>EUuiv1n{kJ5-G5QjnK>)~7Qn44YY63`DY2T9!fL>YGN)HAGXlQ6i zA{?VH830*J%lE|rP_5VK0OgjI@8)(B|#T-Lbt8~dUbsp9XorTe1qy)bN|sJx_Iq6b)7v& zdwRa3k2?=bgk$vK9C*}Zp%c1cLze(y7@Ya#G6huX%x|}DQ^)aMTJq6Wnz80RdcoQB zlsx)y4m{w6j8YGD!v<{W3ZPl+s={$)KzHulr_Z{3Y4!$BOtTVrAp=?HQ0j%PSuti( z$^b%LK<=wM5G>h%|hm zGoYwRuq~!DK=YX6%GnB6do;n3g9P2m*==5wwo(ER)+nJh=N^@B+clzGzN?8Aw0%gG zJ31u7G5SW5gKpT6+k_8k2@qDf%0(b%pGY-l=DY7x`_XQ?_SfG`)<-_J#Q@V9e}$IKH>W@UQ^UAfsGal3(Y-~n$qJ+Pr%0>GD%CWE8` zgw5oo8+}n{4+8H0_fFI+XYhstNiB=u3w%l&fUx8C`vV~>WGwL1cnjE&K~}`Ny?{(X znBfLn@)b9Hflp}zklVX2Bp6J=SOu%`wjVtn)h=FbxItD;Cv3r{oF6`=1R$(4URt|> z3f8p-$@|UsAY3bI@EN-W+Yko4Bt6GDF=uTF(zZmE77ybYhe*}*|#K|86<^XYkQU}n4s^q+@kU#QC|D)VXv$WpZYtzbGD@Rdwqm5avDUsx{z7-wTkYEf z#d;TFFw>-|<>h7J)pSNgXTpg zUxiY!;<#AlTr@n1(8+$`Gkj+;AQr?V#U=>P#`nz*tMxhdYhg5*(Nsp$bWT%;W63e) zzWV)VnIv^`3j6Nh&SGN<4qUsf5Fi!QABjbd;kCd07*qo IM6N<$f`yc=mjD0& literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/mipmap-hdpi/libre_gps_parser_launcher_round.png b/android/app/src/main/res/mipmap-hdpi/libre_gps_parser_launcher_round.png new file mode 100644 index 0000000000000000000000000000000000000000..d8798a550da6f67303e3983d9c751fbe80a50beb GIT binary patch literal 3206 zcmV;140-d3P)b(B6<&k{LW+d6TD02T+0`NmahS`9!xR#hfCwS5KoSyY(Yd=?$+|EBC!~B)apB-1 zRjK@OB^4(>LOCf%4iyL{fUzqH81Rocb}BJfN#HWU21}F?i8yq0`s&kWBZ5n z|1Oigy~otp_CNajkQMxIYwKb6Se=eT>Gt;L(H1mhU@4QvF(5I~QZ<-q->FTvx7kdN z_M>#Lw`d`(*xQs9u^mt22xx+~i~7n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C}y!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ diff --git a/android/app/src/main/res/mipmap-xhdpi/libre_gps_parser_launcher.png b/android/app/src/main/res/mipmap-xhdpi/libre_gps_parser_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..7967221fefe504f61aa39454b6229a94748d47d2 GIT binary patch literal 1936 zcmV;B2XFX^P)V z`|g~%k9i0J2?+@a2?+@a35gF$P0cvLXdF+<6|7Fl$L zf~v&0B6EU2D(VglfQ1xB>NCtGKELvLgUPa)Yjd2*a+m);;M!^b^(PhUY{#G(m;jq6 zu~NO|8%ivxhGNU_+!+(K$V}=`;K8xc7nV*}_e`*}sVgiD*PF~2ZNOW4bS873zQ}AP zHCurNFab8YHKmtgGL2E{oe6d$`oi)pHt@@PIpYJ=>WAon!BpO>FDPT0?A6=VA;8|f zO3KU(H)QAhZq z%v8_M0$bsL=(kr+=eh175ul6!ZC+7##H)+u0y{Mb7#E$jY=*ZG5MNxuvbJnvt9I^v zO0f<5yn=vLriT#=UY`f-)F5E|3ya^G1W$n#kX~=_HYxs(cV6U0BplP9D`#~CXNUgzRs%r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ykN*=e4rIsJx9>z}*o zo~|9I;xof diff --git a/android/app/src/main/res/mipmap-xxhdpi/libre_gps_parser_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/libre_gps_parser_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..a1dc9f5ccaa0c8ba52ea0347a39c46cf9185f23b GIT binary patch literal 3295 zcmZ8kXFMAU_a=!E+ER*|v9)RxZBaxJBV5F)JxfumX050owPFOlt+vFTMXc6LRZ~=N zjoNDF)*h`8Tl2dA|NG^=AI^EcoZtEIoO7P@dy+f7=w74%MT6XUyCmtOY*gn7L z;Nz!~aiVhY`pdy!bnvIBf#0-k+N=g``*(ZqQW5gn6&8$k;lJU5M1OPOeI9Eqty`D% zx|n`p;te>9`HbtcyQF@l`F$SspYh|hv6++&_0Cl*ZgCsx`ZfjxZ=l~MvMsR6I%AxN ztg4>28cDN`7)kG!%Gas9ax#xFF0v}ZFtgfmL9P)iCYk1EBr^s*!$eH&5KC}x-_8VK z-?ZZ+_y=d4pvtMc#DX^Gk=fl7%%f#e zuJYfO9+w7uk~BuSwGhIGCDK9T(o=cazS-Ns`!5MIr@JAiT(?KX=8?&rc9A zpAAEER`7$b1cKJ}063U9I~e{y;C@lhaxAIxRgBC%-&wi2yTSLeVTVE!i;*+>fKWw% zhk^RxA*0!8w>;_X851e_K$G3rx;Cj=**|H}-X3EeuTDqo4Q&xRSd7Vury%_q!B=uY z{f>=JZ)V==Y^p{&+`4l+^_8sbOSl4SPGXQ5bPomr|9EuX_q(Jf6??dr-&sUl>^STw zy4Y8i_65(MSeX5{-=l5p5sI6G9%+9!pjphUu+CfWpWFaK1ONgV79@Jm! za3eovCxcv^N*hn}lo87UZK53s8K4FcG^4DuM43jTu0U1wI|lE&fX(LBdPh9<$ zy75S3`{NmUFPZ?M3ZrHGV*}0>^n)s9yzU}8O9kpV zK4CH7{bHdCHn6)$#6V2Ya85C_J;t%)bXj31@2e)O?I!yFNW}A=AR$JGQCo1rw$OW< z;&g9sKQ1O(py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o%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` diff --git a/android/app/src/main/res/mipmap-xxxhdpi/libre_gps_parser_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/libre_gps_parser_launcher.png new file mode 100644 index 0000000000000000000000000000000000000000..1cf025e27d0fe12c7483291cfd9d249c804e2378 GIT binary patch literal 5053 zcma)AXHb*fvwspIBp?t%5sZ-*DM}RtDN;ix^rlEh0jWypEp$Q=5J3d#RZ)sm0Yd-* z1qBp^NDU~UNPh()^~QJRe`oIfaOZw_&d%AhZFbJH``be>G16gXJj)0G0JEMh#*9Wu ze?KTaZ8e+rVgLa4I6aKIMeyXB9h0AB9}f|x$A@>!=wwGcr2^^~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3T~%^6)#c3SPc~w$HWY#(C!fPrqIGUmH!FZIcc9kI~C`xS#}dcL@}Ah>5}@7bV=rC z8jT8H89*hHApM179 zHMWO+<7%GQt3Nhx6WORDF%9`aN!HKIt!V&`cobVW0CB*$g00FsT#z$yMZ|dmyU}`4 zew!Hur-y?^kfK~*#<5^#;K?Y_S16h(-)+g-%=kP*0{LeL*W>%wElj-8)Z8F017wKH z{Po(reunsiM3zX&(lpQ~0H7hPF)Q841Lm1Z(P#8@w2-GLe`#mX4(nySVSV;C!K8iPDIw6`o21(+ zZ?VdcIhfZNZXBJ=C_w?e9%-(>3w?vv1uf6YV3A>fx!+)%*#pfK7jCW~6wnIe24DSw aO8cX$v83#)-{*h907-E;H literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/values/libre_gps_share_launcher_background.xml b/android/app/src/main/res/values/libre_gps_share_launcher_background.xml new file mode 100644 index 0000000..902ff8c --- /dev/null +++ b/android/app/src/main/res/values/libre_gps_share_launcher_background.xml @@ -0,0 +1,4 @@ + + + #1E656D + \ No newline at end of file diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index f0b1890..44bc99e 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="org.trentpalmer.libre_gps_parser"> diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index cab9fd1..59078c4 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -323,7 +323,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.lnlShare; + PRODUCT_BUNDLE_IDENTIFIER = com.example.libregpsParser; PRODUCT_NAME = "$(TARGET_NAME)"; VERSIONING_SYSTEM = "apple-generic"; }; @@ -448,7 +448,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.lnlShare; + PRODUCT_BUNDLE_IDENTIFIER = com.example.libregpsParser; PRODUCT_NAME = "$(TARGET_NAME)"; VERSIONING_SYSTEM = "apple-generic"; }; @@ -471,7 +471,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.lnlShare; + PRODUCT_BUNDLE_IDENTIFIER = com.example.libregpsParser; PRODUCT_NAME = "$(TARGET_NAME)"; VERSIONING_SYSTEM = "apple-generic"; }; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 452f674..b4fc769 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -11,7 +11,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - lnl_share + libre_gps_parser CFBundlePackageType APPL CFBundleShortVersionString diff --git a/lib/about.dart b/lib/about.dart new file mode 100644 index 0000000..8dbbe21 --- /dev/null +++ b/lib/about.dart @@ -0,0 +1,156 @@ +import 'package:flutter/material.dart'; +import 'global_helper_functions.dart'; + +InkWell aboutApp(BuildContext context) { + return InkWell( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'About', + style: TextStyle( + color: candyApple, + ), + ), + Icon( + Icons.info, + size: 48.0, + color: Colors.black, + ), + ], + ), + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + final double textHeight = 1.5; + return AlertDialog( + backgroundColor: ivory, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + title: Text( + 'Libre Gps Parser', + textAlign: TextAlign.center, + style: TextStyle( + color: candyApple, + ), + ), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Flexible( + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + 'The essence of Libre Gps Parser, is to parse gps coordinates from ' + 'a map link that you share from the Google Maps Application. ' + 'After that you can use the gps coordinates to make api calls for ' + 'weather, elevation, and timezoneoffset.\n\n' + 'Parsing the gps coordinates is accomplished by getting the Google Map ' + 'link with an http request, and then filtering the raw text result. ' + 'Locally, data is cached in an sqlite database, in order to economize ' + 'network requests.\n\n' + 'This version of the application requires that you set up an elevation ' + 'api server, and provide an openweathermap api key. ' + 'Or you can disable elevation and weather in settings.' + '', + ), + Container( + margin: EdgeInsets.only( + top: 40, + bottom: 10, + ), + child: Wrap( + runSpacing: 30, + alignment: WrapAlignment.center, + children: [ + Container( + margin: EdgeInsets.symmetric( + horizontal: 15, + ), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + height: 75, + child: RaisedButton( + color: peacockBlue, + child: Icon( + Icons.arrow_back, + size: 48.0, + color: Colors.white, + ), + onPressed: () { + Navigator.of(context).pop(); + } + ), + ), + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 15, + ), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + height: 75, + child: RaisedButton( + color: peacockBlue, + child: Text( + "License", + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + onPressed: () { + Navigator.of(context).pop(); + } + ), + ), + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 15, + ), + child: ButtonTheme( + height: 75, + child: RaisedButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + color: peacockBlue, + child: Text( + "Other Licenses", + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + onPressed: () { + showLicensePage(context: context); + } + ), + ), + ), + ], + ), + ), + ], + ), + ), + ), + ], + ), + ); + } + ); + }, + ); +} diff --git a/lib/database_helper.dart b/lib/database_helper.dart index 1ab75cc..769aeeb 100644 --- a/lib/database_helper.dart +++ b/lib/database_helper.dart @@ -1,27 +1,34 @@ +// https://github.com/tekartik/sqflite/blob/master/sqflite/doc/migration_example.md import 'dart:io'; import 'package:path/path.dart'; import 'package:sqflite/sqflite.dart'; import 'package:path_provider/path_provider.dart'; class DatabaseHelper { - - static final _databaseName = "LnLShare.db"; - static final _databaseVersion = 1; + static final String _databaseName = "LibreGpsParser.db"; + static final int _databaseVersion = 4; - static final table = 'gmaplocations'; - static final weatherTable = 'weather'; - - static final columnMapLocation = 'mapLocation'; - static final columnLatLong = 'latLong'; - static final columnLnlTime = 'lnlTime'; - static final columnViewTime = 'viewTime'; - static final columnElev = 'elev'; - static final columnElevTime = 'elevTime'; - static final columnWeatherID = 'weatherID'; + static final String table = 'gmaplocations'; + static final String weatherTable = 'weather'; - static final columnWeatherWeatherID = 'weatherID'; - static final columnWeather = 'weather'; - static final columnWeatherForecast = 'weatherForecast'; + static final String columnMapLocation = 'mapLocation'; + static final String columnLatLong = 'latLong'; + static final String columnLnlTime = 'lnlTime'; + static final String columnViewTime = 'viewTime'; + static final String columnElev = 'elev'; + static final String columnElevTime = 'elevTime'; + static final String columnWeatherID = 'weatherID'; + static final String columnTimeOffSet = 'timeOffSet'; + static final String columnTimeOffSetTime = 'timeOffSetTime'; + + static final String columnWeatherWeatherID = 'weatherID'; + static final String columnWeather = 'weather'; + static final String columnWeatherForecast = 'weatherForecast'; + static final String columnNotes = 'notes'; + + // is the timeOffSet automatically set by consulting teleport api + // (not manually set by spinner) + static final String columnIsAutoTimeOffset = 'isAutoTimeOffset'; // make this a singleton class DatabaseHelper._privateConstructor(); @@ -35,14 +42,32 @@ class DatabaseHelper { _database = await _initDatabase(); return _database; } - + // this opens the database (and creates it if it doesn't exist) _initDatabase() async { Directory documentsDirectory = await getApplicationDocumentsDirectory(); - String path = join(documentsDirectory.path, _databaseName); - return await openDatabase(path, - version: _databaseVersion, - onCreate: _onCreate); + String path = join( + documentsDirectory.path, + _databaseName + ); + return await openDatabase( + path, + version: _databaseVersion, + onCreate: _onCreate, + onUpgrade: _onUpgrade, + ); + } + + // sqflite seems to be able to figure out the versions + // automatically? + // you can only ADD one column at a time? + Future _onUpgrade(Database db, int oldVersion, int newVersion) async { + if ((oldVersion == 1) || (oldVersion == 2)) { + await db.execute('''ALTER TABLE $table ADD $columnIsAutoTimeOffset INT'''); + await db.execute('''ALTER TABLE $table ADD $columnNotes TEXT'''); + } else if (oldVersion == 3) { + await db.execute('''ALTER TABLE $table ADD $columnNotes TEXT'''); + } } // SQL code to create the database table @@ -55,18 +80,22 @@ class DatabaseHelper { $columnViewTime INT, $columnElev INT, $columnElevTime INT, - $columnWeatherID INT + $columnWeatherID INT, + $columnTimeOffSet INT, + $columnTimeOffSetTime INT, + $columnIsAutoTimeOffset INT, + $columnNotes TEXT ) '''); await db.execute(''' CREATE TABLE $weatherTable ( - $columnWeatherWeatherID INT UNIQUE, + $columnWeatherWeatherID INT UNIQUE ON CONFLICT REPLACE, $columnWeather TEXT, $columnWeatherForecast TEXT ) '''); } - + Future insert(Map row) async { Database db = await instance.database; return await db.insert(table, row); @@ -84,73 +113,144 @@ class DatabaseHelper { Future queryRowCount() async { Database db = await instance.database; - return Sqflite.firstIntValue(await db.rawQuery('SELECT COUNT(*) FROM $table')); + return Sqflite.firstIntValue( + await db.rawQuery('SELECT COUNT(*) FROM $table')); } Future queryRowExists(String mapLocation) async { + String depostrophedMapLocation = mapLocation.replaceAll('\'', '\'\''); Database db = await instance.database; - return Sqflite.firstIntValue(await db.rawQuery('SELECT EXISTS (SELECT $columnMapLocation FROM $table WHERE $columnMapLocation=\'$mapLocation\')')); + return Sqflite.firstIntValue(await db.rawQuery( + 'SELECT EXISTS (SELECT $columnMapLocation FROM $table WHERE $columnMapLocation=\'$depostrophedMapLocation\')')); } Future queryWeatherIDExists(int weatherID) async { Database db = await instance.database; - return Sqflite.firstIntValue(await db.rawQuery('SELECT EXISTS (SELECT $columnWeatherWeatherID FROM $weatherTable WHERE $columnWeatherWeatherID=\'$weatherID\')')); + return Sqflite.firstIntValue(await db.rawQuery( + 'SELECT EXISTS (SELECT $columnWeatherWeatherID FROM $weatherTable WHERE $columnWeatherWeatherID=\'$weatherID\')')); } Future queryNewestMapLocation() async { Database db = await instance.database; - List result = await db.rawQuery('SELECT $columnMapLocation FROM $table ORDER BY $columnViewTime DESC LIMIT 1'); - return (result.length == 0) ? 'Plataea\nGreece\nhttps://maps.app.goo.gl/1NW9z': result[0]['mapLocation']; + List result = await db.rawQuery( + 'SELECT $columnMapLocation FROM $table ORDER BY $columnViewTime DESC LIMIT 1'); + return (result.length == 0) + ? 'Plataea\nGreece\nhttps://maps.app.goo.gl/1NW9z' + : result[0]['mapLocation']; } + Future querySecondNewestMapLocation() async { + Database db = await instance.database; + List result = await db.rawQuery( + 'SELECT $columnMapLocation FROM $table ORDER BY $columnViewTime DESC LIMIT 2'); + return (result.length == 2) + ? result[1]['mapLocation'] + : 'none'; + } + + Future> sortedMapLocations() async { Database db = await instance.database; - var result = await db.rawQuery('SELECT $columnMapLocation FROM $table ORDER BY $columnViewTime DESC'); - List result_list = new List(); + var result = await db.rawQuery( + 'SELECT $columnMapLocation FROM $table ORDER BY $columnViewTime DESC'); + List resultList = List(); for (var i = 0; i < result.length; i++) { - result_list.add(result[i]['mapLocation']); + resultList.add(result[i]['mapLocation']); } - return result_list; + return resultList; } Future queryLatNLong(String mapLocation) async { Database db = await instance.database; - List result = await db.rawQuery('SELECT $columnLatLong FROM $table WHERE $columnMapLocation = ?',[mapLocation]); + List result = await db.rawQuery( + 'SELECT $columnLatLong FROM $table WHERE $columnMapLocation = ?', + [mapLocation]); return (result[0]['latLong'] == null) ? 'NA' : result[0]['latLong']; } + Future queryNotes(String mapLocation) async { + Database db = await instance.database; + List result = await db.rawQuery( + 'SELECT $columnNotes FROM $table WHERE $columnMapLocation = ?', + [mapLocation]); + return result[0]['notes'] ?? ''; + } + Future queryWeather(int weatherID) async { Database db = await instance.database; - List result = await db.rawQuery('SELECT $columnWeather FROM $weatherTable WHERE $columnWeatherWeatherID = ?',[weatherID]); - return result[0]['weather']; + List result = await db.rawQuery( + 'SELECT $columnWeather FROM $weatherTable WHERE $columnWeatherWeatherID = ?', + [weatherID]); + return (result.length > 0) ? result[0]['weather'] : 'NA'; + } + + Future queryWeatherForeCast(int weatherID) async { + Database db = await instance.database; + List result = await db.rawQuery( + 'SELECT $columnWeatherForecast FROM $weatherTable WHERE $columnWeatherWeatherID = ?', + [weatherID]); + return result[0]['weatherForecast'] ?? 'NA'; } Future queryElevation(String mapLocation) async { Database db = await instance.database; - List result = await db.rawQuery('SELECT $columnElev FROM $table WHERE $columnMapLocation = ?',[mapLocation]); + List result = await db.rawQuery( + 'SELECT $columnElev FROM $table WHERE $columnMapLocation = ?', + [mapLocation]); return result[0]['elev']; } + Future queryIsAutoTimeOffSet(String mapLocation) async { + Database db = await instance.database; + List result = await db.rawQuery( + 'SELECT $columnIsAutoTimeOffset FROM $table WHERE $columnMapLocation = ?', + [mapLocation]); + return result[0]['isAutoTimeOffset'] ?? 1; + } + + Future queryTimeOffSetTime(String mapLocation) async { + Database db = await instance.database; + List result = await db.rawQuery( + 'SELECT $columnTimeOffSetTime FROM $table WHERE $columnMapLocation = ?', + [mapLocation]); + return result[0]['timeOffSetTime'] ?? + -1; // returns -1 if result[0]['timeOffSetTime'] is null + } + + Future queryTimeOffSet(String mapLocation) async { + Database db = await instance.database; + List result = await db.rawQuery( + 'SELECT $columnTimeOffSet FROM $table WHERE $columnMapLocation = ?', + [mapLocation]); + return result[0]['timeOffSet'] ?? + -1; // returns -1 if result[0]['timeOffSet'] is null + } + Future queryWeatherID(String mapLocation) async { Database db = await instance.database; - List result = await db.rawQuery('SELECT $columnWeatherID FROM $table WHERE $columnMapLocation = ?',[mapLocation]); + List result = await db.rawQuery( + 'SELECT $columnWeatherID FROM $table WHERE $columnMapLocation = ?', + [mapLocation]); return result[0]['weatherID']; } Future update(Map row) async { Database db = await instance.database; String mapLocation = row[columnMapLocation]; - return await db.update(table, row, where: '$columnMapLocation = ?', whereArgs: [mapLocation]); + return await db.update(table, row, + where: '$columnMapLocation = ?', whereArgs: [mapLocation]); } Future updateWeathTbl(Map row) async { Database db = await instance.database; int weatherID = row[columnWeatherWeatherID]; - return await db.update(weatherTable, row, where: '$columnWeatherWeatherID = ?', whereArgs: [weatherID]); + return await db.update(weatherTable, row, + where: '$columnWeatherWeatherID = ?', whereArgs: [weatherID]); } Future delete(String ml) async { Database db = await instance.database; - return await db.delete(table, where: '$columnMapLocation = ?', whereArgs: [ml]); + return await db + .delete(table, where: '$columnMapLocation = ?', whereArgs: [ml]); } } diff --git a/lib/default_plataea_notes.dart b/lib/default_plataea_notes.dart new file mode 100644 index 0000000..ba6c2b3 --- /dev/null +++ b/lib/default_plataea_notes.dart @@ -0,0 +1,17 @@ +final String defaultPlataeaNotes = """ +![](https://upload.wikimedia.org/wikipedia/commons/d/d5/Scene_of_the_Battle_of_Plataea.jpg) +___ +# Example Notes For Plataea + +## Greek Coalitian that fought Persia +* Sparta +* Athens +* Corinth +* Megara + +## Major Battles Preceeding Plataea +1. Marathon +2. Thermopylae +3. Sacking of Athens +4. Naval Battle of Salami +"""; diff --git a/lib/edit_notes.dart b/lib/edit_notes.dart new file mode 100644 index 0000000..1c915e5 --- /dev/null +++ b/lib/edit_notes.dart @@ -0,0 +1,330 @@ +import 'package:permission_handler/permission_handler.dart'; +import 'package:file_picker/file_picker.dart'; +import 'package:flutter/material.dart'; +import 'global_helper_functions.dart'; +import 'database_helper.dart'; +import 'dart:io'; + +class EditNotes extends StatefulWidget { + final String mapLocation; + + EditNotes({ + Key key, + this.mapLocation, + }) : super(key: key); + + @override + _EditNotesState createState() => _EditNotesState(); +} + +class _EditNotesState extends State { + + final double textHeight = 1.5; + final _textEditingController = TextEditingController(); + final dbHelper = DatabaseHelper.instance; + String _inputText = ''; + String _oldNotes = ''; + + @override + void initState() { + super.initState(); + loadNotes(); + } + + @override + Widget build(BuildContext context) { + Future _requestPop() { + if (_inputText != _oldNotes) { + showDialog( + context: context, + barrierDismissible: false, + builder: (BuildContext context) { + return AlertDialog( + backgroundColor: ivory, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + 'Discard your changes?', + textAlign: TextAlign.center, + ), + Container( + margin: EdgeInsets.only( + top: 40, + bottom: 10, + ), + child: Wrap( + runSpacing: 30, + children: [ + Container( + margin: EdgeInsets.symmetric( + horizontal: 15, + ), + child: ButtonTheme( + height: 75, + child: RaisedButton( + color: peacockBlue, + child: Text( + "No", + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + onPressed: () { + Navigator.of(context).pop(); + } + ), + ), + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 15, + ), + child: ButtonTheme( + height: 75, + child: RaisedButton( + color: peacockBlue, + child: Text( + "Discard", + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + onPressed: () { + Navigator.of(context).pop(); + Navigator.of(context).pop(); + } + ), + ), + ), + ], + ), + ), + ], + ), + ); + } + ); + return Future.value(false); + } else { + return Future.value(true); + } + } + + return WillPopScope( + onWillPop: _requestPop, + child: Scaffold( + backgroundColor: ivory, + appBar: AppBar( + title: const Text('Notes, MarkDown Supported'), + actions: [ + IconButton( + icon: Icon(Icons.save), + onPressed: () async{ + Navigator.of(context).pop(this._inputText); + Map row = { + DatabaseHelper.columnMapLocation: widget.mapLocation, + DatabaseHelper.columnNotes: this._inputText, + }; + await dbHelper.update(row); + } + ), + ], + ), + body: Column( + children: [ + Expanded( + child: TextField( + controller: _textEditingController, + keyboardType: TextInputType.multiline, + maxLines: null, + onChanged: (text) { + _inputText = text; + }, + ), + ), + Row( + children: [ + Expanded( + child: Container(), + ), + Container( + margin: EdgeInsets.all(20.0), + child: ButtonTheme( + height: 55, + padding: EdgeInsets.only( + top: 5, + right: 12, + bottom: 12, + left: 10 + ), + child: RaisedButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + color: peacockBlue, + child: Text( + 'Import', + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + onPressed: () async{ + Map _storagePermissions; + PermissionStatus _storagePermission = await PermissionHandler().checkPermissionStatus(PermissionGroup.storage); + if (_storagePermission == PermissionStatus.denied) { + _storagePermissions = await PermissionHandler().requestPermissions([PermissionGroup.storage]); + } + if ((_storagePermission == PermissionStatus.granted) || (_storagePermissions.toString() == PermissionStatus.granted.toString())) { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + backgroundColor: ivory, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + title: Text( + 'You can import a markdown (or plain text) file.', + textAlign: TextAlign.center, + style: TextStyle( + color: candyApple, + ), + ), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + margin: EdgeInsets.only( + top: 40, + bottom: 10, + ), + child: ButtonTheme( + height: 55, + padding: EdgeInsets.only( + top: 5, + right: 12, + bottom: 12, + left: 10 + ), + child: RaisedButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + color: peacockBlue, + child: Text( + 'Select File', + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + onPressed: () async{ + String _filePath; + _filePath = await FilePicker.getFilePath(type: FileType.ANY); + Navigator.of(context).pop(); + try { + String _contents = await File(_filePath).readAsString(); + setState(() { + this._textEditingController.text = _contents; + this._inputText = _contents; + }); + } catch(e) { + print(e); + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + backgroundColor: ivory, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + title: Text( + 'Oops, something went wrong', + textAlign: TextAlign.center, + style: TextStyle( + color: candyApple, + ), + ), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + margin: EdgeInsets.only( + top: 40, + bottom: 10, + ), + child: ButtonTheme( + height: 55, + padding: EdgeInsets.only( + top: 5, + right: 12, + bottom: 12, + left: 10 + ), + child: RaisedButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + color: peacockBlue, + child: Text( + 'OK', + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + onPressed: () async{ + Navigator.of(context).pop(); + } + ), + ), + ), + ], + ), + ); + } + ); + } + } + ), + ), + ), + ], + ), + ); + } + ); + } + } + ), + ), + ), + ], + ), + ], + ), + ), + ); + } + + Future loadNotes() async{ + String _notes = await dbHelper.queryNotes(widget.mapLocation); + setState(() { + _oldNotes = _notes; + _textEditingController.text = _notes; + _inputText = _notes; + }); + } +} diff --git a/lib/elevation.dart b/lib/elevation.dart new file mode 100644 index 0000000..62e6f0c --- /dev/null +++ b/lib/elevation.dart @@ -0,0 +1,155 @@ +import 'package:flutter/material.dart'; +import 'global_helper_functions.dart'; + +final double textHeight = 1.5; + +InkWell elevAtion(BuildContext context, int elevation, int feetElevation) { + return InkWell( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Elevation: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: feetElevation.toString(), + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: ' feet, ', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: elevation.toString(), + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: ' meters', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + ], + ), + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + backgroundColor: ivory, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + 'You have to set up an Open-Elevation Api Server, and specify this in ' + 'settings. The instructions are a little bit out-dated, but it\'s not ' + 'too difficult to muddle through and set something up on a vps or ' + 'RaspberryPi or whatever.\n\n' + 'A \$5 Digital Ocean Droplet doesn\'t have enough disk space, but ' + 'a \$5 LightSail instance does.', + textAlign: TextAlign.center, + ), + Container( + margin: EdgeInsets.only( + top: 40, + bottom: 10, + ), + child: ButtonTheme( + height: 75, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + child: RaisedButton( + color: peacockBlue, + child: Column( + children: [ + Container( + width: 150, + margin: EdgeInsets.only( + top: 10, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Text( + 'github', + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + Icon( + Icons.open_in_browser, + size: 48, + color: Colors.white, + ), + ], + ), + ), + Container( + margin: EdgeInsets.only( + bottom: 15, + ), + child: Text( + 'open-elevation', + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + ), + ], + ), + onPressed: () { + Navigator.of(context).pop(); + urlLaunch('https://github.com/Jorl17/open-elevation/blob/master/docs/host-your-own.md'); + } + ), + ), + ), + ], + ), + ); + } + ); + }, + ); +} diff --git a/lib/global_helper_functions.dart b/lib/global_helper_functions.dart index 4a997c0..f6cc15e 100644 --- a/lib/global_helper_functions.dart +++ b/lib/global_helper_functions.dart @@ -1,51 +1,226 @@ +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:url_launcher/url_launcher.dart'; import 'package:flutter/material.dart'; import 'package:http/http.dart'; -import 'package:shared_preferences/shared_preferences.dart'; import 'database_helper.dart'; import 'dart:convert'; final EdgeInsets myBoxPadding = EdgeInsets.all(10.0); final Color navy = Color(0xff00293C); -final Color peacock_blue = Color(0xff1e656d); +final Color peacockBlue = Color(0xff1e656d); final Color ivory = Color(0xfff1f3ce); -final Color candy_apple = Color(0xfff62a00); -final String weatherApiUrlPrefix = 'https://api.openweathermap.org/data/2.5/weather?'; -final String weatherForecastApiUrlPrefix = 'https://api.openweathermap.org/data/2.5/forecast?'; +final Color candyApple = Color(0xfff62a00); +final String weatherApiUrlPrefix = + 'https://api.openweathermap.org/data/2.5/weather?'; +final String weatherForecastApiUrlPrefix = + 'https://api.openweathermap.org/data/2.5/forecast?'; -Future getWeather(String mapLocation, String lat_Long) async { +Future> refreshTimeOffSet(String mapLocation, String latLong) async { + final dbHelper = DatabaseHelper.instance; + final int _timeStamp = newTimeStamp(); + int _isAutoTimeOffset = await dbHelper.queryIsAutoTimeOffSet(mapLocation); + String timeZoneApiUrl = + 'https://api.teleport.org/api/locations/$latLong/?embed=location:nearest-cities/location:nearest-city/city:timezone/tz:offsets-now'; + Response response; + try { + response = await get(timeZoneApiUrl); + } catch (e) { + print('$e in source file global_helper_functions.dart.getTimeOffSet'); + } + if (response.statusCode == 200) { + Map responseJson; + int offSetMin = 2000; + try { + responseJson = jsonDecode(response.body); + offSetMin = responseJson['_embedded']['location:nearest-cities'][0] + ['_embedded']['location:nearest-city']['_embedded'] + ['city:timezone']['_embedded']['tz:offsets-now'] + ['total_offset_min'] ?? + 2000; + } catch (e) { + print('$e in source file global_helper_functions.dart.getTimeOffSet, can\'t assign Map responseJson'); + } + Map row = { + DatabaseHelper.columnMapLocation: mapLocation, + DatabaseHelper.columnTimeOffSet: offSetMin, + DatabaseHelper.columnTimeOffSetTime: _timeStamp + }; + await dbHelper.update(row); + return ([offSetMin, _timeStamp, _isAutoTimeOffset]); + } else { + Map row = { + DatabaseHelper.columnMapLocation: mapLocation, + DatabaseHelper.columnTimeOffSet: 2000, + DatabaseHelper.columnTimeOffSetTime: _timeStamp + }; + await dbHelper.update(row); + return ([2000, _timeStamp, _isAutoTimeOffset]); + } +} + +Future> getTimeOffSet(String mapLocation, String latLong) async{ + final dbHelper = DatabaseHelper.instance; + final int _timeStamp = newTimeStamp(); + int timeOffSetTime = await dbHelper.queryTimeOffSetTime(mapLocation); + int _isAutoTimeOffset = await dbHelper.queryIsAutoTimeOffSet(mapLocation); + if ((_timeStamp - timeOffSetTime) > 604800) { + String timeZoneApiUrl = + 'https://api.teleport.org/api/locations/$latLong/?embed=location:nearest-cities/location:nearest-city/city:timezone/tz:offsets-now'; + Response response; + try { + response = await get(timeZoneApiUrl); + } catch (e) { + print('$e in source file global_helper_functions.dart.getTimeOffSet'); + int timeOffSet = await dbHelper.queryTimeOffSet(mapLocation); + return ([timeOffSet, timeOffSetTime, _isAutoTimeOffset]); + } + if (response.statusCode == 200) { + Map responseJson; + int offSetMin = 2000; + try { + responseJson = jsonDecode(response.body); + offSetMin = responseJson['_embedded']['location:nearest-cities'][0] + ['_embedded']['location:nearest-city']['_embedded'] + ['city:timezone']['_embedded']['tz:offsets-now'] + ['total_offset_min'] ?? + 2000; + } catch (e) { + print('$e in source file global_helper_functions.dart.getTimeOffSet, can\'t assign Map responseJson'); + } + Map row = { + DatabaseHelper.columnMapLocation: mapLocation, + DatabaseHelper.columnTimeOffSet: offSetMin, + DatabaseHelper.columnTimeOffSetTime: _timeStamp + }; + await dbHelper.update(row); + return ([offSetMin, _timeStamp, _isAutoTimeOffset]); + } else { + Map row = { + DatabaseHelper.columnMapLocation: mapLocation, + DatabaseHelper.columnTimeOffSet: 2000, + DatabaseHelper.columnTimeOffSetTime: _timeStamp + }; + await dbHelper.update(row); + return ([2000, _timeStamp, _isAutoTimeOffset]); + } + } + int timeOffSet = await dbHelper.queryTimeOffSet(mapLocation); + return ([timeOffSet, timeOffSetTime, _isAutoTimeOffset]); +} + +// should be similar to getWeatherForeCast(); +Future getWeather( + String mapLocation, String lattLong, bool stale) async { // https://dragosholban.com/2018/07/01/how-to-build-a-simple-weather-app-in-flutter final dbHelper = DatabaseHelper.instance; String weatherApiID = await getPreferenceOpenWeatherMapApiKey(); - if (weatherApiID == 'none?') { return null;} - else { + if (weatherApiID == 'none?') { + return null; + } else { int weatherID = await dbHelper.queryWeatherID(mapLocation); - if (weatherID == null) { - List latLong = lat_Long.split(','); - String weatherApiUrl = '${weatherApiUrlPrefix}lat=${latLong[0]}&lon=${latLong[1]}&units=imperial&appid=${weatherApiID}'; - Response response = await get(weatherApiUrl); - if (response.statusCode == 200) { - Map responseJson = jsonDecode(response.body); - weatherID = responseJson['id']; - Map row = { - DatabaseHelper.columnMapLocation: mapLocation, - DatabaseHelper.columnWeatherID: weatherID - }; - await dbHelper.update(row); - Map row2 = { - DatabaseHelper.columnWeatherWeatherID: weatherID, - DatabaseHelper.columnWeather: response.body - }; - int weatherIDExists = await dbHelper.queryWeatherIDExists(weatherID); - if (weatherIDExists == 0) { - dbHelper.insertWeatherRow(row2); - } else { - dbHelper.updateWeathTbl(row2); + if ((weatherID == null) || (stale == true)) { + List latLong = lattLong.split(','); + String weatherApiUrl; + if ((weatherID == null) || (weatherID < 0)) { + weatherApiUrl = + '${weatherApiUrlPrefix}lat=${latLong[0]}&lon=${latLong[1]}&units=imperial&appid=$weatherApiID'; + } else { + weatherApiUrl = + '${weatherApiUrlPrefix}id=$weatherID&units=imperial&appid=$weatherApiID'; + } + try { + Response response = await get(weatherApiUrl); + if (response.statusCode == 200) { + Map responseJson = jsonDecode(response.body); + weatherID = (responseJson['id'] != 0) ? responseJson['id'] : generateFakeWeatherId(lattLong); + Map row = { + DatabaseHelper.columnMapLocation: mapLocation, + DatabaseHelper.columnWeatherID: weatherID + }; + await dbHelper.update(row); + Map row2 = { + DatabaseHelper.columnWeatherWeatherID: weatherID, + DatabaseHelper.columnWeather: response.body + }; + int weatherIDExists = await dbHelper.queryWeatherIDExists(weatherID); + if (weatherIDExists == 0) { + dbHelper.insertWeatherRow(row2); + } else { + dbHelper.updateWeathTbl(row2); + } + return response.body; } - return response.body; + } catch(e) { + print('$e, can\'t connect to openweathermap in global_helper_functions'); + weatherID ??= generateFakeWeatherId(lattLong); // assign if null + String weather = await dbHelper.queryWeather(weatherID); + return weather ?? 'NA'; } } else { String weather = await dbHelper.queryWeather(weatherID); - return(weather); + return weather ?? 'NA'; + } + } + return null; +} + +// should be similar to getWeather(); +Future getWeatherForeCast( + String mapLocation, String lattLong, bool stale) async { + // https://dragosholban.com/2018/07/01/how-to-build-a-simple-weather-app-in-flutter + final dbHelper = DatabaseHelper.instance; + String weatherApiID = await getPreferenceOpenWeatherMapApiKey(); + if (weatherApiID == 'none?') { + return null; + } else { + int weatherID = await dbHelper.queryWeatherID(mapLocation); + if (weatherID == 0) { + weatherID = generateFakeWeatherId(lattLong); + } + int weatherIDExists = await dbHelper.queryWeatherIDExists(weatherID); + if (weatherIDExists == 0) { stale = true; } + if ((weatherID == null) || (stale == true)) { + List latLong = lattLong.split(','); + String weatherForeCastApiUrl; + if ((weatherID == null) || (weatherID < 0)) { + weatherForeCastApiUrl = + '${weatherForecastApiUrlPrefix}lat=${latLong[0]}&lon=${latLong[1]}&units=imperial&appid=$weatherApiID'; + } else { + weatherForeCastApiUrl = + '${weatherForecastApiUrlPrefix}id=$weatherID&units=imperial&appid=$weatherApiID'; + } + try { + Response response = await get(weatherForeCastApiUrl); + if (response.statusCode == 200) { + Map responseJson = jsonDecode(response.body); + weatherID = responseJson['city']['id']; + weatherID ??= generateFakeWeatherId(lattLong); // assign if null + Map row = { + DatabaseHelper.columnMapLocation: mapLocation, + DatabaseHelper.columnWeatherID: weatherID + }; + await dbHelper.update(row); + Map row2 = { + DatabaseHelper.columnWeatherWeatherID: weatherID, + DatabaseHelper.columnWeatherForecast: response.body + }; + int weatherIDExists = await dbHelper.queryWeatherIDExists(weatherID); + if (weatherIDExists == 0) { + dbHelper.insertWeatherRow(row2); + } else { + dbHelper.updateWeathTbl(row2); + } + return response.body; + } + } catch(e) { + print('$e, probably cant connect to openweathermap... no network connection? global_helper_functions.getWeatherForeCast'); + weatherID ??= generateFakeWeatherId(lattLong); // assign if null + String weatherForeCast = await dbHelper.queryWeatherForeCast(weatherID); + return (weatherForeCast); + } + } else { + String weatherForeCast = await dbHelper.queryWeatherForeCast(weatherID); + return (weatherForeCast); } } return null; @@ -55,45 +230,130 @@ BoxDecoration myBoxDecoration(Color color) { return BoxDecoration( color: color, border: Border.all( - width: 2.0, + width: 2.0, ), - borderRadius: new BorderRadius.all(new Radius.circular(6.0)), - boxShadow: [ - new BoxShadow( - offset: new Offset(2.0, 1.0), - blurRadius: 1.0, - spreadRadius: 1.0, - ) - ], + borderRadius: BorderRadius.all(Radius.circular(6.0)), + boxShadow: [ + BoxShadow( + offset: Offset(2.0, 1.0), + blurRadius: 1.0, + spreadRadius: 1.0, + ) + ], ); } int newTimeStamp() { - DateTime date = new DateTime.now(); - return (date.millisecondsSinceEpoch / 1000).floor(); + DateTime date = DateTime.now(); + return (date.millisecondsSinceEpoch / 1000).floor(); } Future parseMapUrl(String mapUrl) async { - Response response = await get(mapUrl); - RegExp gmapUrl = new RegExp(r'https://www.google.com/(maps/preview)/(place)/([^/]*)/([^/]*)/data'); - String mapInfo = response.body; - Match match = gmapUrl.firstMatch(mapInfo); - String subMapInfo = match.group(4); - RegExp subGmapUrl = new RegExp(r'@([^,]*,[^,]*),([^,]*,[^,]*)'); - Match subMatch = subGmapUrl.firstMatch(subMapInfo); - return subMatch.group(1); + try { + Response response = await get(mapUrl); + RegExp gmapUrl = RegExp( + r'https://www.google.com/(maps/preview)/(place)/([^/]*)/([^/]*)/data'); + String mapInfo = response.body; + Match match = gmapUrl.firstMatch(mapInfo); + String subMapInfo = match.group(4); + RegExp subGmapUrl = RegExp(r'@([^,]*,[^,]*),([^,]*,[^,]*)'); + Match subMatch = subGmapUrl.firstMatch(subMapInfo); + return subMatch.group(1); + } catch(e) { + print('$e can\'t connect to internet in global_helper_functions.parseMapUrl'); + } +} + +Future fetchElevation(String mapLocation) async { + final dbHelper = DatabaseHelper.instance; + String latLong = await dbHelper.queryLatNLong(mapLocation); + if (latLong == 'NA') { + return null; + } else { + String elevationServer = await getPreferenceElevationServer(); + String elevationApiUrl = + elevationServer + '/api/v1/lookup\?locations\=' + latLong; + Response response; + try { + response = await get(elevationApiUrl); + } catch (e) { + print('$e in source file global_helper_functions.dart.fetchElevation'); + return null; + } + if (response.statusCode == 200) { + Map responseJson = jsonDecode(response.body); + int elevation = responseJson['results'][0]['elevation']; + return elevation; + } else { + return null; + } + } +} + +String convertCoordinates(String latNLong) { + try { + List latLong = latNLong.split(','); + List lat = latLong[0].split('.'); + List long = latLong[1].split('.'); + String latMinSec = getMinSec(lat[1]); + String longMinSec = getMinSec(long[1]); + String gpsDMS = + lat[0] + '\u00B0 ' + latMinSec + ',' + long[0] + '\u00B0 ' + longMinSec; + return gpsDMS; + } catch(e) { + print('$e in source file global_helper_functions.convertCoordinates, function parameter probably not a valid latNLong string'); + } +} + +String getMinSec(String numString) { + String numStringX = '0.' + numString; + double num = double.parse(numStringX); + int mins = (num * 100 * 0.6).floor(); + double secs = ((((num * 100 * 0.6) % 1) * 100000 * .6).round() / 1000); + String minSecs = mins.toString() + '\' ' + secs.toString(); + return minSecs; +} + + +String weatherConditions(String weatherConditions) { + int numSpaces = (' '.allMatches(weatherConditions)).length; + if (numSpaces > 1) { + int firstSpace = weatherConditions.indexOf(' '); + int secondSpace = (weatherConditions.indexOf(' ', firstSpace + 1)); + return weatherConditions.replaceRange(secondSpace, (secondSpace + 1), '\n').toUpperCase(); + } else { + return weatherConditions.toUpperCase(); + } +} + +Future urlLaunch(String url) async{ + if (await canLaunch(url)) { + await launch(url); + } else { + throw 'Could not launch $url'; + } +} + +int generateFakeWeatherId(String latLong) { + List _latLongParts = latLong.split(','); + List _shortLat = _latLongParts[0].split('.'); + List _shortLong = _latLongParts[1].split('.'); + String _fakeIDString = _shortLat[0].replaceFirst('-','8') + _shortLong[0].replaceFirst('-','8'); + // you know a weatherID is fake because it is less than zero + return (0 - int.parse(_fakeIDString)); } Future getPreferenceElevationServer() async { SharedPreferences prefs = await SharedPreferences.getInstance(); - String elevationServer = prefs.getString("elevationServer") ?? "https://example.com"; + String elevationServer = + prefs.getString("elevationServer") ?? "https://example.com"; return elevationServer; } Future setPreferenceElevationServer(String elevationServer) async { SharedPreferences prefs = await SharedPreferences.getInstance(); - prefs.setString("elevationServer",elevationServer); - return prefs.commit(); + bool committed = await prefs.setString("elevationServer", elevationServer); + return (committed); } Future getPreferenceOpenWeatherMapApiKey() async { @@ -104,41 +364,30 @@ Future getPreferenceOpenWeatherMapApiKey() async { Future setPreferenceOpenWeatherMapApiKey(String apiKey) async { SharedPreferences prefs = await SharedPreferences.getInstance(); - prefs.setString("openWeatherMapApiKey",apiKey); - return prefs.commit(); + bool committed = await prefs.setString("openWeatherMapApiKey", apiKey); + return (committed); } -Future fetchElevation(String mapLocation) async { - final dbHelper = DatabaseHelper.instance; - String latLong = await dbHelper.queryLatNLong(mapLocation); - if (latLong == 'NA') { return null;} - else { - String elevationServer = await getPreferenceElevationServer(); - String elevationApiUrl = elevationServer + '/api/v1/lookup\?locations\=' + latLong; - Response response = await get(elevationApiUrl); - if (response.statusCode == 200) { - Map responseJson = jsonDecode(response.body); - int elevation = responseJson['results'][0]['elevation']; - return elevation; - } else {return null;} - } +Future getPreferenceUseElevation() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + bool _useElev = prefs.getBool("useElevation") ?? false; + return _useElev; } -String convertCoordinates(String latNLong) { - List latLong = latNLong.split(','); - List lat = latLong[0].split('.'); - List long = latLong[1].split('.'); - String latMinSec = getMinSec(lat[1]); - String longMinSec = getMinSec(long[1]); - String gpsDMS = lat[0] + '\u00B0 ' + latMinSec + ',' + long[0] + '\u00B0 ' + longMinSec; - return gpsDMS; +Future setPreferenceUseElevation(bool useElev) async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + bool committed = await prefs.setBool("useElevation", useElev); + return (committed); } -String getMinSec(String numString) { - String numString_x = '0.' + numString; - double num = double.parse(numString_x); - int mins = (num * 100 * 0.6).floor(); - double secs = ((((num * 100 * 0.6) % 1) * 100000 * .6).round() / 1000); - String minSecs = mins.toString() + '\' ' + secs.toString(); - return minSecs; +Future getPreferenceUseWeather() async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + bool _useElev = prefs.getBool("useWeather") ?? false; + return _useElev; +} + +Future setPreferenceUseWeather(bool useWeather) async { + SharedPreferences prefs = await SharedPreferences.getInstance(); + bool committed = await prefs.setBool("useWeather", useWeather); + return (committed); } diff --git a/lib/lnl_dec.dart b/lib/lnl_dec.dart new file mode 100644 index 0000000..a242be3 --- /dev/null +++ b/lib/lnl_dec.dart @@ -0,0 +1,129 @@ +import 'package:android_intent/android_intent.dart'; +import 'package:flutter/material.dart'; +import 'global_helper_functions.dart'; +import 'package:share/share.dart'; + +final double textHeight = 1.5; + +Row lnlDec(String latnLong) { + + Future _launchLnL() async{ + AndroidIntent intent = AndroidIntent( + action: 'action_view', + data: Uri.encodeFull('geo:$latnLong?z=12'), + package: 'com.google.android.apps.maps', + ); + await intent.launch(); + } + + List _latNLong = ['x','y']; + if ((latnLong == 'none') || (latnLong == null)) { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Check Data Connection', + style: TextStyle( + height: textHeight, + fontSize: 16, + ), + ), + Text( + 'Probably Offline', + style: TextStyle( + height: textHeight, + fontSize: 16, + ), + ), + ], + ), + ), + ], + ); + } else if (!(latnLong.contains(','))) { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Check Data Connection', + style: TextStyle( + height: textHeight, + fontSize: 16, + ), + ), + Text( + 'Probably Offline', + style: TextStyle( + height: textHeight, + fontSize: 16, + ), + ), + ], + ), + ), + ], + ); + } else { + _latNLong = latnLong.split(','); + return Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + IconButton( + icon: Icon(Icons.share), + tooltip: 'share link to another app', + iconSize: 48, + onPressed: () { + Share.share(latnLong); + }, + ), + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Decimal', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + Text( + _latNLong[0], + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + Text( + _latNLong[1], + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + IconButton( + icon: Icon(Icons.map), + tooltip: 'share link to maps', + iconSize: 48, + onPressed: () { + _launchLnL(); + }, + ), + ], + ); + } +} + + diff --git a/lib/lnl_deg.dart b/lib/lnl_deg.dart new file mode 100644 index 0000000..470b4b3 --- /dev/null +++ b/lib/lnl_deg.dart @@ -0,0 +1,108 @@ +import 'package:flutter/material.dart'; +import 'global_helper_functions.dart'; +import 'package:share/share.dart'; + +final double textHeight = 1.5; + +Row lnlDeg(String latnLongDMS) { + List _latNLong = ['x','y']; + if ((latnLongDMS == 'none') || (latnLongDMS == null)) { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Check Data Connection', + style: TextStyle( + height: textHeight, + fontSize: 16, + ), + ), + Text( + 'Probably Offline', + style: TextStyle( + height: textHeight, + fontSize: 16, + ), + ), + ], + ), + ), + ], + ); + } else if (!(latnLongDMS.contains(','))) { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Container( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Check Data Connection', + style: TextStyle( + height: textHeight, + fontSize: 16, + ), + ), + Text( + 'Probably Offline', + style: TextStyle( + height: textHeight, + fontSize: 16, + ), + ), + ], + ), + ), + ], + ); + } else { + _latNLong = latnLongDMS.split(','); + return Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + IconButton( + icon: Icon(Icons.share), + tooltip: 'share link to another app', + iconSize: 48, + onPressed: () { + Share.share(latnLongDMS); + }, + ), + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Deg, Min, Sec', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + Text( + _latNLong[0], + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + Text( + _latNLong[1], + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ], + ); + } +} diff --git a/lib/location.dart b/lib/location.dart new file mode 100644 index 0000000..3edab2e --- /dev/null +++ b/lib/location.dart @@ -0,0 +1,218 @@ +import 'package:flutter/material.dart'; +import 'package:android_intent/android_intent.dart'; +import 'package:share/share.dart'; +import 'global_helper_functions.dart'; + +class Location extends StatefulWidget { + final String mapLocation; + + Location({ + Key key, + this.mapLocation, + }) : super(key: key); + @override + _LocationState createState() => _LocationState(); +} + +class _LocationState extends State { + @override + Widget build(BuildContext context) { + final double textHeight = 1.5; + List locationStringList = _getlocationStringList(widget.mapLocation); + + Future _launchUrl() async{ + AndroidIntent intent = AndroidIntent( + action: 'action_view', + data: Uri.encodeFull(locationStringList[locationStringList.length - 1]), + ); + await intent.launch(); + } + + List createLocation(List location) { + return location.map((line) { + line = (line.length < 25) ? line : + (line.substring(0,20) + '.....' ); + return Container( + child: Text( + line, + style: TextStyle( + height: textHeight, + fontSize: 16.0, + ), + ), + ); + }).toList(); + } + + try { + + return Row( + children: [ + Expanded( + flex: 3, + child: IconButton( + icon: Icon(Icons.share), + tooltip: 'share link to another app', + iconSize: 48, + onPressed: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + backgroundColor: ivory, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + title: Text( + 'Sharing Options', + textAlign: TextAlign.center, + style: TextStyle( + color: candyApple, + ), + ), + content: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + IconButton( + icon: Icon(Icons.share), + tooltip: 'share link to another app', + iconSize: 48, + onPressed: () { + Navigator.of(context).pop(); + Share.share(widget.mapLocation); + }, + ), + IconButton( + icon: Icon(Icons.map), + tooltip: 'share link to maps', + iconSize: 48, + onPressed: () { + Navigator.of(context).pop(); + _launchUrl(); + }, + ), + ], + ), + ); + } + ); + }, + ), + ), + Expanded( + flex: 7, + child: InkWell( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: createLocation(locationStringList), + ), + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + backgroundColor: ivory, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + margin: EdgeInsets.only( + bottom: 25, + ), + child: Text( + widget.mapLocation, + textAlign: TextAlign.center, + ), + ), + RaisedButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + color: peacockBlue, + child: Container( + margin: EdgeInsets.only( + top: 12, + bottom: 20, + ), + child: Text( + 'ok', + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + ), + onPressed: () { + Navigator.of(context).pop(); + } + ), + ], + ), + ); + } + ); + }, + ), + ), + ], + ); + } catch(e) { + print('$e, probably could not call createLocation(locationStringList)'); + return Wrap( + spacing: 20.0, + children: [ + Text( + 'Pending...', + style: TextStyle(height: textHeight), + ), + ], + ); + + } + } + + List _getlocationStringList(String mapLocation) { + List stringList; + try { + stringList = mapLocation.split('\n'); + } catch(e) { + print('$e in source file location.dart._getlocationStringList::first_try'); + } + if (stringList.length < 2) { + return ['','pending...','']; + } else { + try { + if (stringList[1].contains(stringList[0])) { + stringList.removeAt(0); + } + } catch(e) { + print('$e in source file location.dart._getlocationStringList::second_try'); + } + // split up long address lines on the second to last comma + for (int i=0; i 1) { + String currentLine = stringList[i]; + stringList.removeAt(i); + int commaCount = 0; + for (int j=0; j runApp(MainApp()); class MainApp extends StatelessWidget { @override Widget build(BuildContext context) { - return new MaterialApp( - title: 'Lat\'n Long Share', - theme: new ThemeData( + return MaterialApp( + title: 'Libre Gps Parser', + theme: ThemeData( primaryColor: navy, ), home: LatNLong(), @@ -24,43 +34,42 @@ class MainApp extends StatelessWidget { class LatNLong extends StatefulWidget { @override - _LatNLongState createState() => new _LatNLongState(); + _LatNLongState createState() => _LatNLongState(); } class _LatNLongState extends State { // https://stackoverflow.com/a/32437518 <- to here for time zone api info final dbHelper = DatabaseHelper.instance; static const platform = const MethodChannel('app.channel.shared.data'); - RegExp gmapExp = new RegExp(r'(https://maps.app.goo.gl/)(.*$)'); + // "static" variables are hard-coded into the class rather than instances + static RegExp gmapExp = RegExp(r'(https://maps.app.goo.gl/|https://maps.google.com/)(.*$)'); String widgetMapLocation = "none"; String latnLong = "none"; String latnLongDMS = "none"; - int elevation; - int feetElevation; - Map _weather = { - "id":0, - "weather":[ - { - "description":"none", - "icon":"none" - } - ], - "main": { - "temp":0, - "pressure":0, - "humidity":0, - "temp_min":0, - "temp_max":0 - }, - "visibility":0, - "wind": { - "speed":0, - "deg":0 - }, - "dt":0, - "sunrise":0, - "sunset":0 - }; + int elevation = 0; + int feetElevation = 0; + int weatherLocationID = 0; + int weatherCurrentDT = 1556104969; + String weatherConditions = ''; + String weatherConditionsIcon = '01d'; + double weatherCurrentTemp = 0.1; + double weatherCurrentPressure = 0.0; + int weatherCurrentHumidity = 0; + double weatherCurrentTempMin = 0.1; + double weatherCurrentTempMax = 0.1; + int weatherCurrentVisibility = 0; + double weatherCurrentWindSpd = 0.1; + int weatherCurrentWindDir = 0; + int weatherCurrentSunrise = 1556104969; + int weatherCurrentSunset = 1556104969; + int timeOffSet = -1; + int timeOffSetTime = -1; + int isAutoTimeOffSet = 1; + String weatherForeCast = "none"; + final double textHeight = 1.5; + String notes = ''; + bool _useElev = false; + bool _useWTHR = false; @override void initState() { @@ -70,94 +79,761 @@ class _LatNLongState extends State { @override Widget build(BuildContext context) { - return new Scaffold( - backgroundColor: peacock_blue, - appBar: new AppBar( - leading: Builder( - builder: (BuildContext context) { - return IconButton( - icon: const Icon(Icons.settings), onPressed: _settings); - }, + final double _deviceShortestSide = MediaQuery.of(context).size.shortestSide; + + Widget _timezone() { + return TimeZone( + parentAction: this._userTzOffset, + timeOffSet: this.timeOffSet, + timeOffSetTime: this.timeOffSetTime, + isAutoTimeOffSet: this.isAutoTimeOffSet + ); + } + + InkWell _delete() { + return InkWell( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + Icons.delete, + size: 48.0, + color: candyApple, + ), + ], ), - title: new Text('Lat N Long Share'), - actions: [ - new IconButton(icon: const Icon(Icons.list), onPressed: _pushSaved), + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + backgroundColor: ivory, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + title: Text( + 'Really?', + textAlign: TextAlign.center, + style: TextStyle( + color: candyApple, + ), + ), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + 'Delete this location from', + textAlign: TextAlign.center, + ), + Text( + 'the face of the earth forever?', + textAlign: TextAlign.center, + ), + Container( + margin: EdgeInsets.only( + top: 40, + bottom: 10, + ), + child: Wrap( + runSpacing: 30, + children: [ + Container( + margin: EdgeInsets.symmetric( + horizontal: 15, + ), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + height: 75, + child: RaisedButton( + color: peacockBlue, + child: Text( + "launch iCBMs!", + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + onPressed: () { + Navigator.of(context).pop(); + _deleteLocation(); + } + ), + ), + ), + Container( + margin: EdgeInsets.symmetric( + horizontal: 15, + ), + child: ButtonTheme( + height: 75, + child: RaisedButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + color: peacockBlue, + child: Text( + "oops! nvrmnd!", + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + onPressed: () { + Navigator.of(context).pop(); + } + ), + ), + ), + ], + ), + ), + ], + ), + ); + } + ); + }, + ); + } + + Row _editNotes() { + return Row( + children: [ + Expanded( + flex: 5, + child: InkWell( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + Icons.edit, + size: 48.0, + color: Colors.black, + ), + ], + ), + onTap: () async{ + String _noteText = await Navigator.push( + context, + MaterialPageRoute(builder: (context) => EditNotes(mapLocation: this.widgetMapLocation,)), + ); + if ((_noteText != null) && (_noteText != this.notes)) { + setState(() { + this.notes = _noteText; + }); + } + }, + ), + ), + ((this.notes.length > 0) ? Expanded( + flex: 5, + child: Container( + decoration: BoxDecoration( + border: Border( + left: BorderSide( + width: 1.0, + color: Colors.black, + ), + ), + ), + child: InkWell( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + Icons.view_agenda, + size: 48.0, + color: Colors.black, + ), + ], + ), + onTap: () async{ + await Navigator.push( + context, + MaterialPageRoute(builder: (context) => RenderNotes(notes: this.notes,)), + ); + }, + ), + ), + ) : Container()), ], - ), - body: SingleChildScrollView( - child: new Container( - padding: EdgeInsets.all(20.0), - child: new Wrap( - spacing: 20.0, - runSpacing: 20.0, - alignment: WrapAlignment.spaceAround, - children: [ + ); + } + + Container _top() { + if (_deviceShortestSide < 400) { + return Container( + child: Column( + children: [ Container( + margin: EdgeInsets.only( + left: 6, + top: 6, + right: 6, + bottom: 3, + ), padding: myBoxPadding, decoration: myBoxDecoration(ivory), - child: Text( - 'DD / DMS: \n(${this.latnLong})\n(${this.latnLongDMS})' , + child: (this.latnLong != null) ? lnlDec(this.latnLong) : lnlDec('none') , + ), + IntrinsicHeight( + child: Row( + children: [ + Expanded( + flex: 7, + child: Container( + margin: EdgeInsets.only( + left: 6, + top: 3, + right: 6, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: (this.latnLongDMS != null) ? lnlDeg(this.latnLongDMS) : lnlDeg('none'), + ), + ), + ], ), ), - Container( - padding: myBoxPadding, - decoration: myBoxDecoration(ivory), - child: Text( - this.widgetMapLocation, + IntrinsicHeight( + child: Row( + children: [ + Expanded( + flex: 5, + child: Container( + margin: EdgeInsets.only( + left: 6, + top: 3, + right: 3, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: _editNotes(), + ), + ), + Expanded( + flex: 5, + child: Container( + margin: EdgeInsets.only( + left: 3, + top: 3, + right: 6, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: streetView(this.latnLong), + ), + ), + ], ), ), - Container( - padding: myBoxPadding, - decoration: myBoxDecoration(ivory), - child: Text( - 'elevation: ${this.feetElevation.toString()} feet, ${this.elevation.toString()} meters', + IntrinsicHeight( + child: Row( + children: [ + Expanded( + flex: 7, + child: Container( + margin: EdgeInsets.only( + left: 6, + top: 3, + right: 6, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: Location( + mapLocation: this.widgetMapLocation, + ), + ), + ), + ], + ), + ), + IntrinsicHeight( + child: Row( + children: [ + Expanded( + flex: 3, + child: Container( + margin: EdgeInsets.only( + left: 6, + top: 3, + right: 3, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: aboutApp(context), + ), + ), + ((this._useElev) ? Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only( + left: 3, + top: 3, + right: 3, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: elevAtion(context, this.elevation, this.feetElevation), + ), + ) : Container()), + Expanded( + flex: 3, + child: Container( + margin: EdgeInsets.only( + left: 3, + top: 3, + right: 6, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: _delete(), + ), + ), + ], + ), + ), + IntrinsicHeight( + child: Row( + children: [ + ((this._useWTHR) ? Expanded( + flex: 7, + child: Container( + margin: EdgeInsets.only( + left: 6, + top: 3, + right: 6, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: _timezone(), + ), + ) : Container()), + ], ), ), - Weather(weather: this._weather,), ], ), - ), + ); + } else if ((_deviceShortestSide >= 400) && (_deviceShortestSide < 650)) { + return Container( + child: Column( + children: [ + IntrinsicHeight( + child: Row( + children: [ + Expanded( + flex: 7, + child: Container( + margin: EdgeInsets.only( + left: 6, + top: 6, + right: 3, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: (this.latnLongDMS != null) ? lnlDeg(this.latnLongDMS) : lnlDeg('none'), + ), + ), + Expanded( + flex: 3, + child: Container( + margin: EdgeInsets.only( + left: 3, + top: 6, + right: 6, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: _delete(), + ), + ), + ], + ), + ), + Container( + margin: EdgeInsets.only( + left: 6, + top: 3, + right: 6, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: (this.latnLong != null) ? lnlDec(this.latnLong) : lnlDec('none') , + ), + IntrinsicHeight( + child: Row( + children: [ + Expanded( + flex: 5, + child: Container( + margin: EdgeInsets.only( + left: 6, + top: 3, + right: 3, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: _editNotes(), + ), + ), + Expanded( + flex: 5, + child: Container( + margin: EdgeInsets.only( + left: 3, + top: 3, + right: 6, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: streetView(this.latnLong), + ), + ), + ], + ), + ), + IntrinsicHeight( + child: Row( + children: [ + Expanded( + flex: 7, + child: Container( + margin: EdgeInsets.only( + left: 6, + top: 3, + right: 3, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: Location( + mapLocation: this.widgetMapLocation, + ), + ), + ), + Expanded( + flex: 3, + child: Container( + margin: EdgeInsets.only( + left: 3, + top: 3, + right: 6, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: aboutApp(context), + ), + ), + ], + ), + ), + IntrinsicHeight( + child: Row( + children: [ + ((this._useElev) ? Expanded( + flex: 3, + child: Container( + margin: EdgeInsets.only( + left: 6, + top: 3, + right: (this._useWTHR) ? 3 : 6, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: elevAtion(context, this.elevation, this.feetElevation), + ), + ) : Container()), + ((this._useWTHR) ? Expanded( + flex: 7, + child: Container( + margin: EdgeInsets.only( + left: (this._useElev) ? 3 : 6, + top: 3, + right: 6, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: _timezone(), + ), + ) : Container()), + ], + ), + ), + ], + ), + ); + } else if (_deviceShortestSide >= 650) { + return Container( + child: Column( + children: [ + IntrinsicHeight( + child: Row( + children: [ + Expanded( + flex: 3, + child: Container( + margin: EdgeInsets.only( + left: 6, + top: 6, + right: 3, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: _editNotes(), + ), + ), + Expanded( + flex: 5, + child: Container( + margin: EdgeInsets.only( + left: 3, + top: 6, + right: 3, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: (this.latnLong != null) ? lnlDec(this.latnLong) : lnlDec('none'), + ), + ), + Expanded( + flex: 2, + child: Container( + margin: EdgeInsets.only( + left: 3, + top: 6, + right: 6, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: _delete(), + ), + ), + ], + ), + ), + IntrinsicHeight( + child: Row( + children: [ + Expanded( + flex: 5, + child: Container( + margin: EdgeInsets.only( + left: 6, + top: 3, + right: 3, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: (this.latnLongDMS != null) ? lnlDeg(this.latnLongDMS) : lnlDeg('none'), + ), + ), + Expanded( + flex: 3, + child: Container( + margin: EdgeInsets.only( + left: 3, + top: 3, + right: 3, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: streetView(this.latnLong), + ), + ), + Expanded( + flex: 2, + child: Container( + margin: EdgeInsets.only( + left: 3, + top: 3, + right: 6, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: aboutApp(context), + ), + ), + ], + ), + ), + IntrinsicHeight( + child: Row( + children: [ + Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only( + left: 6, + top: 3, + right: 3, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: Location( + mapLocation: this.widgetMapLocation, + ), + ), + ), + ((this._useElev) ? Expanded( + flex: 2, + child: Container( + margin: EdgeInsets.only( + left: 3, + top: 3, + right: (this._useWTHR) ? 3 : 6, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: elevAtion(context, this.elevation, this.feetElevation), + ), + ) : Container()), + ((this._useWTHR) ? Expanded( + flex: 4, + child: Container( + margin: EdgeInsets.only( + left: 3, + top: 3, + right: 6, + bottom: 3, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: _timezone(), + ), + ) : Container()), + ], + ), + ), + ], + ), + ); + } + } + + return Scaffold( + backgroundColor: peacockBlue, + body: CustomScrollView( + slivers: [ + SliverAppBar( + floating: true, + snap: false, + pinned: false, + expandedHeight: 50, + leading: Builder( + builder: (BuildContext context) { + return IconButton( + icon: const Icon(Icons.settings), onPressed: _settings); + }, + ), + title: Text('Libre Gps Parser'), + actions: [ + IconButton(icon: const Icon(Icons.list), onPressed: _pushSaved), + ], + ), + SliverToBoxAdapter( + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + _top(), + ((this._useWTHR) ? Weather( + weatherLocationID: this.weatherLocationID, + weatherConditions: this.weatherConditions, + weatherConditionsIcon: this.weatherConditionsIcon, + weatherCurrentTemp: this.weatherCurrentTemp, + weatherCurrentPressure: this.weatherCurrentPressure, + weatherCurrentHumidity: this.weatherCurrentHumidity, + weatherCurrentTempMin: this.weatherCurrentTempMin, + weatherCurrentTempMax: this.weatherCurrentTempMax, + weatherCurrentVisibility: this.weatherCurrentVisibility, + weatherCurrentWindSpd: this.weatherCurrentWindSpd, + weatherCurrentWindDir: this.weatherCurrentWindDir, + weatherCurrentSunrise: this.weatherCurrentSunrise, + weatherCurrentSunset: this.weatherCurrentSunset, + weatherCurrentDT: this.weatherCurrentDT, + timeOffSet: this.timeOffSet, + parentAction: this._refreshWeather, + ) : Container()), + ((this._useWTHR) ? WeatherForeCast( + weatherForeCast: this.weatherForeCast, + timeOffSet: this.timeOffSet, + ) : Container()), + ], + ), + ), + ], ), ); } - void _settings() { - Navigator.push( - context, - MaterialPageRoute(builder: (context) => Settings()), + void _settings() async{ + int newSetting = await Navigator.push( + context, + MaterialPageRoute(builder: (context) => Settings()), ); + if (newSetting != null) { + await _getUseElevPref(); + } } - void _pushSaved() async { - List sorted_Map_Locations = await dbHelper.sortedMapLocations(); + void _pushSaved() async{ + List sortedMapLocations = await dbHelper.sortedMapLocations(); await Navigator.of(context).push( - new MaterialPageRoute( + MaterialPageRoute( builder: (BuildContext context) { - return new Scaffold( - backgroundColor: peacock_blue, - appBar: new AppBar( + return Scaffold( + backgroundColor: peacockBlue, + appBar: AppBar( title: const Text('Previous Locations'), ), - body: _buildHistory(sorted_Map_Locations), + body: _buildHistory(sortedMapLocations), ); }, ), ); } - Widget _buildHistory(List sorted_Map_Locations) { - return new ListView.builder( - itemCount: sorted_Map_Locations.length, + Widget _buildHistory(List sortedMapLocations) { + return ListView.builder( + itemCount: sortedMapLocations.length, itemBuilder: (BuildContext ctxt, int i) { - return new InkWell( + return InkWell( onTap: () { - selectMapLocation(sorted_Map_Locations[i]); + selectMapLocation(sortedMapLocations[i]); Navigator.of(context).pop(); }, - child: new Card( + child: Card( margin: EdgeInsets.all(4.0), color: Colors.black, - child: new Card( + child: Card( margin: EdgeInsets.all(4.0), color: ivory, child: Padding( @@ -166,14 +842,14 @@ class _LatNLongState extends State { children: [ Expanded( child: Text( - sorted_Map_Locations[i], + sortedMapLocations[i], ), ), Container( - child: new Icon( + child: Icon( Icons.arrow_right, size: 50.0, - color: candy_apple, + color: candyApple, ), ), ], @@ -202,112 +878,219 @@ class _LatNLongState extends State { }); } } - await _Create_Row_If_Needed(sharedData); - await _populateLatNLong(sharedData); + await _createRowIfNeeded(sharedData); + await _getUseElevPref(); + await _populateNotes(sharedData); } - Future _populateWeather(String mapLocation, String latLong) async { - String weather = await getWeather(mapLocation,latLong); - if (weather != null) { - Map weatherJson = jsonDecode(weather); - if (weatherJson != this._weather) { + Future _populateNotes(String mapLocation) async{ + String _notes = await dbHelper.queryNotes(mapLocation); + if ((_notes != null) || (_notes != this.notes)) { + if ((mapLocation.contains('Plataea')) && (_notes.length == 0)) { + _notes = defaultPlataeaNotes; + } + setState(() { + this.notes = _notes; + }); + } + } + + Future _populateWeatherForeCast( + String mapLocation, String latLong) async { + if ((this._useWTHR) && (latLong != null)) { + String weatherForeCast = + await getWeatherForeCast(mapLocation, latLong, false); + if (weatherForeCast == 'NA') { + weatherForeCast = await getWeatherForeCast(mapLocation, latLong, true); + } + if (weatherForeCast != null) { setState(() { - this._weather = weatherJson; + this.weatherForeCast = weatherForeCast; + }); + Map weatherForeCastJson = jsonDecode(weatherForeCast); + int _threeHoursAgo = (newTimeStamp() - 10800); + if (weatherForeCastJson['list'][1]['dt'] < _threeHoursAgo) { + weatherForeCast = await getWeatherForeCast(mapLocation, latLong, true); + setState(() { + this.weatherForeCast = weatherForeCast; + }); + } + } + } + } + + Future _refreshWeather() async{ + await _populateWeather(this.widgetMapLocation,this.latnLong); + await _populateWeatherForeCast(this.widgetMapLocation,this.latnLong); + } + + Future _populateWeather(String mapLocation, String latLong) async{ + if ((this._useWTHR) && (latLong != null)) { + String weather = await getWeather(mapLocation, latLong, false); + if (weather == 'NA') { + weather = await getWeather(mapLocation, latLong, true); + } + if (weather != null) { + Map weatherJson = jsonDecode(weather); + _updateWeather(weatherJson, latLong); + int timeStamp = newTimeStamp(); + if ((timeStamp - weatherJson['dt']) > 3600) { + String _newweather = await getWeather(mapLocation, latLong, true); + Map _newweatherJson = jsonDecode(_newweather); + _updateWeather(_newweatherJson, latLong); + } + } + } + } + + Future _updateWeather(Map weatherJson,String latLong) async { + if (this._useWTHR) { + int _weatherId = (weatherJson['id'] != 0) ? weatherJson['id']: generateFakeWeatherId(latLong); + if ((_weatherId != this.weatherLocationID) || + (weatherJson['dt'] != this.weatherCurrentDT)) { + double tempTemp = (weatherJson['main']['temp'] != null) + ? (weatherJson['main']['temp']).toDouble() + : 0; + double tempPressure = (weatherJson['main']['pressure'] != null) + ? (weatherJson['main']['pressure']).toDouble() + : 0.0; + int tempHumidity = (weatherJson['main']['humidity'] != null) + ? (weatherJson['main']['humidity']).round() + : 0; + double tempTempMin = (weatherJson['main']['temp_min'] != null) + ? (weatherJson['main']['temp_min']).toDouble() + : 0; + double tempTempMax = (weatherJson['main']['temp_max'] != null) + ? (weatherJson['main']['temp_max']).toDouble() + : 0; + double tempWindSpd = (weatherJson['wind']['speed'] != null) + ? (weatherJson['wind']['speed']).toDouble() + : 0; + int tempWindDir = (weatherJson['wind']['deg'] != null) + ? (weatherJson['wind']['deg']).round() + : 0; + setState(() { + this.weatherLocationID = _weatherId; + this.weatherCurrentDT = weatherJson['dt']; + this.weatherConditions = weatherJson['weather'][0]['description']; + this.weatherConditionsIcon = weatherJson['weather'][0]['icon']; + this.weatherCurrentTemp = tempTemp; + this.weatherCurrentPressure = tempPressure; + this.weatherCurrentHumidity = tempHumidity; + this.weatherCurrentTempMin = tempTempMin; + this.weatherCurrentTempMax = tempTempMax; + this.weatherCurrentVisibility = weatherJson['visibility']; + this.weatherCurrentWindSpd = tempWindSpd; + this.weatherCurrentWindDir = tempWindDir; + this.weatherCurrentSunrise = weatherJson['sys']['sunrise']; + this.weatherCurrentSunset = weatherJson['sys']['sunset']; }); } } } Future _populateElevation(String mapLocation) async { - await dbHelper.queryElevation(mapLocation).then((int elev) { - if (elev != this.elevation) { + if (this._useElev) { + await dbHelper.queryElevation(mapLocation).then((int elev) { + if (elev != this.elevation) { + if (elev != null) { + setState(() { + this.elevation = elev; + this.feetElevation = (elev * 3.28084).round(); + }); + } + } + if (elev == null) { + final int timeStamp = newTimeStamp(); + updateElevation(timeStamp, mapLocation); + } + }); + } + } + + Future updateElevation(int timeStamp, String mapLocation) async { + if (this._useElev) { + await fetchElevation(mapLocation).then((int elev) { if (elev != null) { setState(() { this.elevation = elev; this.feetElevation = (elev * 3.28084).round(); }); + } else { + setState(() { + this.elevation = null; + this.feetElevation = null; + }); } - } - if (elev == null) { - final int timeStamp = newTimeStamp(); - updateElevation(timeStamp, mapLocation); - } - }); + Map row = { + DatabaseHelper.columnMapLocation: mapLocation, + DatabaseHelper.columnElevTime: timeStamp, + DatabaseHelper.columnElev: elev + }; + dbHelper.update(row); + }); + } } - Future updateElevation(int timeStamp, String mapLocation) async { - await fetchElevation(mapLocation).then((int elev) { - if (elev != null) { - setState(() { - this.elevation = elev; - this.feetElevation = (elev * 3.28084).round(); - }); - } else { - setState(() { - this.elevation = null; - this.feetElevation = null; - }); - - } - Map row = { - DatabaseHelper.columnMapLocation: mapLocation, - DatabaseHelper.columnElevTime: timeStamp, - DatabaseHelper.columnElev: elev - }; - dbHelper.update(row); - }); - } - - Future _populateLatNLong(String mapLocation) async { - await dbHelper.queryLatNLong(mapLocation).then((String lat_long) { - if ((lat_long != this.latnLong) && (lat_long != 'NA')) { + await dbHelper.queryLatNLong(mapLocation).then((String lattLong) { + if (lattLong != 'NA') { _populateElevation(mapLocation); - _populateWeather(mapLocation, lat_long); - setState(() { - this.latnLong = lat_long; - this.latnLongDMS = convertCoordinates(lat_long); - }); - } - if (lat_long == 'NA') { + _populateWeather(mapLocation, lattLong); + _populateWeatherForeCast(mapLocation, lattLong); + _populateTimeOffSet(mapLocation, lattLong); + if (lattLong != this.latnLong) { + setState(() { + this.latnLong = lattLong; + this.latnLongDMS = convertCoordinates(lattLong); + }); + } + } else if (lattLong == 'NA') { final int timeStamp = newTimeStamp(); - updateLatNLong(timeStamp, mapLocation); + _updateLatNLong(timeStamp, mapLocation); } }); } - Future updateLatNLong(int timeStamp, String mapLocation) async { + Future _updateLatNLong(int timeStamp, String mapLocation) async { String mapUrl = gmapExp.stringMatch(mapLocation); - await parseMapUrl(mapUrl).then((String lat_long) { + await parseMapUrl(mapUrl).then((String lattLong) { setState(() { - this.latnLong = lat_long; - this.latnLongDMS = convertCoordinates(lat_long); + this.latnLong = lattLong; + this.latnLongDMS = convertCoordinates(lattLong); }); Map row = { DatabaseHelper.columnMapLocation: mapLocation, DatabaseHelper.columnLnlTime: timeStamp, - DatabaseHelper.columnLatLong: lat_long + DatabaseHelper.columnLatLong: lattLong }; dbHelper.update(row); updateElevation(timeStamp, mapLocation); - _populateWeather(mapLocation, lat_long); + _populateWeather(mapLocation, lattLong); + _populateWeatherForeCast(mapLocation, lattLong); + _populateTimeOffSet(mapLocation, lattLong); }); } Future selectMapLocation(String mapLocation) async { - int time_Stamp = newTimeStamp(); + int timesStamp = newTimeStamp(); Map row = { DatabaseHelper.columnMapLocation: mapLocation, - DatabaseHelper.columnViewTime: time_Stamp + DatabaseHelper.columnViewTime: timesStamp }; setState(() { this.widgetMapLocation = mapLocation; + this.weatherConditions = ''; + this.weatherForeCast = 'none'; + this.timeOffSet = -1; + this.timeOffSetTime = -1; }); await dbHelper.update(row); - await _populateLatNLong(mapLocation); + await _getUseElevPref(); + await _populateNotes(mapLocation); } - Future _Create_Row_If_Needed(String mapLocation) async { + Future _createRowIfNeeded(String mapLocation) async { final int rowExists = await dbHelper.queryRowExists(mapLocation); final int timeStamp = newTimeStamp(); if (rowExists == 0) { @@ -315,7 +1098,76 @@ class _LatNLongState extends State { DatabaseHelper.columnMapLocation: mapLocation, DatabaseHelper.columnViewTime: timeStamp }; - final id = await dbHelper.insert(row); + await dbHelper.insert(row); } } + + Future _deleteLocation() async{ + String _secondNewest = await dbHelper.querySecondNewestMapLocation(); + if (_secondNewest != 'none') { + String locationToBeDeleted = this.widgetMapLocation; + await selectMapLocation(_secondNewest); + await dbHelper.delete(locationToBeDeleted); + } + } + + Future _populateTimeOffSet(String mapLocation, String latLong) async { + if ((this._useWTHR) && (latLong != null)) { + List _timeOffSet = await getTimeOffSet(mapLocation, latLong); + setState(() { + this.timeOffSet = _timeOffSet[0]; + this.timeOffSetTime = _timeOffSet[1]; + this.isAutoTimeOffSet = _timeOffSet[2]; + }); + } + } + + Future _userTzOffset(int offset) async{ + if (this._useWTHR) { + if (offset > 1999) { // 2001 is magic number for auto + List _timeOffSet = await refreshTimeOffSet(this.widgetMapLocation,this.latnLong); + setState(() { + this.timeOffSet = _timeOffSet[0]; + this.timeOffSetTime = _timeOffSet[1]; + this.isAutoTimeOffSet = 1; + }); + Map row = { + DatabaseHelper.columnMapLocation: this.widgetMapLocation, + DatabaseHelper.columnIsAutoTimeOffset: 1 + }; + await dbHelper.update(row); + } else if (offset < 2000) { + setState(() { + this.timeOffSet = offset; + this.isAutoTimeOffSet = 0; + }); + Map row = { + DatabaseHelper.columnMapLocation: this.widgetMapLocation, + DatabaseHelper.columnTimeOffSet: offset, + DatabaseHelper.columnIsAutoTimeOffset: 0 + }; + await dbHelper.update(row); + } + } + } + + Future _getUseElevPref() async{ + bool _useElevation = await getPreferenceUseElevation(); + if (_useElevation != _useElev) { + setState(() { + this._useElev = _useElevation; + }); + } + await _getUseWeatherPref(); + } + + Future _getUseWeatherPref() async{ + bool _useWeather = await getPreferenceUseWeather(); + if (_useWeather != _useWTHR) { + setState(() { + this._useWTHR = _useWeather; + }); + } + await _populateLatNLong(this.widgetMapLocation); + } } diff --git a/lib/render_notes.dart b/lib/render_notes.dart new file mode 100644 index 0000000..da9f68a --- /dev/null +++ b/lib/render_notes.dart @@ -0,0 +1,296 @@ +import 'package:permission_handler/permission_handler.dart'; +import 'package:flutter_markdown/flutter_markdown.dart'; +import 'package:path_provider/path_provider.dart'; +import 'package:flutter/material.dart'; +import 'global_helper_functions.dart'; +import 'dart:io'; + +class RenderNotes extends StatefulWidget { + final String notes; + + RenderNotes({ + Key key, + this.notes, + }) : super(key: key); + + @override + _RenderNotesState createState() => _RenderNotesState(); +} + +class _RenderNotesState extends State { + final double textHeight = 1.5; + final _textEditingController = TextEditingController(); + String _exportFileNameString = ''; + String fileName = ''; + + @override + void initState() { + super.initState(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: ivory, + body: CustomScrollView( + slivers: [ + SliverAppBar( + floating: true, + snap: false, + pinned: false, + expandedHeight: 50, + title: const Text('Notes, MarkDown Supported'), + ), + SliverToBoxAdapter( + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + Container( + margin: EdgeInsets.symmetric( + horizontal: 10.0, + ), + child: MarkdownBody( + data: widget.notes, + ), + ), + Row( + children: [ + Expanded( + child: Container(), + ), + Container( + margin: EdgeInsets.all(20.0), + child: ButtonTheme( + height: 55, + padding: EdgeInsets.only( + top: 5, + right: 12, + bottom: 12, + left: 10 + ), + child: RaisedButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + color: peacockBlue, + child: Text( + 'Export', + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + onPressed: () async{ + Map _storagePermissions; + PermissionStatus _storagePermission = await PermissionHandler().checkPermissionStatus(PermissionGroup.storage); + if (_storagePermission == PermissionStatus.denied) { + _storagePermissions = await PermissionHandler().requestPermissions([PermissionGroup.storage]); + } + if ((_storagePermission == PermissionStatus.granted) || (_storagePermissions.toString() == PermissionStatus.granted.toString())) { + Directory sdcard = await getExternalStorageDirectory(); + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + backgroundColor: ivory, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + title: Text( + 'File Name To Save As?', + textAlign: TextAlign.center, + style: TextStyle( + color: candyApple, + ), + ), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + TextField( + controller: _textEditingController, + keyboardType: TextInputType.multiline, + maxLines: null, + decoration: InputDecoration( + hintText: 'i.e. timbuktu.md', + ), + onChanged: (text) { + _exportFileNameString = text; + }, + ), + Container( + margin: EdgeInsets.only( + top: 40, + bottom: 10, + ), + child: ButtonTheme( + height: 55, + padding: EdgeInsets.only( + top: 5, + right: 12, + bottom: 12, + left: 10 + ), + child: RaisedButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + color: peacockBlue, + child: Text( + 'Export', + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + onPressed: () async{ + if (this._exportFileNameString.length > 0) { + String _fileName = '${sdcard.path}/${this._exportFileNameString}'; + File _file = File(_fileName); + File _result = await _file.writeAsString(widget.notes); + Navigator.of(context).pop(); + if (_result == null) { + setState(() { + this.fileName = _fileName; + }); + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + backgroundColor: ivory, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + title: Text( + 'Writing To\n\'$fileName\'\n(sdcard) Failed!', + textAlign: TextAlign.center, + style: TextStyle( + color: candyApple, + ), + ), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + margin: EdgeInsets.only( + top: 40, + bottom: 10, + ), + child: ButtonTheme( + height: 55, + padding: EdgeInsets.only( + top: 5, + right: 12, + bottom: 12, + left: 10 + ), + child: RaisedButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + color: peacockBlue, + child: Text( + 'OK', + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + onPressed: () async{ + Navigator.of(context).pop(); + } + ), + ), + ), + ], + ), + ); + } + ); + } else { + setState(() { + this.fileName = _fileName; + }); + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + backgroundColor: ivory, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + title: Text( + 'Writing To\n\'$fileName\'\n(sdcard) Succeeded!', + textAlign: TextAlign.center, + style: TextStyle( + color: candyApple, + ), + ), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Container( + margin: EdgeInsets.only( + top: 40, + bottom: 10, + ), + child: ButtonTheme( + height: 55, + padding: EdgeInsets.only( + top: 5, + right: 12, + bottom: 12, + left: 10 + ), + child: RaisedButton( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + color: peacockBlue, + child: Text( + 'OK', + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + onPressed: () async{ + Navigator.of(context).pop(); + } + ), + ), + ), + ], + ), + ); + } + ); + } + } + } + ), + ), + ), + ], + ), + ); + } + ); + } + } + ), + ), + ), + ], + ), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/settings.dart b/lib/settings.dart index 80855a4..9b374a6 100644 --- a/lib/settings.dart +++ b/lib/settings.dart @@ -1,18 +1,20 @@ -import 'package:shared_preferences/shared_preferences.dart'; import 'package:flutter/material.dart'; import 'global_helper_functions.dart'; class Settings extends StatefulWidget { @override - _SettingsState createState() => new _SettingsState(); + _SettingsState createState() => _SettingsState(); } class _SettingsState extends State { String elevationServer = "none"; - String openWeatherMapKey = "none"; + String openWeatherMapKey = "none??"; String shortOWMAK = "none"; final _elevationServerController = TextEditingController(); final _oWMKController = TextEditingController(); + bool _useElevation = false; + bool _useWeather = false; + double textHeight = 1.5; @override void initState() { @@ -22,132 +24,218 @@ class _SettingsState extends State { @override Widget build(BuildContext context) { - return new Scaffold( - backgroundColor: peacock_blue, - appBar: new AppBar( - title: const Text('Settings'), - ), - body: new ListView( - children: [ - new Container( - padding: myBoxPadding, - decoration: myBoxDecoration(ivory), - child: Column( - children: [ - Text( - 'Open-Elevation Api Server to Use', - ), - Text( - 'Current Value: ' + this.elevationServer, - ), - TextField( - controller: _elevationServerController, - decoration: InputDecoration( - hintText: this.elevationServer, - ), - ), - Container( - margin: EdgeInsets.only( - top: 20.0, - bottom: 5.0, - ), - child: RaisedButton.icon( - label: Text( - "Update Elevation Server", - ), - icon: Icon( - Icons.refresh, - size: 50.0, - ), - color: candy_apple, - onPressed: () { _updateElevationServer(); }, + return WillPopScope( + onWillPop: _popBack, + child: Scaffold( + backgroundColor: peacockBlue, + appBar: AppBar( + title: const Text('Settings'), + ), + body: ListView( + children: [ + Container( + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: Row( + children: [ + Expanded( + child: Text( + 'Enable Elevation Api Server?', + style: TextStyle( + height: textHeight, + fontSize: 20, ), - ), - ], + ), ), - ), - new Container( - padding: myBoxPadding, - decoration: myBoxDecoration(ivory), - child: Column( - children: [ - Text( - 'Open Weather Map Api Key to Use', - ), - Text( - 'Current Value: ${this.shortOWMAK}...', - ), - TextField( - controller: _oWMKController, - decoration: InputDecoration( - hintText: '${this.shortOWMAK}...', - ), - ), - Container( - margin: EdgeInsets.only( - top: 20.0, - bottom: 5.0, - ), - child: RaisedButton.icon( - label: Text( - "Update ... Api Key", - ), - icon: Icon( - Icons.refresh, - size: 50.0, - ), - color: candy_apple, - onPressed: () { _updateOpenWeatherMapApiKey(); }, + Container( + padding: EdgeInsets.all(15.0), + child: Transform.scale( + scale: 2, + child: Switch( + value: this._useElevation, + onChanged: (value) { + setPreferenceUseElevation(value).then((bool committed) { + setState(() { + this._useElevation = value; + }); + }); + }, + activeTrackColor: peacockBlue, + activeColor: navy, + inactiveThumbColor: candyApple, ), - ), - ], + ), ), + ], ), + ), + ((this._useElevation) ? Container( + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: Column( + children: [ + Text( + 'Open-Elevation Api Server to Use', + ), + Text( + 'Current Value: ${this.elevationServer}', + ), + TextField( + controller: _elevationServerController, + decoration: InputDecoration( + hintText: this.elevationServer, + ), + ), + Container( + margin: EdgeInsets.only( + top: 20.0, + bottom: 5.0, + ), + child: RaisedButton.icon( + label: Text( + "Update Elevation Server", + ), + icon: Icon( + Icons.refresh, + size: 50.0, + ), + color: candyApple, + onPressed: () { + _updateElevationServer(); + }, + ), + ), + ], + ), + ) : Container()), + Container( + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: Row( + children: [ + Expanded( + child: Text( + 'Use OpenWeatherMap Weather?', + style: TextStyle( + height: textHeight, + fontSize: 20, + ), + ), + ), + Container( + padding: EdgeInsets.all(15.0), + child: Transform.scale( + scale: 2, + child: Switch( + value: this._useWeather, + onChanged: (value) { + setPreferenceUseWeather(value).then((bool committed) { + setState(() { + this._useWeather = value; + }); + }); + }, + activeTrackColor: peacockBlue, + activeColor: navy, + inactiveThumbColor: candyApple, + ), + ), + ), + ], + ), + ), + ((this._useWeather) ? Container( + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: Column( + children: [ + Text( + 'Open Weather Map Api Key to Use', + ), + Text( + 'Current Value: ${this.shortOWMAK}...', + ), + TextField( + controller: _oWMKController, + decoration: InputDecoration( + hintText: '${this.shortOWMAK}...', + ), + ), + Container( + margin: EdgeInsets.only( + top: 20.0, + bottom: 5.0, + ), + child: RaisedButton.icon( + label: Text( + "Update ... Api Key", + ), + icon: Icon( + Icons.refresh, + size: 50.0, + ), + color: candyApple, + onPressed: () { + _updateOpenWeatherMapApiKey(); + }, + ), + ), + ], + ), + ) : Container()), ], + ), ), ); } Future updateState() async { - String evServer = await getPreferenceElevationServer(); - String oWMK = await getPreferenceOpenWeatherMapApiKey(); - if ((evServer != this.elevationServer) || (oWMK != this.openWeatherMapKey)) { - setState((){ - this.elevationServer = evServer; - this.openWeatherMapKey = oWMK; - this.shortOWMAK = oWMK.substring(0,5); - }); - } + String _evServer = await getPreferenceElevationServer(); + String _oWMK = await getPreferenceOpenWeatherMapApiKey(); + bool _useElev = await getPreferenceUseElevation(); + bool _useWTHR = await getPreferenceUseWeather(); + setState(() { + this.elevationServer = _evServer; + this.openWeatherMapKey = _oWMK; + this._useElevation = _useElev; + this._useWeather = _useWTHR; + this.shortOWMAK = _oWMK.substring(0, 5); + }); } void _updateOpenWeatherMapApiKey() { - String oWMK = _oWMKController.text; - if (oWMK.length > 0) { - setPreferenceOpenWeatherMapApiKey(oWMK).then((bool committed) { - if (oWMK != this.openWeatherMapKey) { - setState((){ - this.openWeatherMapKey = oWMK; - this.shortOWMAK = oWMK.substring(0,5); + String _oWMK = _oWMKController.text; + if (_oWMK.length > 5) { + setPreferenceOpenWeatherMapApiKey(_oWMK).then((bool committed) { + if (_oWMK != this.openWeatherMapKey) { + setState(() { + this.openWeatherMapKey = _oWMK; + this.shortOWMAK = _oWMK.substring(0, 5); }); } }); - Navigator.pop(context); + Navigator.pop(context, 2); } } void _updateElevationServer() { - String elevServer = _elevationServerController.text; - RegExp urlValidator = new RegExp(r'^http[s]?://.+$'); - if (urlValidator.hasMatch(elevServer)) { - setPreferenceElevationServer(elevServer).then((bool committed) { - if (elevServer != this.elevationServer) { - setState((){ - this.elevationServer = elevServer; + String _elevServer = _elevationServerController.text; + RegExp _urlValidator = RegExp(r'^http[s]?://.+$'); + if (_urlValidator.hasMatch(_elevServer)) { + setPreferenceElevationServer(_elevServer).then((bool committed) { + if (_elevServer != this.elevationServer) { + setState(() { + this.elevationServer = _elevServer; }); } }); - Navigator.pop(context); + Navigator.pop(context, 1); } } + Future _popBack() { + Navigator.pop(context, 3); + return Future.value(false); + } + } diff --git a/lib/street_view.dart b/lib/street_view.dart new file mode 100644 index 0000000..597b498 --- /dev/null +++ b/lib/street_view.dart @@ -0,0 +1,53 @@ +import 'package:android_intent/android_intent.dart'; +import 'package:flutter/material.dart'; +import 'global_helper_functions.dart'; + +final double textHeight = 1.5; + +InkWell streetView(String latnLong) { + return InkWell( + onTap: () { + AndroidIntent _intent = AndroidIntent( + action: 'action_view', + data: Uri.encodeFull('google.streetview:cbll=$latnLong'), + package: 'com.google.android.apps.maps'); + _intent.launch(); + }, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Align( + child: Container( + width: 50, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Street', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + Text( + 'View', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + ], + ), + ), + ), + Icon( + Icons.streetview, + size: 48.0, + color: Colors.black, + ), + ], + ), + ); +} diff --git a/lib/timezone.dart b/lib/timezone.dart new file mode 100644 index 0000000..1d1d8c3 --- /dev/null +++ b/lib/timezone.dart @@ -0,0 +1,371 @@ +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'global_helper_functions.dart'; +import 'timezones.dart'; + +class TimeZone extends StatefulWidget { + final int timeOffSet; + final int timeOffSetTime; + final int isAutoTimeOffSet; + + final ValueChanged parentAction; + + TimeZone({ + Key key, + this.timeOffSet, + this.timeOffSetTime, + this.parentAction, + this.isAutoTimeOffSet, + }) : super(key: key); + + @override + _TimeZoneState createState() => _TimeZoneState(); +} + +class _TimeZoneState extends State { + @override + Widget build(BuildContext context) { + int _localOffSet = 5; + final int now = newTimeStamp(); + final int elapsedHours = ((now - widget.timeOffSetTime) / 3600).round(); + final String offSet = (widget.timeOffSet < 0) + ? '(UTC${widget.timeOffSet})' + : '(UTC+${widget.timeOffSet})'; + final double textHeight = 1.5; + + return Row( + children: [ + Expanded( + flex: 7, + child: InkWell( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Time Offset:', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: (widget.timeOffSet != 2000) ? '$offSet' : 'INVALID', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: (widget.timeOffSet != 2000) ? ' minutes, ' : '', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: (widget.isAutoTimeOffSet == 1) ? 'as of' : 'MANUAL SETTING', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: (widget.isAutoTimeOffSet == 1) ? ' $elapsedHours' : '', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: (widget.isAutoTimeOffSet == 1) ? ' hrs' : '', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: (widget.isAutoTimeOffSet == 1) ? ' ago' : '', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + ], + ), + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + final FixedExtentScrollController scrollController = + FixedExtentScrollController(initialItem: _getTimeZoneListIndex()); + return AlertDialog( + backgroundColor: ivory, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + ButtonTheme( + height: 75, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + child: RaisedButton( + onPressed: () { + if (!mounted) { + return; + } else { + Navigator.of(context).pop(); + if (_localOffSet != 5) { + widget.parentAction(_localOffSet); + } + } + }, + color: candyApple, + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Icon( + Icons.save, + size: 48.0, + color: Colors.white, + ), + Text( + 'save tz offset', + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + ], + ), + ), + ), + Container( + height: (MediaQuery.of(context).size.height * .5), + child: CupertinoPicker( + scrollController: scrollController, + backgroundColor: ivory, + itemExtent: 100, + looping: true, + onSelectedItemChanged: (int index) { + if (!mounted) { + return; + } else { + setState(() { + _localOffSet = timeZoneList[index]['offset']; + }); + } + }, + children: List.generate(timeZoneList.length, (int index) { + return Column( + children: [ + Container( + height: 10, + color: ivory, + ), + Container( + alignment: Alignment(0.0,0.0), + height: 80, + width: (MediaQuery.of(context).size.width * .9), + decoration: BoxDecoration( + color: peacockBlue, + border: Border.all( + width: 2.0, + ), + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Text( + _parseTimeZoneOffSet(timeZoneList[index]['offset']), + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + Text( + '${timeZoneList[index]['tz']}', + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + ], + ), + ), + Container( + height: 10, + color: ivory, + ), + ], + ); + }), + ), + ), + ] + ), + ); + }, + ); + } + ), + ), + Expanded( + flex: 3, + child: Container( + decoration: BoxDecoration( + border: Border( + left: BorderSide( + width: 1.0, + color: Colors.black, + ), + ), + ), + child: InkWell( + child: Icon( + Icons.info, + size: 48.0, + color: Colors.black, + ), + /* + onTap: () { + urlLaunch('https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations'); + } + */ + onTap: () { + showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + backgroundColor: ivory, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + content: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + 'The timezone offset should be set and refreshed automatically, ' + 'by querying an api from teleport. However, because the api is ' + 'free, the query is only refreshed once a week.\n' + 'Additionally, in some cases the result is invalid. Tap the ' + 'left side of TimeZone Widget to manually set the timezone offset.', + textAlign: TextAlign.center, + ), + Container( + margin: EdgeInsets.only( + top: 40, + bottom: 10, + ), + child: ButtonTheme( + height: 75, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(6.0)), + ), + child: RaisedButton( + color: peacockBlue, + child: Column( + children: [ + Container( + width: 150, + margin: EdgeInsets.only( + top: 10, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Text( + 'List', + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + Icon( + Icons.open_in_browser, + size: 48, + color: Colors.white, + ), + ], + ), + ), + Container( + margin: EdgeInsets.only( + bottom: 15, + ), + child: Text( + 'Of TimeZones', + style: TextStyle( + height: textHeight, + color: Colors.white, + fontSize: 24, + ), + ), + ), + ], + ), + onPressed: () { + Navigator.of(context).pop(); + urlLaunch('https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations'); + } + ), + ), + ), + ], + ), + ); + } + ); + }, + ), + ), + ), + ], + ); + + } + + int _getTimeZoneListIndex() { + // 2001 is a magic number which means auto + // as in the tz offset is automatically set + return timeZoneList.indexOf(timeZoneList.singleWhere((timeZone) => timeZone['offset'] == ((widget.isAutoTimeOffSet == 1) ? 2001 : widget.timeOffSet))); + } + + String _parseTimeZoneOffSet(int offset) { + if (offset < 2000) { + return offset.toString(); + } else if (offset == 2000) { + return 'INVALID'; + } else if (offset == 2001) { + return 'AUTO'; + } + } +} diff --git a/lib/timezones.dart b/lib/timezones.dart new file mode 100644 index 0000000..7b399aa --- /dev/null +++ b/lib/timezones.dart @@ -0,0 +1,48 @@ +// https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations + +final List> timeZoneList = [ + + { 'offset' : -720, 'tz' : 'BIT, IDLW' }, + { 'offset' : -660, 'tz' : 'NUT, SST' }, + { 'offset' : -600, 'tz' : 'HST, TAHT' }, + { 'offset' : -570, 'tz' : 'MART, MIT' }, + { 'offset' : -540, 'tz' : 'AKST, HDT' }, + { 'offset' : -480, 'tz' : 'AKDT, PST' }, + { 'offset' : -420, 'tz' : 'MST, PDT' }, + { 'offset' : -360, 'tz' : 'CST, GALT' }, + { 'offset' : -300, 'tz' : 'EST, PET' }, + { 'offset' : -240, 'tz' : 'AMT, AST' }, + { 'offset' : -210, 'tz' : 'NST, NT' }, + { 'offset' : -180, 'tz' : 'ADT, FKST' }, + { 'offset' : -150, 'tz' : 'NDT' }, + { 'offset' : -120, 'tz' : 'GST, UYST' }, + { 'offset' : -60, 'tz' : 'CVT, EGT' }, + { 'offset' : 0, 'tz' : 'GMT, UTC' }, + { 'offset' : 60, 'tz' : 'CET, BST' }, + { 'offset' : 120, 'tz' : 'EET, CEST' }, + { 'offset' : 180, 'tz' : 'FET, EEST' }, + { 'offset' : 210, 'tz' : 'IRST' }, + { 'offset' : 240, 'tz' : 'AMT, VOLT' }, + { 'offset' : 270, 'tz' : 'AFT, IRDT' }, + { 'offset' : 300, 'tz' : 'PKT, TFT' }, + { 'offset' : 330, 'tz' : 'IST, SLST' }, + { 'offset' : 345, 'tz' : 'NPT' }, + { 'offset' : 360, 'tz' : 'BST, VOST' }, + { 'offset' : 390, 'tz' : 'CCT, MMT' }, + { 'offset' : 420, 'tz' : 'CXT, THA' }, + { 'offset' : 480, 'tz' : 'AWST, HKT' }, + { 'offset' : 525, 'tz' : 'ACWST' }, + { 'offset' : 540, 'tz' : 'JST, YAKT' }, + { 'offset' : 570, 'tz' : 'ACST' }, + { 'offset' : 600, 'tz' : 'AEST, VLAT' }, + { 'offset' : 630, 'tz' : 'ACDT, LHST' }, + { 'offset' : 660, 'tz' : 'AEDT, VUT' }, + { 'offset' : 720, 'tz' : 'NZST, WAKT' }, + { 'offset' : 765, 'tz' : 'CHAST' }, + { 'offset' : 780, 'tz' : 'NZDT, TOT' }, + { 'offset' : 825, 'tz' : 'CHADT' }, + { 'offset' : 840, 'tz' : 'LINT' }, + { 'offset' : 2000, 'tz' : 'INVLD' }, + { 'offset' : 2001, 'tz' : 'AUTO' }, + +]; diff --git a/lib/weather.dart b/lib/weather.dart index 387d7f6..b9dc59a 100644 --- a/lib/weather.dart +++ b/lib/weather.dart @@ -1,34 +1,1269 @@ import 'package:flutter/material.dart'; import 'global_helper_functions.dart'; - +import 'package:intl/intl.dart'; +import 'package:cached_network_image/cached_network_image.dart'; class Weather extends StatefulWidget { + final String weatherConditions; + final String weatherConditionsIcon; + final int weatherLocationID; + final double weatherCurrentTemp; + final double weatherCurrentPressure; + final int weatherCurrentHumidity; + final double weatherCurrentTempMin; + final double weatherCurrentTempMax; + final int weatherCurrentVisibility; + final double weatherCurrentWindSpd; + final int weatherCurrentWindDir; + final int weatherCurrentSunrise; + final int weatherCurrentSunset; + final int weatherCurrentDT; + final int timeOffSet; + final void Function() parentAction; - Map weather; - - Weather({Key key, this.weather}) : super(key: key); + Weather({ + Key key, + this.weatherLocationID, + this.weatherConditions, + this.weatherConditionsIcon, + this.weatherCurrentTemp, + this.weatherCurrentPressure, + this.weatherCurrentHumidity, + this.weatherCurrentTempMin, + this.weatherCurrentTempMax, + this.weatherCurrentVisibility, + this.weatherCurrentWindSpd, + this.weatherCurrentWindDir, + this.weatherCurrentSunrise, + this.weatherCurrentSunset, + this.weatherCurrentDT, + this.timeOffSet, + this.parentAction, + }) : super(key: key); @override - _WeatherState createState() => new _WeatherState(); + _WeatherState createState() => _WeatherState(); } class _WeatherState extends State { @override Widget build(BuildContext context) { - return Container( + Map updatedAt = + get3WayTime(widget.weatherCurrentDT, widget.timeOffSet); + Map sunrise = + get3WayTime(widget.weatherCurrentSunrise, widget.timeOffSet); + Map sunset = + get3WayTime(widget.weatherCurrentSunset, widget.timeOffSet); + final String windDirection = getDirection(widget.weatherCurrentWindDir); + final int visibilityMeters = getMeters(widget.weatherCurrentVisibility); + final double textHeight = 1.5; + final double _deviceWidth = MediaQuery.of(context).size.width; + final int _now = newTimeStamp(); + final int _staleness = (_now - widget.weatherCurrentDT); + final bool _stale = (_staleness > 3600); + + Expanded _refresh() { + return _stale ? Expanded( + flex: 4, + child: Container( + child: IconButton( + icon: Icon(Icons.refresh), + tooltip: 'refresh weather', + iconSize: 60, + color: candyApple, + onPressed: () { + widget.parentAction(); + }, + ), + ),) : Expanded(child: Container()); + } + + Expanded _staleNotice() { + return _stale ? Expanded( + flex: 6, + child: RichText( + textAlign: TextAlign.justify, + text: TextSpan( + children: [ + TextSpan( + text: 'The Current Weather Report is stale by more than ', + style: TextStyle( + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: '${(_staleness / 3600).floor()} ', + style: TextStyle( + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: 'hours', + style: TextStyle( + color: candyApple, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: '. You probably want to check your network connection and then ', + style: TextStyle( + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'refresh', + style: TextStyle( + color: candyApple, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: '.', + style: TextStyle( + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + ) : Expanded(child: Container()); + } + + Column _currentConditions() { + return Column( + children: [ + Text( + 'Current Conditions:', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + Text( + '${weatherConditions(widget.weatherConditions)}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 18, + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Humidity: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${widget.weatherCurrentHumidity}%', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + ], + ); + } + + Column _temps() { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + RichText( + // temp + text: TextSpan( + children: [ + TextSpan( + text: 'Temp: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${widget.weatherCurrentTemp.round()}\u00B0', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'F', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: + ', ${(((widget.weatherCurrentTemp - 32) * 5) / 9).round()}\u00B0', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'C', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + RichText( + // temp_min + text: TextSpan( + children: [ + TextSpan( + text: 'Min: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: + '${widget.weatherCurrentTempMin.round()}\u00B0', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'F', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: + ', ${(((widget.weatherCurrentTempMin - 32) * 5) / 9).round()}\u00B0', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'C', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + RichText( + // temp_max + text: TextSpan( + children: [ + TextSpan( + text: 'Max: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: + '${widget.weatherCurrentTempMax.round()}\u00B0', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'F', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: + ', ${(((widget.weatherCurrentTempMax - 32) * 5) / 9).round()}\u00B0', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'C', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + ], + ); + } + + Column _updateTime() { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + 'Updated at:', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'There: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${updatedAt['There']}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Here: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${updatedAt['Here']}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'UTC: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${updatedAt['UTC']}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + ], + ); + } + + Column _wind() { + return Column( + children: [ + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Wind: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${widget.weatherCurrentWindSpd.round()}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'mph', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: ',', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: + '${(widget.weatherCurrentWindSpd * 1.60934).round()}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'kph', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: + ', ${(widget.weatherCurrentWindSpd * 0.868976).round()}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'knots', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'From: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${widget.weatherCurrentWindDir}\u00B0, ', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: '($windDirection)', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + ], + ); + } + + Column _sunRise() { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + 'Sunrise:', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'There: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${sunrise['There']}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Here: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${sunrise['Here']}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'UTC: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${sunrise['UTC']}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + ], + ); + } + + Column _sunSet() { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + 'Sunset:', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'There: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${sunset['There']}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Here: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${sunset['Here']}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'UTC: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${sunset['UTC']}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + ], + ); + } + + Column _pressure() { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Pressure: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: '${widget.weatherCurrentPressure}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'mb', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: ', ', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: + '${(widget.weatherCurrentPressure * 29.53).round() / 1000}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'inHg', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: ',', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: + '${(widget.weatherCurrentPressure * 75.0062).round() / 100}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'mmHg', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + ], + ); + } + + Column _visibility() { + return Column( + children: [ + Text( + 'Visibility:', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: '${widget.weatherCurrentVisibility}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: ' feet,', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: '$visibilityMeters', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: ' meters', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'ID: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${widget.weatherLocationID}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + ], + ); + } + + Container _icon() { + return Container( + width: 100, + child: CachedNetworkImage( + imageUrl: 'https://openweathermap.org/img/w/${widget.weatherConditionsIcon}.png', + ), + ); + } + + if (widget.weatherConditions == '') { + return Container( + margin: EdgeInsets.symmetric( + vertical: 3, + horizontal: 6, + ), padding: myBoxPadding, - decoration: myBoxDecoration(ivory), - child: Wrap( - spacing: 10.0, + decoration: myBoxDecoration(_stale ? Colors.grey : ivory), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, children: [ Text( - 'Current Weather Conditions: ${widget.weather['weather'][0]['description']}', + 'Check Data Connection', + style: TextStyle( + height: textHeight, + fontSize: 16, + ), ), Text( - 'Weather location: ${widget.weather['id']}', + 'Probably Offline', + style: TextStyle( + height: textHeight, + fontSize: 16, + ), ), ], - ) - ); + ), + ); + } else if (_deviceWidth < 400) { + return Container( + margin: EdgeInsets.symmetric( + vertical: 3, + horizontal: 6, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(_stale ? Colors.grey : ivory), + child: Column( + children: [ + Padding( + padding: EdgeInsets.only( + top: 16.0, + bottom: 2.0, + right: 25.0, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _refresh(), + _staleNotice(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _icon(), + _currentConditions(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _updateTime(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _temps(), + _wind(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _pressure(), + _visibility(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _sunRise(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _sunSet(), + ], + ), + ), + ], + ), + ); + } else if ((_deviceWidth >= 400) && (_deviceWidth < 650)) { + return Container( + margin: EdgeInsets.symmetric( + vertical: 3, + horizontal: 6, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(_stale ? Colors.grey : ivory), + child: Column( + children: [ + Padding( + padding: EdgeInsets.only( + top: 16.0, + bottom: 2.0, + right: 25.0, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _refresh(), + _staleNotice(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _icon(), + _currentConditions(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _updateTime(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _temps(), + _wind(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _sunRise(), + _pressure(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _sunSet(), + _visibility(), + ], + ), + ), + ], + ), + ); + } else if ((_deviceWidth >= 650) && (_deviceWidth < 1000)) { + return Container( + margin: EdgeInsets.symmetric( + vertical: 3, + horizontal: 6, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(_stale ? Colors.grey : ivory), + child: Column( + children: [ + Padding( + padding: EdgeInsets.only( + top: 16.0, + bottom: 2.0, + right: 25.0, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _refresh(), + _staleNotice(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _icon(), + _currentConditions(), + _temps(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _updateTime(), + _visibility(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _sunRise(), + _wind(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _sunSet(), + _pressure(), + ], + ), + ), + ], + ), + ); + } else if (_deviceWidth >= 1000) { + return Container( + margin: EdgeInsets.symmetric( + vertical: 3, + horizontal: 6, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(_stale ? Colors.grey : ivory), + child: Column( + children: [ + Padding( + padding: EdgeInsets.only( + top: 16.0, + bottom: 2.0, + right: 25.0, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + _refresh(), + _staleNotice(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _icon(), + _currentConditions(), + _temps(), + _visibility(), + _updateTime(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _pressure(), + _sunRise(), + _sunSet(), + _wind(), + ], + ), + ), + ], + ), + ); + } + + } + + Map get3WayTime(int secondsFromEpoch, int timeOffSet) { + DateTime utcTime = + DateTime.fromMillisecondsSinceEpoch(secondsFromEpoch * 1000).toUtc(); + DateTime thereTime = utcTime.add(Duration(minutes: timeOffSet)); + DateTime hereTime = utcTime.toLocal(); + String there = (timeOffSet != 2000) ? DateFormat('EEEE MMMM d, HH:mm').format(thereTime) : 'UNKNOWN, INVALID'; + String here = DateFormat('EEEE MMMM d, HH:mm').format(hereTime); + String utc = DateFormat('EEEE MMMM d, HH:mm').format(utcTime); + return { + 'There': there, + 'Here': here, + 'UTC': utc, + }; + } + + String getElapsedTimeString(int then, int now) { + final int elapsedMin = ((now - then) / 60).round(); + final int elapsedHours = (elapsedMin / 60).floor(); + final int remainingMin = elapsedMin % 60; + return (remainingMin < 10) + ? elapsedHours.toString() + ':0' + remainingMin.toString() + : elapsedHours.toString() + ':' + remainingMin.toString(); + } + + int getMeters(int feet) { + return (feet != null) ? (feet * 0.3048).round() : null; + } + + String getDirection(int direction) { + if ((direction < 22.5) || (direction >= 337.5)) { + return "N"; + } else if ((direction >= 22.5) && (direction < 67.5)) { + return "NE"; + } else if ((direction >= 67.5) && (direction < 112.5)) { + return "E"; + } else if ((direction >= 112.5) && (direction < 157.5)) { + return "SE"; + } else if ((direction >= 157.5) && (direction < 202.5)) { + return "S"; + } else if ((direction >= 202.5) && (direction < 247.5)) { + return "SW"; + } else if ((direction >= 247.5) && (direction < 292.5)) { + return "W"; + } else if ((direction >= 292.5) && (direction < 337.5)) { + return "NW"; + } + return "none"; } } diff --git a/lib/weather_forecast.dart b/lib/weather_forecast.dart new file mode 100644 index 0000000..c928c6c --- /dev/null +++ b/lib/weather_forecast.dart @@ -0,0 +1,1070 @@ +import 'package:flutter/material.dart'; +import 'global_helper_functions.dart'; +import 'package:intl/intl.dart'; +import 'package:cached_network_image/cached_network_image.dart'; +import 'dart:convert'; + +class WeatherForeCast extends StatefulWidget { + final String weatherForeCast; + final int timeOffSet; + + WeatherForeCast({ + Key key, + this.weatherForeCast, + this.timeOffSet, + }) : super(key: key); + + @override + _WeatherForeCastState createState() => _WeatherForeCastState(); +} + +class _WeatherForeCastState extends State { + final double textHeight = 1.5; + + @override + Widget build(BuildContext context) { + Map foreCastJson; + final double _deviceWidth = MediaQuery.of(context).size.width; + + List createForeCast(List foreCastList) { + return foreCastList.map((foreCast) { + Map foreCastTime = + get3WayTime(foreCast['dt'], widget.timeOffSet); + + Column _conditions() { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + 'Forecast: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + Text( + '${weatherConditions(foreCast['weather'][0]['description'])}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 18, + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Humidity: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${foreCast['main']['humidity']}%', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + ], + ); + } + + Container _icon() { + return Container( + width: 100, + child: CachedNetworkImage( + imageUrl: 'https://openweathermap.org/img/w/${foreCast['weather'][0]['icon']}.png', + ), + ); + } + + Column _wind() { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Wind: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${foreCast['wind']['speed'].round()}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'mph', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: ',', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: + '${getKilometers(foreCast['wind']['speed'].toDouble())}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'kph', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: + ', ${getKnots(foreCast['wind']['speed'].toDouble())}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'knots', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'From: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: + '${foreCast['wind']['deg'].round()}\u00B0, ', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: + '(${getDirection(foreCast['wind']['deg'].round())})', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + ], + ); + } + + Column _temp() { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + RichText( + // temp + text: TextSpan( + children: [ + TextSpan( + text: 'Temp: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: + '${foreCast['main']['temp'].round()}\u00B0', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'F', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: + ', ${getCelcius(foreCast['main']['temp'].toDouble())}\u00B0', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'C', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + RichText( + // temp_min + text: TextSpan( + children: [ + TextSpan( + text: 'Min: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: + '${foreCast['main']['temp_min'].round()}\u00B0', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'F', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: + ', ${getCelcius(foreCast['main']['temp_min'].toDouble())}\u00B0', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'C', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + RichText( + // temp_max + text: TextSpan( + children: [ + TextSpan( + text: 'Max: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: + '${foreCast['main']['temp_max'].round()}\u00B0', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'F', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: + ', ${getCelcius(foreCast['main']['temp_max'].toDouble())}\u00B0', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'C', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + ], + ); + } + + Column _time() { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'There: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${foreCastTime['There']}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Here: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${foreCastTime['Here']}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'UTC: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + TextSpan( + text: '${foreCastTime['UTC']}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + ], + ); + } + + Column _pressure() { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Pressure: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: '${foreCast['main']['pressure']}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'mb', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: ', ', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: + '${getinHg(foreCast['main']['pressure'].toDouble())}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'inHg', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: ',', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: + '${getmmHg(foreCast['main']['pressure'].toDouble())}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'mmHg', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + ], + ); + } + + Column _sea() { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Sea Level: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: '${foreCast['main']['sea_level']}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'mb', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: ', ', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: + '${getinHg(foreCast['main']['sea_level'].toDouble())}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'inHg', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: ',', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: + '${getmmHg(foreCast['main']['sea_level'].toDouble())}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'mmHg', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + ], + ); + } + + Column _ground() { + return Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + RichText( + text: TextSpan( + children: [ + TextSpan( + text: 'Ground Level: ', + style: TextStyle( + height: textHeight, + color: candyApple, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: '${foreCast['main']['grnd_level']}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'mb', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: ', ', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: + '${getinHg(foreCast['main']['grnd_level'].toDouble())}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'inHg', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + TextSpan( + text: ',', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + ], + ), + ), + RichText( + text: TextSpan( + children: [ + TextSpan( + text: + '${getmmHg(foreCast['main']['grnd_level'].toDouble())}', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + ), + ), + TextSpan( + text: 'mmHg', + style: TextStyle( + height: textHeight, + color: Colors.black, + fontSize: 16, + fontStyle: FontStyle.italic, + ), + ), + ], + ), + ), + ], + ); + } + + if (_deviceWidth < 400) { + return Container( + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + width: 1.0, + color: Colors.black, + ), + ), + ), + child: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _icon(), + _conditions(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _time(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _temp(), + _wind(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _pressure(), + _sea(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _ground(), + ], + ), + ), + ], + ), + ); + } else if ((_deviceWidth >= 400) && (_deviceWidth < 650)) { + return Container( + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + width: 1.0, + color: Colors.black, + ), + ), + ), + child: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _icon(), + _conditions(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _time(), + _temp(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _pressure(), + _sea(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _ground(), + _wind(), + ], + ), + ), + ], + ), + ); + } else if ((_deviceWidth >= 650) && (_deviceWidth < 1000)) { + return Container( + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + width: 1.0, + color: Colors.black, + ), + ), + ), + child: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _icon(), + _conditions(), + _temp(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _time(), + _wind(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _pressure(), + _sea(), + _ground(), + ], + ), + ), + ], + ), + ); + } else if (_deviceWidth >= 1000) { + return Container( + decoration: BoxDecoration( + border: Border( + bottom: BorderSide( + width: 1.0, + color: Colors.black, + ), + ), + ), + child: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _icon(), + _conditions(), + _temp(), + _time(), + ], + ), + ), + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _wind(), + _pressure(), + _sea(), + _ground(), + ], + ), + ), + ], + ), + ); + } + }).toList(); + } + + try { + foreCastJson = jsonDecode(widget.weatherForeCast); + return Container( + margin: EdgeInsets.symmetric( + vertical: 3, + horizontal: 6, + ), + decoration: myBoxDecoration(ivory), + padding: EdgeInsets.all(5.0), + child: Column( + children: createForeCast(foreCastJson['list']), + ), + ); + } catch(e) { + return Container( + margin: EdgeInsets.symmetric( + vertical: 3, + horizontal: 6, + ), + padding: myBoxPadding, + decoration: myBoxDecoration(ivory), + child: Wrap( + spacing: 20.0, + children: [ + Text( + 'Pending...', + style: TextStyle(height: textHeight), + ), + ], + ), + ); + } + } + + double getinHg(double mBar) { + return (mBar != null) ? ((mBar * 29.53).round() / 1000.0) : null; + } + + double getmmHg(double mBar) { + return (mBar != null) ? ((mBar * 75.0062).round() / 100.0) : null; + } + + int getKnots(double miles) { + return (miles != null) ? (miles * 0.8689).round() : null; + } + + int getKilometers(double miles) { + return (miles != null) ? (miles * 1.60934).round() : null; + } + + int getCelcius(double fahrenheit) { + return (fahrenheit != null) ? (((fahrenheit - 32) * 5) / 9).round() : null; + } + + Map get3WayTime(int secondsFromEpoch, int timeOffSet) { + DateTime utcTime = + DateTime.fromMillisecondsSinceEpoch(secondsFromEpoch * 1000).toUtc(); + DateTime thereTime = utcTime.add(Duration(minutes: timeOffSet)); + DateTime hereTime = utcTime.toLocal(); + String there = (timeOffSet != 2000) ? DateFormat('EEEE MMMM d, HH:mm').format(thereTime) : 'UNKNOWN, INVALID'; + String here = DateFormat('EEEE MMMM d, HH:mm').format(hereTime); + String utc = DateFormat('EEEE MMMM d, HH:mm').format(utcTime); + return { + 'There': there, + 'Here': here, + 'UTC': utc, + }; + } + + String getDirection(int direction) { + if ((direction < 22.5) || (direction >= 337.5)) { + return "N"; + } else if ((direction >= 22.5) && (direction < 67.5)) { + return "NE"; + } else if ((direction >= 67.5) && (direction < 112.5)) { + return "E"; + } else if ((direction >= 112.5) && (direction < 157.5)) { + return "SE"; + } else if ((direction >= 157.5) && (direction < 202.5)) { + return "S"; + } else if ((direction >= 202.5) && (direction < 247.5)) { + return "SW"; + } else if ((direction >= 247.5) && (direction < 292.5)) { + return "W"; + } else if ((direction >= 292.5) && (direction < 337.5)) { + return "NW"; + } + return "none"; + } +} diff --git a/pubspec.lock b/pubspec.lock index 7a47cb8..dd7b1fc 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,13 +1,27 @@ # Generated by pub # See https://www.dartlang.org/tools/pub/glossary#lockfile packages: + android_intent: + dependency: "direct main" + description: + name: android_intent + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.0+2" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.2" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.0.8" + version: "2.1.0" boolean_selector: dependency: transitive description: @@ -15,6 +29,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.4" + cached_network_image: + dependency: "direct main" + description: + name: cached_network_image + url: "https://pub.dartlang.org" + source: hosted + version: "0.8.0" charcode: dependency: transitive description: @@ -29,6 +50,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.14.11" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.6" cupertino_icons: dependency: "direct main" description: @@ -36,11 +71,32 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.1.2" + file_picker: + dependency: "direct main" + description: + name: file_picker + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.5" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + flutter_cache_manager: + dependency: transitive + description: + name: flutter_cache_manager + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.2" + flutter_markdown: + dependency: "direct main" + description: + name: flutter_markdown + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" flutter_test: dependency: "direct dev" description: flutter @@ -60,13 +116,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.1.3" + intl: + dependency: "direct main" + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.15.8" + markdown: + dependency: transitive + description: + name: markdown + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.3" matcher: dependency: transitive description: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.3+1" + version: "0.12.5" meta: dependency: transitive description: @@ -94,21 +164,42 @@ packages: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.4.0" + version: "1.5.0" + permission_handler: + dependency: "direct main" + description: + name: permission_handler + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" quiver: dependency: transitive description: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" + share: + dependency: "direct main" + description: + name: share + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.1+1" shared_preferences: dependency: "direct main" description: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "0.5.2" + version: "0.5.3+1" sky_engine: dependency: transitive description: flutter @@ -120,14 +211,14 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.5.4" + version: "1.5.5" sqflite: dependency: "direct main" description: name: sqflite url: "https://pub.dartlang.org" source: hosted - version: "1.1.3" + version: "1.1.5" stack_trace: dependency: transitive description: @@ -141,7 +232,7 @@ packages: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "1.6.8" + version: "2.0.0" string_scanner: dependency: transitive description: @@ -169,7 +260,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.2" + version: "0.2.4" typed_data: dependency: transitive description: @@ -177,6 +268,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.6" + url_launcher: + dependency: "direct main" + description: + name: url_launcher + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.3" + uuid: + dependency: transitive + description: + name: uuid + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" vector_math: dependency: transitive description: @@ -185,5 +290,5 @@ packages: source: hosted version: "2.0.8" sdks: - dart: ">=2.1.0 <3.0.0" - flutter: ">=1.2.1 <2.0.0" + dart: ">=2.2.0 <3.0.0" + flutter: ">=1.5.0 <2.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 48ecdef..1853033 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,4 +1,4 @@ -name: lnl_share +name: libre_gps_parser description: A new Flutter project. # The following defines the version and build number for your application. @@ -11,7 +11,7 @@ description: A new Flutter project. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.0+1 +version: 0.1.0+4 environment: sdk: ">=2.1.0 <3.0.0" @@ -22,13 +22,20 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^0.1.2 + cupertino_icons: - sqflite: ^1.1.3 - path_provider: ^0.5.0 + file_picker: + sqflite: + path_provider: + permission_handler: http: - + intl: + cached_network_image: + android_intent: shared_preferences: + share: + url_launcher: + flutter_markdown: dev_dependencies: flutter_test: diff --git a/test/widget_test.dart b/test/widget_test.dart index 1a4cf12..a937445 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -8,7 +8,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:lnl_share/main.dart'; +import 'package:libre_gps_parser/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async {