text:
App crashes after updating flutter

Steps to Reproduce

I only updated flutter upon being prompted by VS Code. Application builds without errors but crashes on launch with the following error:

2019-05-17 12:29:56.496 10109-10109/com.rakshak.safeho E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.rakshak.safeho, PID: 10109
    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/InternalAuthProvider;
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:453)
        at java.lang.Class.forName(Class.java:378)
        at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common@@17.0.0:78)
        at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common@@17.0.0:71)
        at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@17.0.0:468)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:354)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:321)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:305)
        at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@17.0.0:53)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1917)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1892)
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@17.0.0:47)
        at android.app.ActivityThread.installProvider(ActivityThread.java:6391)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853)
        at android.app.ActivityThread.access$1100(ActivityThread.java:199)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: java.lang.ClassNotFoundException: com.google.firebase.auth.internal.InternalAuthProvider
        at java.lang.VMClassLoader.findLoadedClass(Native Method)
        at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:738)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:363)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:453)
        at java.lang.Class.forName(Class.java:378)
        at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common@@17.0.0:78)
        at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common@@17.0.0:71)
        at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@17.0.0:468)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:354)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:321)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:305)
        at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@17.0.0:53)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1917)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1892)
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@17.0.0:47)
        at android.app.ActivityThread.installProvider(ActivityThread.java:6391)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853)
        at android.app.ActivityThread.access$1100(ActivityThread.java:199)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/internal/InternalTokenProvider;
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:453)
        at java.lang.Class.forName(Class.java:378)
        at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common@@17.0.0:78)
        at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common@@17.0.0:71)
        at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@17.0.0:468)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:354)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:321)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:305)
        at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@17.0.0:53)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1917)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1892)
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@17.0.0:47)
        at android.app.ActivityThread.installProvider(ActivityThread.java:6391)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853)
        at android.app.ActivityThread.access$1100(ActivityThread.java:199)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.internal.InternalTokenProvider" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.rakshak.safeho-eLXUoWMpQ66_yxePJASNWQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.rakshak.safeho-eLXUoWMpQ66_yxePJASNWQ==/lib/x86, /data/app/com.rakshak.safeho-eLXUoWMpQ66_yxePJASNWQ==/base.apk!/lib/x86, /system/lib]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at java.lang.Class.classForName(Native Method)
        at java.lang.Class.forName(Class.java:453)
        at java.lang.Class.forName(Class.java:378)
        at com.google.firebase.components.ComponentDiscovery.instantiate(com.google.firebase:firebase-common@@17.0.0:78)
        at com.google.firebase.components.ComponentDiscovery.discover(com.google.firebase:firebase-common@@17.0.0:71)
        at com.google.firebase.FirebaseApp.<init>(com.google.firebase:firebase-common@@17.0.0:468)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:354)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:321)
        at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:305)
        at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@17.0.0:53)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1917)
        at android.content.ContentProvider.attachInfo(ContentProvider.java:1892)
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@17.0.0:47)
        at android.app.ActivityThread.installProvider(ActivityThread.java:6391)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853)
        at android.app.ActivityThread.access$1100(ActivityThread.java:199)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
2019-05-17 12:29:56.524 1922-4698/system_process W/ActivityManager:   Force finishing activity com.rakshak.safeho/.MainActivity
2019-05-17 12:29:56.558 10109-10109/com.rakshak.safeho I/Process: Sending signal. PID: 10109 SIG: 9
2019-05-17 12:29:56.704 1922-4133/system_process I/ActivityManager: Process com.rakshak.safeho (pid 10109) has died: vis  +99TOP

I also facing this same issue.
Kindly help me asap.
Thanks

I was able to fix this by reverting changes to all files except the dart files that I had changed myself. Flutter had automatically updated some files with erroneous references to firebase packages.

Thanks @vikramkapoor

Good, I think it's safe to close the issue.

source: gharchive/issue

authors: BondarenkoStas SandyAra vikramkapoor

repo: flutter/flutter

license_type: permissive

license_source: github-api


text:
Text Within a TextField Bounces When Typing

Steps to Reproduce
On iOS, when the user increases the operating system's font size through the accessibility settings, the text within a TextField bounces/wobbles while the user is typing. The bouncing only happens when the maxLines field is set to some value other than 1 (2 or null cause the issue). Below is a sample app which reproduces the issue. First on iOS go to Settings -> General -> Accessibility -> Larger Text, and change the text to a larger value than the nominal. Then run the application below and watch the text wobble.
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Text Field Test',
      home: MainScreen(),
    );
  }
}
class MainScreen extends StatefulWidget {
  @override
  _MainScreenState createState() => _MainScreenState();
}

class _MainScreenState extends State<MainScreen> {
  final _textController = TextEditingController();

  @override
  void dispose() {
    _textController.dispose();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("TextField Test"),
      ),
      body: Center(
        child: Padding(
          padding: const EdgeInsets.all(16.0),
          child: TextField(
            controller: _textController,
            maxLines: null,
          ),
        ),
      ),
    );
  }
}

Flutter Doctor
[✓] Flutter (Channel stable, v1.5.4-hotfix.2, on Mac OS X 10.14.5 18F203, locale en-US)
    • Flutter version 1.5.4-hotfix.2 at /Users/scottdewald/Tools/flutter
    • Framework revision 7a4c33425d (6 weeks ago), 2019-04-29 11:05:24 -0700
    • Engine revision 52c7a1e849
    • Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/scottdewald/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_152-release-1343-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.2.1, Build version 10E1001
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 36.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2019.1.3)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 36.1.4
    • Dart plugin version 191.7830

[✓] IntelliJ IDEA Community Edition (version 2019.1.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 35.3.3
    • Dart plugin version 191.7141.49

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

[✓] Connected device (1 available)
    • iPhone Xs • 291E02F8-C63C-4CA4-87BF-9E05C801C54E • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)

• No issues found!

Here is what the wobbling text looks like

@justinmc I think you've looked at similar issues?

Yep like this one: https://github.com/flutter/flutter/issues/32158
@scottdewald Can you try this on the master channel?  I couldn't reproduce this on a physical iPhone 7 or on an iPhoneX simulator.

@justinmc There was no wobble when I switched to the master channel on the iPhoneX simulator. Do you have any estimated timeline for when this fix will make it into stable or can you suggest any workarounds given the current stable build?

I would recommend that you switch to the dev or beta channels and see if they have the fix, and use one of them if so.  I know that's not possible for everyone using Flutter, but those pre-stable channels are more reliable than you might think.
I haven't checked exactly which version fixed this bug, but it could definitely be a few months before the fix makes it into stable.
I'll go ahead and close this, but feel free to comment if anything else comes up.  And thank you for writing such a clear issue!

yes! stable version of v1.5.4-hotfix.2 has this problem.

v1.7.4 and above should definitely have the fix, maybe earlier.  You'll have to switch channels to get it.  See https://github.com/flutter/flutter/wiki/Flutter-build-release-channels

I'm currently on v1.9.1+hotfix.6 and experiencing the same issue.
The cause is maxLines: true

@Alqueraf I couldn't reproduce this on master just now using the OP's example app code and the iPhone 11 simulator.  Can you reproduce it on master?  If so can you post some details about how you reproduce it?

authors: Alqueraf guopeng1994 jonahwilliams justinmc scottdewald


text:
Add ToggleButtons.constraints parameter

Currently, there is no way to control the constraints of each button in the ToggleButtons widget. It currently defaults to const BoxConstraints(minWidth: 88.0, minHeight: 36.0), which is the constraints for RawMaterialButton, but this is undesirable if we want it to look like the square toggle buttons:

@HansMuller What do you think about making a breaking change such that the default constraints is set to const BoxConstraints(minWidth: 48.0, minHeight: 48.0), since this will get it more in line with the what is seen on the Material specifications?


text:
ShowCupertinoDialog USES a TextField,How to lose focus。

Please provide more details about the issue as well as the steps to reproduce it.

Hello @zhangxu123123 !
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 issue, if you have any more information for us; we will reopen it right away!
Thank you for your contribution.
P.S. If anyone still experience the same problem, please file a new issue with the information required in the template.
All system setups can be slightly different so it’s always better to open new issues and reference related issues.

authors: janmoppel mikhail-tokarev zhangxu123123


text:
When I specify localizations, cursor of TextField is not aligned properly.

@GaryQian
Steps to Reproduce

Add flutter_localizations dependency in pubspec.yaml.
Specify localization in MaterialApp.
Put a TextField in screen with some hint text.
Tap the TextField, the cursor is not aligned properly.

Sample Code:
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      localizationsDelegates: [
        GlobalMaterialLocalizations.delegate,
        GlobalWidgetsLocalizations.delegate,
        GlobalCupertinoLocalizations.delegate,
      ],
      supportedLocales: [const Locale('zh', 'CH'), const Locale('en', 'US')],
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        padding: EdgeInsets.all(32),
        child: Center(
          child: TextField(
            decoration: InputDecoration(hintText: '测试提示'),
          ),
        ),
      ),
    );
  }
}

flutter doctor -v
[✓] Flutter (Channel beta, v1.9.1+hotfix.2, on Mac OS X 10.14.6 18G87, locale en-CN)
    • Flutter version 1.9.1+hotfix.2 at /Users/yohom/Library/Flutter/flutter
    • Framework revision 2d2a1ffec9 (3 days ago), 2019-09-06 18:39:49 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/yohom/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = /Users/yohom/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 10.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.3, Build version 10G8
    • CocoaPods version 1.8.0.beta.1

[✓] 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 2019.2.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 39.0.5
    • Dart plugin version 192.6603.23

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

Have the same issue, mark...

So the cause is that without any actual text, the field is rendering the caret with the default height, which is of an alphabetic   space character. However, the hint text is showing Chinese, which is taller than the alphabetic space. What we could do here is try to base the caret initially off of the hint text (if any) instead of blindly choosing an alphabetic space.

试试 TextField > style > textBaseline: TextBaseline.alphabetic

试试 TextField > style > textBaseline: TextBaseline.alphabetic

这个方法可以

试试 TextField > style > textBaseline: TextBaseline.alphabetic

It seems doesn't work for me.
Target: Android
Version:  Channel stable, v1.9.1+hotfix.2

So I have looked into this, and it is actually not trivial to just use the hint text as the initial height. Since the TextInputDecoration is not actually passed into the RenderEditable, we do not have direct access to the contents of the hint or label. To do so, we would have to pass the decoration info into the RenderEditable as well, which would go against the way we currently have the decoration rendering and textfield rendering separately. I'll see if I can come up with a compromise to obtain the text information.

Have the same issue

Have the same issue

Have the same issue too.

StarOfLife 可行

@githubhai thanks

https://github.com/flutter/flutter/pull/44029 Should fix this.

I have added TextBaseline. Alphabetic, which cannot completely solve the problem, but will still happen occasionally. Android devices have a high probability
Flutter (Channel v1.9.1-hotfixes, v1.9.1+hotfix.6-pre.1

1.12.13， hotfix6 still has this issue, and TextField > style > textBaseline: TextBaseline.alphabetic can't solve this still. @GaryQian @StarOfLife

Do you mind posting a screenshot/code of what you are seeing now? The baseline change should have fixed it for many cases, I'd like to know exactly what cases this repros on now.

Do you mind posting a screenshot/code of what you are seeing now?

I add this code in decoration:
 contentPadding: const EdgeInsets.symmetric(vertical: 0.0),
makes it again.

@GaryQian

D:\Program\flutter\bin\flutter.bat doctor --verbose
[√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18363.535], locale zh-CN)
    • Flutter version 1.12.13+hotfix.5 at D:\Program\flutter
    • Framework revision 27321ebbad (5 days ago), 2019-12-10 18:15:01 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0

Hi @yohom
are you still experiencing the this issue?
https://github.com/flutter/flutter/issues/43482#issuecomment-565149624
thank you

I tested in version 1.14.6, it is fixed.

CupertinoTextField has the same problem

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 it's always better to open new issues and reference related issues.

authors: Curtis-ly GaryQian Jasper-zzq Moosphan RemmoYu StarOfLife caoyunxiao dmskys githubhai iapicca jp1017 mainxml yohom


text:
Problems with using IndexedStack and WebViewScaffold

Steps to Reproduce

When current selected widget(index 1) is WebView, if I try to switch to another widget(index 0), WebView will not disappear.
It seem like Webview is always on top.

WebView.dart
class WebViewPage extends StatefulWidget {
  @override
  _WebViewPageState createState() => _WebViewPageState();
}

class _WebViewPageState extends State<WebViewPage> {

  @override
  void dispose() {
    super.dispose();
  }
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Padding(
        padding: EdgeInsets.only(top: 30, bottom: 30),
        child: WebviewScaffold(
          url: 'https://google.com',
          withJavascript: true,
          hidden: true,
          initialChild: Center(
            child: CircularProgressIndicator(),
          ),
        ),
      ),
    );
  }
}

Target Platform: Android, iOS
Target OS version/browser: All
Devices: All

Hello @wooooooak !
Thank you for posting an issue.
Can you please also attach the flutter doctor -v command output?

@janmoppel
Here is output.
[✓] Flutter (Channel stable, v1.9.1+hotfix.6, on Mac OS X 10.15.1 19B88, locale ko-KR)
• Flutter version 1.9.1+hotfix.6 at /Users/wooooooak/flutter
• Framework revision 68587a0916 (9 weeks ago), 2019-09-13 19:46:58 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/wooooooak/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, 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)
• All Android licenses accepted.
[✓] 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.8.4
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 41.1.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[!] IntelliJ IDEA Ultimate Edition (version 2018.3.5)
• 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.40.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (1 available)

Hi @wooooooak
I noticed that you are using a 3rd party plugin flutter_webview_plugin, you may want to open an issue in the dedicatted github.
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

@wooooooak Have you found a fix for this?

@harshkumarkhatri no.

authors: harshkumarkhatri iapicca janmoppel wooooooak


text:
[Question] Should flutter root widget always be StatelessWidget?

When I read the doc in flutter, I have a question that should flutter root widget always be StatelessWidget?
 class MyApp extends StatelessWidget {
   @override
   Widget build(BuildContext context) {
     return MaterialApp(
       title: 'Flutter Code Sample for Navigator',
       // MaterialApp contains our top-level Navigator
       initialRoute: '/',
       routes: {
         '/': (BuildContext context) => HomePage(),
         '/signup': (BuildContext context) => SignUpPage(),
       },
     );
   }
 }

Because I think there's sometime need init function to call, and maybe not want the code of that write in HomePage.  For example: check token expire or not, and decide go to HomePage or LoginPage.
Then the best option: should I change the root Widget to StatefulWidget, and just include the logic above in its initState function ?

Hi @jerryzhoujw
I don't see any reason why not to use StatefulWidgets right after
void main() => runApp();
Please see https://flutter.dev/community for resources for asking questions like this,
you may also get some help if you post it on Stack Overflow.
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

Thank you

authors: iapicca jerryzhoujw


text:
TapGestureRecognizer doesn't work on web, does work on mobile.

Steps to Reproduce

This is my case of facing the issue

Update the stable version of Flutter to Beta channel to have a web version.

flutter channel beta
flutter upgrade
flutter config --enable-web

Run the application on Chrome.

flutter run -d chrome

My code
RichText(
            text: TextSpan(
              text: 'Package goes from ',
              style: TextStyle(fontSize: 36, color: Colors.black),
              children: <TextSpan>[
                TextSpan(
                  text: _originValue ?? 'here', // _originValue is a String variable (not initially defined)
                  style: TextStyle(
                      color: Colors.deepPurple,
                      fontWeight: FontWeight.bold,
                      decoration: TextDecoration.underline),
                  recognizer: TapGestureRecognizer()
                    ..onTap = () async {
                      _originValue = await Navigator.push(context,
                          MaterialPageRoute(builder: (context) => Cities()));
                    },
                ),
                TextSpan(
                  text: ' to ',
                ),
                TextSpan(
                  text: _destinationValue ?? 'there', // _destinationValue is a String variable (not initially defined)
                  style: TextStyle(
                    color: Colors.deepPurple,
                    fontWeight: FontWeight.bold,
                    decoration: TextDecoration.underline,
                  ),
                  recognizer: TapGestureRecognizer()
                    ..onTap = () async {
                      _destinationValue = await Navigator.push(context,
                          MaterialPageRoute(builder: (context) => Cities()));
                    },
                ),
              ],
            ),
          )

All of this is in a StatefulWidget (in case it's important)

It renders this:

Where only there button works, and the state of it changes.

However, the button here doesn't work. And it doesn't matter if I first click on here or there only there button works.

Target Platform: Web
Target OS version/browser: Version 79.0.3945.79 (Official Build) (64-bit)
Devices: MacBook Pro (Retina, 15-inch, Early 2013)
Logs

flutter run --verbose
[  +35 ms] executing: [/Users/vahagn/Other/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +51 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 18cd7a3601bcffb36fdf2f679f763b5e827c2e8e
[        ] executing: [/Users/vahagn/Other/flutter/] git describe --match v*.*.* --first-parent --long --tags
[  +33 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] v1.12.13+hotfix.6-0-g18cd7a360
[  +12 ms] executing: [/Users/vahagn/Other/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +11 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/beta
[        ] executing: [/Users/vahagn/Other/flutter/] git ls-remote --get-url origin
[   +8 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +78 ms] executing: [/Users/vahagn/Other/flutter/] git rev-parse --abbrev-ref HEAD
[  +12 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] beta
[  +15 ms] executing: sw_vers -productName
[  +36 ms] Exit code 0 from: sw_vers -productName
[        ] Mac OS X
[        ] executing: sw_vers -productVersion
[  +22 ms] Exit code 0 from: sw_vers -productVersion
[        ] 10.15.2
[        ] executing: sw_vers -buildVersion
[  +19 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 19C57
[  +63 ms] executing: /usr/bin/xcode-select --print-path
[  +24 ms] Exit code 0 from: /usr/bin/xcode-select --print-path
[        ] /Applications/Xcode.app/Contents/Developer
[   +3 ms] executing: /usr/bin/xcodebuild -version
[ +817 ms] Exit code 0 from: /usr/bin/xcodebuild -version
[   +4 ms] Xcode 11.3
           Build version 11C29
[  +85 ms] executing: /Users/vahagn/Library/Android/sdk/platform-tools/adb devices -l
[  +10 ms] Exit code 0 from: /Users/vahagn/Library/Android/sdk/platform-tools/adb devices -l
[        ] List of devices attached
[  +19 ms] executing: /Users/vahagn/Other/flutter/bin/cache/artifacts/libimobiledevice/idevice_id -h
[  +93 ms] /usr/bin/xcrun simctl list --json devices
[ +150 ms] More than one device connected; please specify a device with the '-d <deviceId>' flag, or use '-d all' to act on all devices.
[  +69 ms] Chrome     • chrome     • web-javascript • Google Chrome 79.0.3945.79
[   +1 ms] Web Server • web-server • web-javascript • Flutter Tools
[  +17 ms] "flutter run" took 1,465ms.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1      RunCommand.validateCommand (package:flutter_tools/src/commands/run.dart:289:7)
<asynchronous suspension>
#2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:590:11)
#3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:515:33)
<asynchronous suspension>
#4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
#5      _rootRun (dart:async/zone.dart:1126:13)
#6      _CustomZone.run (dart:async/zone.dart:1023:19)
#7      _runZoned (dart:async/zone.dart:1518:10)
#8      runZoned (dart:async/zone.dart:1465:12)
#9      AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#10     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:505:20)
#11     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
#12     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:413:21)
<asynchronous suspension>
#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
#14     _rootRun (dart:async/zone.dart:1126:13)
#15     _CustomZone.run (dart:async/zone.dart:1023:19)
#16     _runZoned (dart:async/zone.dart:1518:10)
#17     runZoned (dart:async/zone.dart:1465:12)
#18     AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#19     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:19)
#20     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#21     new Future.sync (dart:async/future.dart:224:31)
#22     CommandRunner.run (package:args/command_runner.dart:112:14)
#23     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:250:18)
#24     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:63:22)
#25     _rootRun (dart:async/zone.dart:1126:13)
#26     _CustomZone.run (dart:async/zone.dart:1023:19)
#27     _runZoned (dart:async/zone.dart:1518:10)
#28     runZoned (dart:async/zone.dart:1502:12)
#29     run.<anonymous closure> (package:flutter_tools/runner.dart:61:18)
<asynchronous suspension>
#30     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:146:29)
#31     _rootRun (dart:async/zone.dart:1126:13)
#32     _CustomZone.run (dart:async/zone.dart:1023:19)
#33     _runZoned (dart:async/zone.dart:1518:10)
#34     runZoned (dart:async/zone.dart:1465:12)
#35     AppContext.run (package:flutter_tools/src/base/context.dart:145:18)
#36     runInContext (package:flutter_tools/src/context_runner.dart:64:24)
#37     run (package:flutter_tools/runner.dart:50:10)
#38     main (package:flutter_tools/executable.dart:65:9)
#39     main (file:///Users/vahagn/Other/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#40     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:32)
#41     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)

flutter analyze
Analyzing tapov...
No issues found! (ran in 5.7s)

flutter doctor -v
[✓] Flutter (Channel beta, v1.12.13+hotfix.6, on Mac OS X 10.15.2 19C57, locale en-AM)
    • Flutter version 1.12.13+hotfix.6 at /Users/vahagn/Other/flutter
    • Framework revision 18cd7a3601 (2 days ago), 2019-12-11 06:35:39 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/vahagn/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • 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_202-release-1483-b49-5587405)
    • All Android licenses accepted.

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

[✓] 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 42.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

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

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

• No issues found!

From my comment.

It doesn't work even after this. I upgraded to beta version, and even to dev version, both don't work. Am I missing something?

Hi @vhgn
does this code represent the issue you are describing?
I'm not experiencing the issue you are describing on beta or master
thank you

Seems like it does. But I used underlined text (if it changes anything).

/cc @mdebbar

I just checked, this was fixed in https://github.com/flutter/engine/pull/14504.

This is still broken on Flutter v1.17.0-3.4.pre

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 it's always better to open new issues and reference related issues.

authors: iapicca jlubeck mdebbar vhgn yjbanov


text:
Android Studio 3.6 RC1 - no new Flutter Module option

Steps to Reproduce
Follow steps in this documentation. When I go to the File > New > New Module... there is no Flutter Module type (and any other Flutter module types) to choose although I have Flutter plugin for Android Studio installed.
Platform
Windows 10 Pro 64-bit

flutter doctor -v
[√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18362.535], locale pl-PL)
    • Flutter version 1.12.13+hotfix.5 at c:\Users\BB\AppData\Local\Android\flutter
    • Framework revision 27321ebbad (8 days ago), 2019-12-10 18:15:01 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\BB\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = C:\Users\BB\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio Beta\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
    • All Android licenses accepted.

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 41.1.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio Beta
    • Flutter plugin version 42.1.3
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] Connected device (1 available)
    • Nexus 9 • HT4C9JT00640 • android-arm64 • Android 7.1.1 (API 25)

• No issues found!

cc @stevemessick
Please use the Flutter plugin version 42

I'd also suggest using the 3.6 version. It is almost ready for stable release; current version is RC 1.

@xster Thank you! I've updated Flutter plugin to 42.2.2 and appeared two new options in new module:

Flutter Module
Import Flutter Module
There is no "Flutter Package" that is shown on the screenshot in the docs however (https://flutter.dev/docs/development/add-to-app/android/project-setup) but maybe docs are not actual.

I alreadey used AS 3.6 RC1, however I don't know why I got Flutter plugin 42.1.3 when tapped on install Flutter plugin instead of 42. Today I checked and there was possibility to upgrade version.
I think the issue can be closed if missing "Flutter Package" option is intentional, but if so, probably docs should be fixed.

I'm on 42.1.1 and I see "Flutter Package".  Can you file an issue against the IDE extension?
It seems like the "Flutter Module" option is there, though.  Thanks for the report!
Closing.

authors: bDev10 jmagman stevemessick xster


text:
Flutter webivewplugin how to set local storage

My Flutter application flow works like this:
User logins 1-If login successfully, server returns a token
2-Set token to local storage in webview
3-Open Webview fullscreen to a specific URL I am using this Webview plugin.
The sample code shows that it supports local storage (it has a withLocalStorage option) but does not show how to use it.
if  I correctly set the local storage, the Webview would show Home page;
otherwise a login page ( That's Not What Happened) Instade am getting this error

I/chromium(13409): [INFO:CONSOLE(1)] "Uncaught SyntaxError: Invalid or unexpected token", source: (1)

I/chromium(19986): [INFO:CONSOLE(1)] "Uncaught SyntaxError: missing ) after argument list", source:  (1)
I/chromium(19986): [INFO:CONSOLE(1)] "Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.", source:  (1)

My code:
`void webwiew(token) {
    flutterWebViewPlugin
        .launch(
      "URLExpml",
      withLocalStorage: true,
      withJavascript: true,
    )
        .whenComplete(() {
  final res = flutterWebViewPlugin.evalJavascript("(function() { try { window.localStorage.setItem('token', $token); } catch (err) { return err; } })();");

  print("Eval result webview : ${res.toString()}");
});
  }`

Hi @UnluckyY1
This platform is not meant for assistance on personal code.
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.
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


text:
Upgrading packages to the latest version

Use case

Some package managers like yarn (https://classic.yarnpkg.com/en/docs/cli/upgrade/) has a --latest option
--latest : Ignores the version range specified in package.json. Instead, the version specified by the latest tag will be used (potentially upgrading the packages across major versions).

Proposal

flutter pub get --latest : Ignores the version range specified in pubspec.yaml. Instead, the version specified by the latest tag will be used (potentially upgrading the packages across major versions).

Can you re-file this issue against pub?  When they implement, flutter tooling can pass the flag along.

@sm2017 @jmagman
Just remove the version number , let the version parameter empty .. and the flutter will get the latest version ...

authors: imeDevelopers jmagman sm2017


text:
Temporarily provide API for enabling mirrors

The Linux shell doesn't currently provide any command_line_args to the Flutter engine or provide any API for an app author to do so.

This exists in the current desktop embeddings for legacy reasons; the goal is not to expose it. There's only one internal use case that still might require this; I need to check if that's still necessary.

This exists in the current desktop embeddings for legacy reasons; the goal is not to expose it. There's only one internal use case that still might require this; I need to check if that's still necessary.

Ah good. I don't have a reason to add this feature other than the existing bindings did it. So please close this issue if it's not necessary.

I checked, and this is still needed. However, rather than allow arbitrary flags and encourage people to potentially rely on this for other things, let's just add a temporary affordance for the specific thing that's needed (retitling accordingly).
So what we need is an FlDartProject option for enabling mirrors which, when set, causes the engine initialization to pass --dart-flags=--enable_mirrors=true as an argument.

@robert-ancell Assigning to you since I assume you're the best person to do this, but if you don't have cycles you can assign it to me.

authors: robert-ancell stuartmorgan


text:
I/flutter ( 9033): Another exception was thrown: 'package:flutter/src/rendering/sliver.dart': Failed assertion: line 556 pos 15: 'scrollOffsetCorrection != 0.0': is not true. I/flutter ( 9033): Another exception was thrown: NoSuchMethodError: The method '-' was called on null.

I/flutter ( 9033): The following RenderObject was being processed when the exception was fired: RenderSliverList#3776a relayoutBoundary=up2 NEEDS-LAYOUT NEEDS-COMPOSITING-BITS-UPDATE:
I/flutter ( 9033):   needs compositing
I/flutter ( 9033):   creator: SliverList ← MediaQuery ← SliverPadding ← Viewport ← IgnorePointer-[GlobalKey#997ae] ←
I/flutter ( 9033):     Semantics ← _PointerListener ← Listener ← _GestureSemantics ←
I/flutter ( 9033):     RawGestureDetector-[LabeledGlobalKey<RawGestureDetectorState>#6878b] ← _PointerListener ← Listener
I/flutter ( 9033):     ← ⋯
I/flutter ( 9033):   parentData: paintOffset=Offset(0.0, 0.0) (can use size)
I/flutter ( 9033):   constraints: SliverConstraints(AxisDirection.down, GrowthDirection.forward, ScrollDirection.forward,
I/flutter ( 9033):     scrollOffset: 174.1, remainingPaintExtent: 566.0, crossAxisExtent: 360.0, crossAxisDirection:
I/flutter ( 9033):     AxisDirection.right, viewportMainAxisExtent: 566.0, remainingCacheExtent: 990.1, cacheOrigin:
I/flutter ( 9033):     -174.1)
I/flutter ( 9033):   geometry: SliverGeometry(scrollExtent: 2552.0, paintExtent: 566.0, maxPaintExtent: 2552.0,
I/flutter ( 9033):     hasVisualOverflow: true, cacheExtent: 1066.0)
I/flutter ( 9033):   currently live children: 0 to 1
I/flutter ( 9033): This RenderObject had the following descendants (showing up to depth 5):
I/flutter ( 9033):     child with index 0: RenderIndexedSemantics#d8a49 relayoutBoundary=up3 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 9033):       child: RenderRepaintBoundary#c4a34 relayoutBoundary=up4 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 9033):         child: RenderLimitedBox#1d176 relayoutBoundary=up5 NEEDS-PAINT NEEDS-COMPOSITING-BITS-UPDATE
I/flutter ( 9033):           child: RenderConstrainedBox#9aaa2 NEEDS-PAINT
I/flutter ( 9033):     child with index 1: RenderIndexedSemantics#31bed relayoutBoundary=up3
I/flutter ( 9033):       child: RenderRepaintBoundary#d9ec1 relayoutBoundary=up4
I/flutter ( 9033):         child: RenderFlex#173fc relayoutBoundary=up5
I/flutter ( 9033):           child 1: RenderSemanticsAnnotations#6823c relayoutBoundary=up6
I/flutter ( 9033):             child: RenderImage#612e2 relayoutBoundary=up7
I/flutter ( 9033):           child 2: RenderSemanticsAnnotations#ad8d0 relayoutBoundary=up6
I/flutter ( 9033):             child: RenderImage#20b03 relayoutBoundary=up7
I/flutter ( 9033):           child 3: RenderSemanticsAnnotations#384ce relayoutBoundary=up6
I/flutter ( 9033):             child: RenderImage#9aa77 relayoutBoundary=up7
I/flutter ( 9033):           child 4: RenderSemanticsAnnotations#1af8a relayoutBoundary=up6
I/flutter ( 9033):             child: RenderImage#c08c6 relayoutBoundary=up7
I/flutter ( 9033):           child 5: RenderSemanticsAnnotations#7340a relayoutBoundary=up6
I/flutter ( 9033):             child: RenderImage#26937 relayoutBoundary=up7
I/flutter ( 9033):           child 6: RenderSemanticsAnnotations#3def5 relayoutBoundary=up6
I/flutter ( 9033):             child: RenderImage#4c1cf relayoutBoundary=up7
I/flutter ( 9033):           child 7: RenderSemanticsAnnotations#c6d29 relayoutBoundary=up6
I/flutter ( 9033):             child: RenderImage#edb43 relayoutBoundary=up7
I/flutter ( 9033):           child 8: RenderSemanticsAnnotations#9c222 relayoutBoundary=up6
I/flutter ( 9033):             child: RenderImage#d0491 relayoutBoundary=up7
I/flutter ( 9033): ════════════════════════════════════════════════════════════════════════════════════════════════════
I/flutter ( 9033): Another exception was thrown: NoSuchMethodError: The method '-' was called on null.
I/flutter ( 9033): Another exception was thrown: 'package:flutter/src/rendering/sliver.dart': Failed assertion: line 556 pos 15: 'scrollOffsetCorrection != 0.0': is not true.
I/flutter ( 9033): Another exception was thrown: NoSuchMethodError: The method '-' was called on null.

@MubashirMaqbool  Can you share me the code, so that i can take a peek. I think i may have encountered and resolved this.

I'm also facing the same problem after upgrading flutter to newer version.

@roohaani786
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(backgroundColor: color.Red,title: Text(widget.Name.toUpperCase(),style: TextStyle(color: Colors.white),),),body:
ListView.builder(itemBuilder: (context,index){
 return _games[index].id==widget.CatId?Column(

children: [
for(int i=0;i<_games[index]._Gamename.length;i++)
Card(
elevation: 5,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),),
clipBehavior: Clip.antiAlias,
child: Stack(children: [

Center(child: Text('loading......')),
InkWell(
onTap: (){
Navigator.push(
context,
MaterialPageRoute(builder: (context) => GameDetail(
             Name:_games[index]._Gamename[i],
             Image:_games[index]._GameUrl[i],
             Des:_games[index]._Description[i],
             Target:_games[index]._TargetArea[i]

         )),
       );

     },
     child: Container(height: SizeConfig.imageSizeMultiplier*30,decoration: BoxDecoration(image: DecorationImage(image: AssetImage(_games[index]._GameUrl[i]),fit: BoxFit.cover)),child: Container(color: Colors.black26,),)),
  Positioned(
 top: 25,
      left: 15,
      child: Text(_games[index]._Gamename[i],style: TextStyle(color: Colors.white,fontWeight: FontWeight.bold),)),

],),

)
],
):Container();
},itemCount: _games.length,)
);

}

i am also facing same issue

my code is
body:
ListView.builder(itemBuilder: (context,index){
  return _games[index].id==widget.CatId?Column(
    children: [

        Card(
          elevation: 5,
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(15.0),),
          clipBehavior: Clip.antiAlias,

          child: Stack(children: [
            Center(child: Text('loading......')),
            InkWell(
                onTap: (){
                  Navigator.push(
                    context,
                    MaterialPageRoute(builder: (context) => GameDetail(

                        Name:_games[index]._Gamename,
                        Image:_games[index]._GameUrl,
                        Des:_games[index]._Description,
                        Target:_games[index]._TargetArea

                    )),
                  );

                },
                child: Container(height: SizeConfig.imageSizeMultiplier*30,decoration: BoxDecoration(image: DecorationImage(image: AssetImage(_games[index]._GameUrl),fit: BoxFit.cover)),child: Container(color: Colors.black26,),)),
            Positioned(
                top: 25,
                left: 15,
                child: Text(_games[index]._Gamename,style: TextStyle(color: Colors.white,fontWeight: FontWeight.bold),)),

          ],),
        )
    ],
  ):Container();

},itemCount: _games.length,)
);

@praveengupta0895 have you resolved the issue?

Hi @MubashirMaqbool,
This platform is not meant for assistance on personal code. 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/
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 @darshankawar , I understand your concern but as far as I think this is some kind of flutter issue because earlier the code was working fine and with the recent update of flutter we are facing this problem.

Hello @Mudassar823, still not able to resolve it, and right now I'm downgrading my flutter. because I've the same application with different name and older version of flutter and it is running perfect.
And the problem we are facing is due to this line "_games[index].id==widget.CatId". If you remove the condition it will work.

@praveengupta0895  I have to show data on basis of id, this is not a proper solution brother

@praveengupta0895  I am facing this issue
I/flutter ( 9657): Another exception was thrown: 'package:flutter/src/rendering/sliver.dart': Failed assertion: line 556 pos 15: 'scrollOffsetCorrection != 0.0': is not true.
I/flutter ( 9657): Another exception was thrown: NoSuchMethodError: The method '-' was called on null.

No, I was not asking you to remove that ID. I was saying that error is showing due to that only.

@praveengupta0895 ok brother we have to wait and be patient

@praveengupta0895 have you asked it on stackoverflow

I think as of now until flutter community fix this issue. we only have 2 options either downgrade it to 1.19 version or grouped the data.

Yes I've asked it on stack overflow, and also raised another issue on github, but didn't got the proper answer.

Once go through with this link  "https://pub.dev/packages/grouped_list" This might help you.

@praveengupta0895 ok

I just saw your code, I think I can help you with your code as you are comparing the data with the single item.

@praveengupta0895 I am passing data from one page with id and then compare this data with next page id's?
how can you help me

define another list _game2 and add data to _game2 after comparing.
    _games.add(data);
    _games2 = _games.where((i) => i.ID ==widget.ID).toList();

@praveengupta0895  everything is correct issue in scrolling

If you can share the whole code then I might be able to fix it.

and also share the error.

List _games=[
GamesInfo('Dumbbell Pullover','assets/chest/Dumble pull over.JPG',1,'pectorals, latissimus dorsi, serratus','Lie on a bench with your upper back, head and neck supported and your feet flat on the floor. Hold a dumbbell with your arms extended above your face. Maintaining just a slight bend in your elbow throughout, slowly lower the dumbbell backward, allowing your elbows to come to a point at which they align with your ears. When you’ve stretched as far as you can without bending your elbows, flex through your chest and lats to reverse direction to bring the dumbbell back overhead.'),
GamesInfo('Pec-Deck Flye','assets/chest/butterfly.JPG',1,'middle pecs','Sit with your lower back fully in contact with the pad and your feet flat on the floor. With your elbows at 90-degree angles and forearms flush against the pads, move your arms slightly forward to disengage the weight from the stack. From here, deliberately flex your pecs to bring the handles out in an arc until they meet in front of your body. Squeeze hard, then slowly return to the start, stopping when your upper arms are even with your torso, and repeat.'),
GamesInfo('Decline Bench Press','assets/chest/decline bench press.JPG',1,'inner pecs, lower pecs','Lie on a decline bench. Your torso should be fully supported from your head to your hips, with your knees bent and feet harnessed behind roller pads. Grasp the bar with a wide, overhand grip. Bend your arms and slowly lower the bar toward your lower chest. When the bar reaches chest level, forcefully extend your arms, elevating the bar back to the starting position.'),
GamesInfo('Cable Crossover','assets/chest/cablecross.png',1,'middle pecs','Stand in the direct center of a cable-cross station with your feet staggered, knees slightly bent and your focus forward, and grasp D-handles attached to the upper pulleys. Starting with your palms facing downward and elbows bent slightly, flex your pecs to draw the handles down and together, meeting below your waist. Try to keep your elbows up throughout the movement. Pause a moment for a peak contraction, then slowly allow the handles to return to the start position. Don’t let the weight stacks touch down between reps.'),
GamesInfo('Dumbbell Bench Press','assets/chest/dumble press.jpg',1,'upper pecs','Lie on a bench with your feet flat on the floor, holding a dumbbell in each hand just outside your shoulders. Powerfully press the dumbbells upward toward the ceiling, stopping when they come to an inch or so away from each other above your upper-middle chest, then slowly bend your elbows to lower the weights back down to a point even with your torso.'),
GamesInfo('Incline Dumbbell Flye','assets/chest/incline duble fly.JPG',1,'upper pecs','middle pecs'),
GamesInfo('Standing Cable Curl','assets/biceps/cable curl.JPG',2,'Biceps brachii from origin to insertion and peak','Stand holding a bar attached to a low-pulley cable with an underhand grip, elbows extended. Keep your abs tight, chest up and head straight as you contract your biceps to curl the bar toward your chest, keeping your elbows at your sides throughout. Hold and squeeze the contraction at the top, then slowly return the bar along the same path. Repeat for reps without letting the weight stack touch down between reps.'),
GamesInfo('Seated Alternating Dumbbell Curl','assets/biceps/dumble curl.JPG',2,'Biceps brachii, with brachialis activation if using a rope','Stand inside a Smith machine holding the bar in front of your upper thighs, with your chest up, shoulders back and eyes focused straight ahead. Begin by shifting your elbows back and bending them to curl the bar toward your upper abs. As the name suggests, you’ll actually drag the bar up your torso, keeping your elbows behind you the entire time. Upon full contraction, return the bar along the same path and repeat'),

GamesInfo('Dumbbell Concentration Curl','assets/biceps/dumble concentration curl.JPG',2,'Biceps and brachialis, emphasizing the full length of the muscle','Sit on a low-back bench, holding a dumbbell in each hand at your sides. Keeping your chest up, curl one weight toward the same-side shoulder, squeezing your biceps hard at the top, then lower to the start. Repeat with the other arm. You can either condense the set by lowering one dumbbell as you lift the other, or take it slower by moving through one full rep per side, going all the way up and down with one arm before switching to the other.'),

GamesInfo('Scott Curl','assets/biceps/scott curl.JPG',2,'Biceps, with emphasis on the peak','Sit at the end of a flat bench or use a short-back chair. Bend over and grasp a dumbbell with an underhand grip, locking your working arm against your same-side inner thigh. Place your nonworking hand on your leg for balance. Moving only at your elbow, curl the weight as high as you can toward your torso. Squeeze your biceps at the top before lowering the dumbbell back to the start, but don’t let it rest on the floor between reps.'),
GamesInfo('Barbell Preacher Curl','assets/biceps/preacher curl.JPG',2,'Biceps, with emphasis on the short, inner head','Grasp a barbell or EZ-bar and lean your chest against the angled side of a preacher bench, keeping your back tight and knees slightly bent. (You can also use a dumbbell and train one arm at a time.) Make sure your armpits fit securely against the top of the pad, with your triceps pressed into the flat side of the bench. Hold the bar straight toward the floor with a supinated (palms-up) grip. With your head neutral and eyes focused forward, curl the weight in a smooth arc, squeeze your biceps hard for a one-count, and slowly lower back to the nearly elbows-straight position.'),
GamesInfo('Incline Dumbbell Curl','assets/biceps/incline dumble curl.JPG',2,'Biceps, with emphasis on the stretch','Set up a preacher bench so the top of the pad fits securely under your armpits. Take a shoulder-width, underhand grip on a straight bar or EZ-bar and position your arms parallel to each other on the pad. Keep your feet flat on the floor and your head straight as you flex your biceps to bring the bar as high as possible. Don’t allow your elbows to flare out or come off the bench. Flex strongly at the top before slowly returning the bar along the same path, stopping just short of full elbow extension before starting the next rep. You can also do this exercise one arm at a time with a dumbbell.'),
GamesInfo('Close-Grip Chin-Up','assets/biceps/close grip chin up.JPG',2,'Biceps and brachialis, emphasizing the full length of the muscle','Adjust an incline bench to about 45 degrees and sit back squarely against the pad, feet flat on the floor. Your arms should hang straight down by your sides, palms up. With your shoulders shifted back and upper arms in a fixed position perpendicular to the floor, curl the weights so they approach your shoulders, either one at a time or both arms simultaneously. Squeeze your biceps hard at the top before slowly returning to the start position.'),
GamesInfo('Barbell Curl','assets/biceps/barbel curl.JPG',2,'Brachialis mainly, with biceps brachii activation ','Grasp a fixed overhead bar with a close underhand grip. Hang freely from the bar, arms fully extended and ankles crossed behind you. Contract your lats and bi’s to bring your body upward, concentrating on keeping your elbows tight to your sides. Hold momentarily as your chin crosses the level of the bar, then lower yourself to return to the dead-hang position'),

];
@override
void initState() {
// TODO: implement initState
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(backgroundColor: color.Red,title: Text(widget.Name.toUpperCase(),style: TextStyle(color: Colors.white),),),body:
ListView.builder(
scrollDirection: Axis.horizontal,
itemBuilder: (context,index){
  return _games[index].id==widget.CatId?Column(
    children: [
        Card(
          elevation: 5,
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(15.0),),
          clipBehavior: Clip.antiAlias,

          child: Stack(children: [
            Center(child: Text('loading......')),
            InkWell(
                onTap: (){
                  Navigator.push(
                    context,
                    MaterialPageRoute(builder: (context) => GameDetail(

                        Name:_games[index]._Gamename,
                        Image:_games[index]._GameUrl,
                        Des:_games[index]._Description,
                        Target:_games[index]._TargetArea

                    )),
                  );

                },
                child: Container(height: SizeConfig.imageSizeMultiplier*30,decoration: BoxDecoration(image: DecorationImage(image: AssetImage(_games[index]._GameUrl),fit: BoxFit.cover)),child: Container(color: Colors.black26,),)),
            Positioned(
                top: 25,
                left: 15,
                child: Text(_games[index]._Gamename,style: TextStyle(color: Colors.white,fontWeight: FontWeight.bold),)),

          ],),
        )
    ],
  ):Container();

},itemCount: _games.length,)
);

}
}

List _games=[
GamesInfo('Dumbbell Pullover','assets/chest/Dumble pull over.JPG',1,'pectorals, latissimus dorsi, serratus','Lie on a bench with your upper back, head and neck supported and your feet flat on the floor. Hold a dumbbell with your arms extended above your face. Maintaining just a slight bend in your elbow throughout, slowly lower the dumbbell backward, allowing your elbows to come to a point at which they align with your ears. When you’ve stretched as far as you can without bending your elbows, flex through your chest and lats to reverse direction to bring the dumbbell back overhead.'),
GamesInfo('Pec-Deck Flye','assets/chest/butterfly.JPG',1,'middle pecs','Sit with your lower back fully in contact with the pad and your feet flat on the floor. With your elbows at 90-degree angles and forearms flush against the pads, move your arms slightly forward to disengage the weight from the stack. From here, deliberately flex your pecs to bring the handles out in an arc until they meet in front of your body. Squeeze hard, then slowly return to the start, stopping when your upper arms are even with your torso, and repeat.'),
GamesInfo('Decline Bench Press','assets/chest/decline bench press.JPG',1,'inner pecs, lower pecs','Lie on a decline bench. Your torso should be fully supported from your head to your hips, with your knees bent and feet harnessed behind roller pads. Grasp the bar with a wide, overhand grip. Bend your arms and slowly lower the bar toward your lower chest. When the bar reaches chest level, forcefully extend your arms, elevating the bar back to the starting position.'),
GamesInfo('Cable Crossover','assets/chest/cablecross.png',1,'middle pecs','Stand in the direct center of a cable-cross station with your feet staggered, knees slightly bent and your focus forward, and grasp D-handles attached to the upper pulleys. Starting with your palms facing downward and elbows bent slightly, flex your pecs to draw the handles down and together, meeting below your waist. Try to keep your elbows up throughout the movement. Pause a moment for a peak contraction, then slowly allow the handles to return to the start position. Don’t let the weight stacks touch down between reps.'),
GamesInfo('Dumbbell Bench Press','assets/chest/dumble press.jpg',1,'upper pecs','Lie on a bench with your feet flat on the floor, holding a dumbbell in each hand just outside your shoulders. Powerfully press the dumbbells upward toward the ceiling, stopping when they come to an inch or so away from each other above your upper-middle chest, then slowly bend your elbows to lower the weights back down to a point even with your torso.'),
GamesInfo('Incline Dumbbell Flye','assets/chest/incline duble fly.JPG',1,'upper pecs','middle pecs'),
GamesInfo('Standing Cable Curl','assets/biceps/cable curl.JPG',2,'Biceps brachii from origin to insertion and peak','Stand holding a bar attached to a low-pulley cable with an underhand grip, elbows extended. Keep your abs tight, chest up and head straight as you contract your biceps to curl the bar toward your chest, keeping your elbows at your sides throughout. Hold and squeeze the contraction at the top, then slowly return the bar along the same path. Repeat for reps without letting the weight stack touch down between reps.'),
GamesInfo('Seated Alternating Dumbbell Curl','assets/biceps/dumble curl.JPG',2,'Biceps brachii, with brachialis activation if using a rope','Stand inside a Smith machine holding the bar in front of your upper thighs, with your chest up, shoulders back and eyes focused straight ahead. Begin by shifting your elbows back and bending them to curl the bar toward your upper abs. As the name suggests, you’ll actually drag the bar up your torso, keeping your elbows behind you the entire time. Upon full contraction, return the bar along the same path and repeat'),

GamesInfo('Dumbbell Concentration Curl','assets/biceps/dumble concentration curl.JPG',2,'Biceps and brachialis, emphasizing the full length of the muscle','Sit on a low-back bench, holding a dumbbell in each hand at your sides. Keeping your chest up, curl one weight toward the same-side shoulder, squeezing your biceps hard at the top, then lower to the start. Repeat with the other arm. You can either condense the set by lowering one dumbbell as you lift the other, or take it slower by moving through one full rep per side, going all the way up and down with one arm before switching to the other.'),

GamesInfo('Scott Curl','assets/biceps/scott curl.JPG',2,'Biceps, with emphasis on the peak','Sit at the end of a flat bench or use a short-back chair. Bend over and grasp a dumbbell with an underhand grip, locking your working arm against your same-side inner thigh. Place your nonworking hand on your leg for balance. Moving only at your elbow, curl the weight as high as you can toward your torso. Squeeze your biceps at the top before lowering the dumbbell back to the start, but don’t let it rest on the floor between reps.'),
GamesInfo('Barbell Preacher Curl','assets/biceps/preacher curl.JPG',2,'Biceps, with emphasis on the short, inner head','Grasp a barbell or EZ-bar and lean your chest against the angled side of a preacher bench, keeping your back tight and knees slightly bent. (You can also use a dumbbell and train one arm at a time.) Make sure your armpits fit securely against the top of the pad, with your triceps pressed into the flat side of the bench. Hold the bar straight toward the floor with a supinated (palms-up) grip. With your head neutral and eyes focused forward, curl the weight in a smooth arc, squeeze your biceps hard for a one-count, and slowly lower back to the nearly elbows-straight position.'),
GamesInfo('Incline Dumbbell Curl','assets/biceps/incline dumble curl.JPG',2,'Biceps, with emphasis on the stretch','Set up a preacher bench so the top of the pad fits securely under your armpits. Take a shoulder-width, underhand grip on a straight bar or EZ-bar and position your arms parallel to each other on the pad. Keep your feet flat on the floor and your head straight as you flex your biceps to bring the bar as high as possible. Don’t allow your elbows to flare out or come off the bench. Flex strongly at the top before slowly returning the bar along the same path, stopping just short of full elbow extension before starting the next rep. You can also do this exercise one arm at a time with a dumbbell.'),
GamesInfo('Close-Grip Chin-Up','assets/biceps/close grip chin up.JPG',2,'Biceps and brachialis, emphasizing the full length of the muscle','Adjust an incline bench to about 45 degrees and sit back squarely against the pad, feet flat on the floor. Your arms should hang straight down by your sides, palms up. With your shoulders shifted back and upper arms in a fixed position perpendicular to the floor, curl the weights so they approach your shoulders, either one at a time or both arms simultaneously. Squeeze your biceps hard at the top before slowly returning to the start position.'),
GamesInfo('Barbell Curl','assets/biceps/barbel curl.JPG',2,'Brachialis mainly, with biceps brachii activation ','Grasp a fixed overhead bar with a close underhand grip. Hang freely from the bar, arms fully extended and ankles crossed behind you. Contract your lats and bi’s to bring your body upward, concentrating on keeping your elbows tight to your sides. Hold momentarily as your chin crosses the level of the bar, then lower yourself to return to the dead-hang position'),

];
@override
void initState() {
// TODO: implement initState
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(backgroundColor: color.Red,title: Text(widget.Name.toUpperCase(),style: TextStyle(color: Colors.white),),),body:
ListView.builder(
scrollDirection: Axis.horizontal,
itemBuilder: (context,index){
  return _games[index].id==widget.CatId?Column(
    children: [
        Card(
          elevation: 5,
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(15.0),),
          clipBehavior: Clip.antiAlias,

          child: Stack(children: [
            Center(child: Text('loading......')),
            InkWell(
                onTap: (){
                  Navigator.push(
                    context,
                    MaterialPageRoute(builder: (context) => GameDetail(

                        Name:_games[index]._Gamename,
                        Image:_games[index]._GameUrl,
                        Des:_games[index]._Description,
                        Target:_games[index]._TargetArea

                    )),
                  );

                },
                child: Container(height: SizeConfig.imageSizeMultiplier*30,decoration: BoxDecoration(image: DecorationImage(image: AssetImage(_games[index]._GameUrl),fit: BoxFit.cover)),child: Container(color: Colors.black26,),)),
            Positioned(
                top: 25,
                left: 15,
                child: Text(_games[index]._Gamename,style: TextStyle(color: Colors.white,fontWeight: FontWeight.bold),)),

          ],),
        )
    ],
  ):Container();

},itemCount: _games.length,)
);

}
}

axis not horizental its vertical

Okay so first of all define another list of same model. and apply the above comparison code, remove comparison while returning Column and to avoid scrolling problem wrap ListView.builder into Expanded widget.

@praveengupta0895 okay I check

@praveengupta0895  @Mudassar823 please follow-up your discussion privately.


text:
Cannot return with NULL from Isolate: Exception: Isolate exited without result or error

The following pull request introduced an issue with isolates:
https://github.com/flutter/flutter/pull/59666
Steps to Reproduce

Create a method that should be run by the isolate (my example uses http package to download web requests using isolates), which returns null value
Call the isolate function using compute()
An exception is being thrown by the engine (see below)

Expected results:
I can pass null values from functions run via Isolates. Before this pull request it was working as expected.
Actual results:
I receive an engine exception when returning nulls.
Exception details
E/flutter (12100): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: 'package:flutter/src/foundation/_isolates_io.dart': Failed assertion: line 55 pos 12: 'resultData is R': is not true.
E/flutter (12100): #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
E/flutter (12100): #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
E/flutter (12100): #2      compute.<anonymous closure> (package:flutter/src/foundation/_isolates_io.dart:55:12)
E/flutter (12100): #3      _rootRunUnary (dart:async/zone.dart:1206:13)
E/flutter (12100): #4      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
E/flutter (12100): #5      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
E/flutter (12100): #6      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
E/flutter (12100): #7      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285:7)
E/flutter (12100): #8      _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:808:19)
E/flutter (12100): #9      _StreamController._add (dart:async/stream_controller.dart:682:7)
E/flutter (12100): #10     _StreamController.add (dart:async/stream_controller.dart:624:5)
E/flutter (12100): #11     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
E/flutter (12100):
I/flutter (12100): 2020-08-12 10:34:59.877287 PD.runMainInit: Completed
I/flutter (12100): 2020-08-12 10:34:59.877803 PD.runMainInit: Completed, setting state
I/flutter (12100): 2020-08-12 10:35:00.756946 Error occured during WebDownloader.getHtml
I/flutter (12100): 2020-08-12 10:35:00.757186 Url:https://test-url.com
I/flutter (12100): Exception: Isolate exited without result or error.

Flutter doctor
[✓] Flutter (Channel stable, 1.20.1, on Mac OS X 10.15.5 19F101, locale en-US)
    • Flutter version 1.20.1 at /Users/bkopacz/FlutterDev/flutter
    • Framework revision 2ae34518b8 (7 days ago), 2020-08-05 19:53:19 -0700
    • Engine revision c8e3b94853
    • Dart version 2.9.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/bkopacz/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_242-release-1644-b3-6222593)
    • All Android licenses accepted.

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

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 47.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (1 available)
    • VOG L29 (mobile) • DUM7N19327008485 • android-arm64 • Android 10 (API 29)

• No issues found!

Hi @botiking
Can you please provide your flutter run --verbose logs, and a minimal complete reproducible code sample?
Thank you

Fixed by #63515

Many thanks for the quick fix! Seems that additional logs and code sample is no longer required.

Will this get hotfixed into stable? It could be considered a regression error, as the assertion exception wasn't being thrown on the previous stable tag.
I've got confused with this error as well when updating my app to Flutter 1.20

Thanks for the clarification, wasn't able to find that PR. Closing since this is fixed on the latest master.

@pcsosinski @a14n this may be a candidate for a hot fix.. like @davidmartos96 said, its a regression in 1.17 -> 1.20, (stable -> stable).


text:
[ShapeBorder Class]-3of 5 Overrides created have errors when created using QuickFix of VsCode:

I was creating a CustomShapeBorder by extending the ShapeBorder class, then when I used quickfixto create the 5 @overrides using the quickfix from vsCode. 3 of 5 overrides the getInnerPath, getOuterPath  and paint had syntax errors in their parameters.
the code is as follows  with the errors:
class CustomCardShapeBorder extends ShapeBorder{
  @override
  // TODO: implement dimensions
  EdgeInsetsGeometry get dimensions => throw UnimplementedError();

  @override
 // error: parameter with ${3|
  Path getInnerPath(Rect rect${3|, {TextDirect,TextDirection,Object|}ion textDirection}) {
      // TODO: implement getInnerPath
      throw UnimplementedError();
    }

    @override
// error: parameter with closing }  in the end of text direction
    Path getOuterPath(Rect rectrection textDirection}) {
      // TODO: implement getOuterPath
      throw UnimplementedError();
    }

    @override
// error: parameter with speling errors and closing }  in the end of text direction
    void paint(Canvas canvas, Rect rectxtDirection textDirection}) {
      // TODO: implement paint
    }

    @override
    ShapeBorder scale(double t) {
    // TODO: implement scale
    throw UnimplementedError();
  }

}

Hi @Maverick099
Not sure what do you mean by quickfix, if you mean this menu option to add override.
No issues with this

flutter doctor -v
[✓] Flutter (Channel stable, 1.20.3, on Mac OS X 10.15.6 19G2021, locale en-GB)
    • Flutter version 1.20.3 at /Users/tahatesser/Code/flutter_stable
    • Framework revision 216dee60c0 (2 days ago), 2020-09-01 12:24:47 -0700
    • Engine revision d1bc06f032
    • Dart version 2.9.2

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/tahatesser/Code/sdk
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = /Users/tahatesser/Code/sdk
    • 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-6222593)
    • All Android licenses accepted.

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

[✓] Android Studio (version 4.0)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6222593)

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

[✓] Connected device (1 available)
    • iPhone 11 (mobile) • EDB19945-0B9F-4A6E-BAA1-425E68E3B6D6 • ios •
      com.apple.CoreSimulator.SimRuntime.iOS-13-7 (simulator)

• No issues found!
[✓] Flutter (Channel master, 1.22.0-10.0.pre.65, on Microsoft Windows [Version 10.0.19041.450], locale en-US)
    • Flutter version 1.22.0-10.0.pre.65 at C:\Code\flutter_master
    • Framework revision 2032a448ed (2 hours ago), 2020-09-02 23:36:19 -0700
    • Engine revision 165abef0a2
    • Dart version 2.10.0 (build 2.10.0-77.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Code\sdk
    • Platform android-30, build-tools 30.0.2
    • ANDROID_HOME = C:\Code\sdk
    • Java binary at: C:\Code\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.2)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.7.30413.136
    • Windows 10 SDK version 10.0.18362.0

[✓] Android Studio (version 4.0)
    • Android Studio at C:\Code\android-studio
    • Flutter plugin version 48.1.2
    • Dart plugin version 193.7547
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[✓] VS Code (version 1.48.2)
    • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.13.2

[✓] Connected device (3 available)
    • Windows (desktop) • windows    • windows-x64    • Microsoft Windows [Version 10.0.19041.450]
    • Web Server (web)  • web-server • web-javascript • Flutter Tools
    • Chrome (web)      • chrome     • web-javascript • Google Chrome 84.0.4147.135

• No issues found!

Following the indication of VS Code Flutter Extension, the correct way to address the problem is to open an issue in the dedicated repository.
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

I have the problem still and will raise an issue in the VS Code Flutter Extension:

Thank you for the assist


text:
Divider cannot set dashed lines

Divider cannot set dashed lines

Default flutter does not allow this but there is a great package that does a great job.
🌟 https://pub.dev/packages/fdottedline

@gionchat Please elaborate on your issue. Which platform are you describing this issue for ? Can you provide flutter doctor -v and minimal reproducible code sample along with actual and expected behavior ?

Without plugin you can do this like below :
class DashedLinePainter extends CustomPainter {
  @override
  void paint(Canvas canvas, Size size) {
    double dashWidth = 9, dashSpace = 5, startX = 0;
    final paint = Paint()
      ..color = Colors.grey
      ..strokeWidth = 1;
    while (startX < size.width) {
      canvas.drawLine(Offset(startX, 0), Offset(startX + dashWidth, 0), paint);
      startX += dashWidth + dashSpace;
    }
  }

  @override
  bool shouldRepaint(CustomPainter oldDelegate) => false;
}

authors: darshankawar gionchat hello-addweb jeanluc243