1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

1449330894 dart 3505

7 0 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Nội dung

Dart: Up and Running Kathy Walrath and Seth Ladd Dart: Up and Running by Kathy Walrath and Seth Ladd Copyright © 2013 Kathy Walrath, Seth Ladd All rights reserved Printed in the United States of America Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472 O’Reilly books may be purchased for educational, business, or sales promotional use Online editions are also available for most titles (http://my.safaribooksonline.com) For more information, contact our corporate/ institutional sales department: 800-998-9938 or corporate@oreilly.com Editor: Meghan Blanchette Production Editor: Christopher Hearse Proofreader: Christopher Hearse Cover Designer: Randy Comer Interior Designer: David Futato Illustrator: Rebecca Demarest Revision History for the First Edition: 2012-10-24 First release See http://oreilly.com/catalog/errata.csp?isbn=9781449330897 for release details Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc Dart: Up and Running, the image of a greater roadrunner, and related trade dress are trademarks of O’Reilly Media, Inc This text of this work is available at this book’s GitHub project under the Creative Commons AttributionNoncommercial-No Derivative Works 3.0 United States License 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 O’Reilly Media, Inc., was aware of a trade‐ mark claim, the designations have been printed in caps or initial caps While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein ISBN: 978-1-449-33089-7 [LSI] Table of Contents Foreword ix Preface xi Quick Start Why Google Created Dart A Quick Look at the Dart Language What’s Cool About Dart Up and Running Step 1: Download and Install the Software Step 2: Launch the Editor Step 3: Create and Run an App Step 4: Open and Run a Sample What Next? 3 5 A Tour of the Dart Language 11 A Basic Dart Program Important Concepts Runtime Modes Variables Default Value Optional Types Final and Const Built-in Types Numbers Strings Booleans Lists Maps Functions Optional Parameters 11 12 13 13 14 14 14 15 15 16 17 18 19 20 20 iii Recall that in the root isolate, the _loggingPort variable holds a SendPort that the root isolate uses to send messages to the logging isolate Every time the chat server calls the log() method, the root isolate sends the log data: void log(String message) { _loggingPort.send(message); } See “dart:isolate - Concurrency with Isolates” (page 76) for more information about using isolates What Next? You’ve seen how the Dart Chat sample uses both server-side and client-side Dart code to implement a web app Here are some other samples you might want to look at: • Solar, which simulates the solar system with animations in a canvas, using requestAnimationFrame() • Spirodraw, a fun, interactive tool to build colorful works of art Finally, please visit our website and join the discussion We look forward to hearing from you! • Dart website • Dart discussion group • Dart questions on Stack Overflow What Next? | 119 About the Authors Kathy is a technical writer who’s worked on docs for Chrome and other developer APIs at Google since 2006 Before that, she worked at Sun, NeXT, and HP Back when the Web was young, she wrote the first doc to help developers write Java applets She also co-created The Java Tutorial and maintained it for a very long time Seth is a Developer Advocate with the Chrome team He is a conference organizer (Aloha on Rails, New Game) and author (Expert Spring MVC [Apress]), helped publish Angry Birds for the Web, and is a big fan of HTML5 and the modern Web ... Why Google Created Dart A Quick Look at the Dart Language What’s Cool About Dart Up and Running Step 1: Download and Install the Software Step... See ? ?dart: isolate - Concurrency with Isolates” (page 76) for more information about using isolates What Next? You’ve seen how the Dart Chat sample uses both server-side and client-side Dart code... visit our website and join the discussion We look forward to hearing from you! • Dart website • Dart discussion group • Dart questions on Stack Overflow What Next? | 119 About the Authors Kathy is

Ngày đăng: 04/12/2022, 15:15

w