Giter VIP home page Giter VIP logo

flutter / flutter Goto Github PK

View Code? Open in Web Editor NEW
161.1K 3.5K 26.4K 124.17 MB

Flutter makes it easy and fast to build beautiful apps for mobile and beyond

Home Page: https://flutter.dev

License: BSD 3-Clause "New" or "Revised" License

Dart 98.78% Shell 0.08% HTML 0.06% Objective-C 0.16% PowerShell 0.01% Batchfile 0.03% Java 0.15% Swift 0.04% Ruby 0.07% CSS 0.01% JavaScript 0.05% Kotlin 0.01% C++ 0.24% C 0.01% CMake 0.15% GLSL 0.01% Groovy 0.14%
mobile android ios material-design dart skia web web-framework windows macos

flutter's Introduction

Flutter CI Status Discord badge Twitter handle codecov CII Best Practices OpenSSF Scorecard SLSA 1

Flutter is Google's SDK for crafting beautiful, fast user experiences for mobile, web, and desktop from a single codebase. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.

Documentation

For announcements about new releases, follow the [email protected] mailing list. Our documentation also tracks breaking changes across releases.

Terms of service

The Flutter tool may occasionally download resources from Google servers. By downloading or using the Flutter SDK, you agree to the Google Terms of Service: https://policies.google.com/terms

For example, when installed from GitHub (as opposed to from a prepackaged archive), the Flutter tool will download the Dart SDK from Google servers immediately when first run, as it is used to execute the flutter tool itself. This will also occur when Flutter is upgraded (e.g. by running the flutter upgrade command).

About Flutter

We think Flutter will help you create beautiful, fast apps, with a productive, extensible and open development model, whether you're targeting iOS or Android, web, Windows, macOS, Linux or embedding it as the UI toolkit for a platform of your choice.

Beautiful user experiences

We want to enable designers to deliver their full creative vision without being forced to water it down due to limitations of the underlying framework. Flutter's layered architecture gives you control over every pixel on the screen and its powerful compositing capabilities let you overlay and animate graphics, video, text, and controls without limitation. Flutter includes a full set of widgets that deliver pixel-perfect experiences whether you're building for iOS (Cupertino) or other platforms (Material), along with support for customizing or creating entirely new visual components.

Reflectly hero image

Fast results

Flutter is fast. It's powered by hardware-accelerated 2D graphics libraries like Skia (that underpins Chrome and Android) and Impeller. We architected Flutter to support glitch-free, jank-free graphics at the native speed of your device.

Flutter code is powered by the world-class Dart platform, which enables compilation to 32-bit and 64-bit ARM machine code for iOS and Android, JavaScript and WebAssembly for the web, as well as Intel x64 and ARM for desktop devices.

Dart diagram

Productive development

Flutter offers stateful hot reload, allowing you to make changes to your code and see the results instantly without restarting your app or losing its state.

Hot reload animation

Extensible and open model

Flutter works with any development tool (or none at all), and also includes editor plug-ins for both Visual Studio Code and IntelliJ / Android Studio. Flutter provides tens of thousands of packages to speed your development, regardless of your target platform. And accessing other native code is easy, with support for both FFI (on Android, on iOS, on macOS, and on Windows) as well as platform-specific APIs.

Flutter is a fully open-source project, and we welcome contributions. Information on how to get started can be found in our contributor guide.

flutter's People

Contributors

a14n avatar aam avatar abarth avatar cbracken avatar chinmaygarde avatar christopherfujino avatar chunhtai avatar collinjackson avatar dantup avatar devoncarew avatar dnfield avatar engine-flutter-autoroll avatar fluttergithubbot avatar goderbauer avatar gspencergoog avatar hansmuller avatar hixie avatar jason-simmons avatar jmagman avatar jonahwilliams avatar justinmc avatar longcatislooong avatar piinks avatar pq avatar tahatesser avatar tvolkert avatar vlidholt avatar xster avatar yjbanov avatar zanderso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter's Issues

Tools should support Windows hosts

Hello,

I follow the installation steps to use stocks examples which is in examples/stocks folder.

There, I executed pub get command and it was ok. Then, I tried to launch the sky_tool like said in the steps by steps instructions.

On examples/stocks folder :

C:\Users\sylsau\MyDocuments\Android\dart\sky_sdk\examples\stocks>.\packages\sky\sky_tool start --install '.\packages\sky\sky_tool' n'est pas reconnu en tant que commande interne ou externe, un programme exรฉcutable ou un fichier de commandes.

Sorry, message is in french but problem is that sky_tool is not known as an executable. Is it normal ? sky_tool is not supported on Windows 8 ?

Thanks for your help.

Sylvain

Canvas constructor crashes with bad arguments

Issue by Hixie
Thursday Jul 16, 2015 at 22:25 GMT
Originally opened as https://github.com/flutter/engine/issues/23


From @Hixie on July 15, 2015 21:0

My reading of the Canvas constructor is that it'll crash if you call it with a null first argument.
The comment also explicitly says that it'll crash if you call it with a PictureRecorder in the wrong state.

The APIs the C++ expose to the Dart code should never be able to crash the app.

Copied from original issue: domokit/mojo#326

404 on network_service.mojom.dart, url_loader.mojom.dart and service_registry.mojom.dart

When I try to run a Hello World Sky app on Android, I only get a black screen. Looking at logs, I see it can't find bunch of files:

27.0.0.1 - - [05/Jul/2015 08:33:41] code 404, message File not found
127.0.0.1 - - [05/Jul/2015 08:33:41] "GET /packages/mojom/mojo/network_service.mojom.dart HTTP/1.1" 404 -
127.0.0.1 - - [05/Jul/2015 08:33:41] code 404, message File not found
127.0.0.1 - - [05/Jul/2015 08:33:41] "GET /packages/mojom/mojo/url_loader.mojom.dart HTTP/1.1" 404 -
127.0.0.1 - - [05/Jul/2015 08:33:41] code 404, message File not found
127.0.0.1 - - [05/Jul/2015 08:33:41] "GET /packages/mojom/mojo/service_registry.mojom.dart HTTP/1.1" 404 -

What I am doing is just creating a simple main.dart in a folder with a pubspec.yaml that looks like:

name: your_app_name
dependencies:
  sky: any

and doing a pub get and ./packages/sky/sky_tool start

pub get seems to be getting the latests versions(0.13)

Resolving dependencies... (1.2s) 
+ args 0.13.2
+ mojo 0.0.13
+ mojom 0.0.13
+ path 1.3.5
+ sky 0.0.13
+ vector_math 1.4.3

I have also tried uninstalling SkyDemo and running with ./packages/sky/sky_tool start --install, but same issue.

We should support ideographic, hanging, and mathematical baselines

Issue by Hixie
Thursday June 23, 2015 at 19:55
Originally opened as domokit/mojo#264 then copied to https://github.com/flutter/engine/issues/46


The TrueType 'bsln' table exposes metrics for ideographic, hanging, and mathematical baselines. We should add support for those to FreeType and our other font backends, then add support to Skia to report these metrics, then add support to the Sky engine to be able to align to those baselines and report the distance from the top of a LayoutRoot to each of those baselines, then add support for those baselines to the Dart-level RenderBox baseline protocol.

Unfortunately, Sky has stopped

Steps I followed:

  1. git clone https://github.com/domokit/sky_sdk.git
  2. cd examples/hello_world
  3. ./packages/sky/sky_tool start --install
  4. I receive the warning that sky_sdk/examples/hello_world/packages/apks/SkyDemo.apk does not exist so I copy it over from sky_sdk/packages/sky/
  5. ./packages/sky/sky_tool start --install

At this point I receive the message:

SkyDemo.apk is not installed, installing.
1075 KB/s (7094229 bytes in 6.440s)
        pkg: /data/local/tmp/SkyDemo.apk
Success
Serving HTTP on 0.0.0.0 port 9888 ...
Starting: Intent { act=android.intent.action.VIEW dat=sky://localhost:9888/main.sky }
WARNING:root:Failed to write pid file: /tmp/sky_tool.pids

Then the app launches and then immediately crashes with the message "Unfortunately, Sky has stopped".

I am on a Windows 7 machine, and I am running a Nexus 5 ARM emulator.

Output of adb logcat:

D/AndroidRuntime( 1218): >>>>>> START com.android.internal.os.RuntimeInit uid 0
<<<<<<
D/AndroidRuntime( 1218): CheckJNI is ON
E/memtrack( 1218): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1218): failed to load memtrack module: -2
D/AndroidRuntime( 1218): Calling main entry com.android.commands.am.Am
I/ActivityManager(  335): Force stopping org.domokit.sky.demo appid=10053 user=0
: from pid 1218
D/AndroidRuntime( 1218): Shutting down VM
D/AndroidRuntime( 1229): >>>>>> START com.android.internal.os.RuntimeInit uid 0
<<<<<<
D/AndroidRuntime( 1229): CheckJNI is ON
E/memtrack( 1229): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1229): failed to load memtrack module: -2
D/AndroidRuntime( 1229): Calling main entry com.android.commands.pm.Pm
I/art     ( 1229): System.exit called, status: 0
I/AndroidRuntime( 1229): VM exiting with result code 0.
D/AndroidRuntime( 1242): >>>>>> START com.android.internal.os.RuntimeInit uid 0
<<<<<<
D/AndroidRuntime( 1242): CheckJNI is ON
E/memtrack( 1242): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1242): failed to load memtrack module: -2
D/AndroidRuntime( 1242): Calling main entry com.android.commands.am.Am
I/ActivityManager(  335): START u0 {act=android.intent.action.VIEW dat=sky://loc
alhost:9888/main.sky flg=0x10000000 cmp=org.domokit.sky.demo/.SkyDemoActivity} f
rom uid 0 on display 0
V/WindowManager(  335): addAppToken: AppWindowToken{bca5c97 token=Token{316bcb16
 ActivityRecord{2651f831 u0 org.domokit.sky.demo/.SkyDemoActivity t17}}} to stac
k=1 task=17 at 0
V/WindowManager(  335): Adding window Window{ed182a2 u0 Starting org.domokit.sky
.demo} at 2 of 7 (after Window{348e15b1 u0 com.android.launcher/com.android.laun
cher2.Launcher})
D/AndroidRuntime( 1242): Shutting down VM
I/art     (   66): Background concurrent mark sweep GC freed 777(32KB) AllocSpac
e objects, 0(0B) LOS objects, 91% free, 93KB/1117KB, paused 541us total 163.437m
s
I/ActivityManager(  335): Start proc 1253:org.domokit.sky.demo/u0a53 for activit
y org.domokit.sky.demo/.SkyDemoActivity
I/LibraryLoader( 1253): Time to load native libraries: 170 ms (timestamps 3025-3
195)
I/LibraryLoader( 1253): Expected native library version number "",actual native
library version number ""
D/        ( 1253): HostConnection::get() New Host Connection established 0xb4a62
f70, tid 1253
W/art     ( 1253): Attempt to remove local handle scope entry from IRT, ignoring

E/TracingController( 1253): org.domokit.sky.demo.TRACING_START
D/OpenGLRenderer( 1253): Use EGL_SWAP_BEHAVIOR_PRESERVED: true
D/Atlas   ( 1253): Validating map...
V/WindowManager(  335): Adding window Window{1e8b25c6 u0 org.domokit.sky.demo/or
g.domokit.sky.demo.SkyDemoActivity} at 2 of 8 (before Window{ed182a2 u0 Starting
 org.domokit.sky.demo})
I/OpenGLRenderer( 1253): Initialized EGL, version 1.4
D/        ( 1253): HostConnection::get() New Host Connection established 0xb4b15
460, tid 1274
D/OpenGLRenderer( 1253): Enabling debug mode 0
W/EGL_emulation( 1253): eglSurfaceAttrib not implemented
W/OpenGLRenderer( 1253): Failed to set EGL_SWAP_BEHAVIOR on surface 0xb4b81180,
error=EGL_SUCCESS
V/WindowManager(  335): Adding window Window{2f3b0b4 u0 SurfaceView} at 2 of 9 (
before Window{1e8b25c6 u0 org.domokit.sky.demo/org.domokit.sky.demo.SkyDemoActiv
ity})
W/art     ( 1253): Attempt to remove local handle scope entry from IRT, ignoring

I/ActivityManager(  335): Displayed org.domokit.sky.demo/.SkyDemoActivity: +2s13
7ms
D/        ( 1253): HostConnection::get() New Host Connection established 0xb4a62
fe0, tid 1270
I/chromium( 1253): [INFO:GrGLUtil.cpp(152)] NULL GLSL version string.
F/libc    ( 1253): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xc in tid 1270
 (gpu_thread)
D/TaskPersister(  335): removeObsoleteFile: deleting file=16_task.xml
I/DEBUG   (   60): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *
**
I/DEBUG   (   60): Build fingerprint: 'generic/sdk_phone_armv7/generic:5.1/LKY45
/1737576:eng/test-keys'
I/DEBUG   (   60): Revision: '0'
I/DEBUG   (   60): ABI: 'arm'
I/DEBUG   (   60): pid: 1253, tid: 1270, name: gpu_thread  >>> org.domokit.sky.d
emo <<<
I/DEBUG   (   60): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xc
I/DEBUG   (   60):     r0 00000000  r1 00000800  r2 06000000  r3 a68880cd
I/DEBUG   (   60):     r4 b4a40a10  r5 00000000  r6 b488d200  r7 b4a40a10
I/DEBUG   (   60):     r8 00000000  r9 a660db18  sl a6d70018  fp b487188c
I/DEBUG   (   60):     ip b6df97ec  sp a660d880  lr a679cf1b  pc a68887b8  cpsr
80000030
I/DEBUG   (   60):
I/DEBUG   (   60): backtrace:
I/DEBUG   (   60):     #00 pc 001727b8  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #01 pc 00086f17  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #02 pc 00087533  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #03 pc 00087691  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #04 pc 00089109  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #05 pc 000a22bf  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #06 pc 001daceb  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #07 pc 00097c89  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #08 pc 00098283  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #09 pc 00098a01  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #10 pc 000aa5dd  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #11 pc 000aa6bf  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #12 pc 0009b509  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #13 pc 000978dd  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #14 pc 000a28d3  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #15 pc 000a1f5b  /data/app/org.domokit.sky.demo-1/lib/arm
/libsky_shell.so
I/DEBUG   (   60):     #16 pc 00015f2b  /system/lib/libc.so (__pthread_start(voi
d*)+30)
I/DEBUG   (   60):     #17 pc 00013ea3  /system/lib/libc.so (__start_thread+6)
I/DEBUG   (   60):
I/DEBUG   (   60): Tombstone written to: /data/tombstones/tombstone_00
I/BootReceiver(  335): Copying /data/tombstones/tombstone_00 to DropBox (SYSTEM_TOMBSTONE)

W/ActivityManager(  335):   Force finishing activity 1 org.domokit.sky.demo/.SkyDemoActivity
W/InputDispatcher(  335): channel '1e8b25c6 org.domokit.sky.demo/org.domokit.sky.demo.SkyDemoActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
E/InputDispatcher(  335): channel '1e8b25c6 org.domokit.sky.demo/org.domokit.sky.demo.SkyDemoActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
I/Zygote  (   66): Process 1253 exited due to signal (11)
D/        (  335): HostConnection::get() New Host Connection established 0xa5194700, tid 1283
E/EGL_emulation(   52): tid 52: eglCreateSyncKHR(1237): error 0x3004 (EGL_BAD_ATTRIBUTE)
E/FrameworkListener(   59): read() failed (Connection reset by peer)
I/art     (  335): Explicit concurrent mark sweep GC freed 3399(273KB) AllocSpace objects, 9(1281KB) LOS objects, 33% free, 6MB/9MB, paused 2.012ms total 133.117ms
I/WindowState(  335): WIN DEATH: Window{1e8b25c6 u0 org.domokit.sky.demo/org.domokit.sky.demo.SkyDemoActivity}
W/InputDispatcher(  335): Attempted to unregister already unregistered input channel '1e8b25c6 org.domokit.sky.demo/org.domokit.sky.demo.SkyDemoActivity (server)'
I/WindowState(  335): WIN DEATH: Window{2f3b0b4 u0 SurfaceView}
W/ActivityManager(  335): Exception thrown during pause
W/ActivityManager(  335): android.os.DeadObjectException
W/ActivityManager(  335):       at android.os.BinderProxy.transactNative(Native Method)
W/ActivityManager(  335):       at android.os.BinderProxy.transact(Binder.java:496)
W/ActivityManager(  335):       at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:704)
W/ActivityManager(  335):       at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:825)
W/ActivityManager(  335):       at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:2726)
W/ActivityManager(  335):       at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:2583)
W/ActivityManager(  335):       at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:2497)
W/ActivityManager(  335):       at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:11500)
W/ActivityManager(  335):       at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:11397)
W/ActivityManager(  335):       at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:12081)
W/ActivityManager(  335):       at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:11592)
W/ActivityManager(  335):       at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
E/lowmemorykiller(   49): Error opening /proc/1253/oom_score_adj; errno=2
I/ActivityManager(  335): Process org.domokit.sky.demo (pid 1253) has died
W/EGL_emulation(  598): eglSurfaceAttrib not implemented
W/OpenGLRenderer(  598): Failed to set EGL_SWAP_BEHAVIOR on surface 0xb4b319a0, error=EGL_SUCCESS
I/OpenGLRenderer(  335): Initialized EGL, version 1.4
W/EGL_emulation(  335): eglSurfaceAttrib not implemented
W/OpenGLRenderer(  335): Failed to set EGL_SWAP_BEHAVIOR on surface 0xa5185f40, error=EGL_SUCCESS
W/OpenGLRenderer(  598): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
W/OpenGLRenderer(  598): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
W/OpenGLRenderer(  598): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...

Support capturing back button

I see no way of capturing the back button press in the app. Currently this closes the Sky Engine.

It would be great if this can be combined with the request to have framework level support for page transitions (with animations). Back button can then be handled within framework and transition to the previous page.

Sky runtime for OS X

I know Android is the only supported platform for now, so this is just to track the issue and get notified if things change.

Fold packages/unit into packages/flutter

There's no reason to keep these separate anymore. We can just have packages/unit/test be packages/flutter/test and make test and quiver dev dependencies of the flutter package.

sky.ColorFilter needs operator==

Issue by Hixie
Thursday Jul 16, 2015 at 22:25 GMT
Originally opened as https://github.com/flutter/engine/issues/25


From @abarth on July 15, 2015 19:7

When someone sets a sky.ColorFilter on either a ColorFilter widget or on an Image widget, we call operator== to check whether the filter has changed. If it has changed, we mark ourselves as needing paint. However, sky.ColorFilter doesn't implement operator==, which means we're just getting object identity, which means we're invalidating paint more often than necessary.

/cc @mpcomplete

Copied from original issue: domokit/mojo#324

we need some feedback that the observatory is up and available to connect to

From https://github.com/flutter/tools/issues/110

The CLI VM prints out Observatory listening on http://127.0.0.1:8989 when run w/ the observatory enabled. Perhaps the flutter runtime should to the same?

It looks like the VM doesn't print on startup if you use the default port of 8181. And parsing stdout for a token isn't the most reliable way of doing things.

We could change the flutter start command to not return until the process is up and running on android. Then we'd know, when that completes, that the observatory is ready to connect to.

Stocks example: 404 on resolving image assets

When running the sample application, material icons seem to be missing from the UI

device-2015-05-01-204028

Verifying the output in the terminal, I noticed the lines with a 404 code:

screen shot 2015-05-01 at 20 35 06

I went to check the mentioned paths and they were indeed non-exisitent. I stumbled on this python script to download the assets. In the screenshot below you can see the result after execution:

screen shot 2015-05-01 at 20 48 45

Running the application and remove/reinstalling the application resulted in the same 404 messages.

`flutter start` doesn't give good error messages when it can't find main.dart

When I try to flutter start any of the example programs widgets, fitness or rendering I get an error like the following:

Downloading Sky Snapshot from the cloud, one moment please...
Downloading Sky Shell from the cloud, one moment please...
[1108/213053:FATAL:loader.cc(21)] Check failed: base::ReadFileToString(path, &source). /home/dmta/flutter/flutter/examples/rendering/./lib/main.dart

The other examples I have tried worked fine.

UI Node key confusion

UI nodes require a unique key for arrays of homogeneous children. They key is nominally Object but internally it seems to be converted to String. This causes the surprising behavior that custom objects are rejected as keys:

[0612/154234:ERROR:dart_error.cc(20)] Unhandled exception:
Uncaught Error: If multiple non-interchangeable nodes of the same type exist as children
of another node, they must have unique keys.
Duplicate:

The current workaround is to add a custom .toString() method to any custom class used as key

For example

class Cell {
final int posX;
final int posY;
Cell(this.posX, this.posY);
String toString() => 'Cell($posX, $posY)';
}

without the toString() method, it cannot be used as a key.

HTML Support?

So let's say there was a case where a server sends dynamic content for your mobile app to display to the user, and it does so by feeding HTML to the app. Does Sky have a way of taking that HTML and displaying it to the user? Obviously in Android / iOS the dev would just use a WebView. Is / will there be something to handle this in Sky?

Many of our components draw outside their paintBounds

Issue by Hixie
Thursday Jul 16, 2015 at 22:25 GMT
Originally opened as https://github.com/flutter/engine/issues/26


From @Hixie on July 14, 2015 17:22

You can now easily tell what components paint outside their bounds by turning on debugPaintBoundsEnabled in sdk/lib/base/debug.dart. I noticed at least the following in the stocks app:

  • radio buttons
  • switches
  • anything with shadows, including drawer, popup menu, toolbar, floating action button, dialog
  • circles in the stock row

/cc @collinjackson @iansf

Copied from original issue: domokit/mojo#321

flutter listen fails on Mac OS X

  • OS X
  • fswatch installed
  • moto x. android 5.1
  1. cd into hello world app directory
  2. start the hello world app with flutter start --checked
  3. start listen with flutter listen --checked

adb log:

11-07 13:08:49.544 30092-30092/? D/AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
11-07 13:08:49.547 30092-30092/? D/AndroidRuntime: CheckJNI is OFF
11-07 13:08:49.590 30092-30092/? E/cutils-trace: Error opening trace file: Permission denied (13)
11-07 13:08:49.668 30092-30092/? D/AndroidRuntime: Calling main entry com.android.commands.am.Am
11-07 13:08:49.676 925-1403/? I/ActivityManager: START u0 {act=android.intent.action.VIEW dat=http://localhost:9888/lib/main.dart?rand=0.8416346927957559 flg=0x10000000 cmp=org.domokit.sky.shell/.SkyActivity (has extras)} from uid 2000 on display 0
11-07 13:08:49.685 925-1403/? V/WindowManager: addAppToken: AppWindowToken{28a1d68a token=Token{29fbf8f5 ActivityRecord{976c62c u0 org.domokit.sky.shell/.SkyActivity t2424}}} to stack=1 task=2424 at 1
11-07 13:08:49.690 30092-30092/? D/AndroidRuntime: Shutting down VM
11-07 13:08:49.723 925-3947/? V/WindowManager: Adding window Window{1b5b85d7 u0 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity} at 13 of 19 (after Window{31ae72a6 u0 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity})
11-07 13:08:49.774 925-939/? V/WindowManager: Adding window Window{3af751ad u0 SurfaceView} at 13 of 20 (before Window{1b5b85d7 u0 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity})
11-07 13:08:49.781 30037-30037/? W/art: Attempt to remove local handle scope entry from IRT, ignoring
11-07 13:08:49.808 1362-1362/? I/Keyboard.Facilitator: onFinishInput()
11-07 13:08:49.818 925-949/? I/LaunchCheckinHandler: Displayed org.domokit.sky.shell/.SkyActivity,wp,ca,128
11-07 13:08:49.818 925-949/? I/ActivityManager: Displayed org.domokit.sky.shell/.SkyActivity: +128ms
11-07 13:08:49.848 30037-30110/? W/UrlLoaderImpl: Network failure loading http://localhost:9888/lib/main.dart?rand=0.8416346927957559
11-07 13:08:49.850 30037-30058/? E/chromium: [ERROR:dart_library_loader.cc(299)] Library Load failed: http://localhost:9888/lib/main.dart?rand=0.8416346927957559
11-07 13:08:49.874 30037-30058/? E/chromium: [ERROR:dart_error.cc(16)] Dart_LookupLibrary: library 'http://localhost:9888/lib/main.dart?rand=0.8416346927957559' not found.
11-07 13:08:49.924 925-1097/? W/InputDispatcher: channel '31ae72a6 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
11-07 13:08:49.924 925-1097/? E/InputDispatcher: channel '31ae72a6 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
11-07 13:08:49.924 925-1097/? W/InputDispatcher: channel '1b5b85d7 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
11-07 13:08:49.924 925-1097/? E/InputDispatcher: channel '1b5b85d7 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
11-07 13:08:49.963 270-270/? I/Zygote: Process 30037 exited cleanly (1)
11-07 13:08:49.985 925-4769/? I/WindowState: WIN DEATH: Window{3e6cf894 u0 SurfaceView}
11-07 13:08:50.005 925-3947/? W/WindowManager: Failed looking up window
                                               java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@209994e7 does not exist
                                                   at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8594)
                                                   at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8585)
                                                   at com.android.server.wm.WindowManagerService.relayoutWindow(WindowManagerService.java:3040)
                                                   at com.android.server.wm.Session.relayout(Session.java:197)
                                                   at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:273)
                                                   at com.android.server.wm.Session.onTransact(Session.java:130)
                                                   at android.os.Binder.execTransact(Binder.java:446)
11-07 13:08:50.006 925-1647/? I/WindowState: WIN DEATH: Window{1b5b85d7 u0 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity}
11-07 13:08:50.006 925-1647/? W/InputDispatcher: Attempted to unregister already unregistered input channel '1b5b85d7 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity (server)'
11-07 13:08:50.006 925-1647/? W/WindowManager: Force-removing child win Window{3af751ad u0 SurfaceView} from container Window{1b5b85d7 u0 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity}
11-07 13:08:50.014 925-939/? W/WindowManager: Failed looking up window
                                              java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@2409aec4 does not exist
                                                  at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8594)
                                                  at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8585)
                                                  at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1152)
                                                  at android.os.BinderProxy.sendDeathNotice(Binder.java:551)
11-07 13:08:50.014 925-939/? I/WindowState: WIN DEATH: null
11-07 13:08:50.014 925-1403/? I/WindowState: WIN DEATH: Window{31ae72a6 u0 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity}
11-07 13:08:50.014 925-1403/? W/InputDispatcher: Attempted to unregister already unregistered input channel '31ae72a6 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity (server)'
11-07 13:08:50.042 925-4909/? I/ActivityManager: Process org.domokit.sky.shell (pid 30037) has died
11-07 13:08:50.044 925-4909/? W/ActivityManager: Force removing ActivityRecord{976c62c u0 org.domokit.sky.shell/.SkyActivity t2424}: app died, no saved state
11-07 13:08:50.044 925-4909/? W/ActivityManager: Force removing ActivityRecord{3ee01ff6 u0 org.domokit.sky.shell/.SkyActivity t2424}: app died, no saved state

Leaking intent receiver

From logcat:

05-18 13:55:41.176: E/ActivityThread(13923): android.app.IntentReceiverLeaked: Activity org.domokit.sky.demo.SkyDemoActivity has leaked IntentReceiver org.domokit.sky.shell.TracingController$TracingBroadcastReceiver@7aef0e2 that was originally registered here. Are you missing a call to unregisterReceiver()?
05-18 13:55:41.176: E/ActivityThread(13923):    at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:903)
05-18 13:55:41.176: E/ActivityThread(13923):    at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:704)
05-18 13:55:41.176: E/ActivityThread(13923):    at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1643)
05-18 13:55:41.176: E/ActivityThread(13923):    at android.app.ContextImpl.registerReceiver(ContextImpl.java:1623)
05-18 13:55:41.176: E/ActivityThread(13923):    at android.app.ContextImpl.registerReceiver(ContextImpl.java:1617)
05-18 13:55:41.176: E/ActivityThread(13923):    at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:489)
05-18 13:55:41.176: E/ActivityThread(13923):    at org.domokit.sky.shell.TracingController.<init>(TracingController.java:40)
05-18 13:55:41.176: E/ActivityThread(13923):    at org.domokit.sky.shell.SkyActivity.onCreate(SkyActivity.java:38)
05-18 13:55:41.176: E/ActivityThread(13923):    at org.domokit.sky.demo.SkyDemoActivity.onCreate(SkyDemoActivity.java:22)

Download the Android platform tools automatically

Developers using Flutter or contributing to the Flutter framework shouldn't need to download their own copy of the Android platform tools. Instead, we should manage that dependency automatically from the flutter.git repository.

App level UINode build is called many times

Testing the sky framework now with the stocks example. I added a print() statement to build() fn in stocks_app and discovered that it is printed close to 30 times in logcat:

05-18 12:51:30.268: I/chromium(8515): [INFO:builtin_natives.cc(144)] CONSOLE: Building the app node
05-18 12:51:30.330: I/chromium(8515): [INFO:builtin_natives.cc(144)] CONSOLE: Building the app node
05-18 12:51:30.410: I/chromium(8515): [INFO:builtin_natives.cc(144)] CONSOLE: Building the app node
05-18 12:51:30.481: I/chromium(8515): [INFO:builtin_natives.cc(144)] CONSOLE: Building the app node
05-18 12:51:30.563: I/chromium(8515): [INFO:builtin_natives.cc(144)] CONSOLE: Building the app node
05-18 12:51:30.619: I/chromium(8515): [INFO:builtin_natives.cc(144)] CONSOLE: Building the app node
...

Just filing an FYI bug. I expected this to show up only once:

  UINode build() {
    print("Building the app node");
    List<UINode> overlays = [];
    addMenuToOverlays(overlays);
    _scaffold = new Scaffold(
      header: _isSearching ? buildSearchBar() : buildActionBar(),
      content: new Stocklist(stocks: _stocks, query: _searchQuery, app: this),
      fab: new FloatingActionButton(
        content: new Icon(type: 'content/add_white', size: 24), level: 3),
      drawer: buildDrawer(),
      overlays: overlays
    );
    return _scaffold;
  }

Download the Dart SDK automatically

Developers using Flutter or contributing to the Flutter framework shouldn't need to download their own copy of the Dart SDK. Instead, we should manage that dependency automatically from the flutter.git repository.

./dev/update_packages.py fails awkwardly if pub is not in your path

./dev/update_packages.py [/src/flutter]
Updating cassowary ...
Traceback (most recent call last):
File "./dev/update_packages.py", line 19, in
update(os.path.join(FLUTTER_ROOT, 'packages'))
File "./dev/update_packages.py", line 17, in update
subprocess.check_call(['pub', 'get'], cwd=package_dir)
File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
retcode = call(_popenargs, *_kwargs)
File "/usr/lib/python2.7/subprocess.py", line 522, in call
return Popen(_popenargs, *_kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 710, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

%pub [/src/flutter]
zsh: command not found: pub

Support page transitions

Right now I do page transitions via something like this:

  void forward(UINode newContent) {
    setState(() {
      _content = newContent;
    });
  }

  UINode build() {
    List<UINode> overlays = [];
    addMenuToOverlays(overlays);
    _scaffold = new Scaffold(
      header: _isSearching ? buildSearchBar() : buildActionBar(),
      content: _content,
      fab: new FloatingActionButton(
        content: new Icon(type: 'content/add_white', size: 24), level: 3),
      drawer: buildDrawer(),
      overlays: overlays
    );
    return _scaffold;
  }

Then passing the app object around. This is very rudimentary. It would be great if we could inject some sort of router to the components so they can request a page transition. Angular does this via defining routes on dart.

Inline Google Maps support

Issue by Hixie
Thursday Jul 16, 2015 at 22:26 GMT
Originally opened as https://github.com/flutter/engine/issues/30


From @collinjackson on July 8, 2015 20:23

We are going to want to have support for maps in Sky.

There are a few ways we might go about doing this:

  1. Use native maps widget for each platform to render the map
  2. Use maps widget for each platform to render to a texture and draw the map ourselves
  3. Develop a custom maps SDK for Sky

The second option would be ideal but may not be possible. We should investigate which approach is best and build a demo app.

Copied from original issue: domokit/mojo#310

Rename our tools package

For sanity, we should make the following changes to our tools package naming:

  • directory flutter/packages/flutter_tools/* => flutter/packages/tools/*
  • package name sky_tools => flutter_tools

`flutter listen` causes SkyShell to crash when a file is changed

From https://github.com/flutter/tools/issues/176

On OS X with fswatch installed.
Connected via adb to real android device.

cd into hello world app directory
Start the hello world app with flutter start --checked
Start listen with flutter listen
Open lib/main.dart and change the Hello world. text to anything, save.

adb logcat:

11-07 12:43:32.270  4335  4477 W UrlLoaderImpl: Network failure loading http://localhost:9888/lib/main.dart?rand=0.7224074384297607
11-07 12:43:32.272  4335  4357 E chromium: [ERROR:dart_library_loader.cc(299)] Library Load failed: http://localhost:9888/lib/main.dart?rand=0.7224074384297607
11-07 12:43:32.293  4335  4357 E chromium: [ERROR:dart_error.cc(16)] Dart_LookupLibrary: library 'http://localhost:9888/lib/main.dart?rand=0.7224074384297607' not found.
11-07 12:43:32.327  1906  3524 I WindowState: WIN DEATH: Window{29e51ec u0 SurfaceView EXITING}
11-07 12:43:32.327  1906  7745 D GraphicsStats: Buffer count: 3
11-07 12:43:32.329  1906  7745 I WindowState: WIN DEATH: Window{1f1c7fd u0 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity}
11-07 12:43:32.330  1906  7746 I WindowState: WIN DEATH: Window{6948678 u0 org.domokit.sky.shell/org.domokit.sky.shell.SkyActivity EXITING}
11-07 12:43:32.331  1906  1916 I WindowState: WIN DEATH: Window{2e6f9b5 u0 SurfaceView}
11-07 12:43:32.353  1409  1409 I Zygote  : Process 4335 exited cleanly (1)
11-07 12:43:32.372  1906  3790 I ActivityManager: Process org.domokit.sky.shell (pid 4335) has died
11-07 12:43:32.372  1906  3790 W ActivityManager: Force removing ActivityRecord{e40e49a u0 org.domokit.sky.shell/.SkyActivity t2371}: app died, no saved state
11-07 12:43:32.373  1906  3790 W ActivityManager: Force removing ActivityRecord{68357cf u0 org.domokit.sky.shell/.SkyActivity t2371}: app died, no saved state

/cc @jakerr

Sky shell doesn't build with openjdk javac 1.8.

Issue by Hixie
Thursday Jul 16, 2015 at 22:26 GMT
Originally opened as https://github.com/flutter/engine/issues/31


From @PPiet on July 8, 2015 16:38

The error I get is:

[193/2246] ACTION //sky/shell:java__compile_java__javac(//build/toolchain/android:arm)
FAILED: python ../../build/android/gyp/javac.py --depfile=gen/sky/shell/java__compile_java__javac.d --classpath=\[\"../../third_party/android_tools/sdk/platforms/android-22/android.jar\"\] --classpath=@FileArg\(gen/sky/shell/java.build_config:javac:classpath\) --jar-path=gen/sky/shell/java__compile_java.initial.jar --java-srcjars=\[\] --java-srcjars=@FileArg\(gen/sky/shell/java.build_config:javac:srcjars\) --jar-excluded-classes=\[\"\*/R.class\",\ \"\*/R\#\#\*.class\",\ \"\*/Manifest.class\",\ \"\*/Manifest\#\#\*.class\"\] --chromium-code=1 ../../sky/shell/android/org/domokit/sky/shell/GestureProvider.java ../../sky/shell/android/org/domokit/sky/shell/PlatformServiceProvider.java ../../sky/shell/android/org/domokit/sky/shell/PlatformViewAndroid.java ../../sky/shell/android/org/domokit/sky/shell/ResourceExtractor.java ../../sky/shell/android/org/domokit/sky/shell/ServiceFactory.java ../../sky/shell/android/org/domokit/sky/shell/ServiceRegistry.java ../../sky/shell/android/org/domokit/sky/shell/SkyActivity.java ../../sky/shell/android/org/domokit/sky/shell/SkyApplication.java ../../sky/shell/android/org/domokit/sky/shell/SkyMain.java ../../sky/shell/android/org/domokit/sky/shell/TracingController.java
Traceback (most recent call last):
  File "../../build/android/gyp/javac.py", line 280, in <module>
    sys.exit(main(sys.argv[1:]))
  File "../../build/android/gyp/javac.py", line 244, in main
    java_files)
  File "../../build/android/gyp/javac.py", line 104, in DoJavac
    input_strings=javac_cmd)
  File "/usr/local/work/mojo/src/build/android/gyp/util/md5_check.py", line 30, in CallAndRecordIfStale
    function()
  File "../../build/android/gyp/javac.py", line 97, in Compile
    stderr_filter=ColorJavacOutput)
  File "/usr/local/work/mojo/src/build/android/gyp/util/build_utils.py", line 158, in CheckOutput
    raise CalledProcessError(cwd, args, stdout + stderr)
util.build_utils.CalledProcessError: Command failed: ( cd /usr/local/work/mojo/src/out/android_Debug; javac -g -encoding UTF-8 -source 1.7 -target 1.7 -classpath ../../third_party/android_tools/sdk/platforms/android-22/android.jar:gen/base/base_java.jar:gen/mojo/android/system_java.jar:gen/mojo/public/interfaces/application/application_java.jar:gen/mojo/public/java/bindings.jar:gen/mojo/public/java/system.jar:gen/mojo/services/network/public/interfaces/interfaces_java.jar:gen/services/keyboard/keyboard.jar:gen/sky/services/engine/engine_java.jar:gen/sky/services/oknet/oknet.jar:gen/sky/services/intents/intents_lib.jar -d /tmp/tmpZoxfmr/classes -Xlint:unchecked ../../sky/shell/android/org/domokit/sky/shell/GestureProvider.java ../../sky/shell/android/org/domokit/sky/shell/PlatformServiceProvider.java ../../sky/shell/android/org/domokit/sky/shell/PlatformViewAndroid.java ../../sky/shell/android/org/domokit/sky/shell/ResourceExtractor.java ../../sky/shell/android/org/domokit/sky/shell/ServiceFactory.java ../../sky/shell/android/org/domokit/sky/shell/ServiceRegistry.java ../../sky/shell/android/org/domokit/sky/shell/SkyActivity.java ../../sky/shell/android/org/domokit/sky/shell/SkyApplication.java ../../sky/shell/android/org/domokit/sky/shell/SkyMain.java ../../sky/shell/android/org/domokit/sky/shell/TracingController.java )
warning: [options] bootstrap class path not set in conjunction with -source 1.7
../../sky/shell/android/org/domokit/sky/shell/PlatformViewAndroid.java:97: error: cannot access KeyboardService
        KeyboardServiceImpl.setActiveView(this);
                           ^
  class file for org.chromium.mojom.keyboard.KeyboardService not found
../../sky/shell/android/org/domokit/sky/shell/SkyActivity.java:47: error: cannot access ActivityManager
        ActivityManagerImpl.setCurrentActivity(this);
                           ^
  class file for org.chromium.mojom.intents.ActivityManager not found
2 errors
1 warning

Setting the PATH to use openjdk javac 1.7 instead makes the error go away.

Copied from original issue: domokit/mojo#308

Add examples of Material Design Card Content Blocks to gallery demo

Issue by Hixie
Thursday Jul 16, 2015 at 22:26 GMT
Originally opened as https://github.com/flutter/engine/issues/28


From @eseidelGoogle on July 14, 2015 16:58

Cards have specific layout patterns for their content:
http://www.google.com/design/spec/components/cards.html#cards-content-blocks

We should provide some helpers to get those layouts as part of the Sky Framework.

FYI @HansMuller

Copied from original issue: domokit/mojo#319

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.