text:
There is a blank area between the appbar and the body

It's not a blank space it's the AppBar's shadow. You can turn it off with the elevation property.
AppBarTheme(
elevation: 0, // This removes the shadow from all App Bars.
)

I believe it's not a blank space it's the AppBar's shadow. You can turn it off with the elevation property.
AppBarTheme(
elevation: 0, // This removes the shadow from all App Bars.
)

This is not a shadow,It is the real spacing
AppBarTheme(
elevation: 0 // Not effective
)

Different, but still similar issue #40939.
@itMcdull can you paste here your code example to reproduce it, and your flutter doctor -v output?

 @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        elevation: 0,
        backgroundColor: Color(0xff2196f3),
      ),
      body: Container(
        height: 200,
        color:  Color(0xff2196f3),
      ),
    );
  }

This problem it confirmed happening in
Flutter 1.13.6-pre.23 • channel master  and  Flutter 1.12.13+hotfix.5 • channel stable
And it is a real "space between". You can check adding a background color to Scaffold:
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.orange,
appBar: AppBar(
elevation: 0,
backgroundColor: Color(0xff2196f3),
),
body: Container(
height: 200,
color:  Color(0xff2196f3),
),
);
}

the properties of Scaffold "extendBodyBehindAppBar" may can solve this

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Color(0xff2196f3),
),
body: Container(
transform: Matrix4.translationValues(0, -1, 0),
height: 200,
color:  Color(0xff2196f3),
),
);
}

This issue still exsits now in the  latest flutter 1.17.
are there any solutions for it?

Hi all,
the issue occur with the latest master,
tested with the code from this issue

doctor
[✓] Flutter (Channel master, 1.19.0-2.0.pre.143, on Mac OS X 10.15.4 19E287, locale en-GB)
    • Flutter version 1.19.0-2.0.pre.143 at /Users/nevercode/development/flutter_master
    • Framework revision 9d58a87066 (2 days ago), 2020-05-22 22:37:01 -0700
    • Engine revision 9ce1e5c5c7
    • Dart version 2.9.0 (build 2.9.0-10.0.dev 7706afbcf5)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/nevercode/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.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.9.0

[✓] 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 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] VS Code
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.10.2

[✓] Connected device (3 available)
    • Pixel 3a   • 965AY0WP5C • android-arm64  • Android 10 (API 29)
    • Web Server • web-server • web-javascript • Flutter Tools
    • Chrome     • chrome     • web-javascript • Google Chrome 81.0.4044.138

• No issues found!

Screenshot

大家好，
这个问题发生在最新的master上，
并已使用此问题中的代码进行了测试
医生
屏幕截图

How to deal with it? I rewrote Appbar and solved

I am trying to create a frame of spotify. By making elevation : 0 worked for me.

 return Scaffold(
      appBar: AppBar(
        elevation: 0,
)
)

even after adding this code it did not resolved the issue

possibly related to https://github.com/flutter/flutter/issues/22056

My temporary solution for this: create an AppBar with shadow with the background color in the shadow color

My temporary solution for this: create an AppBar with shadow with the background color in the shadow color

Verified this issue on latest stable and master using this code sample, https://github.com/flutter/flutter/issues/40947#issuecomment-533760734 and didn't see the blank area / white spacing between appbar and the body.

flutter doctor -v
[✓] Flutter (Channel stable, 1.22.6, on Mac OS X 10.15.4 19E2269 darwin-x64,
    locale en-IN)
    • Flutter version 1.22.6 at /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision 9b2d32b605 (5 days ago), 2021-01-22 14:36:39 -0800
    • Engine revision 2f0af37152
    • Dart version 2.10.5

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.9.3

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

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

[✓] Connected device (2 available)
    • SM A260G (mobile)      • 5200763ebcfa861f • android-arm • Android 8.1.0
      (API 27)
    • emulator-5554 (mobile) • emulator-5554    • android-x86 • Android 4.1.2
      (API 16) (emulator)

! Doctor found issues in 1 category.

[✓] Flutter (Channel master, 1.26.0-13.0.pre.177, on Mac OS X 10.15.4 19E2269
    darwin-x64, locale en-IN)
    • Flutter version 1.26.0-13.0.pre.177 at
      /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision 2eeeba9c09 (29 hours ago), 2021-01-25 20:52:30 -0800
    • Engine revision 6e391c5942
    • Dart version 2.12.0 (build 2.12.0-257.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    ! CocoaPods 1.9.3 out of date (1.10.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin
        code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade see
      https://guides.cocoapods.org/using/getting-started.html#installation for
      instructions.

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

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

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

[✓] Connected device (4 available)
    • SM A260G (mobile)      • 5200763ebcfa861f • android-arm    • Android 8.1.0
      (API 27)
    • emulator-5554 (mobile) • emulator-5554    • android-x86    • Android 4.1.2
      (API 16) (emulator)
    • macOS (desktop)        • macos            • darwin-x64     • Mac OS X
      10.15.4 19E2269 darwin-x64
    • Chrome (web)           • chrome           • web-javascript • Google Chrome
      88.0.4324.96

! Doctor found issues in 1 category.

Going ahead and closing this as fixed. If anybody disagrees, write in comment and I'll reopen.
Thanks.

Verified this issue on latest stable and master using this code sample, https://github.com/flutter/flutter/issues/40947#issuecomment-533760734 and didn't see the blank area / white spacing between appbar and the body.

flutter doctor -v
[✓] Flutter (Channel stable, 1.22.6, on Mac OS X 10.15.4 19E2269 darwin-x64,
    locale en-IN)
    • Flutter version 1.22.6 at /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision 9b2d32b605 (5 days ago), 2021-01-22 14:36:39 -0800
    • Engine revision 2f0af37152
    • Dart version 2.10.5

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.9.3

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

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

[✓] Connected device (2 available)
    • SM A260G (mobile)      • 5200763ebcfa861f • android-arm • Android 8.1.0
      (API 27)
    • emulator-5554 (mobile) • emulator-5554    • android-x86 • Android 4.1.2
      (API 16) (emulator)

! Doctor found issues in 1 category.

[✓] Flutter (Channel master, 1.26.0-13.0.pre.177, on Mac OS X 10.15.4 19E2269
    darwin-x64, locale en-IN)
    • Flutter version 1.26.0-13.0.pre.177 at
      /Users/dhs/documents/Fluttersdk/flutter
    • Framework revision 2eeeba9c09 (29 hours ago), 2021-01-25 20:52:30 -0800
    • Engine revision 6e391c5942
    • Dart version 2.12.0 (build 2.12.0-257.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at /Users/dhs/Library/Android/sdk
    • Platform android-30, build-tools 30.0.0
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    ! CocoaPods 1.9.3 out of date (1.10.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin
        code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade see
      https://guides.cocoapods.org/using/getting-started.html#installation for
      instructions.

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

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

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

[✓] Connected device (4 available)
    • SM A260G (mobile)      • 5200763ebcfa861f • android-arm    • Android 8.1.0
      (API 27)
    • emulator-5554 (mobile) • emulator-5554    • android-x86    • Android 4.1.2
      (API 16) (emulator)
    • macOS (desktop)        • macos            • darwin-x64     • Mac OS X
      10.15.4 19E2269 darwin-x64
    • Chrome (web)           • chrome           • web-javascript • Google Chrome
      88.0.4324.96

! Doctor found issues in 1 category.

Going ahead and closing this as fixed. If anybody disagrees, write in comment and I'll reopen.
Thanks.

hello, did anyone have solved this bug?

i solved this , set the   preferredSize: const Size.fromHeight(0.0), and use toolbarHeight
appBar: AppBar(
backgroundColor: ColorPrimary,
elevation: 0,
centerTitle: true,
toolbarHeight: 80,
bottom: PreferredSize(
preferredSize: const Size.fromHeight(0.0),
child: Theme(

This is still happening, please investigate, just can't accomplish the design which connects the AppBar and scaffold.

```
[✓] Flutter (Channel beta, 2.1.0-12.2.pre, on macOS 11.0.1 20B50 darwin-x64, locale en-US)
• Flutter version 2.1.0-12.2.pre at /Users/sameerkashyap/Documents/Development/flutter
• Framework revision 5bedb7b1d5 (4 days ago), 2021-03-17 17:06:30 -0700
• Engine revision 711ab3fda0
• Dart version 2.13.0 (build 2.13.0-116.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/sameerkashyap/Library/Android/sdk
• Platform android-30, build-tools 30.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_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] IntelliJ IDEA Community Edition (version 2020.3.2)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.54.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.20.0
[✓] Connected device (3 available)
• SM M405F (mobile) • RZ8M62KF2VV • android-arm64  • Android 10 (API 29)
• macOS (desktop)   • macos       • darwin-x64     • macOS 11.0.1 20B50 darwin-x64
• Chrome (web)      • chrome      • web-javascript • Google Chrome 89.0.4389.90
• No issues found!
</details>

I'm facing this issue as well, tried all the solutions suggested above... though adding the backgroundColor property to the Scaffold solved the issue, it didn't solve it for me because I'm using a bottomNavigationBar that would take the Scaffold's backgroundColor as I am trying to give that a different background colour.

authors: BondarenkoStas Dinosane2 ErickPariseVitorassi Sameerkash chcarmen darshankawar ding-zou iapicca itMcdull joharputr kenthinson once10301 surhidamatya tfannoush tomakazu


text:
[iOS] Scaffold resizes when you come from an app with the keyboard open

This problem occurs whenever the keyboard is raised in other apps and return to the app
Steps to Reproduce
Open an app like messages and tap in a field, when the keyboard is on the screen, slide back to your app. The flutter app will resize weirdly for a moment.
Demo with gallery app

Target Platform: iOS
Target OS version/browser: 12/13
Devices: Simulator/iPhone X
[✓] Flutter (Channel master, v1.10.15-pre.205, on Mac OS X 10.15 19A602, locale es-ES)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.5)
[✓] Connected device (4 available)

The workaround to avoid this is: in your Scaffold, set resizeToAvoidBottomInset property to false.
It desactives the resize of the scaffold when the keyboard pop ups. You should be careful in the scaffolds where you want to use the keyboard

I think this is the real cause of this other observed issue:
https://github.com/flutter/flutter/issues/41679

The workaround to avoid this is: in your Scaffold, set resizeToAvoidBottomInset property to false.
It desactives the resize of the scaffold when the keyboard pop ups. You should be careful in the scaffolds where you want to use the keyboard

Resolved, thanks
This problem occurs whenever the keyboard is raised  in other apps and  return to the app

This is fixed at 16270

I'm running an app from the latest Flutter dev branch and still seeing this issue.

source: gharchive/issue

authors: ChinaFishNews athornz jamesblasco sroddy

repo: flutter/flutter

license_type: permissive

license_source: github-api


text:
Constants Crashes, Sluggish Debugging and Unable to Connect After Flutter 1.12 Update

I am experiencing issues where my code from VS Code is not able to run on the iOS simulator or Android emulator. I had to kill the simulator and start again. This happens every single time when I try to run the app. The app is also freezing a lot after Flutter 1.12 update.

Hi @azamsharp
can you please provide your updated  flutter doctor -v
and your flutter run --verbose?
Also, to better address the issue, would be helpful
if you could post  a minimal code sample
or the steps to reproduce the problem.
Thank you

The app is the basic counter default app that comes with Flutter.
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.1 19B88,
locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version
29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.41.0)
[✓] Connected device (1 available)
• No issues found!
On Fri, Dec 13, 2019 at 5:50 AM Francecsco Iapicca notifications@github.com
wrote:

Hi @azamsharp https://github.com/azamsharp
can you please provide your updated flutter doctor -v
and your flutter run --verbose?
Also, to better address the issue, would be helpful
if you could post a minimal code sample
or the steps to reproduce the problem.
Thank you
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/46895?email_source=notifications&email_token=AAAEBXHC2BLQCFWYE6CAWHDQYNZGTA5CNFSM4J2CLIX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGZYQFI#issuecomment-565413909,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAAEBXAY5DFQ4OSC7UVEZBTQYNZGTANCNFSM4J2CLIXQ
.

--
Interested in learning development! Check out courses on Udemy.
https://www.udemy.com/user/mohammad-azam-2/

Hi @azamsharp
thank you for providing your  flutter doctor -v.
Can you please provide your flutter run --verbose relative to the crash?
Thank you

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.

authors: VladyslavBondarenko azamsharp iapicca


text:
[macOS] add lookupKeyForAsset to FlutterPluginRegistrar

It is currently not possible to load assets from a plugin. This is needed for the video_player plugin for example.

I need it too for a third party package, please make it open :)

Patches are welcome for this; it would be easy to plumb through following the same approach as the iOS code.

@stuartmorgan I would like to have a try at this. Can you suggest me where to look for in the iOS code. Thanks

https://github.com/flutter/engine/search?q=lookupKeyForAsset&unscoped_q=lookupKeyForAsset

Can be used as a temporary solution:
#if os(iOS)
guard let path = Bundle.main.path(forResource: "Frameworks/App.framework/flutter_assets/" + name, ofType: "") else {
    return nil
}
#elseif os(macOS)
let path = Bundle.main.bundlePath + "/Contents/Frameworks/App.framework/Resources/flutter_assets/" + name;
#endif

Any update on this?

BTW, is anyone know how to look up the asset path in Windows?

Any update on this?

I found a slightly more idiomatic way to get the resource URL on macOS (because Data(contentsOf: ...) requires a URL, not a path):
let filename = "FontManifest.json"
let flutterBundleId = "io.flutter.flutter.app"
let flutterAssetsDirectory = "flutter_assets"
guard let flutterBundle = Bundle(identifier: flutterBundleId) else {
    fatalError("Could not get Flutter App bundle with ID: \(flutterBundleId)")
}
guard
    let resourceURL = flutterBundle.url(forResource: filename, withExtension: nil, subdirectory: flutterAssetsDirectory)
else {
    fatalError("Could not get resource URL!")
}

(Bundle ID comes from Contents/Frameworks/App.framework/Resources/Info.plist.)

authors: SergeShkurko cbenhagen florent37 littleGnAl nabil6391 patrick-fu stuartmorgan tgrushka


text:
SURVEY FOR FLUTTER DEVELOPERS AND THE SATISFACTION WITH THE FRAMEWORK AND ITS 3RD PARTY LIBRARIES

My name is Tobi Michael Aroyehun and I am currently pursuing MSc in software development at the University of Limerick, Ireland. I am currently doing a research for my final thesis on the study of the flutter development framework and its 3rd party libraries. I am writing this to get feedback via a 10minutes survey from flutter developer on the current state of this framework with more emphasis on working with 3rd party libraries.
If you're interested in supporting this course,the URL link is below and as stated earlier it will only take 10 minutes. Thank you all for assistance.
Best Regards, Tobi.
https://docs.google.com/forms/d/e/1FAIpQLSdS1_WdjPIJslTY4xc4wWGZTamY1wyBGMaZLyDy16hvqZe7Mg/viewform?usp=sf_link

See flutter.dev/community for places you may want to post this. The issue tracker is for bug reports and feature requests.


text:
flutter: Another exception was thrown: RangeError (index): Invalid value: Valid value range is empty: 0

What happend with RangError:
1. My Model:
class Sliderapi {
int id;
String text1;
String text2;
String text3;
String img;
String link;
int del;
String createdAt;
String updatedAt;
Sliderapi(
{this.id,
this.text1,
this.text2,
this.text3,
this.img,
this.link,
this.del,
this.createdAt,
this.updatedAt});
Sliderapi.fromJson(Map<String, dynamic> json) {
id = json['id'];
text1 = json['text1'];
text2 = json['text2'];
text3 = json['text3'];
img = json['img'];
link = json['link'];
del = json['del'];
createdAt = json['created_at'];
updatedAt = json['updated_at'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['text1'] = this.text1;
data['text2'] = this.text2;
data['text3'] = this.text3;
data['img'] = this.img;
data['link'] = this.link;
data['del'] = this.del;
data['created_at'] = this.createdAt;
data['updated_at'] = this.updatedAt;
return data;
}
}
2. My View Page:
List serviceapi = [];
@override
void initState() {
// TODO: implement initState
super.initState();
loadSliderData();
}
loadSliderData() async{
var url = "http://citgroup.la/api/slide";
var response = await http.get(url);
var jsonString = json.decode(response.body);
setState(() {
  jsonString.forEach((sl){
    final slider = Sliderapi.fromJson(sl);
    sliderapi.add(slider);
  });
});

}
3. My Widget:
Widget carousel_slider = Container(
child: CarouselSlider.builder(
height: 200,
autoPlay: true,
enlargeCenterPage: true,
itemCount: sliderapi.length,
itemBuilder: (context, i) => Container(
child: Card(
child: Container(
decoration: BoxDecoration(
),
child: Image.network('http://citgroup.la/${sliderapi[i].img}'),
),
),
),
),
);

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: citdevs jonahwilliams


text:
Blinking cursor should use less CPU

Details
I noticed that this issue has been raised in regards to ios, but this is on macos and that issue is also locked now. https://github.com/flutter/flutter/issues/33833
Using an animated widget, such as TextField (when the cursor is blinking) causes cpu usage to remain steadily at 6-10% in the mac activity monitor. I'm on a 2019 15" MBP. Submitting the field (and therefore ending the animation) sees a return to 0% cpu usage.
To reproduce, just display a TextField.
As a side note, memory usage sits between 200-300MB for a relatively simple app. Loading larger widgets such as large amounts of text (not rich text) causes memory to spike as much as 50-70MB.
I'm on flutter master, but this issue occurs on every version I've tried.

Target Platform:
MacOS
Target OS version/browser:
Catalina 10.15.1 (19B88)
Devices:
MacBook Pro
Logs

   info • The getter doesn't override an inherited getter • lib/bloc/active_requests_bloc.dart:40:20 • override_on_non_overriding_member
   info • The getter doesn't override an inherited getter • lib/bloc/active_requests_bloc.dart:49:20 • override_on_non_overriding_member
   info • The getter doesn't override an inherited getter • lib/bloc/active_requests_bloc.dart:58:20 • override_on_non_overriding_member
   info • The getter doesn't override an inherited getter • lib/bloc/active_requests_bloc.dart:63:20 • override_on_non_overriding_member
   info • The getter doesn't override an inherited getter • lib/bloc/active_requests_bloc.dart:68:20 • override_on_non_overriding_member
   info • The getter doesn't override an inherited getter • lib/bloc/active_requests_bloc.dart:77:20 • override_on_non_overriding_member
   info • The getter doesn't override an inherited getter • lib/bloc/active_requests_bloc.dart:86:20 • override_on_non_overriding_member
   info • The getter doesn't override an inherited getter • lib/bloc/active_requests_bloc.dart:93:20 • override_on_non_overriding_member
   info • This class (or a class that this class inherits from) is marked as '@immutable', but one or more of its instance fields aren't final: RequestModel.id • lib/bloc/models.dart:16:7 •
          must_be_immutable
   info • Close instances of `dart.core.Sink` • lib/header_bar.dart:12:9 • close_sinks
   info • Close instances of `dart.core.Sink` • lib/request_container.dart:36:9 • close_sinks
   info • Close instances of `dart.core.Sink` • lib/request_container.dart:111:9 • close_sinks

[✓] Flutter (Channel master, 1.20.0-1.0.pre.25, on Mac OS X 10.15.1 19B88, locale en-US)
    • Flutter version 1.20.0-1.0.pre.25 at /Users/ben/.local/lib/flutter
    • Framework revision 3744b82d8c (17 hours ago), 2020-06-11 13:25:01 -0700
    • Engine revision 965fbbed17
    • Dart version 2.9.0 (build 2.9.0-14.0.dev 2b917f5b6a)

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location.
      You may also want to add it to your PATH environment variable.

[✓] Xcode - develop for iOS and macOS (Xcode 11.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.2.1, Build version 11B500
    • CocoaPods version 1.9.3

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] IntelliJ IDEA Ultimate Edition (version 2020.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 46.0.3
    • Dart plugin version 201.7846.93

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

[✓] Connected device (1 available)
    • macOS • macOS • darwin-x64 • Mac OS X 10.15.1 19B88

! Doctor found issues in 2 categories.

Hi @Blquinn
testing the code below with the latest master

code sample
import 'package:flutter/material.dart';

void main() =>
  runApp(MyApp());

class MyApp extends StatelessWidget {

  static const Widget _home = MyHomePage();
  @override
  Widget build(BuildContext context) => MaterialApp(
      home: _home,
    );
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) => const Material(
    child: Center(child: TextField(),),
  );
}

screenshot
![image](https://user-images.githubusercontent.com/45637986/84514396-a1273680-acd3-11ea-97af-a4542669d9bc.png)

doctor
[✓] Flutter (Channel master, 1.20.0-1.0.pre.29, on Mac OS X 10.15.5 19F101, locale en-GB)
    • Flutter version 1.20.0-1.0.pre.29 at /Users/nevercode/development/flutter_master
    • Framework revision 1d407de925 (15 hours ago), 2020-06-11 19:45:02 -0400
    • Engine revision d417772d7a
    • Dart version 2.9.0 (build 2.9.0-15.0.dev f043f9e5f6)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/nevercode/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.9.0

[✓] 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 45.1.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] VS Code
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.11.0

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

• No issues found!

the data are comparable to the one you provided
Thank you
https://github.com/flutter/flutter/issues/33833#issuecomment-573752087
https://github.com/flutter/flutter/pull/46720

Thanks for confirming @iapicca
Also note that I ran the same app on linux and did not see the cpu issues. It ran at 0% cpu the whole time. The cursor doesn't fade in and out as it does on mac though, so I assume the problem is with that fade animation.
Memory usage is much lower at start on linux (125MB) as well, however after loading large amount of text, it shot up to 256MB.

Hi @Blquinn
I'll test it on my laptop later and update the issue.
Thanks again

Hi @Blquinn
testing the code below with the latest master on linux

info
 francesco@francesco-yoga720  ~  uname -r                                                                                 ✔  1477  12:20:10

5.3.0-59-generic
 francesco@francesco-yoga720  ~  cat /etc/os-release                                                                                 ✔  1478  12:20:14
NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.4 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
    system         80X6 (LENOVO_MT_80X6_BU_idea_FM_YOGA 720-13IKB)
/0                       bus            LNVNB161216
/0/0                     memory         128KiB BIOS
/0/4                     processor      Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
/0/4/5                   memory         128KiB L1 cache
/0/4/6                   memory         512KiB L2 cache
/0/4/7                   memory         3MiB L3 cache
/0/24                    memory         8GiB System Memory
/0/24/0                  memory         4GiB SODIMM DDR4 Synchronous Unbuffered (Unregistered) 2133 MHz (0.5 ns)
/0/24/1                  memory         4GiB SODIMM DDR4 Synchronous Unbuffered (Unregistered) 2133 MHz (0.5 ns)
/0/100                   bridge         Xeon E3-1200 v6/7th Gen Core Processor Host Bridge/DRAM Registers
/0/100/2       /dev/fb0  display        HD Graphics 620
/0/100/4                 generic        Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem
/0/100/14                bus            Sunrise Point-LP USB 3.0 xHCI Controller
/0/100/14/0    usb1      bus            xHCI Host Controller
/0/100/14/0/2            input          USB Optical Mouse
/0/100/14/0/5            multimedia     EasyCamera
/0/100/14/0/6            generic        Generic USB device
/0/100/14/0/7            communication  Bluetooth wireless interface
/0/100/14/1    usb2      bus            xHCI Host Controller
/0/100/14.2              generic        Sunrise Point-LP Thermal subsystem
/0/100/15                generic        Sunrise Point-LP Serial IO I2C Controller #0
/0/100/15.1              generic        Sunrise Point-LP Serial IO I2C Controller #1
/0/100/15.2              generic        Sunrise Point-LP Serial IO I2C Controller #2
/0/100/16                communication  Sunrise Point-LP CSME HECI #1
/0/100/1c                bridge         Sunrise Point-LP PCI Express Root Port #1
/0/100/1c.2              bridge         Sunrise Point-LP PCI Express Root Port #3
/0/100/1c.5              bridge         Sunrise Point-LP PCI Express Root Port #6
/0/100/1c.5/0  wlp63s0   network        QCA6174 802.11ac Wireless Network Adapter
/0/100/1d                bridge         Sunrise Point-LP PCI Express Root Port #9
/0/100/1d/0              storage        NVMe SSD Controller SM961/PM961
/0/100/1e                generic        Sunrise Point-LP Serial IO UART Controller #0
/0/100/1f                bridge         Intel(R) 100 Series Chipset Family LPC Controller/eSPI Controller - 9D4E
/0/100/1f.2              memory         Memory controller
/0/100/1f.3              multimedia     Sunrise Point-LP HD Audio
/0/100/1f.4              bus            Sunrise Point-LP SMBus
/1                       power          CRB Battery 0
/2                       power          OEM Define 5
/3             docker0   network        Ethernet interface

code sample
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  static const Widget _home = MyHomePage();
  @override
  Widget build(BuildContext context) => MaterialApp(
        home: _home,
      );
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key key}) : super(key: key);

  static const _lorem =
      'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';

  TextEditingController get _controller =>
      TextEditingController()..text = _lorem;
  @override
  Widget build(BuildContext context) => Material(
        child: Center(
          child: TextField(
            controller: _controller,
          ),
        ),
      );
}

screenshots

logs
 francesco@francesco-yoga720  ~/projects/master  flutter_master run -d linux -v                                                                                 ✔  1486  12:36:37
[ +144 ms] executing: [/home/francesco/development/flutter_master/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +35 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 401690a64f7780ca55c763ebf2e0b449b1180c2e
[        ] executing: [/home/francesco/development/flutter_master/] git tag --contains HEAD
[ +204 ms] Exit code 0 from: git tag --contains HEAD
[   +2 ms] executing: [/home/francesco/development/flutter_master/] git describe --match *.*.*-*.*.pre --first-parent --long --tags
[  +11 ms] Exit code 0 from: git describe --match *.*.*-*.*.pre --first-parent --long --tags
[        ] 1.20.0-0.0.pre-42-g401690a64
[  +11 ms] executing: [/home/francesco/development/flutter_master/] git rev-parse --abbrev-ref --symbolic @{u}
[   +4 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/master
[        ] executing: [/home/francesco/development/flutter_master/] git ls-remote --get-url origin
[   +6 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +64 ms] executing: [/home/francesco/development/flutter_master/] git rev-parse --abbrev-ref HEAD
[   +4 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] master
[  +54 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +17 ms] executing: /usr/lib/Android/platform-tools/adb devices -l
[  +61 ms] List of devices attached
[   +6 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +3 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +254 ms] Generating /home/francesco/projects/master/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[  +90 ms] Starting incremental build...
[   +2 ms] Initializing file store
[  +12 ms] Skipping target: gen_localizations
[  +10 ms] complete
[   +7 ms] Launching lib/main.dart on Linux in debug mode...
[   +9 ms] /home/francesco/development/flutter_master/bin/cache/dart-sdk/bin/dart --disable-dart-dev
/home/francesco/development/flutter_master/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot --sdk-root
/home/francesco/development/flutter_master/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names -Ddart.developer.causal_async_stacks=true
--output-dill /tmp/flutter_tools.PYFDHT/flutter_tool.RARTYN/app.dill --packages .packages -Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts --track-widget-creation
--filesystem-scheme org-dartlang-root --initialize-from-dill build/cache.dill.track.dill
[  +31 ms] Building Linux application...
[  +17 ms] <- compile package:master/main.dart
[   +6 ms] executing: [build/linux/debug/] cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug /home/francesco/projects/master/linux
[  +36 ms] -- Configuring done
[  +33 ms] -- Generating done
[   +2 ms] -- Build files have been written to: /home/francesco/projects/master/build/linux/debug
[   +8 ms] executing: ninja -C build/linux/debug install
[  +14 ms] ninja: Entering directory `build/linux/debug'
[+20179 ms] [1/14] Generating /home/francesco/projects/master/linux/flutter/ephemeral/libflutter_linux_glfw.so, flutter_export.h, flutter_glfw.h, flutter_messenger.h, flutter_plugin_registrar.h,
/home/francesco/projects/master/linux/flutter/ephemeral/cpp_client_wrapper_glfw/engine_method_result.cc, /home/francesco/projects/master/linux/flutter/ephemeral/cpp_client_wrapper_glfw/standard_codec.cc,
/home/francesco/projects/master/linux/flutter/ephemeral/cpp_client_wrapper_glfw/plugin_registrar.cc, /home/francesco/projects/master/linux/flutter/ephemeral/cpp_client_wrapper_glfw/flutter_engine.cc,
/home/francesco/projects/master/linux/flutter/ephemeral/cpp_client_wrapper_glfw/flutter_window_controller.cc, _phony_
[   +2 ms] [ +261 ms] executing: [/home/francesco/development/flutter_master/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] [  +71 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] [        ] 401690a64f7780ca55c763ebf2e0b449b1180c2e
[        ] [        ] executing: [/home/francesco/development/flutter_master/] git tag --contains HEAD
[        ] [ +252 ms] Exit code 0 from: git tag --contains HEAD
[        ] [   +2 ms] executing: [/home/francesco/development/flutter_master/] git describe --match *.*.*-*.*.pre --first-parent --long --tags
[        ] [  +40 ms] Exit code 0 from: git describe --match *.*.*-*.*.pre --first-parent --long --tags
[        ] [        ] 1.20.0-0.0.pre-42-g401690a64
[        ] [  +13 ms] executing: [/home/francesco/development/flutter_master/] git rev-parse --abbrev-ref --symbolic @{u}
[        ] [   +5 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] [        ] origin/master
[        ] [        ] executing: [/home/francesco/development/flutter_master/] git ls-remote --get-url origin
[        ] [   +7 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] [        ] https://github.com/flutter/flutter.git
[        ] [  +64 ms] executing: [/home/francesco/development/flutter_master/] git rev-parse --abbrev-ref HEAD
[        ] [   +5 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] [        ] master
[        ] [  +62 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [  +12 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] [ +140 ms] Initializing file store
[        ] [  +17 ms] Done initializing file store
[        ] [  +58 ms] Skipping target: gen_localizations
[        ] [+3379 ms] kernel_snapshot: Starting due to {InvalidatedReason.inputChanged}
[        ] [  +39 ms] /home/francesco/development/flutter_master/bin/cache/dart-sdk/bin/dart --disable-dart-dev
/home/francesco/development/flutter_master/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot --sdk-root
/home/francesco/development/flutter_master/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --target=flutter -Ddart.developer.causal_async_stacks=true -Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts --track-widget-creation --packages
/home/francesco/projects/master/.packages --output-dill /home/francesco/projects/master/.dart_tool/flutter_build/864b60a98bb7a76e628541281853f8b1/app.dill --depfile
/home/francesco/projects/master/.dart_tool/flutter_build/864b60a98bb7a76e628541281853f8b1/kernel_snapshot.d package:master/main.dart
[   +3 ms] [+9616 ms] Skipping target: unpack_linux
[        ] [+3711 ms] kernel_snapshot: Complete
[        ] [ +775 ms] debug_bundle_linux_assets: Starting due to {InvalidatedReason.inputChanged}
[        ] [ +152 ms] debug_bundle_linux_assets: Complete
[        ] [ +377 ms] Persisting file store
[        ] [   +9 ms] Done persisting file store
[        ] [   +8 ms] build succeeded.
[        ] [   +9 ms] "flutter assemble" took 18,333ms.
[        ] [   +4 ms] ensureAnalyticsSent: 0ms
[        ] [   +1 ms] Running shutdown hooks
[        ] [        ] Shutdown hooks complete
[        ] [        ] exiting with code 0
[ +339 ms] [2/5] Building CXX object CMakeFiles/master.dir/flutter/generated_plugin_registrant.cc.o
[ +381 ms] [3/5] Building CXX object CMakeFiles/master.dir/main.cc.o
[ +129 ms] [4/5] Linking CXX executable master
[        ] [4/5] Install the project...
[  +10 ms] -- Install configuration: "Debug"
[   +6 ms] -- Installing: /home/francesco/projects/master/build/linux/debug/bundle/master
[   +1 ms] -- Set runtime path of "/home/francesco/projects/master/build/linux/debug/bundle/master" to "$ORIGIN/lib"
[        ] -- Installing: /home/francesco/projects/master/build/linux/debug/bundle/data/icudtl.dat
[   +1 ms] -- Installing: /home/francesco/projects/master/build/linux/debug/bundle/lib/libflutter_linux_glfw.so
[ +184 ms] -- Installing: /home/francesco/projects/master/build/linux/debug/bundle/data/flutter_assets
[        ] -- Installing: /home/francesco/projects/master/build/linux/debug/bundle/data/flutter_assets/packages
[        ] -- Installing: /home/francesco/projects/master/build/linux/debug/bundle/data/flutter_assets/packages/cupertino_icons
[        ] -- Installing: /home/francesco/projects/master/build/linux/debug/bundle/data/flutter_assets/packages/cupertino_icons/assets
[        ] -- Installing: /home/francesco/projects/master/build/linux/debug/bundle/data/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf
[        ] -- Installing: /home/francesco/projects/master/build/linux/debug/bundle/data/flutter_assets/AssetManifest.json
[        ] -- Installing: /home/francesco/projects/master/build/linux/debug/bundle/data/flutter_assets/fonts
[        ] -- Installing: /home/francesco/projects/master/build/linux/debug/bundle/data/flutter_assets/fonts/MaterialIcons-Regular.ttf
[        ] -- Installing: /home/francesco/projects/master/build/linux/debug/bundle/data/flutter_assets/NOTICES
[        ] -- Installing: /home/francesco/projects/master/build/linux/debug/bundle/data/flutter_assets/kernel_blob.bin
[  +39 ms] -- Installing: /home/francesco/projects/master/build/linux/debug/bundle/data/flutter_assets/FontManifest.json
[  +13 ms] Building Linux application... (completed in 21.4s)
[ +697 ms] Observatory URL on device: http://127.0.0.1:43375/sn9nF6xJRy0=/
[  +24 ms] Caching compiled dill
[  +47 ms] Connecting to service protocol: http://127.0.0.1:43375/sn9nF6xJRy0=/
[ +197 ms] Successfully connected to service protocol: http://127.0.0.1:43375/sn9nF6xJRy0=/
[        ] Waiting for Linux to report its views...
[   +4 ms] Waiting for Linux to report its views... (completed in 3ms)
[  +13 ms] DevFS: Creating new filesystem on the device (null)
[  +16 ms] DevFS: Created new filesystem on the device (file:///tmp/masterWWQQKE/master/)
[   +3 ms] Updating assets
[ +122 ms] Syncing files to device Linux...
[   +2 ms] Scanning asset files
[   +2 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[   +1 ms] <- recompile package:master/main.dart 9a57feef-a6a5-4149-a800-29f7e0be1ae7
[        ] <- 9a57feef-a6a5-4149-a800-29f7e0be1ae7
[  +94 ms] Updating files
[  +95 ms] DevFS: Sync finished
[        ] Syncing files to device Linux... (completed in 197ms)
[   +1 ms] Synced 0.9MB.
[   +1 ms] <- accept
[   +2 ms] Connected to _flutterView/0x1ab8650.
[   +1 ms] Flutter run key commands.
[   +2 ms] r Hot reload. 🔥🔥🔥
[   +1 ms] R Hot restart.
[   +1 ms] h Repeat this help message.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] An Observatory debugger and profiler on Linux is available at: http://127.0.0.1:43375/sn9nF6xJRy0=/
[+61272 ms] DevFS: Deleting filesystem on the device (file:///tmp/masterWWQQKE/master/)
[   +5 ms] DevFS: Deleted filesystem on the device (file:///tmp/masterWWQQKE/master/)
[  +39 ms] Service protocol connection closed.
[        ] Application finished.
[   +3 ms] "flutter run" took 84,634ms.
[   +4 ms] ensureAnalyticsSent: 0ms
[   +1 ms] Running shutdown hooks
[        ] Shutdown hook priority 4
[        ] Shutdown hooks complete
[   +1 ms] exiting with code 0

doctor
[✓] Flutter (Channel master, 1.20.0-1.0.pre.42, on Linux, locale en_US.UTF-8)
    • Flutter version 1.20.0-1.0.pre.42 at /home/francesco/development/flutter_master
    • Framework revision 401690a64f (31 hours ago), 2020-06-12 19:45:48 -0700
    • Engine revision 965fbbed17
    • Dart version 2.9.0 (build 2.9.0-14.0.dev 2b917f5b6a)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /usr/lib/Android
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = /usr/lib/Android
    • ANDROID_SDK_ROOT = /usr/lib/Android
    • Java binary at: /usr/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1~18.04-b09)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
    • cmake version 3.10.2
    • ninja version 1.8.2

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] VS Code (version 1.46.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.11.0

[✓] Connected device (3 available)
    • Linux      • Linux      • linux-x64      • Linux
    • Web Server • web-server • web-javascript • Flutter Tools
    • Chrome     • chrome     • web-javascript • Google Chrome 83.0.4103.97

! Doctor found issues in 1 category.

I see the memory usage you described
Thank you

Flutter's architecture differs from traditional macOS applications. Flutter does all the compositing itself, as opposed to native UIKit apps which can delegate part of the composition workload to the system compositor. You can see WindowServer as a candidate in the activity monitor which accounts for some of the cpu and gpu time.
If you were to create an application with a simple text box on macOS, the native application can essentially sleep as most of the heavy lifting is done by the system compositor. In Flutter the cursor is a timer and for each frame we need to composit and paint the layer tree to the surface. I’ve confirmed that we aren’t doing any additional work than expected.
Flutter also has the dart VM running to run the framework code to produce each frame and we expect that this will incur additional overhead as compared to native applications. Given this I think this is working as intended. If we at a later stage determine that we need to hit specific CPU and GPU utilization goals we can revisit this issue and try to find some improvements.

@iskakaushik Sorry, but using a constant 6-10% cpu to have a cursor animation is not acceptable. This means that if I leave my cursor in a text box and go do something else, my simple flutter application will be draining more battery than the rest of my applications + os combined. It is common to have desktop applications where the cursor is active most of the time.
Clearly, the short term solution is to turn off the animation on macos, right? Why let such a small visual effect destroy the efficiency of the entire application?

I don't think this is an acceptable range of additional overhead, it's a serious performance issue and I'd suggest removing the cursor animation for now (set the duration to 0 for now?).
Actually when using flutter desktop to create a product, our customers are always complaining that the cpu usage and power consumption is very fast, and if using a laptop it even leads to higher temperature and noise due to high fan speed.

@liyuqian  I would like to know if we have any plans to improve this in the near future?

This is a showstopper bug for our plans to use Flutter. Battery usage is absolutely critical. If this is really unfixable as @iskakaushik says then Flutter's current architecture is frankly unfit for purpose.

@iskakaushik Any progress on this matter? i'm getting constant 40% CPU usage on macos while on windows it is between 0 and 0.1 % !

+1
my app cpu usage reach to 70% - 80% !
apple m1 mac mini

At a minimum, we ought to be able to disable the animation when the window doesn't have focus. That would minimize the impact of this issue to just those times when someone was actively editing a text field. Adding for consideration to our next milestone (although it might be worth splitting this off into a separate issue).

Hi all.  Flutter engineering lead here.  Thank you for the bug.
Long ago I worked on AppKit for Mac, there were (and I'm sure still are) specific carve-outs to make the blinking cursor do as little work as possible as @iskakaushik describes.  (It had a bunch of logic to make sure it was the common non-occluded case, and then if so was drawn by a separate "heartbeat thread" which also drew things like progress indicators, etc.)  We've not yet done the work to replicate making just-drawing-the-blinking-cursor super cheap or use the system's special drawing code yet, but one could certainly imagine us doing so.  We need to actually ship Desktop to the stable channel first. :)
I've retitled the bug to specifically target the blinking cursor issue.  I don't expect us to attack this soon, but it's on our radar.  The best way to indicate your support for this or any other issue is to use the 👍 button.
If others have separate CPU/Battery issues or separate issues with animations or desktop in general, please file separate bugs so we can make sure they're addressed.  Thank you!

@eseidelGoogle Agreed that :+1: is sufficient to show support for the issue.
That said, I just wanted to re-iterate that for many of us here in the thread, just having the ability to disable the animation would be sufficient, we're not asking that you re-architect the animation architecture. (Although it would be pretty swell if you did!) Those changes obviously require a ton more work and thought.
Explaining how to avoid the blinking cursor, if there is an existing (reasonably simple) way to do so, would be great too.
I think the cursor is particularly painful because it may literally run for the entire duration of an application, unlike a loading spinner for example. This is a pretty huge bummer for people who are reporting in with 10/25/75% cpu utilization.
Thanks for your attention on the issue.

I think there are a few issues which will have to get split out here.  Re-reading the comments it seems like there is at least:

Cursor animation not always disabling on loss of focus (and thus consuming CPU even when in background?)
Cursor not changing color on loss of focus.
Cursor using more CPU than necessary to blink (because we're either not using the fancy cursor-specific drawing logic for the platform, or haven't yet invented our own cursor-specific cheap-to-execute animation path).

I suspect this will require @cbracken or @gspencergoog to split these out eventually (or someone reading this is welcome to file separate bugs with test cases/screen shots).  But likely all this work ends up being in a post-stable pass.
Thank you again for the reports!

If you would like an API that disables cursor blinking specifically (or gives you control over the blink period, etc), please file a separate bug, this issue is about CPU usage when blinking. In general we would be open to PRs that provide such control, assuming they can be implemented without negatively impacting the default path. @justinmc owns that area of the code.

We definitely don't disable blinking when the app loses focus, and we should. We'll need an API for the framework to know when the app loses focus if we don't already have one.

We noticed this issue when benchmarking our apps Flokk and Flutterfolio on macos, you'll see the highest % usage on laptops that are using 4k external monitors.
It seems like even though you can prevent layout with a redraw boundary, all pixels of the app are painted each time anything changes? And on 4k monitors this paint pass is really quite heavy. I'm not sure if redraw regions like flash had back in the day are an option but something like that seems like it would be ideal (if only the text field is changing, only push pixels for that region)

This also sparks an interesting discussion of what platform fidelity means. Is it more important to match the visual effect of a TextBox on macOs, or is it more important to match the battery profile of typical a macOs app that allows text entry?
Pragmatically speaking, if your framework has to choose between the two evils, I'd argue it should probably just drop visual fidelity in cases where the alternative is being a bad citizen with regards to battery usage. After all, what do users care more about, a blinking cursor or long battery life?

We should be able to get both good battery life and the right pixels. The question is how to do it, not whether to do it.

@Hixie The main reason I asked for the ability to disable the animation was as a stop gap measure to give you all time to work through the performance issues. The only reason I suggested that is because I'm not aware of what your priorities are. What would come sooner, or be more realistic, an update to the framework to disable the animation, or performance improvements?
It's the flutter team's decision to make obviously, I'm more curious than anything. It's pretty clear to me that you would all prefer to spend time having the animations run smoothly over updating the framework, which I don't necessarily disagree with.
I do wonder whether people who are developing for more constrained devices will want the ability to disable animations in general. Though maybe those folks will develop their own widgets that don't make use of any animations. It would be nice to have those fancy looking widgets you all made with disable-able animations, though I understand that's probably a big ask.

What would come sooner, or be more realistic, an update to the framework to disable the animation, or performance improvements?

I don't know of anyone who is currently working on Flutter full time who intends to provide a way to disable the animation, but it is probably significantly less work so if someone wanted to contribute a PR to do that, then that would happen sooner. Fixing the performance of normal cursors specifically will probably require significant work so I would not expect that in the near term, but that's something that I know the people working on Flutter full time do intend to eventually fix, so it will happen first if nobody volunteers time to do the animation disabling feature.
Sorry for the waffling answer, but it's really hard to answer questions like that for open source projects, since there's no single person in charge of when people do work; it's all volunteer work (either companies volunteering their engineers, like Google's or Canonical's contributions to Flutter, or individuals volunteering their time, like potentially you), and the project doesn't control what the volunteers think is most important to work on next.

It's the flutter team's decision to make obviously

We're an open source project, "the flutter team" is several hundred people with wildly differing priorities, skill levels, interests, and amount of available time to spend on the project. You could be a member of the team (see [https://github.com/flutter/flutter/blob/master/CONTRIBUTING.md](our contributing guide)). What I mean is, it could be your decision to make too.

https://github.com/flutter/flutter/issues/33939 fixes the problem right? This has already landed for Metal on IOS (https://github.com/flutter/engine/pull/28801)

Regarding the memory usage, it could be possibly related to using emoji? Right now flutter loads entire SBIX table, which on macOS is about 200MB, even though it's not really needed.
Also when looking at memory usage, I'd recommend looking at "private memory" usage, which doesn't include things that shared with flutter app and other processes (i.e. memory mapped files).

Btw, this issue affects web performance even more. On mac-native just blinking cursor is taking 8-10% of CPU on the web up to 30% in the same app.

Related: https://github.com/flutter/flutter/issues/93416

Generally speaking this applies to virtually any small animated widget a developer might make, the generalized issue is that changing small parts of the ui (1px) seems cause a millions of pixels to be painted, which on platforms with tons of pixels and weak CPU's can be a big issue.

Coming from AppKit,  this very disappointing. Does an issue exist to address this particular issue ?

@jimmycoyne I believe that has changed already, see #33939.

@jimmycoyne I believe that has changed already, see #33939.

It landed for iOS and Android, but not for desktop embedders (yet) :)

It landed for iOS and Android, but not for desktop embedders (yet) :)

Oh that is encouraging, is there a rough ETA for desktop ?

I'm now seeing a constant 12% cpu usage on the original macbook that I tested with (Release build). This is for the cursor blinking animation of the CupertinoTextField.
Similar story on the iPhone 12, cpu usage hovering around 11-12% (also a release build).
This is a blank app with just a CupertinoTextField.
Flutter version 3.3.4

The tracking issue for Metal/Vulkan embedders is https://github.com/flutter/flutter/issues/109721 . DRM is already enabled for openGL embedders

LOL.  I read "DRM" as "Digital Rights Management", not "Dirty Region Management". I was very confused for a moment.

I ran this on iOS with the latest engine, here is the profile: blinking_cursor_0102bb6de994.trace.zip
The top down view of the ui thread:

Just looking at that I think: eliminating allocations, Dart value types, revisiting the Matrix4 class might give you some small wins.  For Matrix4, trying to move to SIMD and using matrix operations that modify matrices instead of creating new allocations.  There isn't an obvious big win in there to my eyes though, beyond maybe value types.

@gaaclarke based on @jonahwilliams' comment; the DRM patch has not been released on metal, or vulkan platforms yet. So the performance we're seeing on Mac/iPhone does not reflect what you should expect to see after the patch has actually been released.

iOS and Android engines don't use embedder API. Unless it got reverted at some point metal already uses partial redraw.

I'm referring to desktop metal, not iOS metal.

I'm referring to desktop metal, not iOS metal.

Should have quoted. I was responding to @Blquinn's comment:

So the performance we're seeing on Mac/iPhone does not reflect what you should expect to see after the patch has actually

@gaaclarke based on @jonahwilliams' comment; the DRM patch has not been released on metal, or vulkan platforms yet. So the performance we're seeing on Mac/iPhone does not reflect what you should expect to see after the patch has actually been released.

There was some conversation in the Discord channel and I did a poor job of contextualizing my comment.  The gist is that the DRM patch has landed on iOS metal.  It makes a big difference, but we still see ~10% of the CPU used on iOS even with DRM landed.  So the question is "what is using the CPU now?"  That's what's in that profile.  If you look the usage is pretty split between the raster thread and the ui thread.  DRM doesn't do anything to address the ui thread usage.
So, the DRM patch is awesome, but probably insufficient to consider this ticket closed.  Don't get it twisted, this ticket is about the CPU usage for this use-case not about landing DRM =)

Oops my bad, sorry for the confusion.

I'm having this issue but on Web. Just a simple dartpad app with a CupertinoTextField that is focused causes the browser's GPU process (from the browser task manager) to increase anwhere from 5-15%.
Not focused:

Focused:

Is there anything that can be done to alleviate the problem with a bandaid fix?

Hi all. Flutter engineering lead here. Thank you for the bug.
Long ago I worked on AppKit for Mac, there were (and I'm sure still are) specific carve-outs to make the blinking cursor do as little work as possible as @iskakaushik describes. (It had a bunch of logic to make sure it was the common non-occluded case, and then if so was drawn by a separate "heartbeat thread" which also drew things like progress indicators, etc.) We've not yet done the work to replicate making just-drawing-the-blinking-cursor super cheap or use the system's special drawing code yet, but one could certainly imagine us doing so. We need to actually ship Desktop to the stable channel first. :)
I've retitled the bug to specifically target the blinking cursor issue. I don't expect us to attack this soon, but it's on our radar. The best way to indicate your support for this or any other issue is to use the 👍 button.
If others have separate CPU/Battery issues or separate issues with animations or desktop in general, please file separate bugs so we can make sure they're addressed. Thank you!

Hi @eseidelGoogle ,
How soon is a fix going to come and are there alternatives to fixing this issue. I currently notice increase in cpu load from 0.1% to about 40% when i place my cursor in a TextFormField on an iPhone 14 Pro Max - iOS 16 simulator.
I see this issue has lingered for a pretty long time.
Flutter 3.7.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 9944297138 (4 days ago) • 2023-02-08 15:46:04 -0800
Engine • revision 248290d6d5
Tools • Dart 2.19.2 • DevTools 2.20.1
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.7.3, on macOS 13.1 22C65 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] IntelliJ IDEA Community Edition (version 2022.3.1)
[✓] VS Code (version 1.75.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

@emekalites https://medium.com/flutter/announcing-flutter-3-3-at-flutter-vikings-6f213e068793
Eric Seidel left Google and his work account has been suspended. You'd better call others

It's been 3 years and attempts to resolve the animation's performance issues haven't been successful. I'm still getting 12-15% cpu utilization during the cursor opacity animation. For this reason I believe it is time to simply expose a toggle to disable the animation as I originally suggested.
I created a PR to expose the already existing toggle of EditableText to disable the cursor opacity animation. Please consider merging it.
https://github.com/flutter/flutter/pull/122474

Is this improved with Impeller or no?

@esDotDev Tested on iPhone 12, flutter version 3.7.7 (That should have impeller enabled). 16% average CPU usage while blinking cursor animation runs.

This probably shouldn't have been closed.  With https://github.com/flutter/flutter/pull/122474 we now have the option to disable the blinking cursor, but really we should find a way to improve the performance problem.

Yea, my PR shouldn't close this. I wrote "sort of fixes" which may have triggered the bot to close 🤷♂ .
To those following this thread because of CPU usage you should note that my PR was merged to disable the cursor blink. On the master branch you can now set cursorOpacityAnimates on TextField and CupertinoTextField to disable/enable the opacity animation, which should save you some juice for the time being while perf is improved!

I created a minimal example of an opacity blink animation using the standard animation controller in this gist https://gist.github.com/Blquinn/072fa91d6da3927a2d1d5aa7e57c8ffa
It only uses around 2% cpu on my computer vs the 10% of the text field's cursor animation. Could this mean that the majority of the performance problem is actually this specific animation and not the animation / rendering stack in general?
I'm not sure if this example is exactly replicating the cursor blink, but it looks pretty similar.

Another thing to note is that native macOS applications don't actually use the opacity animation, macOS uses a solid white cursor with no pulsing/fading animation. Should we just disable this on macOS all the time?

Yeah I'm totally on board with disabling this for macOS then.

I think this is just a difference in phrasing, but it should only be enabled on iOS.

authors: AriaShishegaran Blquinn DJafari Hixie Sunbreak YeungKC cbracken emekalites esDotDev eseidelGoogle gaaclarke gspencergoog iapicca iskakaushik jimmycoyne jonahwilliams justinmc kanekv knopp peterscodee timsneath tneotia xjru


text:
smoke_catalina_startup_ios failing on device disappearing?

See the logs from the dashboard. The tree is closed on this failure.

2020-09-30T12:45:14.772340: stdout: [ +265 ms] No devices found with name or id matching 'e7184ae5fe05c2ea2ad4654ac70b4ba19c92f2c6'
2020-09-30T12:45:15.062096: stdout: [ +289 ms] "flutter run" took 7,602ms.
2020-09-30T12:45:15.068402: stderr: [   +4 ms]
stderr:            #0      throwToolExit (package:flutter_tools/src/base/comm

We can find the device with
flutter@flutter-devicelab-mac-12 agent % idevice_id -l
e7184ae5fe05c2ea2ad4654ac70b4ba19c92f2c6

And the infra-dialog XCUITest executed successfully. So the error is mysterious, I will try rebooting the device.

Rebooting worked.

authors: digiter jonahwilliams zanderso


text:
How to set resource-id/content-desc in flutter app for automation using Appium?

To automate flutter app using Appium, we need to set the resource-id (for Android) and accessibility-Id/content-desc (for iOS) of any element/control in the flutter app. To get resource-id and accessibility-Id in the Appium tree view of flutter app, what should be done? Please help with possible solutions to achieve this.
Please refer below screenshot of Appium tree view which shows the missing resource-id.

Flutter version = 1.17.5
Please take a note that we have already tried "key" property of Widget for unique identification but it didn't work.

@maulikpatel890 Appium is 3rd party tool for Flutter. You may check out below plugins and repos to get answers on your question.
https://pub.dev/packages/appium_driver
https://github.com/truongsinh/appium-flutter-driver
Also, Please see https://flutter.dev/community for resources, you may also get some help if you post it on Stack Overflow and if you need help with your code, please see https://www.reddit.com/r/flutterhelp/
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you

Thanks @darshankawar  for the quick reply.
To help you better understand the issue, I am using traditional Appiumdriver (AndroidDriver/IOSdriver) for flutter app automation with UiAutomator2/XCUITest. (I am not using flutterdriver explicitly here.) This Automator just reads the whatever key set for an element in the app.
In any native apps, we get the resource-id/accessibility-Id/content-desc based on the value set in the application layout/widget. But, the same is not achieved in flutter app. We have already tried "key" property of flutter Widget but after the build, it does not reflect the resource-id/accessibility-Id/content-desc based on the value given for the key of the element.
To set the resourceId in native android app, please refer https://developer.android.com/guide/topics/resources/layout-resource. Similarly, I need resourceId in flutter app which can be recognized by AndroidDriver.
Additionally, We already opened a question on StackOverflow as well and awaiting for the solution if any.

@maulikpatel890 thanks for the details. Please see below related issues:
https://github.com/flutter/flutter/issues/17988
https://github.com/flutter/flutter/issues/18060


text:
file crash

Details

Target Platform:
Target OS version/browser:
Devices:
Logs

Hi @itsdharmxd
can you please provide flutter run -v, 'flutter doctor -v`, and minimal reproduction code?
Thanks.

Removing " created via performance template" as this doesn't seem to be performance related.

Hi @itsdharmxd ,
When opening an issue, please try to provide all or some of the information indicated in the template.

Issue Template
If you are looking for support, please check out our documentation
or consider asking a question on Stack Overflow:
- https://flutter.dev/
- https://api.flutter.dev/
- https://stackoverflow.com/questions/tagged/flutter?sort=frequent

If you have found a bug or if our documentation doesn't have an answer
to what you're looking for, then fill our the template below. Please read
our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports

Steps to Reproduce

Please tell us exactly how to reproduce the problem you are running into.

Please attach a small application (ideally just one main.dart file) that
reproduces the problem. You could use https://gist.github.com/ for this.

If the problem is with your application's rendering, then please attach
a screenshot and explain what the problem is.

1. ...
2. ...
3. ...

Please tell us which target platform(s) the problem occurs (Android / iOS / Web / macOS / Linux / Windows)
Which target OS version, for Web, browser, is the test system running?
Does the problem occur on emulator/simulator as well as on physical devices?

Target Platform:
Target OS version/browser:
Devices:

Run your application with `flutter run --verbose` and attach all the
log output below between the lines with the backticks. If there is an
exception, please see if the error message includes enough information
to explain how to solve the issue.

Run `flutter analyze` and attach any output of that command below.
If there are any analysis errors, try resolving them before filing this issue.

Finally, paste the output of running `flutter doctor -v` here.

Closing this issue, since no information has been provided.
Thank you.

authors: Abhishek01039 TahaTesser itsdharmxd liyuqian


text:
Issue: App running slow on a specific armeabi-v7 Device

Details
So I was testing my application on this, and noticed it was unbearably sluggish.
I tried installing a version specific to armeabi-v7 by using split, but to no luck. After which I though maybe it was something wrong with my code so create a fresh new project and tried installing it. This also resulted in the same performance issue.
I know this is an OEM device and wouldn't be in the testing suite, but I just wanted to know if there is something that can be done, or else if this is a lost case.

Target Platform: Android
Target OS version/browser: API 23
Devices: SystemView 10”
Logs

Logs

> flutter analyze
Analyzing nube_mqtt_dashboard...

   info • The value of the field '_page' isn't used • lib/application/layout/pages/pages_cubit.dart:12:20 • unused_field

1 issue found. (ran in 12.4s)

[✓] Flutter (Channel stable, 1.22.5, on Linux, locale en_AU.UTF-8)
    • Flutter version 1.22.5 at /home/hill/snap/flutter/common/flutter
    • Framework revision 7891006299 (5 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /home/hill/Android/Sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = /home/hill/Android/Sdk
    • Java binary at: /home/hill/Downloads/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.
[!] Android Studio
    • Android Studio at /home/hill/Downloads/android-studio
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • android-studio-dir = /home/hill/Downloads/android-studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.52.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.18.1
[✓] Connected device (1 available)
    • EasyIO SystemView10 (mobile) • 20080411 • android-arm • Android 6.0.1 (API 23)
! Doctor found issues in 1 category.

Export from Observatory (In txt cause I couldn't include json)
dart-timeline-2021-1-12.txt

Video Export

Hi @riteshakya037
Can you please provide your flutter run --verbose, the actual vs expected results and a minimal complete reproducible code sample?
Thank you

Hi @riteshakya037
Can you please provide your flutter run --verbose, the actual vs expected results and a minimal complete reproducible code sample?
Thank you

I can send you the verbose next working day, since I don't have the device at hand atm.
My main concern is that even the starting flutter counter app runs a sluggish. I've attached a video recording of the starter app.

I can send you the verbose next working day, since I don't have the device at hand atm.
My main concern is that even the starting flutter counter app runs a sluggish. I've attached a video recording of the starter app.

As promised I have attached flutter run --verbose logs. As for the minimal complete reproducible code sample, the delay is throughout the app so, it's not like its a piece of code.
actual_app_verbose_logs.txt
Here's the export of Observatory for the sample counter app running on the tablet.

dart-timeline-2021-1-13 Counter App.txt

As promised I have attached flutter run --verbose logs. As for the minimal complete reproducible code sample, the delay is throughout the app so, it's not like its a piece of code.
actual_app_verbose_logs.txt
Here's the export of Observatory for the sample counter app running on the tablet.

dart-timeline-2021-1-13 Counter App.txt

Is this generally reproducible on Android API 23? It will be difficult to root cause this without the hardware. It's possible that it's due to the hardware itself; it looks like that platform is based on a 7-year-old SOC. We may just not be able to perform adequately on it.  As filed, we're afraid this isn't actionable.

Is this generally reproducible on Android API 23? It will be difficult to root cause this without the hardware. It's possible that it's due to the hardware itself; it looks like that platform is based on a 7-year-old SOC. We may just not be able to perform adequately on it.  As filed, we're afraid this isn't actionable.

@kf6gpe Thanks for the response. As you mentioned it isn't reproducible on API 23. And since it is most probably because of the outdated SoC the best approach would be to upgrade the hardware and move forward anyways.

@kf6gpe Thanks for the response. As you mentioned it isn't reproducible on API 23. And since it is most probably because of the outdated SoC the best approach would be to upgrade the hardware and move forward anyways.


text:
How do I change the background color?

I use google_sign_in 4.5.9.
I tried primaryColor and dialogBackgroundColor.
But there not working...

Hi @YojiroMotoba
This issue doesn't seem to describe a bug or a feature request. Please see https://flutter.dev/community for resources and asking questions like this,
you may also get some help if you post it on Stack Overflow and if you need help with your code, please see https://www.reddit.com/r/flutterhelp/
This dialog is not customizable even on native implementation so I don't think you are able to change its background color!
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you

Hi @YojiroMotoba
This issue doesn't seem to describe a bug or a feature request. Please see https://flutter.dev/community for resources and asking questions like this,
you may also get some help if you post it on Stack Overflow and if you need help with your code, please see https://www.reddit.com/r/flutterhelp/
This dialog is not customizable even on native implementation so I don't think you are able to change its background color!
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you

authors: YojiroMotoba pedromassangocode


text:
[flutter-in-app-purchase]  PlatformException (PlatformException(storekit_no_receipt, Cannot find receipt for the current main bundle., null, null))

I try to implement in-app purchases in my app and I've received this kind of error on iPhone 12 (iOS14). This problem doesn't occur in iPhone 11. Do you have any ideas to solve this problem?
PlatformException (PlatformException(storekit_no_receipt, Cannot find receipt for the current main bundle., null, null))

Hi @wiktoriasobczyk
Can you please provide your flutter doctor -v your pubspec.yaml and a complete reproducible minimal code sample
Thanks for filing the issue

Hi @wiktoriasobczyk
Can you please provide your flutter doctor -v your pubspec.yaml and a complete reproducible minimal code sample
Thanks for filing the 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 description of what happens, logs, and the output of flutter doctor -v.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.

I runt the example of this plugin and I got the same error when it hits the following line:
final QueryPurchaseDetailsResponse purchaseResponse = await _connection.queryPastPurchases();

I use in_app_purchase version 0.5.1. Please suggest solution or workaround. Thanks in advance.

I am in the same situation @tuanbs and @wiktoriasobczyk are. Please help us, we really need it, because we ca not move our app to production if it's not fixed.
This is my flutter doctor -v:
`[✓] Flutter (Channel stable, 2.0.3, on macOS 11.2.3 20D91 darwin-x64, locale en-GB)
• Flutter version 2.0.3 at /Users/robert/Developer/flutter
• Framework revision 4d7946a68d (11 days ago), 2021-03-18 17:24:33 -0700
• Engine revision 3459eb2436
• Dart version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/robert/Library/Android/sdk
• Platform android-30, build-tools 30.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_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] Connected device (3 available)
• iPhone (mobile)    • 7f230f8009a52e248fb4b425069f9975c11ed11c • ios            • iOS
14.4.1
• iPhone 12 (mobile) • FCB20924-A8F8-4AF1-A2AF-3105A8DF4031     • ios            •
com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
• Chrome (web)       • chrome                                   • web-javascript •
Google Chrome 89.0.4389.90
• No issues found!
`

Same with me

Happening to me as well, I have no idea how to fix this. This literally breaks my app.

Same here. Breaks my apps. Please help.

I was running into this too, and I think I figured it out. This seems to happen when there is no logged-in Apple account.
To fix:

Delete the app from the test device entirely
Launch the app from XCode, not from your Flutter IDE
It should pop up asking for your Apple username/password
Enter a valid username/password
Now you should be able to launch from your Flutter IDE without this crash

I'll pile on. This is also on my physical phone that I can't follow @amandaoneal advice because it doesn't ask for my apple username/pass again

After multiple rounds of testing, I couldnt get a way around this issue. I migrated to https://pub.dev/packages/flutter_inapp_purchase .  Took me not more than 4 hours considering the configurations were already done to support in app purchase.

Same here....

Any update on this?

authors: BringTheChill MaxAltena TahaTesser TylerSustare amandaoneal jdragonball kdcyberdude mg7237 pedromassangocode slobodanmilinkovic tuanbs wiktoriasobczyk


text:
Flutter Error while running main.dart

Error running 'main.dart': java.io.EOFException
I'm getting this error when I try to run a Flutter project on Android Studio.
Please help!

this issue is already being solved here: https://github.com/flutter/flutter-intellij/issues/2713

@parthraj1001
Provide flutter doctor -v and flutter run --verbose to properly address your issue.

@parthraj1001
Provide flutter doctor -v and flutter run --verbose to properly address your issue.

This is what I got when I run flutter doctor -v
I've been working with flutter for the past year without any problems
What should I do now?

@parthraj1001
Avoid providing the details in a screenshot. Also your flutter run --verbose is incomplete. Provide the entire log in properly formatted text.

authors: darshankawar parthraj1001 thisisamank