text:
[web]: safari blank page production build

After running flutter packages pub global run webdev build or flutter packages pub global run webdev serve -r web app loads all resources but shows a blank page with Safari.
With Chrome all works.
Browser console logs:
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (stack_trace_mapper.dart.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (dart_sdk.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (client.dart.js.map, line 0)
[Error] Unhandled Promise Rejection: SyntaxError: The string did not match the expected pattern. 	_rethrow (dart_sdk.js:28306) 	(funzione anonima) (dart_sdk.js:28302) 	_microtaskLoop (dart_sdk.js:25002) 	_startMicrotaskLoop (dart_sdk.js:25008) 	(funzione anonima) (dart_sdk.js:25083) 	promiseReactionJob

Got the same issue!

/cc @jonahwilliams @grouma

This appears to be a DDC issue. @vsmenon to triage.

@grouma - The -r should mean dart2js, not ddc.  But we should only serve stack_trace_mapper.dart and (I think) client.dart with ddc.  Is something getting mixed up here?

Ahh I missed that.
Yes we should not be serving client.js in release mode. I tried reproducing this locally with webdev version 2.2.0 and was unable to do so.
@taepo what version of webdev are you using? You can run flutter packages pub global run webdev --version

The version after flutter packages pub global run webdev --version is 2.2.0

Please run with the latest webdev version 2.3.0 and see if you can reproduce the issue. Please provide further details on your set up including if possible a sample application.

I update webdev to 2.3.0.
With Chrome keeps working, using Safari, it prints these logs:
The last one log is called multiple times until I close the tab.
[Error] TypeError: null is not an object (evaluating 'this.gWQ().$3')
	oW (main.dart.js:52915)
	z3 (main.dart.js:48158)
	$1 (main.dart.js:48165)
	abQ (main.dart.js:571)
	(funzione anonima) (main.dart.js:580)
[Error]
	$0 (main.dart.js:18417)
	aaI (main.dart.js:1625)
	aaM (main.dart.js:1627)
	$1 (main.dart.js:17666)
	abQ (main.dart.js:571)
	(funzione anonima) (main.dart.js:580)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (main.dart.js.map, line 0)
[Error] TypeError: null is not an object (evaluating 'this.gWS().$1')
	WT (main.dart.js:52912)
	PI (main.dart.js:48191)
	(funzione anonima) (Script anonimo 1 (linea 2))
	$1 (main.dart.js:48335)
	$1 (main.dart.js:48200)
	abQ (main.dart.js:571)
	(funzione anonima) (main.dart.js:580)

Using the debug build version, safari logs these:
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (stack_trace_mapper.dart.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (dart_sdk.js.map, line 0)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (client.dart.js.map, line 0)
[Debug] dart.developer.registerExtension – "ext.flutter.disassemble" (dart_sdk.js, line 45147)
[Error] Unhandled Promise Rejection: SyntaxError: The string did not match the expected pattern.
	_rethrow (dart_sdk.js:28723)
	(funzione anonima) (dart_sdk.js:28719)
	_microtaskLoop (dart_sdk.js:25352)
	_startMicrotaskLoop (dart_sdk.js:25358)
	(funzione anonima) (dart_sdk.js:25433)
	promiseReactionJob
[Error] TypeError: t3.onPointerDataPacket is not a function. (In 't3.onPointerDataPacket(packet)', 't3.onPointerDataPacket' is null)
	(funzione anonima) (ui.ddc.js:5304)
	[_onPointerData]
	(funzione anonima) (ui.ddc.js:5595)
	(funzione anonima) (ui.ddc.js:5407)

I'm struggling to reproduce this issue with any of our sample Flutter apps. Can you provide a small zip containing a repo?

Here it is the sample.
issue_sample.zip

Thanks for the sample. I was able to reproduce your issue locally. This appears to be an issue with both DDC and Dart2JS but only in Safari. Very strange!
The errors I'm seeing are:
DDC: Unhandled Promise Rejection: SyntaxError: The string did not match the expected pattern.
Dart2JS: TypeError: null is not an object
Note that compilation with webdev succeeds. Bouncing over to @vsmenon to triage and resolve.

This appears to be some Font related issue.  The app is hitting an error on this line in Safari:
https://github.com/flutter/flutter_web/blob/4520a11a3499ca4c487dddfbbf45e20644de0df8/packages/flutter_web_ui/lib/src/engine/text/font_collection.dart#L126
due to style: 'bold'.  If I edit FontManifest.json to remove the bold, the app loads fine.
@ferhatb - can you please retriage?

@tapeo , Please see font issue above and close if that resolves your issue.

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact descriptions what happens, logs and the output of ' flutter doctor -v'  please.
All system setups can be slightly different so its always better to open new issues and reference related issues.

I have the exact same issue only on Safari. Firefox, Microsoft Edge, and Chrome are all working perfectly. I tried to delete the font weights using bold and deleting Cupertino icons and fonts to no effect.
Safari Console:
[Error]
$0 (main.dart.js:34302)
aWS (main.dart.js:4369)
aXa (main.dart.js:4371)
$1 (main.dart.js:33185)
aYZ (main.dart.js:2806)
(anonymous function) (main.dart.js:2814)
Flutter Doctor -v report:
[✓] Flutter (Channel beta, 1.22.0, on Mac OS X 10.15.5 19F101, locale en-US)
• Flutter version 1.22.0 at /Users/redacted/Downloads/flutter
• Framework revision d408d302e2 (5 months ago), 2020-09-29 11:49:17 -0700
• Engine revision 5babba6c4d
• Dart version 2.10.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/redacted/Library/Android/sdk
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.5, Build version 11E608c
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 49.0.1
• Dart plugin version 192.8052
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[✓] Connected device (3 available)
• iPhone 8 (mobile) • D0C7B53E-F48C-41CA-804D-2FB21EF32023 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)
• Web Server (web)  • web-server                           • web-javascript • Flutter Tools
• Chrome (web)      • chrome                               • web-javascript • Google Chrome 88.0.4324.192
• No issues found!

P.ayb.prototype = {
$0: function() {
var s = H.d(this.a)
s.stack = J.b9(this.b)
throw s
}, <-----------------------------------------------------the console shows that the error is here?-------------------
$S: 0
}

authors: 04Basti04 ferhatb grouma iapicca suhmeanhuck tapeo vsmenon yjbanov


text:
lost connection to device,when i send camera preview data to native.

when i send a camera preview data(cameraImage) to native,app will lost connection to device. it will happen on medium and high quality of cameraImage, low quality it's OK,  i checked permission and code,and didn't find anything. plz help me,thanks a lot. :)

@bladeofgod Please provide your `flutter doctor -v``` output. Please provide  a small self-contained app that demonstrates the problem. You can include small examples inline if they're enclosed by backticks, or just provide a public link to a github "gist" - https://gist.github.com/.

Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Could everyone who still has this problem please file a new issue with the exact descriptions what happens, logs and the output of ' flutter doctor -v'  please.
All system setups can be slightly different so its always better to open new issues and reference related issues.

source: gharchive/issue

authors: BondarenkoStas bladeofgod iapicca

repo: flutter/flutter

license_type: permissive

license_source: github-api


text:
AndroidView方式的百度地图加载，在vivo手机上面，出现黑屏，花屏，但从不同的页面跳转进入出现的问题还不一样 (Baidu map loading in AndroidView mode, In vivo cell phone above, appears black screen, the screen, but from a different page jump to the problem is not the same)

I mentioned this problem before, accidentally closed by me, I again.
[✓] Flutter (Channel master, v1.10.3-pre.45, on Mac OS X 10.14.6 18G95, locale zh-Hans-CN)
• Flutter version 1.10.3-pre.45 at /Users/yujunyao/flutter/flutter
• Framework revision d11c0e3 (20 hours ago), 2019-09-16 01:28:41 -0400
• Engine revision 47991fe122
• Dart version 2.6.0 (build 2.6.0-dev.0.0 d0052c1b31)

[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/yujunyao/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.3, Build version 10G8
• CocoaPods version 1.7.5

[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 39.0.3
• Dart plugin version 191.8423
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[!] IntelliJ IDEA Ultimate Edition (version 2017.1.3)
• IntelliJ at /Applications/IntelliJ IDEA.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] VS Code (version 1.38.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.4.1

[✓] Connected device (1 available)
• vivo Z1 • 9099106 • android-arm64 • Android 9 (API 28)

! Doctor found issues in 2 categories.

The following is the address of the making my project, please use the master branch, when login password input casually.### https://github.com/wangyin8866/flutter_bd
Use baidu map met two problems, black screen and the black line：

Is this a Flutter App or an Android App with embedded Flutter View?
I'm not sure if this isn't a problem of the BD package and not a Flutter one. Have you tried asking there first?

Is this a Flutter App or an Android App with embedded Flutter View?
I'm not sure if this isn't a problem of the BD package and not a Flutter one. Have you tried asking there first?

In vivo cell phone above, flutter load baidu map of native view cause blackout.

Have you asked first at the BD repository?

Have you asked first at the BD repository?

Yes, in vivo cell phone system, in the flutter projects, like this loading '_mapView = AndroidView (viewType:' MapView);'baidu map appears black screen, but the Home button back again good again cut to the background.

What did the BD developers say to this problem? I'm still not convinced that  this is a framework error.

What did the BD developers say to this problem? I'm still not convinced that this is a framework error.

However, only vivo phones have this problem。This is someone I had the same questions.#40229

Anyone solve this?

authors: escamoteur ikkyu0319 junyao-yu


text:
Dump syslog output on Fuchsia when running tests on LUCI

Right now we're seeing issues with the Linux Fuchsia bot on LUCI. I'd like to dump the entire syslog output so that we can get better insight into what is failing.

Resolved in https://github.com/flutter/engine/pull/16564


text:
Flutter Web and  in the index.html?

I am building a Flutter Web app
I put a my_javascript_file.min.js file in my web/ dir alongside the index.html file
then
I edit the web/index.html file to add  <script src="my_javascript_file.min.js" like this:
 <body>
  <script src="my_javascript_file.min.js" type="application/javascript"></script>
  <script src="main.dart.js" type="application/javascript"></script>
</body>

So I can call stuff for the js interop.
It works when I am on the Flutter channel beta
But not in the channel dev, the file my_javascript_file.min.js is not included in the build because Chrome gives a 404 not found in the Javascript console.
Is there a new way to specify the include?
I tried adding web/my_javascript_file.min.js in pubspec.yaml assets but nope

What version of dev? (flutter doctor -v)
What version of beta? (flutter doctor -v)
With flutter run or build web served via some alternative means?

Do not work with:
➜  ~ flutter doctor -v
[✓] Flutter (Channel dev, v1.15.6, on Mac OS X 10.15.3 19D76, locale fr-FR)
    • Flutter version 1.15.6 at /Users/pouledodue/.flutter_sdk/flutter
    • Framework revision 0b8129db1f (4 hours ago), 2020-03-04 14:26:02 -0800
    • Engine revision b77f509e0b
    • Dart version 2.8.0 (build 2.8.0-dev.11.0 57462f9ca5)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/pouledodue/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/pouledodue/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode1131.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C505
    • CocoaPods version 1.9.0.beta.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 40.0.2
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.42.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.8.1

[✓] Connected device (3 available)
    • macOS      • macOS      • darwin-x64     • Mac OS X 10.15.3 19D76
    • Chrome     • chrome     • web-javascript • Google Chrome 80.0.3987.122
    • Web Server • web-server • web-javascript • Flutter Tools

But works with:
[✓] Flutter (Channel beta, v1.14.6, on Mac OS X 10.15.3 19D76, locale fr-FR)
    • Flutter version 1.14.6 at /Users/pouledodue/.flutter_sdk/flutter
    • Framework revision fabeb2a16f (5 weeks ago), 2020-01-28 07:56:51 -0800
    • Engine revision c4229bfbba
    • Dart version 2.8.0 (build 2.8.0-dev.5.0 fc3af737c7)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/pouledodue/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/pouledodue/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode1131.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C505
    • CocoaPods version 1.9.0.beta.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 40.0.2
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.42.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.8.1

[✓] Connected device (2 available)
    • Chrome     • chrome     • web-javascript • Google Chrome 80.0.3987.122
    • Web Server • web-server • web-javascript • Flutter Tools

• No issues found!

Command to run is : flutter run -d chrome --web-port=11000

Thank you @pouledodue

We used to unconditionally serve files from web, but this led to a lot of issues with people adding assets to web, then discovering that they didn't work in release builds. I think that restriction could be loosened a bit so this pattern works, though if you flutter build web && cd build/web && python -m SimpleHTTPServer, this bundle should correctly contain the JavaScript assets

authors: jonahwilliams pouledodue


text:
[ Feature Request ] Android Compiled Code as Dynamic Feature Module to reduce apk Updatable Size

Google Play Store can make file by file patching for updates, and split apks if we seperate flutter.so and app.so into two modules, since flutter.so is always unchanged unless flutter SDK update, this will save app furthur update size, since only app.so only need to be updated.

See https://github.com/flutter/flutter/issues/51522
\cc @xster

See https://github.com/flutter/flutter/issues/51522
\cc @xster

It's about asset modules, my issue is libapp.so file to seperate module, which can be updated by filebyfile patching support by Google Playstore.

Merging this into https://github.com/flutter/flutter/issues/57617

authors: canewsin jmagman xster


text:
[tool_crash] RangeError (index): Index out of range: no indices are valid: 0

Command
flutter packages get

Steps to Reproduce

...
...
...

Logs
IndexError: RangeError (index): Index out of range: no indices are valid: 0
#0      _Uint8ArrayView.[] (dart:typed_data-patch/typed_data_patch.dart:3932:7)
#1      InputStream.readUint16 (package:archive/src/util/input_stream.dart:206:22)
#2      GZipDecoder._readHeader (package:archive/src/gzip_decoder.dart:89:29)
#3      GZipDecoder.decodeBuffer (package:archive/src/gzip_decoder.dart:26:5)
#4      GZipDecoder.decodeBytes (package:archive/src/gzip_decoder.dart:17:12)
#5      _WindowsUtils.verifyGzip (package:flutter_tools/src/base/os.dart:352:21)
#6      CachedArtifact._downloadArchive.<anonymous closure> (package:flutter_tools/src/cache.dart:605:20)
#7      CachedArtifact._withDownloadFile (package:flutter_tools/src/cache.dart:638:26)
#8      CachedArtifact._downloadArchive (package:flutter_tools/src/cache.dart:604:12)
#9      CachedArtifact._downloadZippedTarball (package:flutter_tools/src/cache.dart:630:12)
#10     GradleWrapper.updateInner (package:flutter_tools/src/cache.dart:1070:12)
#11     CachedArtifact.update (package:flutter_tools/src/cache.dart:560:11)
#12     Cache.updateAll (package:flutter_tools/src/cache.dart:432:24)
#13     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:697:27)
#14     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:619:33)
<asynchronous suspension>
#15     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart)
#16     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:29)
#17     _rootRun (dart:async/zone.dart:1184:13)
#18     _CustomZone.run (dart:async/zone.dart:1077:19)

[✓] Flutter (Channel master, v1.17.1-pre.23, on Microsoft Windows [Version 10.0.18362.720], locale en-US)
    • Flutter version 1.17.1-pre.23 at C:\src\flutter
    • Framework revision a2e6c30b44 (12 hours ago), 2020-04-03 20:26:01 -0700
    • Engine revision 09bc1fc45e
    • Dart version 2.8.0 (build 2.8.0-dev.19.0 e736495eb7)

[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\onik\AppData\Local\Android\sdk
    • Platform android-29, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    ✗ Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions.

[✓] Android Studio (version 3.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 34.0.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[!] IntelliJ IDEA Community Edition (version 2019.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] VS Code (version 1.43.2)
    • VS Code at C:\Users\onik\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.9.0

[!] Connected device
    ! No devices available

! Doctor found issues in 3 categories.

Flutter Application Metadata
Type: app
Version: 1.0.0+1
Material: true
Android X: false
Module: false
Plugin: false
Android package: null
iOS bundle identifier: null
Creation channel: stable
Creation framework version: 2d2a1ffec95cc70a3218872a2cd3f8de4933c42f

Hi @mizanonik
could you attach your flutter pub get --verbose?
Related to https://github.com/flutter/flutter/issues/48014

The same error on every Flutter version above 1.17.0-dev.0.0 (including the newest one). Occurred in two separate applications.

Hi @mizanonik
could you attach your flutter pub get --verbose?
Related to #48014

All this started after the flutter update. First of all it was showing man in the middle attack message. Then I tried reinstalling and downgrading the flutter version, but nothing worked. After that while running flutter doctor command I changed the channel to master, then this occurred.
After all this I again installed a fresh version of flutter then run then flutter doctor command. Though I was getting man in the middle attack, I kept running that command again and again. I step completed at every and finally everything was set. Now, I working perfectly.
I have no idea why that man in the middle attack was showing suddenly. But I'm guessing it has probably something to do with my network. While running the flutter doctor command it was loosing connection after every few seconds.


text:
_gpus_ReturnNotPermittedKillClient issue in Flutter V1.12.13.hotfix.8

We received several crash reports in testflight.
The stacktrace is given below:
Hardware Model:      iPhone7,2
Version:             3.19.999.8+ (3.19.999.8)
Code Type:           ARM-64
Parent Process:      ??? [1]
Date/Time:           2020-05-25 11:33:10 +0000
OS Version:          iPhone OS 11.4.1 (15G77)
Report Version:      104
Exception Type:  SIGSEGV
Exception Codes: SEGV_ACCERR at 0x1
Triggered by Thread:  71
Thread 0:
Thread 0:
0   libsystem_kernel.dylib          0x0000000181f210e8 __psynch_cvwait :8 (in libsystem_kernel.dylib)
1   libc++.1.dylib                  0x00000001815d825c std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) :24 (in libc++.1.dylib)
2   Flutter                         0x0000000105603364 0x00000001055c8000 + 242532(fml::AutoResetWaitableEvent::Wait() (in Flutter) + 72)
3   Flutter                         0x000000010564a100 0x00000001055c8000 + 532736(flutter::Shell::OnPlatformViewCreated(std::__1::unique_ptr<flutter::Surface, std::__1::default_delete<flutter::Surface> >) (in Flutter) + 872)
4   Flutter                         0x00000001055e5f04 0x00000001055c8000 + 122628(-[FlutterViewController surfaceUpdated:] (in Flutter) + 768)
5   LTao4iPhone                     0x000000010334622c -[FLBFlutterViewContainer viewDidAppear:] FLBFlutterViewContainer.m:210 (in LTao4iPhone)
6   LTao4iPhone                     0x00000001017bb964 -[LTaoFlutterViewController viewDidAppear:] LTaoFlutterViewController.m:62 (in LTao4iPhone)
7   LTao4iPhone                     0x00000001018a5368 -[LTaoHomeFlutterViewController viewDidAppear:] LTaoHomeFlutterViewController.m:41 (in LTao4iPhone)
8   UIKit                           0x000000018c13573c -[UIViewController _setViewAppearState:isAnimating:] :840 (in UIKit)
9   UIKit                           0x000000018c386448 __64-[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:]_block_invoke :44 (in UIKit)
10  UIKit                           0x000000018c18b798 -[UIViewController _executeAfterAppearanceBlock] :92 (in UIKit)
11  UIKit                           0x000000018c491990 _runAfterCACommitDeferredBlocks :564 (in UIKit)
12  UIKit                           0x000000018c487958 _cleanUpAfterCAFlushAndRunDeferredBlocks :384 (in UIKit)
13  UIKit                           0x000000018c36c51c _afterCACommitHandler :132 (in UIKit)
14  CoreFoundation                  0x0000000182442910 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ :32 (in CoreFoundation)
15  CoreFoundation                  0x0000000182440238 __CFRunLoopDoObservers :412 (in CoreFoundation)
16  CoreFoundation                  0x0000000182440884 __CFRunLoopRun :1436 (in CoreFoundation)
17  CoreFoundation                  0x0000000182360da8 _CFRunLoopRunSpecific :552 (in CoreFoundation)
18  GraphicsServices                0x0000000184346020 _GSEventRunModal :100 (in GraphicsServices)
19  UIKit                           0x000000018c380758 _UIApplicationMain :236 (in UIKit)
20  LTao4iPhone                     0x0000000100b2ca1c main main.m:53 (in LTao4iPhone)
21  libdyld.dylib                   0x0000000181df1fc0 _start :4 (in libdyld.dylib)

Thread 71 Crashed:
0   libGPUSupportMercury.dylib      0x000000019e691140 _gpus_ReturnNotPermittedKillClient :12 (in libGPUSupportMercury.dylib)
1   libGPUSupportMercury.dylib      0x000000019e692110 _gpusSubmitDataBuffers :176 (in libGPUSupportMercury.dylib)
2   AGXGLDriver                     0x00000001a29b8cec 0x00000001a2993000 + 154860
3   GLEngine                        0x00000001a3a54c2c 0x00000001a396f000 + 941100
4   OpenGLES                        0x00000001854b1a8c -[EAGLContext presentRenderbuffer:] :80 (in OpenGLES)
5   Flutter                         0x00000001055f1898 0x00000001055c8000 + 170136(flutter::IOSSurfaceGL::GLContextPresent() (in Flutter) + 100)
6   Flutter                         0x00000001059e4818 0x00000001055c8000 + 4311064(std::__1::__function::__func<flutter::GPUSurfaceGL::AcquireFrame(SkISize const&)::$_1, std::__1::allocator<flutter::GPUSurfaceGL::AcquireFrame(SkISize const&)::$_1>, bool (flutter::SurfaceFrame const&, SkCanvas*)>::operator()(flutter::SurfaceFrame const&, SkCanvas*&&) (in Flutter) + 284)
7   Flutter                         0x000000010565a294 0x00000001055c8000 + 598676(flutter::SurfaceFrame::Submit() (in Flutter) + 104)
8   Flutter                         0x0000000105647e74 0x00000001055c8000 + 523892(flutter::Rasterizer::DrawToSurface(flutter::LayerTree&) (in Flutter) + 464)
9   Flutter                         0x0000000105648c28 0x00000001055c8000 + 527400(std::__1::__function::__func<flutter::Rasterizer::Draw(fml::RefPtr<flutter::Pipeline<flutter::LayerTree> >)::$_0, std::__1::allocator<flutter::Rasterizer::Draw(fml::RefPtr<flutter::Pipeline<flutter::LayerTree> >)::$_0>, void (std::__1::unique_ptr<flutter::LayerTree, std::__1::default_delete<flutter::LayerTree> >)>::operator()(std::__1::unique_ptr<flutter::LayerTree, std::__1::default_delete<flutter::LayerTree> >&&) (in Flutter) + 104)
10  Flutter                         0x0000000105648134 0x00000001055c8000 + 524596(flutter::Rasterizer::Draw(fml::RefPtr<flutter::Pipeline<flutter::LayerTree> >) (in Flutter) + 360)
11  Flutter                         0x000000010564e104 0x00000001055c8000 + 549124(std::__1::__function::__func<flutter::Shell::OnAnimatorDraw(fml::RefPtr<flutter::Pipeline<flutter::LayerTree> >)::$_30, std::__1::allocator<flutter::Shell::OnAnimatorDraw(fml::RefPtr<flutter::Pipeline<flutter::LayerTree> >)::$_30>, void ()>::operator()() (in Flutter) + 76)
12  Flutter                         0x0000000105601e0c 0x00000001055c8000 + 237068(fml::MessageLoopImpl::FlushTasks(fml::FlushType) (in Flutter) + 1664)
13  Flutter                         0x0000000105604090 0x00000001055c8000 + 245904(fml::MessageLoopDarwin::OnTimerFire(__CFRunLoopTimer*, fml::MessageLoopDarwin*) (in Flutter) + 32)
14  CoreFoundation                  0x0000000182443aa8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ :28 (in CoreFoundation)
15  CoreFoundation                  0x000000018244376c __CFRunLoopDoTimer :864 (in CoreFoundation)
16  CoreFoundation                  0x0000000182443010 __CFRunLoopDoTimers :248 (in CoreFoundation)
17  CoreFoundation                  0x0000000182440b60 __CFRunLoopRun :2168 (in CoreFoundation)
18  CoreFoundation                  0x0000000182360da8 _CFRunLoopRunSpecific :552 (in CoreFoundation)
19  Flutter                         0x0000000105603f6c 0x00000001055c8000 + 245612(fml::MessageLoopDarwin::Run() (in Flutter) + 88)
20  Flutter                         0x0000000105603778 0x00000001055c8000 + 243576(void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, fml::Thread::Thread(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::$_0> >(void*) (in Flutter) + 200)
21  libsystem_pthread.dylib         0x00000001820c1220 _pthread_body :272 (in libsystem_pthread.dylib)
22  libsystem_pthread.dylib         0x00000001820c1110 _pthread_start :292 (in libsystem_pthread.dylib)
23  libsystem_pthread.dylib         0x00000001820bfb10 _thread_start :4 (in libsystem_pthread.dylib)

This issue happens on iPhone6 Plus&iPhone6, iOS11&iOS 12.
kylewong@KyleWongdeMacBook-Pro ltao_flutter_builder % /Users/kylewong/Desktop/flutter/bin/flutter doctor -v
[✓] Flutter (Channel unknown, v1.12.13+hotfix.8, on Mac OS X 10.15.4 19E287, locale en-CN)
• Flutter version 1.12.13+hotfix.8 at /Users/kylewong/Desktop/flutter
• Framework revision 0b8abb4 (3 months ago), 2020-02-11 11:44:36 -0800
• Engine revision e1e6ced81d
• Dart version 2.7.0

In the past, we use flutter in detail page where user will enter a flutter page after entering the homepage and click some items. The _gpus_ReturnNotPermittedKillClient related crash exists, however, in an acceptable level and would probably happen when entering the background, doing some gl operations and cause crash.
However, this time we're using flutter in the homepage, in other words, the flutter page would be the homepage(embedded as the 1st item for a tabbarcontroller acting as the rootvc). What confuses me the most is that after contacting the end users, they declares that they click the app icon to launch, and the application crashes on launching without any operations to switch to the background.

Also CC @dnfield @chinmaygarde
Please have a look at this issue as it's preventing us to release our application.

This issue is duplicate  of https://github.com/flutter/flutter/issues/57464
Closing https://github.com/flutter/flutter/issues/57464 now.

@kangwang1988 please don't assign bugs to people without speaking to them first

Got it, sorry about that.

@kangwang1988 I'm going to open #57464 again since it has important context and an associated PR that is about to land that fixes it.  It looks like that PR should fix this as well.  Although I agree the description from your users is a bit odd.
So, closing since this is a duplicate of #57464

A couple of observations:

This will not be present on ToT because we we use Metal on iPhone7,2 OS 11.4.1 now. There, the background rendering restriction does not exist. So reproducing this (or any other issue of the _gpus_ReturnNotPermittedKillClient class) on ToT would need to be done on an older iPhone.
Flutter only renders (on any thread) when the application is in the foreground active state. This is the state in between viewWillAppear: and viewWillDisappear: to prevent issue like the ones reported here. This is quite obviously working fine because viewWillAppear: has been called already here on Thread 0. What I don't understand why iOS is terminating our process when it has already given up the notification that we are in the foreground. Maybe it is because we haven't returned from that callout yet? Not sure if that is a restriction as well.

What I don't understand why iOS is terminating our process when it has already given up the notification that we are in the foreground. Maybe it is because we haven't returned from that callout yet? Not sure if that is a restriction as well.

They are subclassing FlutterViewController, I wonder if there is a timing issue related to when they are calling [FlutterViewController viewDidAppear:]  Perhaps they are triggering a GL call before calling up to super.

We use flutter_boost in a add2app scenario.
See the related code at: https://github.com/alibaba/flutter_boost/blob/v1.12.13_support+2/ios/Classes/container/FLBFlutterViewContainer.m
I know flutter_boost are doing some trick job to deal with various scenario in add2app form which might be odd in some cases. The weird thing is the crash is reported when users declares they're in foreground when launching. From the crash backtraces we received, some users are very easy to crash with the same stack(iPhone6&Plus, iOS11&iOS12), however, sometimes, it works fine.
Do you think even in foreground, if flutter_boost did some unusual thing, it could cause the same crash(_gpus_ReturnNotPermittedKillClient)?
@gaaclarke

@kangwang1988 Yea, this seems suspicious: https://github.com/alibaba/flutter_boost/blob/v1.12.13_support+2/ios/Classes/container/FLBFlutterViewContainer.m#L214
There is a bit work happening before [super viewDidAppear:animated];

Good catch. surfaceUpdated: is a private method on FlutterViewController which this project seems to calling by forward declaring the method in the header. This is going to be brittle and break if we ever refactor the internal method or change its name.

@kangwang1988 Yea, this seems suspicious: https://github.com/alibaba/flutter_boost/blob/v1.12.13_support+2/ios/Classes/container/FLBFlutterViewContainer.m#L214
There is a bit work happening before [super viewDidAppear:animated];

I know this is abnormal. But _gpus_ReturnNotPermittedKillClient is supposed to be caused when doing gl operations in foreground, right?  We're pretty sure those crash happens when launching, not only based on the user's description, but also other thread's call stack.

But _gpus_ReturnNotPermittedKillClient is supposed to be caused when doing gl operations in foreground, right?

No, it is caused when we attempt to perform GL operations in the background. What seems to be happening here is that iOS thinks the application is in the foreground only when the viewWillAppear: call has returned. This hasn't happened yet because we are still in flutter::Shell::OnPlatformViewCreated. Now, in normal operation, when viewWillAppear: is in progress, there can be no frames in flight because the animator is disengaged. However, because of the call to the private method mentioned above, this assumption no longer holds.
I don't know what the context behind calling private Flutter framework methods is but that implementation needs to be reworked to stick to public API methods. As I said earlier, the runtime hacks are brittle and already warnings from the compiler about this had been suppressed.

@xujim
Can you explain why surfaceUpdated is called explicitly outside the FlutterViewController?

No, it is caused when we attempt to perform GL operations in the background. What seems to be happening here is that iOS thinks the application is in the foreground only when the viewWillAppear: call has returned.

From the crash log, seems the viewWillAppear: has already been returned, but the viewDidAppear: has never returned. Will the ios thinks the application is in background when the viewDidAppear has not returned?

Can you explain why surfaceUpdated is called explicitly outside the FlutterViewController?

FlutterBoost managed to open new FlutterViewController when clicked a url in the existing FlutterViewController. However Flutter didn't support such feature, Flutter boost hacked it in the way mentioned above.
For this issue, I created a issue month ago: https://github.com/flutter/flutter/issues/52456
The excerpt is as following:

The sequence of multiple views' life cycle have side effect on the surface updates. for example:
I start a FlutterVC#1 to render flutter page#2, then I push a second FlutterVC#2 to render flutter page#2. The FlutterVC#2 will cover the FlutterVC#1. Note that we have only one FlutterEngine which hold only one surface, so when I started the FlutterVC#2, the FlutterVC#2 view will appear and surfaceUpdate:YES, then for a while, the FlutterVC#1 will view disappear, and surfaceUpdate:NO, which will let the FlutterEngine hold a nulled surface, and introduce failure of FlutterVC#2.

I've confirmed this issue happens when launching without switching into background. So it's not a duplicate of https://github.com/flutter/flutter/issues/57464. See https://github.com/flutter/engine/pull/18742 for more details.
So I'm reopening this issue as I think the codes responsible for this issue remains in latest FlutterViewController etc.

@kangwang1988 the context for this crash is an incorrect usage of private APIs.  Can you come up with reproduction steps that use the API appropriately?

A typical log from the crashed user(iPhone6, iOS12.4.5)
E2020-06-01 20:55:27.896618ALIFLUTTER{
  "ApplicationState" : "UIApplicationStateBackground",
  "curTime" : "2020年6月1日 下午8:55:27",
  "message" : "LTaoHomeFlutterViewController:willMoveToParentViewController:"
}
E2020-06-01 20:55:27.905619ALIFLUTTER{
  "ApplicationState" : "UIApplicationStateBackground",
  "curTime" : "2020年6月1日 下午8:55:27",
  "message" : "LTaoHomeFlutterViewController:viewWillAppear:"
}
E2020-06-01 20:55:27.905620ALIFLUTTER{
  "ApplicationState" : "UIApplicationStateBackground",
  "curTime" : "2020年6月1日 下午8:55:27",
  "message" : "LTaoHomeFlutterViewController:attatchFlutterEngine"
}
E2020-06-01 20:55:27.906621ALIFLUTTER{
  "ApplicationState" : "UIApplicationStateBackground",
  "curTime" : "2020年6月1日 下午8:55:27",
  "message" : "LTaoHomeFlutterViewController:bridge_viewWillAppear:"
}
E2020-06-01 20:55:27.906622ALIFLUTTER{
  "ApplicationState" : "UIApplicationStateBackground",
  "curTime" : "2020年6月1日 下午8:55:27",
  "message" : "FLBFlutterEngine:inactive"
}
E2020-06-01 20:55:27.941623ALIFLUTTER{
  "ApplicationState" : "UIApplicationStateBackground",
  "curTime" : "2020年6月1日 下午8:55:27",
  "message" : "LTaoHomeFlutterViewController:viewDidLayoutSubviews"
}
E2020-06-01 20:55:27.942624ALIFLUTTER{
  "ApplicationState" : "UIApplicationStateBackground",
  "curTime" : "2020年6月1日 下午8:55:27",
  "message" : "LTaoHomeFlutterViewController:surfaceUpdated:"
}
E2020-06-01 20:55:28.342636ALIFLUTTER{
  "ApplicationState" : "UIApplicationStateBackground",
  "curTime" : "2020年6月1日 下午8:55:28",
  "message" : "FLBFlutterEngine:resume"
}
E2020-06-01 20:55:28.345637ALIFLUTTER{
  "ApplicationState" : "UIApplicationStateBackground",
  "curTime" : "2020年6月1日 下午8:55:28",
  "message" : "LTaoHomeFlutterViewController:viewDidAppear:"
}
E2020-06-01 20:55:28.345638ALIFLUTTER{
  "ApplicationState" : "UIApplicationStateBackground",
  "curTime" : "2020年6月1日 下午8:55:28",
  "message" : "LTaoHomeFlutterViewController:attatchFlutterEngine"
}
E2020-06-01 20:55:28.346639ALIFLUTTER{
  "ApplicationState" : "UIApplicationStateBackground",
  "curTime" : "2020年6月1日 下午8:55:28",
  "message" : "LTaoHomeFlutterViewController:surfaceUpdated:"
}

![image](https://user-images.githubusercontent.com/817851/83733314-f6ce6400-a67f-11ea-8f15-bc137bb9908e.png)

@kangwang1988 the context for this crash is an incorrect usage of private APIs. Can you come up with reproduction steps that use the API appropriately?

The key point I want to say is that even the unmodified engine of the latest master commit can't ensure that the gpu operations triggered by viewWillAppear happens when UIApplication is active.
In this case, the notification based operation can't coordinate with the viewcontroller lifecycle based operation. With a unmodified engine(master branch), when viewWillAppear is called, gpu operations is triggered, however, the application is still in background state, it would crash.

I think the question perhaps boils down (between 1.12+patch vs master) is whether there are cases where applicationBecameActive was called https://github.com/flutter/engine/blob/master/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm#L738 (since that's now what it takes on master to crash during boot in addition to viewWillAppear) but [UIApplication sharedApplication].applicationState != UIApplicationStateActive (which is the diff from the patch).
If so, then we might need some more defensive coding around https://github.com/flutter/engine/pull/18563. If not, then this problem will likely be resolved when you upgrade the engine.

@zoeyfan can you reach out to our customer to see if they're using a public or private method to initiate this bug, as suggested by the discussion? Or @kangwang1988, can you answer same, please?

@kf6gpe Yes, We're using some private api, like surfaceUpdated in order to handle some add2app scenarios.
Now there're two points.
First, we need to use flutter_boost(who is calling surfaceUpdated to handle some add2app scenarios). I can't remove those private apis to verify if this issue is triggered by that issue.
Second, after I add some logs to track this issue, I found some unexpected but actually existing api calls in specific devices(iOS12, iPhone6 & iPhone 6Plus), FlutterViewController's viewWillAppear and viewDidAppear could be called by iOS when the applicationstate is not active, which is not related to the suspicious private api call.
In other words, https://github.com/flutter/engine/blob/e3f3fecb18cb676a81e125cdf9d35bb59243e4c6/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm#L531 could trigger gpu operations when applicationstate is background. The same logic applies for https://github.com/flutter/engine/blob/e3f3fecb18cb676a81e125cdf9d35bb59243e4c6/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm#L542 as it would result in the scheduleFrame(https://github.com/flutter/flutter/blob/e0ed12c73a3df00b72af6e5657d35035a76c90db/packages/flutter/lib/src/scheduler/binding.dart#L721), hence, trigger gpu operations when applicationstate is background.
In one words, the logs collected from user side, indicates that even the latest FlutterViewController logic in master branch would also face the problem that GPU operations triggered FlutterViewController's viewWillAppear and viewDidAppear(handled by iOS), could happen when applicationState is not active. Besides, after the protection logic(https://github.com/flutter/engine/pull/18742) is applied, the crash disappears.
One more point, this problem happens in a add2app scenario, it's a complicated application which have heavy launch logic and the HomeViewController(first tab of a tabviewcontroller as the Window's rootViewController) is written in flutter.
Before that, we use flutter in a detail page, in other words, you have to click some items to enter the item detail when the home page is ready, and this problem is not reported.
Also CC @zoeyfan

Based on the above, I'm going to close this bug.
Accessing engine APIs that aren't part of the intended public API surface is not a configuration that we recommend, and as such is not something for which we are going to fix apparent bugs. We welcome patches, if you wish to address a problem you see; such patches will of course have to be of high quality, with tests, and will be reviewed in the context of intended API usage (so a patch that only addresses a problem that would occur given unintended API access patterns would get feedback to the effect that it is not fixing a problem we want to address).
If there is a bug that happens in normal operation (i.e. not when the API is used outside of its intended design) then I recommend creating a reproducible test case and filing a separate bug; we would be happy to give such a bug the usual high priority we provide for your bugs. Creating such a reproducible test case is tedious and time-consuming, but not especially difficult. It is literally just a matter of deleting code line by line, verifying at each step that the bug still occurs, until you manage to get the whole problem reproduced with only a few lines of code.
I understand and empathize with your difficulty here. I hope you can understand our position as well.

@Hixie
I fully understand the team's position.
Maybe the key problem here is the difference the business developers and sdk developers.
For a business developers, the key problem they're focusing on is to ensure that "the business can iterate fast and it's of high quality." So when we received crash reports or abnormal issues, we will try to reproduce it in the first time. Sometimes we can, sometimes, we can't. However, even when we can't reproduce it locally, we need to fix it or bypass it ASAP. In this scenario, we still can't reproduce it locally. FlutterBoost may still have some kind of unexpected private api use, however, in the add2app scenario, the private api use is needed to avoid some weird cases.
For an sdk developers, the team may need to ensure that any changes is reasonable and working fine for all developers and cases. If I can't reproduce it, I wouldn't be able to diagnose it, fix it, and verify if the patch actually works fine.
The key point I want to say is that after some kind of diagnosis, we believe the lifecycle could be an abnormal state and resulted in a crash. I'm ok with this issue and related patch can't be merged into the master branch, but I want to say that we need to pay attention that the ViewController Lifecycle could be not compatible with the app's lifecycle in some extreme cases.

authors: Hixie chinmaygarde gaaclarke kangwang1988 kf6gpe xster xujim


text:
Make Dart VM aware of growing size/weight of Canvas

For example, when we draw an image to a canvas, we should inform the VM that the canvas' allocation size is now higher to include the image.
We'll be able to do this once https://dart-review.googlesource.com/c/sdk/+/149245 lands
/cc @chinmaygarde @liyuqian @rmacnak-google

Does the framework hold references to Canvases directly very often? My expectation was that pictures were the long lived heavyweight objects.

No, I think we can lower the priority on this until we have a user who needs it or some convincing evidence that it's needed.

Now that we properly dispose Canvas/Picture objects this is not necessary.

authors: chinmaygarde dnfield


text:
flutter project don't run properly

hello  i don't know why my flutter project don't run and i can't find such eror in my caode sample
can you look at it aslo
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main()=>runApp(MyApp());
class MyApp extends StatefulWidget{
@override
State createState() {
return MyAppState();

}
}
class MyAppState extends State{
String _value = '0';
TextEditingController _controller = new TextEditingController();
String text="";
var _Key_form = GlobalKey();
int group_value;  @override
void initState() {
super.initState();
group_value=0;
}
double _slider_value=0;
bool chek1 = false;
bool chek2 =false;
final GlobalKey _key = new GlobalKey();
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'zinwar',
home: Scaffold(
key:_key ,
backgroundColor: Colors.white,
body: Center(
child:ListView (
children: [
    Column(
       mainAxisAlignment: MainAxisAlignment.end,
       mainAxisSize: MainAxisSize.max,
      textBaseline: TextBaseline.alphabetic,
      verticalDirection: VerticalDirection.up,
      children: <Widget>[
        Container(
          height: 100,
          width: 120,
          color: Colors.blue,
        ),
        Padding(padding: EdgeInsets.only(left: 10),),
        Container(
          height: 100,
          width: 120,
          color: Colors.red,
        )
      ],
     ),
     Row(
       mainAxisAlignment: MainAxisAlignment.end,
       mainAxisSize: MainAxisSize.max,
      textBaseline: TextBaseline.alphabetic,
      verticalDirection: VerticalDirection.up,

       children: <Widget>[ Container(
          height: 100,
          width: 120,
          color: Colors.blue,
        ),
        Padding(padding: EdgeInsets.only(right: 10),),
        Container(
          height: 100,
          width: 120,
          color: Colors.red,
        )

       ],
     ),
      Container(
       height: 200,
       width: 220,
       padding: EdgeInsets.all(10),
       margin: EdgeInsets.all(10),
       child: Align(
         alignment: Alignment.center,
         child:  Text('hello flutter',
       textDirection: TextDirection.ltr,
       textAlign: TextAlign.center,
       maxLines: 10,
       style:TextStyle(
         fontSize: 15 ,
         fontWeight: FontWeight.bold,
         fontStyle: FontStyle.normal,
         wordSpacing: 3,
         letterSpacing: 1,

       ),
       ),
       ),
       decoration: BoxDecoration(
         borderRadius: BorderRadius.circular(100),
         border: Border.all(
           color: Colors.red,
           width: 5,
         ),
         gradient: LinearGradient(
           colors: [Colors.red,Colors.cyan],
           begin: Alignment.topLeft,
           end: Alignment.bottomRight,
           ),
         /*  image: DecorationImage(
             image: NetworkImage('https://png.pngtree.com/png-clipart/20190516/original/pngtree-instagram-icon-png-image_3584852.jpg'),
              fit: BoxFit.contain,
            alignment: Alignment.topLeft,
            image: AssetImage('Triple-spiral-wheeled-simple.png'),
             ),*/
       ),

     ),
     Form(
       key:_Key_form ,
     child:TextFormField(
       controller: _controller,
       enabled: true,
       maxLines: 1,
       maxLength: 15,
      cursorColor: Colors.amber,
      keyboardType: TextInputType.phone,

       decoration: InputDecoration(
        hintText: 'username',
        helperText: 'eg/zinwar_12',
        border: OutlineInputBorder(borderRadius: BorderRadius.circular(100)),
       prefixIcon: Icon(Icons.person),
       labelText: 'zinwar_zardasht'
       ),
      validator: (String value){

        if (value!='zinwar'){

          return 'ببورە ناوەکەت بە هەڵە نووسیوە';
        }
      },
     ),
     ),
     CupertinoButton(
       color: Colors.blue,
       onPressed: () {
         setState(() {
           _Key_form.currentState.validate();
           text = _controller.text.toString();
         });
        },
       child: Text('log in'),

       ),
     D(),
     Radio(
       value: 0,
        groupValue: group_value,
        onChanged: (value){
          setState(() {
            group_value = value;
          });
        }
        ),
        Text('male'),
         Radio(
       value: 0,
        groupValue: group_value,
        onChanged: (value){
          setState(() {
            group_value = value;
          });
        }
        ),
        Text('famale'),
       FlatButton(
         onPressed: (){
           show(context);
         },
         child: Text('show dialog')
         ),
          CupertinoButton(
                          color: Colors.blue,

         onPressed: (){
           sho(context);
         },
         child: Text('show dialog')
         ),
         CupertinoButton(
                         color: Colors.blue,

         onPressed: (){
           sh(context);
         },
         child: Text('show model button sheet'),
         ),
        CupertinoButton(
          child: Text('snack bar'),
          color: Colors.blue,
          onPressed:(){
            _key.currentState.showSnackBar(
              SnackBar(
                duration: Duration(
                  seconds: 10,
                ),
                content: Text('you deleted this button'),
                action: SnackBarAction(
                  label: 'undo',
                  onPressed: (){
                  Navigator.pop(context);
                  }),
                )
            );
          },
        ),
        Column(
          mainAxisAlignment: MainAxisAlignment.end,
          children: <Widget>[
            Card(

          shape:RoundedRectangleBorder(borderRadius: BorderRadius.only(
            topRight:Radius.circular(100),
            bottomLeft:Radius.circular(100),
          )) ,
          color: Colors.blue,
          margin: EdgeInsets.only(top: 100,bottom: 100),
          child: InkWell(
            splashColor: Colors.yellow,
            //کاتێک کەسەکە یەکجار پەنجەی بەر کاردەکە کەوت
            onTap: (){},
             //کاتێک کەسەکە دوو جار پەنجەی بەر کاردەکە کەوت

            onDoubleTap: (){},
           //کاتێک کەسەکە بۆماوەیەکی زۆر پەنجەی لەسەر کارتە کەبوو
            onLongPress: (){},
          ),
        ),

          ],
        ),
        Slider(
          min: 0,
          max: 100,
          //دیڤیژن واتا بیکات بە چەن بەشەوە
          divisions: 100,
          label: 'c${_slider_value.round()}',
          value: _slider_value,
          activeColor: Colors.red,
          inactiveColor: Colors.redAccent,

          onChanged: (double value){
            _slider_value=value;
          }
          ),
          Wrap(
            runSpacing: 5,
            spacing: 5,
            children: <Widget>[
              Container(
                height: 100,
                width: 100,
                color: Colors.blue,

              ),
              Container(
                height: 100,
                width: 100,
                color: Colors.black,

              ),
              Container(
                height: 100,
                width: 100,
                color: Colors.red,

              ),
            ],
          ),
         Stack(
           alignment: Alignment.bottomRight,
           children: <Widget>[
              Container(
                height: 150,
                width: 150,
                color: Colors.blue,

              ),
              Container(
                height: 100,
                width: 100,
                color: Colors.black,

              ),
              Container(
                height: 50,
                width: 50,
                color: Colors.red,

              ),
           ],
         ),
       ],

   ),

   ),
   drawer: Drawer(
     child:ListView(
       children: <Widget>[

         DrawerHeader(
           child: CircleAvatar(
             backgroundColor: Colors.yellow,
           ),
           decoration: BoxDecoration(
           color: Colors.white,
           ),

         ),
         ListTile(
           leading: Icon(Icons.search),

           title: Text('search'),
         ),
         ListTile(
           leading: Icon(Icons.settings),
           title: Text('settings'),
         ),
         ListTile(
           leading: Icon(Icons.info),
           title: Text('info'),
         ),
         RaisedButton(
           onPressed: (){
             print('you pressed print bottun');
           },
          color: Colors.blue,
          child: Text('raised button'),
        //  highlightColor: Colors.amberAccent,
          splashColor: Colors.red,
          shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)),
           ),
           OutlineButton(
             onPressed: (){},
             child: Text('outline button'),
            color: Colors.red,
            borderSide: BorderSide(width: 4,
            color:Colors.red,),
             ),
             FlatButton(
               onPressed: (){},
                child: Text('FlatButton',
                style: TextStyle(
                  color:Colors.white,
                ),),
                color: Colors.blue,
                ),
                FlatButton.icon(
                  color: Colors.blue,
                  onPressed: (){},
                   icon: Icon(Icons.wallpaper),
                    label: Text('FlatButton.icon'),
                    ),
                    CupertinoButton(
                      pressedOpacity: 0.3,
                      color: Colors.blue,
                      child: Text('CupertinoButton',
                      style: TextStyle(
                        color:Colors.white,
                      ),),
                       onPressed: (){}
                       ),
                       MaterialButton(
                         onPressed: (){},
                         child: Text('material button'),
                          color:Colors.blue,

                     ),
                     FloatingActionButton
                     (onPressed: (){},
                     child: Text('hi'),
                     backgroundColor: Colors.blue,
                     ),
                     //هەم باک بەتن و هەم کلۆس بەتن حازر کراوە واتا پێویت ناکا خۆت فەرمانی بۆ بنوسی
                     BackButton(
                       color: Colors.blue,
                     ),
                     CloseButton(
                       color: Colors.blue,
                     ),
                     DropdownButton
                     (
                       value:_value,
                       items: <DropdownMenuItem>[
                         DropdownMenuItem(
                           child: Text('iraq',
                           style: TextStyle(
                             color: Colors.blue,
                           ),),
                           value: '0',

                           ),
                           DropdownMenuItem(
                           child: Text('iran',
                           style: TextStyle(
                             color: Colors.blue,
                           ),),
                           value: '1',

                           ),
                           DropdownMenuItem(
                           child: Text('usa',
                           style: TextStyle(
                             color: Colors.blue,
                           ),),
                           value: '2',
                           ),

                       ],

                      onChanged: (value) {
                        setState(() {
                          _value=value;
                        });
                       },
                      ),
                      Text('کەباب'),
                      Checkbox(
                        value: chek1,
                        onChanged: (bool value){
                          setState(() {
                            chek1 = value;
                          });

                        },),
                         Text('مریشک'),
                      Checkbox(
                        value: chek2,
                        onChanged: (bool value){
                          setState(() {
                            chek2 = value;
                          });

                        })

       ],
     ),

   ),
   appBar: AppBar(
     backgroundColor: Colors.blue,
    // leading: IconButton(icon: Icon(Icons.arrow_back), onPressed: () {  },),
    centerTitle: false,
    title: Text('app bar'),

   ),

 ),

);
}
Widget D(){
return Padding(padding: EdgeInsets.all(10),
child: Text('$text بەخێر بێیت '),
);
}
show(BuildContext context){
showDialog(
context: context,
builder:  (BuildContext context){
AlertDialog(
title: Text('close'),
content: Text('are you sure to close this program'),
actions: [
FlatButton(
color: Colors.blue,
onPressed: (){},
 child: Text('close')
 ),

FlatButton(
onPressed: (){
Navigator.pop(context);
},
child: Text('cancel'),
)
],
);
 }
 );

}
sho(BuildContext context){
showDialog(
context: context,
builder: (BuildContext context){
CupertinoAlertDialog(
title: Text('close'),
content: Text('are you sure to close this program'),
actions: [
CupertinoDialogAction(
onPressed: (){},
 child: Text('close')
 ),

CupertinoDialogAction(
onPressed: (){
Navigator.pop(context);
},
child: Text('cancel'),
)
],
);
 }
 );

}
sh(BuildContext context){
showModalBottomSheet(
backgroundColor: Colors.grey.shade200,
context: context,
builder:(BuildContext context){
return
//ئیتر لێرە بە ئارەزی خۆت چیت بوێت ئەتوانیت دایبنێت وەک کۆنتەینەر یان فۆرم یان تێکست فیڵد
Container(
child: Column(
children: [
TextField(
decoration: InputDecoration(
border: OutlineInputBorder(borderRadius: BorderRadius.circular(110)),
helperText: 'ناو',
labelText: 'ناوت چیە',
prefixIcon: Icon(Icons.person),
),
)
]
)
);
}
);
}
}

Can you upload your project on a Github repository and then share the link of it so that everything will be in a structured manner. And can you also upload a snapshot of problems and debug console errors.?

The Github issue tracker is for bugs and features requests for the Flutter SDK. Help and support questions like these are better suited for Q&A sites like StackOverflow or on one of the flutter community sites at https://flutter.dev/community .

authors: jonahwilliams onkar-shaligram zinwar1