Programming Flutter Native Cross Platform Apps the Easy Way 1st Edition Carmine Zaccagnino 2024 scribd download

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 43

Download and Read online, DOWNLOAD EBOOK, [PDF EBOOK EPUB ], Ebooks

download, Read Ebook EPUB/KINDE, Download Book Format PDF

Programming Flutter Native Cross Platform Apps the


Easy Way 1st Edition Carmine Zaccagnino

OR CLICK LINK
https://textbookfull.com/product/programming-
flutter-native-cross-platform-apps-the-easy-
way-1st-edition-carmine-zaccagnino/

Read with Our Free App Audiobook Free Format PFD EBook, Ebooks dowload PDF
with Andible trial, Real book, online, KINDLE , Download[PDF] and Read and Read
Read book Format PDF Ebook, Dowload online, Read book Format PDF Ebook,
[PDF] and Real ONLINE Dowload [PDF] and Real ONLINE
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Programming Flutter Native Cross Platform Apps the Easy


Way 1st Edition Carmine Zaccagnino

https://textbookfull.com/product/programming-flutter-native-
cross-platform-apps-the-easy-way-1st-edition-carmine-
zaccagnino-2/

Cross-platform Localization for Native Mobile Apps with


Xamarin 1st Edition Christopher Miller

https://textbookfull.com/product/cross-platform-localization-for-
native-mobile-apps-with-xamarin-1st-edition-christopher-miller/

Ultimate Flutter for Cross-Platform App Development 1st


Edition Temidayo Adefioye

https://textbookfull.com/product/ultimate-flutter-for-cross-
platform-app-development-1st-edition-temidayo-adefioye/

Xamarin.Forms Essentials: First Steps Toward Cross-


Platform Mobile Apps 1st Edition Gerald Versluis
(Auth.)

https://textbookfull.com/product/xamarin-forms-essentials-first-
steps-toward-cross-platform-mobile-apps-1st-edition-gerald-
versluis-auth/
Mobile app development with Ionic cross platform apps
with Ionic Angular and Cordova Griffith

https://textbookfull.com/product/mobile-app-development-with-
ionic-cross-platform-apps-with-ionic-angular-and-cordova-
griffith/

Building Xamarin.Forms Mobile Apps Using XAML: Mobile


Cross-Platform XAML and Xamarin.Forms Fundamentals Dan
Hermes

https://textbookfull.com/product/building-xamarin-forms-mobile-
apps-using-xaml-mobile-cross-platform-xaml-and-xamarin-forms-
fundamentals-dan-hermes/

Learn Google Flutter Fast: 65 Example Apps Mark Clow

https://textbookfull.com/product/learn-google-flutter-
fast-65-example-apps-mark-clow/

Cloud Native Apps on Google Cloud Platform Use


Serverless Microservices and Containers to Rapidly
Build and Deploy Apps on Google Cloud English Edition
Gilchrist
https://textbookfull.com/product/cloud-native-apps-on-google-
cloud-platform-use-serverless-microservices-and-containers-to-
rapidly-build-and-deploy-apps-on-google-cloud-english-edition-
gilchrist/

Beginning Visual Studio for Mac: Build Cross-Platform


Apps with Xamarin and .NET Core Alessandro Del Sole

https://textbookfull.com/product/beginning-visual-studio-for-mac-
build-cross-platform-apps-with-xamarin-and-net-core-alessandro-
del-sole/
Programming Flutter
NATIVE, CROSS-PLATFORM APPS THE EASY WAY

BY CARMINE ZACCAGNINO
Version: P1.0 (February 2020)
Copyright © 2020 The Pragmatic Programmers,
LLC. This book is licensed to the individual who
purchased it. We don't copy-protect it because that
would limit your ability to use it for your own
purposes. Please don't break this trust—you can
use this across all of your devices but please do not
share this copy with other members of your team,
with friends, or via file sharing services. Thanks.

Many of the designations used by manufacturers


and sellers to distinguish their products are
claimed as trademarks. Where those designations
appear in this book, and The Pragmatic
Programmers, LLC was aware of a trademark
claim, the designations have been printed in initial
capital letters or in all capitals. The Pragmatic
Starter Kit, The Pragmatic Programmer, Pragmatic
Programming, Pragmatic Bookshelf and the linking
g device are trademarks of The Pragmatic
Programmers, LLC.

Every precaution was taken in the preparation of


this book. However, the publisher assumes no
responsibility for errors or omissions, or for
damages that may result from the use of
information (including program listings) contained
herein.

About the Pragmatic Bookshelf

The Pragmatic Bookshelf is an agile publishing


company. We’re here because we want to improve
the lives of developers. We do this by creating
timely, practical titles, written by programmers for
programmers.

Our Pragmatic courses, workshops, and other


products can help you and your team create better
software and have more fun. For more
information, as well as the latest Pragmatic titles,
please visit us at http://pragprog.com.

Our ebooks do not contain any Digital Restrictions


Management, and have always been DRM-free. We
pioneered the beta book concept, where you can
purchase and read a book while it’s still being
written, and provide feedback to the author to help
make a better book for everyone. Free resources for
all purchasers include source code downloads (if
applicable), errata and discussion forums, all
available on the book's home page at
pragprog.com. We’re here to make your life easier.

NEW BOOK ANNOUNCEMENTS

Want to keep up on our latest titles and


announcements, and occasional special offers?
Just create an account on pragprog.com (an email
address and a password is all it takes) and select
the checkbox to receive newsletters. You can also
follow us on twitter as @pragprog.

ABOUT EBOOK FORMATS

If you buy directly from pragprog.com, you get


ebooks in all available formats for one price. You
can synch your ebooks amongst all your devices
(including iPhone/iPad, Android, laptops, etc.) via
Dropbox. You get free updates for the life of the
edition. And, of course, you can always come back
and re-download your books when needed. Ebooks
bought from the Amazon Kindle store are subject
to Amazon's polices. Limitations in Amazon's file
format may cause ebooks to display differently on
different devices. For more information, please see
our FAQ at pragprog.com/frequently-asked-
questions/ebooks. To learn more about this book
and access the free resources, go to
https://pragprog.com/book/czflutr, the book's
homepage.

Thanks for your continued support,

Andy Hunt
The Pragmatic Programmers

The team that produced this book includes:


Andy Hunt (Publisher),
Janet Furlow (VP of Operations),
Dave Rankin (Executive Editor),
Michael Swaine (Development Editor),
Jasmine Kwityn (Copy Editor),
Potomac Indexing, LLC (Indexing),
Gilson Graphics (Layout)

For customer support, please contact


support@pragprog.com.

For international rights, please contact


rights@pragprog.com.
Table of Contents

1. Acknowledgments

2. Preface
1. A Brief History of Flutter

2. Why Flutter Matters and What We’ll See in This Book


3. Don’t Know Dart? Don’t Worry About It
4. Installing the SDK and the IDE Plugins

5. Where We’re Going Next: Let’s Start Building Apps

3. Part I. Getting Started with Flutter

1. 1. Making Your First Flutter App


1. Get Familiar with Dart Syntax and Flutter Classes
2. Give the App Your Personal Touch
3. Where We’re Going Next

2. 2. Laying Out More Widgets


1. Introducing Layout Widgets

Contain and Add Padding to Widgets Using


2. Invisible Layout Widgets
3. Add Your Own Assets to the App
4. Displaying Images

5. Vertical Layout
6. Horizontal Layout: The Row
7. Making Grids

8. The Card
9. Fill the Space Available in the View Using Expanded
10. Slivers, Custom Scrollables, and Collapsable App Bars
11. The Key

12. Where We’re Going Next

3. 3. Building a Calculator App


1. Importing Basic Dependencies
2. Writing main
3. The Calculator’s Home Page

4. How the App Will Be Structured


5. Implement the Basic Layout

6. Let’s Give the Calculator a Screen


7. Add the Deletion Row
8. The Third Row

9. Why a GridView Wouldn’t Work


10. Make the App Look and Work Right with Expanded
11. The Finished Layout

12. Implement the Calculations


13. Use the Calculation Inside the App

14. Wrapping Up the Calculator


15. What If We Try to Divide by 0?
16. Where We’re Going Next

4. Beyond the Standard Library:


4. Plugins and Packages
1. An Introduction to Packages

2. Package Usage Example


3. Making Your Own Packages
4. Publishing a Package to Pub

5. Packages for Windows, macOS, and Linux


6. Where We’re Going Next
4. Part II. Doing More with Flutter

1. 5. Network and Storage I/O and Navigation


1. The API
2. The http Package

3. Writing Methods to Fetch Comics


What You Need to Build the UI: Navigation and the
4. InheritedWidget
5. Build the App’s Basic UI

6. Building the Comic Page


7. Using the CircularProgressIndicator

8. Making Everything Faster by Caching to Local Storage


Allowing the User to Click the Image and Go to the Website:
9. The url_launcher Package
10. Adding Comic Selection by Number
11. Permanent Data I/O in Flutter: Adding “Starred” Comics

12. Where We’re Going Next

2. 6. Testing and Debugging Flutter Apps


1. Testing
2. Testing the XKCD App: Using Mock Objects

3. Throwing and Catching Exceptions


4. Assert Statements
5. Where We’re Going Next

3. 7. Build a Chat App Using Firebase


1. What Is Firebase?

2. Animations and Transistions


3. Custom Shapes and Drawing in Flutter Apps Using Painters

4. The StreamBuilder
5. Building the Chat App
6. Where You’re Going Next

5. A1. Introduction to Dart


1. Comments in Dart
2. Variables and Conditions
3. Functions

4. main
5. Asynchronous Code in Dart: The dart:async Library
6. Conditional Constructs and Expressions

7. Loops: while, do while, and for


8. Classes

9. Typedef and Callbacks


10. Mastering import
11. Conversion Between Native Java/Apple and Dart Data Types

12. Where You’re Going Next

A2. Apple-Like Look and Additional


6. App Configuration
1. Cupertino Widgets
2. pubspec.yaml
3. Platform-Specific Setup

Copyright © 2020, The Pragmatic Bookshelf.


Early Praise for Programming
Flutter
I’m excited to read this book: ten years ago, I learned
Android development reading a PragProg book, and this has
changed my life forever. Now this book could change it
again.

→ Giordano Scalzo
iOS Senior Software Engineer, NatWest Markets

Carmine’s book is a comprehensive journey into Flutter. He


leads you through the basics like widgets, standard library,
packages, and plugins, and helps you to understand the
more advanced topics like network, I/O, navigation, testing,
debugging, and firebase. His book is a reference for practical
suggestions, useful tips, and solid advice, without sacrificing
the details. What I liked the most is that each chapter starts
with a premise, and ends with a conclusion and “where
we’re going next,” building up a natural, logical, and
consequential narrative.

→ Alessio Salvadorini
Creative Technologist, Nokia

Great book for anyone who wants to start grasping Flutter.

→ Erdem Orman
Software Development Engineer, Amazon
If you want or need to do cross-platform mobile app
development, you should have this book at hand.
Programming Flutter, by Carmine Zaccagnino, walks you
systematically through this important Google platform for
building full apps that work with Android, iOS, and Google
Fuchsia.

→ John Barry
Independent Editorial Consultant, various

Carmine’s hands-on tutorial will help you understand


Flutter and why it is the best solution to target iPhones and
Androids with a single codebase. Great book for a great
framework!

→ Paul Freiberger
Coauthor, Fire in the Valley: The Birth and Death of the
Personal Computer
Acknowledgments
This book exists because Flutter was released and such a
revolutionary technology needed a way for people to know
about it and learn it however they prefer. So, before even talking
about the book, it’s necessary to remember how good it is for
the developer community that Google has released Flutter and
they’re continuing to invest in it to make it even more
revolutionary and important every day that passes.

Talking about the book, it has to be said that working with the
Pragmatic Bookshelf has been great. First of all, I want to thank
Andy Hunt, who as a publisher has built a wonderful team:
starting from my very first interactions with Brian MacDonald
over my proposal to write this book everyone has been
thorough, welcoming, and helpful.

In particular, I want to thank Michael Swaine who, as the editor


of this book, has been encouraging, helpful, and understanding
throughout the process, never making me feel pressured and
always helping and encouraging me when any issues arose or
when I had questions about anything related to the book.

When bigger and more technical issues arose, production


manager Janet Furlow has fixed them, allowing me to keep
working on the content of the book instead. The cover Gilson
Graphics made for the book is very nice as a visual metaphor of
Flutter’s multi-platform nature. In addition to those I have
mentioned, I want to thank everyone else at the Pragmatic
Bookshelf who has been involved in making the book as good as
it is.

I want to thank everybody who has looked at the book and given
me feedback, which I have taken on and tried to use to the best
of my ability to make the book better for everyone. In particular,
the technical reviewers who have been thorough and thoughtful
in their feedback and the beta book readers who have taken
their time to submit errata: it’s been very important and seeing
how thorough they have been has encouraged me to do as much
as I could for the book. Thank you Giordano Scalzo, Alessio
Salvadorini, Erdem Orman, Paul Freiberger, and John Barry.

I want to thank everyone I know informally: my friends and


family have all been very encouraging and supportive and have
made this journey more pleasant than it could have ever been
without their support. Knowing the people close to me were
happy with the fact that I was doing this was invaluable. I would
also like to mention the people who were less close to me, who
knew me barely or not at all previously and who have reached
out to ask about the book because they made the results of my
work feel like something closer to me.

Copyright © 2020, The Pragmatic Bookshelf.


Preface
This book is about Flutter, Google’s open source software
development kit (SDK) that can be used to develop applications
across a wide range of platforms. We’ll begin by taking a brief
look at its history, followed by an overview of its features and
what we will see during the course of this book.

At the end of this Preface you’ll find information about the


installation and usage of the Flutter SDK and integrated
development environment (IDE) plugins.
A Brief History of Flutter
In 2015 Google unveiled Flutter, a new SDK based on the Dart
language, as the next platform for Android development, and in
2017 an alpha version of it (0.0.6) was released to the public for
the first time.

At I/O 2017 Google showed off using Flutter and its multi-
platform capabilities, and continued promoting it at I/O 2018.
Since then, Google has been investing in Flutter and
recommending it as the way everyone should be developing
mobile apps.

In December 2018 Flutter 1.0 was released and made available


so that developers could begin using the SDK to make app
creation easier.

At Google I/O 2019, Flutter support for desktop and web


platforms was publicly announced. Tools for developing Flutter
apps for Windows, macOS, Linux, and the web were released.

In addition to being unstable and untested, desktop


development is being held back further by the lack of plugin
support, which is very limited mostly because, at the time of
writing, plugin tooling is still in the process of being developed,
meaning that binaries for the platform-specific code for each
platform has to be manually built and linked by editing the
Google-provided Makefiles that can be found in Google’s
dedicated flutter-desktop-embedding GitHub repository.[1]

On the other hand, web support is progressing quickly and


shouldn’t take much more than a rebuild of a working Flutter
mobile project that doesn’t have any native plugins or platform-
specific code.
Why Flutter Matters and What We’ll See in
This Book
Flutter’s entry into the mobile app development framework
space is recent and, because of that, Flutter needs to carry
significant improvements over existing frameworks and SDKs
to actually be useful—and it does.

For one thing, with Flutter you’ll be able to develop apps that
work with Android, iOS, and Google Fuchsia,[2] (which might
replace Android and/or Chrome OS at some point in the
future). Flutter is developed by Google, but it fully supports iOS,
and this means you can now also run an iOS emulator and build
for iOS in Android Studio. However, you won’t be able to build
iOS apps on Linux or Windows because iOS emulation and
compilation is still done through Xcode.

Flutter makes developing apps incredibly easy by allowing you


to define the app’s UI declaratively but in the same place and
language you define the app logic (no XML UI files required).
You can instanly preview the changes you make to your app
using stateful hot reload.

Additionally, its cross-platform nature doesn’t skimp on having


a native look and feel, as the framework supports all of the
typical native features of each of the operating systems
(different app bar, different list drag to update, Material Design
and Apple icons, etc.). The advantages compared to other cross-
platform frameworks don’t end there: you’ll be able to run any
native Kotlin/Java and Swift/Objective-C method using
platform channels, as we’ll see in ​Integrating Native Code:
Making Plugin Packages​.
Even though it’s really new, Flutter is already used by some big
and established companies (as well as many smaller ones) to
build cross-platform mobile apps, as you can see in Google’s
Flutter Showcase Page.[3]

We’ll be using Flutter packages and plugins (many of them


developed by Google) to build ever more useful apps, also
introducing more advanced standard Flutter features such as
navigation and animations.
Don’t Know Dart? Don’t Worry About It
You might want to read Appendix 1, ​Introduction to Dart ​if
you don’t have much programming experience or find even the
first chapter difficult to follow because of Dart’s syntax; many
Dart-specific constructs will be explained during the course of
the book, but you might want to consider going through that
appendix first if you find yourself struggling to understand the
code.
Installing the SDK and the IDE Plugins
To use Flutter, you need to install its SDK, and to be able to get
on with your programming in a quick and uncomplicated
manner, you’ll probably want to install the IDE tools too.

If you prefer to use the command line (maybe because you want
to use other, perhaps lighter, IDEs or text editors) there will be
guidance on the usage of the flutter command throughout the
book.

INSTALLING FLUTTER
The installation process for the Flutter SDK differs slightly for
each operating system, so I’ll separate the instructions into
three sections. Skip ahead to the instructions specific to your
platform and, if you want to install them, the part that covers
IDE plugin installation.

At the time of writing, the latest stable version is 1.9.1 and


requires a 495MB download on Linux (tar.xz archive), a 655MB
download on Windows (zip archive), or a 786MB download on
macOS (zip archive).

Installing on Linux

On a Linux machine only Android development is supported, so


we will install just the Android SDK and the Flutter SDK itself.
You’ll receive guidance for both CLI and graphical installation
methods.

Installing the Android SDK on Linux

If you have never developed Android apps, you need to install


the Android SDK, which includes the tools needed to build and
debug Android apps.

In order to use Flutter, you need to install Android Studio and


the Android SDK tools. Flutter requires Android Studio to be
installed, but you don’t have to use it for development.

Alternatives to the Official Zip File

On Gentoo and Arch Linux you can use packages to install


the Android SDK and/or Android Studio:

On Gentoo, you can install the


[4]
Android Studio package
by running emerge --ask dev-
util/android-studio;

For Arch Linux there is an actively maintained and


popular package available on the AUR called android-
[5]
studio .

Start by heading over to the downloads page on the Android


Developers page:[6] there you’ll find links for the .zip download
of Android Studio (around 1GB in size).

Regardless of what you choose, you might need to install some


32-bit libraries to make the SDK work on a 64-bit operating
system:

On Debian/Ubuntu, run sudo apt install libc6:i386 libncurses5:i386


libstdc++6:i386 lib32z1 libbz2-1.0:i386

On Fedora, run sudo dnf install zlib.i686 ncurses-libs.i686 bzip2-


libs.i686.

After that, we’re ready to actually install the Android SDK.

To do that using the full Android Studio installer, after


extracting the zip file you downloaded from Google’s website,
run the studio.sh script contained in the bin subdirectory. This
will start a setup wizard. After you complete the setup of the
SDK you can launch Android Studio by running that same
studio.sh script.

Installing the Flutter SDK on Linux

This part will provide guidance for Linux installation aimed at


beginners; if you are comfortable with the command line the
CLI steps will be more predictable. (For complete Linux
newbies it might be easier to follow GUI-oriented guidance
since that’s usually more familiar.)
Alternatives to the Tarball

There are alternatives to installing the official tarball:

Arch Linux has an actively maintained package in the


[7]
AUR to install Flutter.

The Linux download is a source tarball that also contains the


script needed to run the flutter command, which means you just
need to extract it and add the bin subdirectory of the extracted
tarball to the PATH environment variable.

Before we can do that, we need to browse to the SDK archive[8]


page on Flutter’s official website and download the latest stable
version.

Alternatively, in a CLI-only environment, you can download the


1.2.1 tarball using curl
https://storage.googleapis.com/flutter_infra/releases/stable/linux/flutter_linu
x_v1.2.1-stable.tar.xz -o flutter_linux_v1.2.1-stable.tar.xz.

Extract the tarball you just downloaded with any GUI tool of
your liking or by running the following command:
​ $ tar -xf flutter_linux_v1.2.1-stable.tar.xz

Now we need to add the executable script to the PATH


environment variable.

Before doing this, you need to take note of the directory where
you extracted the tarball. It contains a flutter directory, inside
which there is a bin directory; we need to know the path to reach
that bin directory.

If you are using the GUI, in most distribution it is available by


browsing the directory’s properties. It will be something along
the lines of /home/username/Downloads/flutter_linux_v1.9.1-
stable/flutter/bin if you have gone with the default settings for each
piece of software used in the steps we described earlier. I
suggest moving this to a more permanent path; ideally one at
which you’ll remember you have installed Flutter.

If you worked in the CLI using the commands just outlined,


browse to your Flutter installation directory and then change
the working directory to the flutter/bin subdirectory by running:

​ $ cd flutter/bin

and get the working directory by running:

​ $ pwd

which will return something along the lines of


/home/username/flutter/bin (here you’ll see the path where you
installed Flutter, so your mileage may vary significantly).
Know Your Shell

[9]
This section supposes that your shell is Bash.
This is the case for most Linux distributions (and Unix-like
operating systems in general—some exceptions are the BSDs,
[10]
which have tcsh,
[11]
ksh,
[12]
or ash,
[13]
and Arch Linux’s installer, which runs on Zsh
but installs Bash by default) and, since you would need to
manually install and configure a different one, you probably
would know how to add a directory to its PATH.

To add this to the PATH environment variable, we need to edit


~/.bash_profile.

To do that using the GUI, you first need your file manager to
display hidden files. If you can’t find a file named .bash_profile in
your home directory, you need to toggle the option that makes
the file manager show hidden files, and this depends on the file
manager that you’re using:

In Nautilus (a.k.a. GNOME Files, default in most distributions using


the GNOME desktop like Ubuntu, RHEL, Fedora, and default SLED
and Debian) you need to press Ctrl + H . This shortcut also works in
PCManFM (part of the LXDE, as found in Lubuntu), Caja (part of
Mate), and Thunar (part of the XFCE desktop, as found in
Xubuntu).

If you are using the KDE desktop (for example when running
Kubuntu or when choosing it when installing distributions like
Another random document with
no related content on Scribd:
indisputably true, that the crude lymph is sufficient to give the
infection, and that there is no necessity to draw blood at the time of
incision. Add to this, the frequent tumour of the lymphatic glands in
the axilla soon after the operation.
From these premises, it seems rational to conclude, that the
general success of inoculation is chiefly to be attributed to our mixing
the fixed variolous ferment with the lymph on the surface of the body,
by which means the viscera, most essential to our existence, are
less affected, and the poison rendered less virulent by dilution. But
the wonderful success of the present practice of inoculation remains
yet to be accounted for.
I have told you, that the most malignant diseases may be rendered
less malignant by proper treatment. The malignancy of the small-pox
hath been considerably abated by inoculation, and that malignancy
hath been still farther diminished by the gradual introduction of the
anti-phlogistic and antiseptic plan. So that in all places where
inoculation hath been long practised, and the patients thus treated,
the small-pox will naturally become a mild disorder, and the ignorant
operators themselves will be surprised at their unexpected success.
This, gentlemen of the jury, I conceive to be a true picture of the
present state of inoculation in these kingdoms. You will now lay your
heads together, and weigh well the evidence you have heard. If you
are of opinion that the articles of the indictment have been
sufficiently proved; that the Prisoner hath in an especial manner
preserved the lives of his Majesty’s liege subjects, by secret
medicines and modes of practice unknown to all other practitioners,
you will then find him guilty. If on the contrary, you think that these
things are not true, and that this is a malicious prosecution, you will
in that case acquit him.
The jury having laid their heads together, without going out of
Court, were called over, and answered to their names.
Cl. of the Cr. Gentlemen of the jury, are you agreed in your
verdict?
Jury. Yes.
Cl. of the Cr. Who shall say for you?
Jury. Our foreman.
Cl. of the Cr. Daniel Sutton, hold up your hand. You of the jury,
look upon the Prisoner. How say you? Is Daniel Sutton guilty of the
high crimes and misdemeanors of which he stands indicted, or not
guilty?
Jury. Not guilty.
The Prisoner was acquitted, and discharged accordingly.

FINIS.
Transcriber’s Notes
A few minor errors in punctuation were fixed.
A few minor inconsistencies in the treatment of speaker names were fixed.
Page 8: “extreamly full” changed to “extremely full”
Page 16: The missing catchword “the” from the previous page was added before
“colour of Madeira wine”.
Page 22: “he ingredients” changed to “the ingredients”
Page 26: “gentletlemen” changed to “gentlemen”
Page 39 & 69: “administred” changed to “administered”
*** END OF THE PROJECT GUTENBERG EBOOK THE TRYAL OF
MR. DANIEL SUTTON, FOR THE HIGH CRIME OF PRESERVING
THE LIVES OF HIS MAJESTY'S LIEGE SUBJECTS, BY MEANS
OF INOCULATION ***

Updated editions will replace the previous one—the old editions will
be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying copyright
royalties. Special rules, set forth in the General Terms of Use part of
this license, apply to copying and distributing Project Gutenberg™
electronic works to protect the PROJECT GUTENBERG™ concept
and trademark. Project Gutenberg is a registered trademark, and
may not be used if you charge for an eBook, except by following the
terms of the trademark license, including paying royalties for use of
the Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is very
easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund from
the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law in
the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name
associated with the work. You can easily comply with the terms of
this agreement by keeping this work in the same format with its
attached full Project Gutenberg™ License when you share it without
charge with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the terms
of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears, or
with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning of
this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1 with
active links or immediate access to the full terms of the Project
Gutenberg™ License.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or expense
to the user, provide a copy, a means of exporting a copy, or a means
of obtaining a copy upon request, of the work in its original “Plain
Vanilla ASCII” or other form. Any alternate format must include the
full Project Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™ works
unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing


access to or distributing Project Gutenberg™ electronic works
provided that:

• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt that
s/he does not agree to the terms of the full Project Gutenberg™
License. You must require such a user to return or destroy all
copies of the works possessed in a physical medium and
discontinue all use of and all access to other copies of Project
Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™


electronic work or group of works on different terms than are set
forth in this agreement, you must obtain permission in writing from
the Project Gutenberg Literary Archive Foundation, the manager of
the Project Gutenberg™ trademark. Contact the Foundation as set
forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on, transcribe
and proofread works not protected by U.S. copyright law in creating
the Project Gutenberg™ collection. Despite these efforts, Project
Gutenberg™ electronic works, and the medium on which they may
be stored, may contain “Defects,” such as, but not limited to,
incomplete, inaccurate or corrupt data, transcription errors, a
copyright or other intellectual property infringement, a defective or
damaged disk or other medium, a computer virus, or computer
codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in paragraph
1.F.3, the Project Gutenberg Literary Archive Foundation, the owner
of the Project Gutenberg™ trademark, and any other party
distributing a Project Gutenberg™ electronic work under this
agreement, disclaim all liability to you for damages, costs and
expenses, including legal fees. YOU AGREE THAT YOU HAVE NO
REMEDIES FOR NEGLIGENCE, STRICT LIABILITY, BREACH OF
WARRANTY OR BREACH OF CONTRACT EXCEPT THOSE
PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE THAT THE
FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of receiving it,
you can receive a refund of the money (if any) you paid for it by
sending a written explanation to the person you received the work
from. If you received the work on a physical medium, you must
return the medium with your written explanation. The person or entity
that provided you with the defective work may elect to provide a
replacement copy in lieu of a refund. If you received the work
electronically, the person or entity providing it to you may choose to
give you a second opportunity to receive the work electronically in
lieu of a refund. If the second copy is also defective, you may
demand a refund in writing without further opportunities to fix the
problem.

1.F.4. Except for the limited right of replacement or refund set forth in
paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of damages.
If any disclaimer or limitation set forth in this agreement violates the
law of the state applicable to this agreement, the agreement shall be
interpreted to make the maximum disclaimer or limitation permitted
by the applicable state law. The invalidity or unenforceability of any
provision of this agreement shall not void the remaining provisions.
1.F.6. INDEMNITY - You agree to indemnify and hold the
Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and distribution
of Project Gutenberg™ electronic works, harmless from all liability,
costs and expenses, including legal fees, that arise directly or
indirectly from any of the following which you do or cause to occur:
(a) distribution of this or any Project Gutenberg™ work, (b)
alteration, modification, or additions or deletions to any Project
Gutenberg™ work, and (c) any Defect you cause.

Section 2. Information about the Mission of


Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new computers.
It exists because of the efforts of hundreds of volunteers and
donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project Gutenberg™’s
goals and ensuring that the Project Gutenberg™ collection will
remain freely available for generations to come. In 2001, the Project
Gutenberg Literary Archive Foundation was created to provide a
secure and permanent future for Project Gutenberg™ and future
generations. To learn more about the Project Gutenberg Literary
Archive Foundation and how your efforts and donations can help,
see Sections 3 and 4 and the Foundation information page at
www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-profit
501(c)(3) educational corporation organized under the laws of the
state of Mississippi and granted tax exempt status by the Internal
Revenue Service. The Foundation’s EIN or federal tax identification
number is 64-6221541. Contributions to the Project Gutenberg
Literary Archive Foundation are tax deductible to the full extent
permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West,


Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up
to date contact information can be found at the Foundation’s website
and official page at www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission of
increasing the number of public domain and licensed works that can
be freely distributed in machine-readable form accessible by the
widest array of equipment including outdated equipment. Many small
donations ($1 to $5,000) are particularly important to maintaining tax
exempt status with the IRS.

The Foundation is committed to complying with the laws regulating


charities and charitable donations in all 50 states of the United
States. Compliance requirements are not uniform and it takes a
considerable effort, much paperwork and many fees to meet and
keep up with these requirements. We do not solicit donations in
locations where we have not received written confirmation of
compliance. To SEND DONATIONS or determine the status of
compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where


we have not met the solicitation requirements, we know of no
prohibition against accepting unsolicited donations from donors in
such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make


any statements concerning tax treatment of donations received from
outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About Project


Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could be
freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose network of
volunteer support.

Project Gutenberg™ eBooks are often created from several printed


editions, all of which are confirmed as not protected by copyright in
the U.S. unless a copyright notice is included. Thus, we do not
necessarily keep eBooks in compliance with any particular paper
edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg Literary
Archive Foundation, how to help produce our new eBooks, and how
to subscribe to our email newsletter to hear about new eBooks.

You might also like