text:
Corrections to be applied on

Hi guys, and specially Fiorin the developer
After the recent update the player started to work finally in my template but there is a few issues that remain yet:
in the desktop the video container becomes gray with the banner in the upleft corner. No way to close it. After update the page once or twice the video finallly appears.
This behavior happens in the mobile too, with the banner big ocuppying almost all the video area. The only way to play is to click ouside the banner.
when the video is playing in mobile the fullscreen button is placed over the timeline so its not possible to enlarge it.
When i post a video in the body of the post it , like an article it works perfectly with the banner appearing in center, in pause, etc. as meant to.
By the way this is a brand new installed template, there is no any kind of hack,

Hell @machonatural,
Could you provide us a link where we can test the issues you're experiencing?

Right, heres a link
http://machosaonatural.com.br/dentista-taradao-faz-a-festa-com-paciente/
Update it twice or three to see the error

Hello @machonatural,
I checked the sample page, it doesn't seem  to be a FluidPlayer related issue. Doing a quick check noticed that the theme styling is conflicting with the way the banner is set, .flex-video iframe in foundation.min.css could be a starting point to debug your problem.
Hope it helps.

Have no idea how to fix it. Thats the point. Wouldn´t you do it for a fee for example?
btw how can i set the video size in post body. Sometimes it goes very large and others it fits.

@machonatural are you still having the same issues regarding the plugin and player behaviour?

This seems out of date, closing. Please, reopen if this is still relevant.

authors: Addvilz cian-exads exoclick-florin-tudor machonatural

repo: fluid-player/fluid-player


text:
Pointer not visible while viewing the website on a Mobile Phone.

Description
Unable to view the right pointer for the contrast preference while viewing it on Google Chrome on a mobile phone.
So basically you have to drag it towards the left, to see the pointer - and I feel like this needs to be fixed :)
Screenshots

@akhillllldev yes, this is because the whole panel is too wide due to all of the options. We need to figure out way to represent the contrast options in a way that works easier on mobile. In the meantime we've decided to leave it as is and require a bit of horizontal scrolling.

source: gharchive/issue

authors: akhillllldev jobara

license_type: permissive

license_source: github-api


text:
esllint.json check reports errors when sourceType is module

Describe the bug
When your code is a module, you need to set the sourceType to module in the eslint's parser options. However doing this causes the eslint.json check to report (-1:1) 'use strict' is unnecessary inside of modules. error for all checked json files.
I tried setting the following configuration in .fluidlintallrc.json but it didn't help. In the end I disabled the eslint.json check.
    "eslint": {
        "json": {
            "options": {
                "overrideConfig": {
                    "rules": {
                        "strict": ["error", "never"]
                    }
                }
            }
        }
    }

To reproduce
Steps to reproduce the behavior:

In .eslintrc.json set the sourceType parserOption to module
Run the linting, making sure to include json files in the checks

Expected behavior
The eslint.json check shouldn't check for strict mode when the code is declared a module.

@jobara, I don't actually have any projects that are a model, if you have a branch/project I could check out for testing purposes, that would help me look into this.

Justin and I discussed this, he couldn't remember why this was needed.  I'll close for now, we can always reopen if needed.

authors: duhrer jobara

repo: fluid-project/fluid-lint-all


text:
[Flutter 3] setState not workin in google_maps_flutter

I have an application with google_maps_flutter, when updating to Flutter 3 setState I stop updating markers that I add on the map, for the markers to be displayed on the map I have to zoom or move the map, so they are shown in the version of Flutter 2.10 .5 works fine.
Any solution for this?

what warnings do you get in the console, it may be that the package has not yet been updated to version 3

what warnings do you get in the console, it may be that the package has not yet been updated to version 3

Absolutely nothing appears in the console, there are no warning or error messages.

If it happened to you after migrating, it may be that the package is missing an update, with version 3 there may be some change that affects it, you can check the google_maps_flutter repo to see if another has the same problem

https://github.com/flutter/flutter/issues/101119
something related to what happens to you

If it happened to you after migrating, it may be that the package is missing an update, with version 3 there may be some change that affects it, you can check the google_maps_flutter repo to see if another has the same problem

Update all libraries including google maps, I'm using the
google_maps_flutter: ^2.1.5
If you are using google maps, you should not update yet, I tried all possible ways, even creating the marker from a button even so I was not successful, just moving or zooming it managed to solve the problem although it is not the solution I was looking for.

#101119 something related to what happens to you

It is not the same, my case is that setState does not execute the action, as it did with the previous version of flutter.

Hi @Cryward. Thanks for filing the issue. Please share a completed and minimal reproducible code sample along with the output of flutter doctor -v to investigate this issue further.

The example is simple when clicking on the map a marker is added and if I click on another place the marker is updated in the new position, but in flutter 3 it is necessary to move the map so that the marker is refreshed, this happens in Windows and MacOS .
`import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
void main() {
if (defaultTargetPlatform == TargetPlatform.android) {
AndroidGoogleMapsFlutter.useAndroidViewSurface = true;
}
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter Demo',
theme: ThemeData(
colorSchemeSeed: Colors.blue,
useMaterial3: true,
brightness: Brightness.light,
//appBarTheme: const AppBarTheme(backgroundColor: Colors.blue)
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State createState() => _MyHomePageState();
}
class _MyHomePageState extends State {
final Completer _controller = Completer();
final List _markers = [];
final CameraPosition _kGooglePlex = const CameraPosition(
target: LatLng(37.42796133580664, -122.085749655962),
zoom: 14.4746,
);
final CameraPosition _kLake = const CameraPosition(
bearing: 192.8334901395799,
target: LatLng(37.43296265331129, -122.08832357078792),
tilt: 59.440717697143555,
zoom: 19.151926040649414);
void _incrementCounter() {
setState(() {
});

}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: GoogleMap(
mapType: MapType.hybrid,
initialCameraPosition: _kGooglePlex,
onMapCreated: (GoogleMapController controller) {
_controller.complete(controller);
},
markers: Set.of(_markers),
onTap: (position) {
//if (newPolyAvance) {
setState(() {
_markers.add(Marker(
infoWindow: const InfoWindow(title: 'Prueba'),
//icon: iconMk,
markerId: const MarkerId('test'),
position: position,
)
);
});
},
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
 [√] Flutter (Channel stable, 3.0.0, on Microsoft Windows [Versi¢n 10.0.22000.675], locale es-CL)
• Flutter version 3.0.0 at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ee4e09cce0 (7 days ago), 2022-05-09 16:45:18 -0700
• Engine revision d1b9a6938a
• Dart version 2.17.0
• DevTools version 2.12.2
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at C:\Users\HP\AppData\Local\Android\sdk
• Platform android-32, build-tools 32.0.0
• Java binary at: C:\Users\HP\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\211.7628.21.2111.8193401\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.9)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
• Visual Studio Build Tools 2019 version 16.11.32106.194
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2020.3)
• Android Studio at C:\Program Files\Android\Android Studio
• 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 11.0.11+9-b60-7590822)
[√] Android Studio (version 2021.1)
• Android Studio at C:\Users\HP\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\211.7628.21.2111.8193401
• Flutter plugin version 67.1.1
• Dart plugin version 211.7817
• Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)
[√] VS Code (version 1.67.1)
• VS Code at C:\Users\HP\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.40.0
[√] Connected device (4 available)
• SM G973F (mobile) • R28M21MZ6XR • android-arm64  • Android 12 (API 31)
• Windows (desktop) • windows     • windows-x64    • Microsoft Windows [Versi¢n 10.0.22000.675]
• Chrome (web)      • chrome      • web-javascript • Google Chrome 101.0.4951.67
• Edge (web)        • edge        • web-javascript • Microsoft Edge 101.0.1210.39
[√] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!`

Hi @Cryward. Thanks for filing the issue. Please share a completed and minimal reproducible code sample along with the output of flutter doctor -v to investigate this issue further.

The example is simple when clicking on the map a marker is added and if I click on another place the marker is updated in the new position, but in flutter 3 it is necessary to move the map so that the marker is refreshed, this happens in Windows and MacOS .

Hi @Cryward, thank for your response. But the google_maps_flutter has not supported for Desktop yet. Can you tell me what your target environments so that I can try to verify this issue?

The example is simple when clicking on the map a marker is added and if I click on another place the marker is updated in the new position, but in flutter 3 it is necessary to move the map so that the marker is refreshed, this happens in Windows and MacOS .

Hi @Cryward, thank for your response. But the google_maps_flutter has not supported for Desktop yet. Can you tell me what your target environments so that I can try to verify this issue?

Hello, I'm sorry I don't program on the desktop, in the previous answer I meant that in the installation of flutter 3 in windows and in macos the same thing happens when compiling the example for android, I develop for android and ios, the problem appears in android, in ios I have not tried it yet, greetings

authors: Cryward huycozy manuelduarte077

repo: flutter/flutter


text:
Flutter Web build not working after 3.0 upgrade

Hi,
My flutter build does not compile for web since I've upgraded to Flutter 3.0.
I'm getting errors on the win32 package while not building for windows. When I just run flutter run -d chrome it works perfectly, when I'm trying to run my specific main.dart file attached errors occurs. Also building for macOS and mobile works.
Does anyone know what is causing this issue?
Output

Pubspec.yaml
name: frontend
description: A new Flutter project.

# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 21.06.17+1

environment:
  sdk: ">=2.12.0 <3.0.0"

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
  flutter:
    sdk: flutter
  flutter_web_plugins:
      sdk: flutter
  flutter_localizations:
    sdk: flutter
  intl: ^0.17.0
  get: ^4.6.3
  mockito: ^5.1.0
  get_storage: ^2.0.3
  encrypt: 5.0.0
  base32: 2.0.0
  circular_profile_avatar: ^2.0.5
  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^1.0.2
  get_cli: ^1.6.0
  flavor: ^2.0.0
  event_bus: ^2.0.0
  package_info_plus: ^1.3.0

  flutter_svg: ^1.0.3
  toggle_switch: ^1.4.0

  flutter_multi_formatter: ^2.5.1
  json_annotation: ^4.5.0

  #Needs flutter 3.0 migration
  easy_sidemenu: ^0.2.1
  #Need flutter 3.0 migration
  elegant_notification: ^1.5.2
  responsive_ui: ^2.1.0

dev_dependencies:
  flutter_test:
    sdk: flutter
  build_runner: ^2.0.0
  json_serializable: ^6.2.0

  # The "flutter_lints" package below contains a set of recommended lints to
  # encourage good coding practices. The lint set provided by the package is
  # activated in the `analysis_options.yaml` file located at the root of your
  # package. See that file for information about deactivating specific lint
  # rules and activating additional ones.
  flutter_lints: ^1.0.0

# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true
  generate: true

  # To add assets to your application, add an assets section, like this:
  #assets:
  #   - images/a_dot_burr.jpeg
  #   - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.dev/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.dev/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  fonts:
    - family: Inter
      fonts:
        - asset: assets/fonts/Inter-Black.ttf
          weight: 900
        - asset: assets/fonts/Inter-Bold.ttf
          weight: 700
        - asset: assets/fonts/Inter-ExtraBold.ttf
          weight: 800
        - asset: assets/fonts/Inter-ExtraLight.ttf
          weight: 200
        - asset: assets/fonts/Inter-Light.ttf
          weight: 300
        - asset: assets/fonts/Inter-Medium.ttf
          weight: 500
        - asset: assets/fonts/Inter-Regular.ttf
          weight: 400
        - asset: assets/fonts/Inter-SemiBold.ttf
          weight: 600
        - asset: assets/fonts/Inter-Thin.ttf
          weight: 100

  assets:
    - assets/images/
    - web/version.json
    - assets/data/

  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.dev/custom-fonts/#from-packages

Hi @jordandevogelaere, Thanks for filing the issue.

My flutter build does not compile for web since I've upgraded to Flutter 3.0.

When I just run flutter run -d chrome it works perfectly, when I'm trying to run my specific main.dart file attached errors occurs. Also building for macOS and mobile works.

I am bit confused here whether you are able to build for web or not based on your two statements, However I take that build fails on web (based on the title)
Please share the output of flutter run -d chrome -v along with the output of flutter doctor -v.

Hi @maheshmnj ,
Thanks for your response. So basically the issue is that I'm able to run on macOS and iOS but when I run my application on web I get compilation errors.
Here are the outputs:
flutter doctor -v
`[✓] Flutter (Channel stable, 3.0.0, on macOS 12.3.1 21E258 darwin-x64, locale
en-BE)
• Flutter version 3.0.0 at /Users/jordandevogelaere/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ee4e09cce0 (9 days ago), 2022-05-09 16:45:18 -0700
• Engine revision d1b9a6938a
• Dart version 2.17.0
• DevTools version 2.12.2
[✗] 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, please use
flutter config --android-sdk to update to that location.
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] 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).
[✓] VS Code (version 1.58.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.25.0
[✓] Connected device (2 available)
• macOS (desktop) • macos  • darwin-x64     • macOS 12.3.1 21E258 darwin-x64
• Chrome (web)    • chrome • web-javascript • Google Chrome 101.0.4951.64
[✓] HTTP Host Availability
• All required HTTP hosts are available`
flutter run -d chrome -v.txt

authors: jordandevogelaere maheshmnj


text:
Pointers compression in iOS makes apps more easily to OOM in production.

Recently we upgraded our app to latest stable version of flutter, and encountered much more crashes in production. Most of the crashes are unrelated to flutter itself, but they are all memory issues.
Steps to Reproduce

flutter create bug, then replace ios/main.swift as below
Run this sample in iPhone 7 (or other low-end iOS devices, physical devices are required), and wait for 3 seconds.

Expected results:
There should not be any issue allocating the memory, because iPhone 7 has 2GB RAM.
Actual results:
malloc returned nil even though the memory footprint is low.
In practical situations I would never allocate a huge chunk of memory by myself, but in my app there are many features which will cost a lot of memory, like map views, web views, or editing a large photo, and after upgrading they are much more fragile than before.

Code sample
import UIKit
import Flutter

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {

  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    GeneratedPluginRegistrant.register(with: self)

    DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(3)) {
      let ptr = malloc(1024 * 1024 * 1024) // 1GB
      print("memory allocated: \(String(describing: ptr))")
    }

    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}

Logs

[✓] Flutter (Channel stable, 3.0.1, on macOS 12.4 21F79 darwin-arm, locale zh-Hans-CN)
    • Flutter version 3.0.1 at /Users/yeatse/Developer/Repo/flutter/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fb57da5f94 (13 days ago), 2022-05-19 15:50:29 -0700
    • Engine revision caaafc5604
    • Dart version 2.17.1
    • DevTools version 2.12.2

[✗] 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, please use
      `flutter config --android-sdk` to update to that location.

[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge

[!] 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).

[✓] VS Code (version 1.67.2)
    • VS Code at /Users/yeatse/Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.42.0

[✓] Proxy Configuration
    • HTTP_PROXY is set
    • NO_PROXY is 127.0.0.1,localhost,::1
    • NO_PROXY contains localhost
    • NO_PROXY contains 127.0.0.1
    • NO_PROXY contains ::1

[✓] Connected device (3 available)
    • CC's iPhone 7 (mobile) • ff750f59fe91f87eed8aff9c32219c2cf7e2d23c • ios            • iOS 15.2.1 19C63
    • macOS (desktop)        • macos                                    • darwin-arm64   • macOS 12.4 21F79 darwin-arm
    • Chrome (web)           • chrome                                   • web-javascript • Microsoft Edge 102.0.1245.30
    ! Error: CC’s iPhone 12 Pro is not connected. Xcode will continue when CC’s iPhone 12 Pro is connected. (code -13)
    ! Error: CC's iPhone 7 is busy: Fetching debug symbols for CC's iPhone 7. Xcode will continue when CC's iPhone 7 is finished. (code -10)

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 2 categories.

Question
After bisecting I believe that the problem comes from flutter/engine#30333, as when I revert it in my local build of flutter, or switch flutter to the commit before #95364, the problem disappears. But I really want the pointer compression feature in my app, so what should I do?
From comment by @rmacnak-google in https://github.com/flutter/flutter/issues/95482#issuecomment-1007749971

madvise(DONTNEED) is lazy on macOS/iOS: the pages are not immediately released and RSS does not immediately decrease as on Linux/Android, but the pages will be released once there is memory pressure.

Is lazy releasing of pages causing this issue?

Thanks for the report. I verified this behavior on stable 2.5.3, 2.8.1, 2.10.5 and latest 3.0.1 and below are the results:

Stable 2.5.3:  memory allocated: Optional(0x0000000112000000)
Stable 2.8.1: memory allocated: nil
Stable 2.10.5: memory allocated: nil
Stable 3.0.1: memory allocated: nil

I am not sure if this is a regression or expected behavior, but based on the above result and additional context below, I'll label it as reproducible and for further insights from the team.

After bisecting I believe that the problem comes from flutter/engine#30333, as when I revert it in my local build of flutter, or switch flutter to the commit before #95364, the problem disappears. But I really want the pointer compression feature in my app, so what should I do?

 previous stable flutter doctor

[✓] Flutter (Channel unknown, 2.5.3, on macOS 12.2.1 21D62 darwin-x64, locale
    en-GB)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[☠] IntelliJ IDEA Ultimate Edition (the doctor check crashed)
    ✗ Due to an error, the doctor check did not complete. If the error message
      below is not helpful, please let us know about this issue at
      https://github.com/flutter/flutter/issues.
    ✗ FormatException: Unexpected extension byte (at offset 5)
[✓] VS Code (version 1.62.0)
[✓] Connected device (4 available)

[✓] Flutter (Channel unknown, 2.8.1, on macOS 12.2.1 21D62 darwin-x64, locale
    en-GB)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[☠] IntelliJ IDEA Ultimate Edition (the doctor check crashed)
    ✗ Due to an error, the doctor check did not complete. If the error message
      below is not helpful, please let us know about this issue at
      https://github.com/flutter/flutter/issues.
    ✗ FormatException: Unexpected extension byte (at offset 5)
[✓] VS Code (version 1.62.0)
[✓] Connected device (4 available)

[✓] Flutter (Channel unknown, 2.10.5, on macOS 12.2.1 21D62 darwin-x64, locale
    en-GB)
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[☠] IntelliJ IDEA Ultimate Edition (the doctor check crashed)
    ✗ Due to an error, the doctor check did not complete. If the error message
      below is not helpful, please let us know about this issue at
      https://github.com/flutter/flutter/issues.
    ✗ FormatException: Unexpected extension byte (at offset 5)
[✓] VS Code (version 1.62.0)
[✓] Connected device (4 available)
[✓] HTTP Host Availability

 latest stable flutter doctor -v

[✓] Flutter (Channel stable, 3.0.1, on macOS 12.2.1 21D62 darwin-x64, locale
    en-GB)
    • Flutter version 3.0.1 at /Users/dhs/documents/fluttersdk/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fb57da5f94 (13 days ago), 2022-05-19 15:50:29 -0700
    • Engine revision caaafc5604
    • Dart version 2.17.1
    • DevTools version 2.12.2

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

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

[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 65.1.4
    • Dart plugin version 213.7228

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

[✓] Connected device (3 available)
    • iPhone 13 (mobile) • 3BD8F2FF-FDB5-4074-8C91-54F99C79156D • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator)
    • macOS (desktop)    • macos                                • darwin-x64
      • macOS 12.2.1 21D62 darwin-x64
    • Chrome (web)       • chrome                               • web-javascript
      • Google Chrome 102.0.5005.61

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

@a-siva @zanderso @rmacnak-google

This sounds related to how the Dart VM reserves parts of the address space to implement compressed pointers. I have a suspicion that it might only be an issue when allocating huge buffers like the 1GB one in the example. I wonder what will happen if instead of one giant 1GB allocation, several smaller allocations are done, like ten 100MB allocations, or one hundred 10MB allocations.

This sounds related to how the Dart VM reserves parts of the address space to implement compressed pointers. I have a suspicion that it might only be an issue when allocating huge buffers like the 1GB one in the example. I wonder what will happen if instead of one giant 1GB allocation, several smaller allocations are done, like ten 100MB allocations, or one hundred 10MB allocations.

To dive into it I did more tests and got some interesting results. The code:
var buffer = [UnsafeMutableRawPointer]()
let chunkSize = 10 * 1024 * 1024
while true {
    if let ptr = malloc(chunkSize) {
        buffer.append(ptr)
    } else {
        break
    }
}
print("allocated \(buffer.count) chunks")

and result on my iPhone 7 and iPhone XR:

chunk size
result on 5d3720625725244345539ea980c9e8599f8e38b1
result on 1de200596be62f0b487e8dfa742e930d6f13bd1f

1 MB
2752 chunks
1710 chunks

10 MB
271 chunks
176 chunks

100 MB
26 chunks
15 chunks

500 MB
4 chunks
2 chunks

1000 MB
1 chunks
0 chunks

It seems this only affects the code which needs a lot of virtual memory, as when I call memset after malloc'ing them, both two versions behaves the same.

@Yeatse could you alaborate on what you mean by " as when I call memset after malloc'ing them, both two versions behaves the same."

@zanderso Yes. I created an example project to better describe the use case in my app.
https://github.com/Yeatse/flutter_map_test
From the template project created by flutter create bug, I added one NSCache, which should be freed once the system triggers a memory warning, and one ViewController containing a MKMapView, where much of the crashes in my app come from.
When I open the map page and navigate to some large cities like Tokyo, the memory used will grow up to 1.1GB before this app suddenly crashes, even without receiving a memory warning. But after I switched to flutter 2.8.1, the memory used can grow up to 1.6GB, then the system will trigger a memory warning for both NSCache and MKMapView to clean up the cached data.
This can be more easily reproduced on 3GB iOS devices, like iPhone XR and iPhone 8 Plus.
https://user-images.githubusercontent.com/6036532/171924262-3af8cc93-4067-4da9-aa89-ab4bee07945b.mp4

@a-siva I mean when I change my sample code like this:
if let ptr = malloc(chunkSize) {
  memset(ptr, 1, chunkSize)
  buffer.append(ptr)
} else {
  break
}

test result will be the same in both 2.8 and 3.0

The compressed heap wants to allocate an aligned 4GB region of address space at startup without also allocating 4GB of memory. Unfortunately, iOS does not respect the MAP_NORESERVE flag to mmap, and we have not found any alternative way to allocate address space without reserving memory. At startup, the compressed heap will allocate the largest power-of-2 that succeeds, and woe be to malloc if it would like to grow by more than what is leftover because iOS will count the whole compressed heap region against the process, including pages that have never been touched.
The alternatives are not good: we can avoid trying to reserve anything up front and hope that subsequent allocations end up in the same aligned 4GB region. This happens to work today because iOS seems to allocate from increasing addresses in the 2nd 4GB region, but if iOS fixes its allocator to do proper randomization, this would break every app using compressed pointers.
If an application's memory is nearly all in the Dart heap, the status quo is a good trade off. But if not, the saving in the Dart heap may be less than the memory made effectively unusable by the compressed heap region.

Me too. When we upgrade the Flutter to 2.10.5.  Much OOM errors.
@Yeatse  Can I ask you how to fix this ?  build flutter engine local or switch flutter to the commit before https://github.com/flutter/flutter/pull/95364 or another solutions.

@rmacnak-google Hello, can you provide some better ways to solve this problem.

@rmacnak-google  Hello, our project is using the Flutter 2.10.5,  so I want to close the pointers compression, so I just revert the Flutter engine  'ecb5b20a453bcd09219ed7bdc338ced699f96793'. Have any problems ?

@chejdj We reverted https://github.com/flutter/engine/pull/30333 in our internal fork of flutter engine and problem disappeared.

Compressed pointers are being disabled on iOS due to this issue.

I presume this bug is still open to account for the cherry pick to stable, it should be labelled for cherry pick I presume.

This issue is closed, and the CP is approved and should go out in an upcoming 3.0 hotfix release.

Hi, will we one day get compressed pointers again on iOS in the future? It is saving memory so is quite useful to a lot of apps which does not have heavy native memory usage.

Bit of a tricky situation on iOS here. Based on further investigation by @rmacnak-google, a solution to this was introduced in iOS 14 via an additional application entitlement in Extended Virtual Addressing. Since Flutter supports iOS versions all the way back to iOS 10, this in itself is a non-starter.
Even if this weren't an issue, we could not enable the entitlement without a paid developer account. The "Extended Virtual Addressing" option was absent and could not be manually added till we setup the right team profile. This is perhaps a non-issue and a user error on our part during our investigation.
Unfortunately, compressed pointers isn't a runtime option and requires a specifically compiled Dart VM. So we can't detect whether to use compressed pointers using a runtime check to see if we can allocate the required virtual address space.
Another (albeit minor and automate-able) issue is that we would require all applications (include to Add2App) scenarios to migrate to adding the entitlement.
We could consider asking applications that make heavy use of native memory to add this entitlement. But if these apps also need to target iOS < 14.0, there is effectively no way to support them and breaks Flutters minimum version guarantees.
To your question of whether we could get compressed pointes in the future again in the default iOS engine, given what we know today, I think we could revisit this till the minimum iOS version supported by Flutter is bumped up to iOS 14.0.

authors: Yeatse a-siva chejdj chinmaygarde darshankawar fzyzcjy jmagman rmacnak-google zanderso


text:
Request for API docs for Image.asset constructor (what is asset name?)

When reading https://docs.flutter.io/flutter/widgets/Image/Image.asset.html I was left with the question "what does the name mean or expect to be" ?
Does the name argument intend to be the exact matching path as declared in the asset bundle, which is declared in the pubspec.yaml ?
Assume I have this in my pubspec.yaml:
  assets:
    - assets/kitten1.jpg

What do I pass to the name argument of new Image.asset(_____) ?

https://github.com/flutter/flutter/pull/10904

Thanks!

authors: Hixie sethladd


text:
[webview_flutter] twitch oauth login fail through webview with error: your browser is not currently supported

Steps to Reproduce

using webview to pass info to twitch OAuth
on OAuth2 sending back info will get error: your browser is not currently supported.

Expected results:
like safari or chrome apps on the device, they work well.
Actual results:
Your browser is not currently supported. Please use an recommended browser.

The following code works fine before 07/30/2022 but recently has this issue. we change webview_flutter to 3.0.4 still the same
sample code:
WebView(
    onWebViewCreated: (controller) {
      if (clearCache) {
        controller.clearCache();
        CookieManager().clearCookies();
      }
    },
    userAgent: userAgent,
    initialUrl: authUrl,
    javascriptMode: JavascriptMode.unrestricted,
    navigationDelegate: (NavigationRequest request) {
      String url = request.url;
      if (url.startsWith(redirectUri)) {
        var returnedData = _getQueryParams(url);
        returnedData[CLIENT_ID_KEY] = clientID;
        returnedData[REDIRECT_URI_KEY] = redirectUri;
        returnedData[STATE_KEY] = state;

        if (clientSecret != null) {
          returnedData[CLIENT_SECRET_KEY] = clientSecret;
        }

        onDone(returnedData);
      }

      return NavigationDecision.navigate;
    });

Logs

$ flutter doctor -v
[✓] Flutter (Channel unknown, 2.5.3, on macOS 12.1 21C52 darwin-x64, locale zh-Hant-TW)
• Flutter version 2.5.3 at /Users/3a20/Library/Developer/flutter
• Upstream repository unknown
• Framework revision 18116933e7 (1 year, 2 months ago), 2021-10-15 10:46:35 -0700
• Engine revision d3ea636dc5
• Dart version 2.14.4
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
• Android SDK at /Users/3a20/Library/Android/sdk
✗ cmdline-tools component is missing
Run path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run flutter doctor --android-licenses to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 13.2.1, Build version 13C100
• CocoaPods version 1.11.3
[✓] 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.72.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.52.0

If a site chooses not to support the system webview for a given platform, there's nothing the plugin can do about that; it's entirely up to the site's developers. You would need to report this issue to Twitch.

authors: herehere stuartmorgan


text:
Flutter customer tests should not be analyzed with fatal warnings.

When the flutter customer tests analyze a customer repository (I believe with flutter_test_runner.sh), warnings are treated as fatal, so when the Dart static analysis team lands new warnings, the customer tests fail. I believe they should not.
The changed behavior, which is reporting new warnings about existing code, is intentional. It should not be a cause for a break in the flutter engine CI.
The fix would be to pass --no-fatal-warnings to flutter analyze.
CC @bwilkerson @jacob314

I'll just add that this is based on the premise that our commitment to not break the user's code is limited to certain kinds of breakages and that the tests should only be testing the breakages covered by the commitment. In the same way that we didn't promise to not introduce breaking changes to the language (such as the upcoming change to the semantics of switch statements, or the change that disallows opting back to any version before 2.12), we have not promised that we wouldn't break their code by adding new warnings in order to do a better job of helping users identify bugs in their code.
While it's necessary to look for compilation errors in order to determine whether an API change has broken the user's code, I don't believe that any warning (existing or future) needs to be checked for in order to determine that an API change is valid. If you know of any counterexamples, please let us know so that we can find another way to mitigate this situation.

Ping. Should I send a PR?

CC @devoncarew @goderbauer @Hixie

For context, we did a similar thing in https://github.com/flutter/tests/pull/105 where we ignored info level items. That PR description claims that warning level items "to some extent" are also relevant to determine whether API changes break customers. Has anything changed that that's no longer true?
Also, to determine what kind of coverage we would lose if we made this change: Is there a list somewhere of the warnings that would get ignored if we go forward with this?

Ideally, the customers who add their tests to flutter/tests would respond promptly in helping with fixing any issues that arise. That is our documented policy [1]. Wondering if the motivation behind this proposal is more a lack of prompt responses than a technical reason? In the former case, we should enforce the policy of removing them over reducing our coverage by ignoring warnings...
[1] https://github.com/flutter/tests#if-a-test-is-broken

Why wouldn't we just go and fix the warnings?

I'll note some more context: we're removing the Hint diagnostic category, and moving most Hints to be Warnings. Hints did not cause dart analyze to exit with a non-zero exit, but Warnings do. To continue the old behavior of not having these various diagnostics cause dart analyze to exit with a non-zero exit, the flag --no-fatal-warnings can be used.

That PR description claims that warning level items "to some extent" are also relevant to determine whether API changes break customers. Has anything changed that that's no longer true?

Nothing has changed, I believe. I don't think warning level items ever determined whether API changes broke customers.  In Dart 2.19.0, for example, there are only 5 StaticWarningCodes:

DEAD_NULL_AWA_RE_EXPRESSION
INVALID_NULL_AWARE_OPERATOR
INVALID_NULL_AWARE_OPERATOR_AFTER_SHORT_CIRCUIT
MISSING_ENUM_IN_CONSTANT_SWITCH
UNNECESSARY_NON_NULL_ASSERTION

Viewed holistically, I would claim this is more or less a random selection of "non-error" codes. There's really no difference between these and many of the Hints.

Also, to determine what kind of coverage we would lose if we made this change: Is there a list somewhere of the warnings that would get ignored if we go forward with this?

It will be all of the existing StaticWarningCodes and the vast majority of HintCodes (source of truth is here). I think the list of Hints which will continue to not be fatal by default is:

DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE
DEPRECATED_MEMBER
DIVISION_OPTIMIZATION
FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE
FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE
IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION
IMPORT_OF_LEGACY_LIBRARY_INTO_NULL_SAFE
PACKAGE_IMPORT_CONTAINS_DOT_DOT
TYPE_CHECK_IS_NOT_NULL
TYPE_CHECK_IS_NULL

Most of these should be documented at https://dart.dev/tools/diagnostic-messages.

Wondering if the motivation behind this proposal is more a lack of prompt responses than a technical reason? In the former case, we should enforce the policy of removing them over reducing our coverage by ignoring warnings...

The motivation is both. There is a high cost to cleaning up all violations of a new warning that exist in the world before the new warning can even be written.
However, I think the reasoning stands on its own. The customer tests should not have to analyze perfectly cleanly when using Dart at HEAD and flutter at HEAD (as was, I imagine, the reasoning for using --no-fatal-infos already).

In general I would much rather we be fixing these tests than ignoring warnings. The whole point here is to feel the pain we are putting our developers under. If these warning are painful, we should feel that pain. I wasn't especially eager for us to disable the lints, but I'm even less eager for us to disable warnings.

I have a choice to run or not run analyze I want some warnings in my face please!

but I'm even less eager for us to disable warnings

Huh, it's an "analyzer", it needs to run :P

I think we changed this already for most customer tests.
In general this infrastructure has no owner so if there is a needed change I recommend just filing a PR to fix it (possibly after creating a design doc and socializing it around if it's a significant or potentially controversial change).

authors: Hixie bwilkerson goderbauer hampsterx srawlins


text:
[flutter_adaptive_scaffold] drawerBreakpoint does not have any effect

Hi,
I might have misunderstood documentation, but my testing of the drawerBreakpoint option in the AdaptiveScaffold widget does not seem to work.
I used the Adaptive Scaffold example running on chrome to test width variation.
I only added the drawerBreakpoint and I tried almost all breakpoints possible but nothing happened.
I was expecting that by using a Breakoints.standard or Breakpoints.smallAndUp my navigation rail wouldn't switch to a bottom navigation bar under example small breakpoint.
Was my expectation right ?
What behaviour do you get ?

@nicolascrochet7
Thanks for the report. Can you provide flutter doctor -v, a complete minimal reproducible code sample along with actual vs expected behavior while running your scenario ?

Of course,
Here is flutter doctor -v :
`√] Flutter (Channel stable, 3.7.3, on Microsoft Windows [version 10.0.19045.2604], locale fr-FR)
• Flutter version 3.7.3 on channel stable at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 9944297138 (2 weeks ago), 2023-02-08 15:46:04 -0800
• Engine revision 248290d6d5
• Dart version 2.19.2
• DevTools version 2.20.1
[X] Windows Version (Unable to confirm if installed Windows version is 10 or greater)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Users\user\AppData\Local\Android\sdk
• Platform android-31, build-tools 30.0.2
• Java binary at: C:\Program Files\Android\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 Build Tools 2019 16.11.8)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
• Visual Studio Build Tools 2019 version 16.11.32002.261
X The current Visual Studio installation is incomplete. Please reinstall Visual Studio.
[√] Android Studio (version 4.1)
• Android Studio at C:\Program Files\Android\Android Studio
• 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-b01)
[√] VS Code (version 1.75.1)
• VS Code at C:\Users\user\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.58.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64    • Microsoft Windows [version 10.0.19045.2604]
• Chrome (web)      • chrome  • web-javascript • Google Chrome 110.0.5481.96
• Edge (web)        • edge    • web-javascript • Microsoft Edge 110.0.1587.50
[√] HTTP Host Availability
• All required HTTP hosts are available`
So as mentionned the code is from the example folder with drawerBreakpoint option added :
`// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:flutter_adaptive_scaffold/flutter_adaptive_scaffold.dart';
void main() {
runApp(const MyApp());
}
/// The main application widget for this example.
class MyApp extends StatelessWidget {
/// Creates a const main application widget.
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(home: MyHomePage());
}
}
/// Creates a basic adaptive page with navigational elements and a body using
/// [AdaptiveScaffold].
class MyHomePage extends StatelessWidget {
/// Creates a const [MyHomePage].
const MyHomePage({super.key});
// #docregion Example
@override
Widget build(BuildContext context) {
// Define the children to display within the body at different breakpoints.
final List children = [
for (int i = 0; i < 10; i++)
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
color: const Color.fromARGB(255, 255, 201, 197),
height: 400,
),
)
];
return BottomNavigationBarTheme(
    data: const BottomNavigationBarThemeData(
      unselectedItemColor: Colors.black,
      selectedItemColor: Colors.black,
      backgroundColor: Colors.white,
    ),
    child: AdaptiveScaffold(
        // An option to override the default breakpoints used for small, medium,
        // and large.
        smallBreakpoint: const WidthPlatformBreakpoint(end: 700),
        mediumBreakpoint:
            const WidthPlatformBreakpoint(begin: 700, end: 1000),
        largeBreakpoint: const WidthPlatformBreakpoint(begin: 1000),
        useDrawer: false,
        drawerBreakpoint: Breakpoints.smallAndUp,
        destinations: const <NavigationDestination>[
          NavigationDestination(icon: Icon(Icons.inbox), label: 'Inbox'),
          NavigationDestination(
              icon: Icon(Icons.article), label: 'Articles'),
          NavigationDestination(icon: Icon(Icons.chat), label: 'Chat'),
          NavigationDestination(
              icon: Icon(Icons.video_call), label: 'Video')
        ],
        body: (_) => GridView.count(crossAxisCount: 2, children: children),
        smallBody: (_) => ListView.builder(
              itemCount: children.length,
              itemBuilder: (_, int idx) => children[idx],
            ),
        // Define a default secondaryBody.
        secondaryBody: (_) =>
            Container(color: const Color.fromARGB(255, 234, 158, 192)),
        // Override the default secondaryBody during the smallBreakpoint to be
        // empty. Must use AdaptiveScaffold.emptyBuilder to ensure it is properly
        // overridden.
        smallSecondaryBody: AdaptiveScaffold.emptyBuilder));

}
// #enddocregion
}`
And I was expecting that by using a Breakoints.standard or Breakpoints.smallAndUp my navigation rail wouldn't switch to a bottom navigation bar under example small breakpoint.

Here is the result for added information :

And I was expecting not to have any bottom navigation bar at the breakpoint but a navigation rail. (If I understood drawerBreakpoint's option documentation correctly, which I am not sure)

Thanks for the update. I see below upon running the code sample, but not sure what exactly is the issue is. Can you please elaborate by providing steps to replicate on the behavior you are seeing ?

Thank you for your return.
In the adaptive_scaffold.dart there is an option called drawerBreakpoint :
  /// Option to override the drawerBreakpoint for the usage of [Drawer] over the   /// usual [BottomNavigationBar].   ///   /// Defaults to [Breakpoints.smallDesktop].   final Breakpoint drawerBreakpoint;
where you have to setup a Breakpoint, and where from what I understand, it would allow the adaptive scaffold to maintain a navigation rail instead of a bottom navigation bar from that breakpoint. This would be my use case, but I am not seeing any effect of that option with all available breakpoints from the Breakpoint class.
The adaptive scaffold from the example  provided in this repo, shows a bottom navigation bar when window is resized below 700 width window size.
The code that I shared, fully reuse the example except adding the drawerBreakpoint option Breakpoint.smallAndUp. When window is resized below 700 the bottom navigation bar still apears instead of the drawer (picture above).  I was expecting the bottom navigation bar not to appear and have the navigation rail maintained instead.

Hi,
I got it. It was a misunderstanding on my end.
The drawerBreakpoint has an effect when useDrawer is true (option I did not notice) which is to add a drawer on not mobile platform.
Then I would change my bug report to a feature request to add an option to expand drawer usage to mobile platform for the AdaptiveScaffold widget.


text:
Rich text adding default margin in android when wrapped inside column

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce
I have added my sample code In which rich text is added in column and it is adding some extra space only in android device while in Ios device it is working fine
Expected results
Both ios and Android devices should have the same result. means no space should be there in Android device at the left side of rich text
Actual results
The rich text adds some extra space only on the Android device.
Code sample
Column(
      children: [
        Container(
          padding: EdgeInsets.only(
            top: getSize(10),
            bottom: getSize(6),
          ),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Text(
                'switch ',
                maxLines: 2,
                style: CustomTextStyle.textColorBoldText16.copyWith(
                  fontSize: getSize(20),
                ),
              ),
              CupertinoSwitch(
                value: false,
                onChanged: (value) async {},
                thumbColor: ColorConstants.whiteColor,
                activeColor: ColorConstants.colorPrimary,
              )
            ],
          ),
        ),
        Container(
          padding: EdgeInsets.only(
            top: getSize(6),
            bottom: getSize(8),
            left: 0,
            right: 0,
          ),
          child: RichText(
            softWrap: true,
            textAlign: TextAlign.left,
            maxLines: 3,
            text: TextSpan(
              text: 'behaviour should be',
              style: CustomTextStyle.textColorRegularText14,
              children: <TextSpan>[
                TextSpan(
                  text: ' (default)',
                  style: CustomTextStyle.textColorRegularText14.copyWith(
                    fontStyle: FontStyle.italic,
                  ),
                ),
                TextSpan(
                  text:
                      'sample long text with some dummy data i have added and it is adding extra margin in android and not in ios actual expectation is it should not add any space in android',
                  style: CustomTextStyle.textColorRegularText14,
                ),
              ],
            ),
          ),
        ),
      ],
    );`

Screenshots or Video

Screenshots / Video demonstration
[Upload media here]

Logs
Logs
[Paste your logs here]

Flutter Doctor output

[✓] Flutter (Channel stable, 3.7.12, on macOS 13.3.1 22E261 darwin-arm64, locale en-IN)
    • Flutter version 3.7.12 on channel stable at /Users/parthjain/Downloads/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4d9e56e694 (4 weeks ago), 2023-04-17 21:47:46 -0400
    • Engine revision 1a65d409c7
    • Dart version 2.19.6
    • DevTools version 2.20.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/parthjain/Library/Android/sdk
    • Platform android-33, build-tools 33.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E222b
    • CocoaPods version 1.11.3

[✓] Android Studio (version 2022.2)
    • 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 17.0.6+0-17.0.6b802.4-9586694)

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

[✓] Connected device (3 available)
    • Android SDK built for arm64 (mobile) • emulator-5554                        • android-arm64 • Android 10 (API 29) (emulator)
    • iPhone 14 Pro (mobile)               • B6A3F019-C3FE-477E-950D-1F79BD0E6AA1 • ios           •
      com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)                      • macos                                • darwin-arm64  • macOS 13.3.1 22E261 darwin-arm64

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

Hi @aubieparthhj, your code sample is not complete. Please provide a complete minimal reproducible code sample without any third-party packages/plugins so that we can investigate this.
You also appear to be using an older version of flutter. Please upgrade to the latest version of flutter stable (3.10.1) to see if you still reproduce the issue. If you do, please provide the updated output of flutter doctor -v.
Thank you

authors: aubieparthhj danagbemava-nc


text:
Flutter wrapper to bundle flutter within a project

It would be ideal if all devs and CI would use the exact same version of flutter to build and develop an app. Right now it's hard to bundle flutter within a repository. Git submodule would be one solution but it is currently not working https://github.com/flutter/flutter/issues/3770.
Gradle had the same problem and solved this with the gradle wrapper, automatically downloading the gradle binaries to a fixed version which is part of the projects repository. Instead of calling gradle everybody is used to call ./gradlew when executing gradle tasks.
There should be a ./flutterw which does exactly this, downloading the correct flutter version based on a version file which can be part of the repository.
working flutterw implementation
Here is my current ./flutterw implementation which works by putting it top level into a flutter project:
#!/bin/bash

# Use this flutter wrapper to bundle flutter within your project to make sure everybody builds with the same version
# put `flutterw` into the root of your flutter project and execute it. It will download all dependencies automatically when calling it.
# Use `./flutterw upgrade` to upgrade the flutter version, using the channel defined in flutter/wrapper/flutter-wrapper.properties

FLUTTERW_DIR="$(pwd -P)/flutter/wrapper"
FLUTTER_DIR="$(pwd -P)/.flutter"
WRAPPER_PROPERTIES="$FLUTTERW_DIR/flutter-wrapper.properties"
FLUTTER_REPO_URL="https://github.com/flutter/flutter.git"

DEFAULT_CHANNEL="alpha"

# Check if wrapper config file exists otherwise create with default values
if [ ! -d $FLUTTERW_DIR ]; then
    mkdir -p $FLUTTERW_DIR
fi

# Create wrapper properties file if it doesn't exit
if [ ! -f $WRAPPER_PROPERTIES ]; then
    # Use alpha here as recommended, will be replaced with explicit sha1 once cloned
    echo "flutter_channel=$DEFAULT_CHANNEL" > $WRAPPER_PROPERTIES
fi

# read all properties from config file
while IFS='=' read -r key value; do
    key=$(echo $key | tr '.' '_')
    eval "${key}='${value}'"
done < "$WRAPPER_PROPERTIES"

# Clone Flutter when not already cloned in project dir, the outer git repo will ignore this sub repo
if [ ! -d $FLUTTER_DIR ]; then
    echo "Downloading Flutter with wrapper"
    git clone $FLUTTER_REPO_URL $FLUTTER_DIR
fi

upgradeWrapperConfigFile () {
    FLUTTER_SHA1="$(git -C $FLUTTER_DIR rev-parse HEAD)"
    if [ ! -z "$FLUTTER_SHA1" ]; then
        # Write config file with updated version
        echo "flutter_channel=$flutter_channel" > $WRAPPER_PROPERTIES
        echo "flutter_version=$FLUTTER_SHA1" >> $WRAPPER_PROPERTIES
    else
        echo "Error: could not get version from flutter repo"
        exit 1
    fi
}

FLUTTER_SHA1="$(git -C $FLUTTER_DIR rev-parse HEAD)"

# When wrapper file version was changed, update flutter accordingly before executing
if [ "$flutter_version" != "$FLUTTER_SHA1" ]; then
    # use version when available, otherwise the channel on initial checkout
    if [ -z $flutter_version ]; then REV="$flutter_channel"; else REV="$flutter_version"; fi

    echo "Change Flutter version to $REV"

    git -C $FLUTTER_DIR checkout $REV -q
    upgradeWrapperConfigFile

    # when changing version also update binaries
    echo "Upgrading engine"
    $FLUTTER_DIR/bin/flutter precache
    $FLUTTER_DIR/bin/flutter packages upgrade
fi

# Flutter wrapper operates with detached HEAD. Upgrade won't work, flutter has to be on a branch to pull
# Checkout channel before upgrading
if [[ $@ == *"upgrade"* ]]; then
    echo "Switch to channel '$flutter_channel' before upgrading"
    git -C $FLUTTER_DIR checkout $flutter_channel -q
fi

set -e
"$FLUTTER_DIR/bin/flutter" "$@"

# Automatically update the flutter version in wrapper after upgrade; or at initial run without existing version
if [[ $@ == *"upgrade"* ]]; then
    upgradeWrapperConfigFile
fi

Benefits:

No more "works on my machine". Everybody uses the same flutter version (exact commit)
App version and flutter version are locked together. You'll never build an old app version with a never flutter version which could fail due to breaking changes or misbehave because of implementation detail changes.
Flutter doesn't have to be explicitly installed on CI, neither on any development machine. Basically all the Flutter installation & setup will be obsolete. It's only required to create a new project which could be moved into the flutter IntelliJ plugin.
It would simplify the logic to get the path of the flutter sdk by pointing to a fixed location within the repository ('../../.flutter')
I could replace the logic with

project.ext.setProperty('flutter.sdk', file('../../.flutter').absolutePath)
apply from: "${rootProject.projectDir}/../.flutter/packages/flutter_tools/gradle/flutter.gradle"

It's easy to change the channel or specific commit of flutter. flutter upgrade is great but using a specific commit requires git checkout.

Missing

flutterw.bat for windows users
The IntelliJ plugin should automatically use the local flutter sdk (./flutterw) if available instead of the global one. This is already kind of working because flutter remembers which sdk was last used and it gets picked up by IntelliJ.

The way we've seen teams work around #3770 for now is to make their own fork of flutter/flutter and all pull from that fork.

The main purpose of flutterw is that a flutter version - a file, containing the channel and exact commit hash - is part of the project and added to CVS. By using ./flutterw instead of flutter it is guaranteed that the app builds with the flutter version it was made for.
A fork is not a workaround to bind a specific flutter version to a project. It would fail when someone updates the fork. It would require everyone to update their dev machines and the CI environment to guarantee stable builds for everyone.
Working on different projects would require me to update all projects at once or me to manually change the version everytime I switch the project (multiple times a day).
Also, building a hotfix release for a previous version could cause new problems because the flutter version has also changed.
I don't think I have to add more arguments why the flutter version should be bundled with a project. In the end flutter is a dependency and dependencies shouldn't use dynamic versions.

The solution we've been suggesting more recently is to use git submodules to import flutter as part of the git repo for your app.

@passsy Would you please release the flutterw.bat Version? thank you!

@Hixie it feels like this is a great candidate to either 1) Handle in a 1st party way out of the box built in or 2) Officially endorse passsy's solution; what do you think?

Yeah, we should document the recommended solution. See https://github.com/flutter/website/issues/1845 which is tracking that suggestion. PRs welcome. :-)

authors: Hixie eseidelGoogle neiljaywarner passsy spysoos


text:
%5Btool_crash%5D FileSystemException%3A Creation failed%2C OS Error%3A No such file or directory%2C errno %3D 2

%23%23 Command%0A%60%60%60%0Aflutter downgrade v3.10.2%0A%60%60%60%0A%0A%23%23 Steps to Reproduce%0A1. ...%0A2. ...%0A3. ...%0A%0A%23%23 Logs%0AFileSystemException%3A Creation failed%2C OS Error%3A No such file or directory%2C errno %3D 2%0A%60%60%60%0A%230      _Directory.createSync %28dart%3Aio%2Fdirectory_impl.dart%3A129%3A7%29%0A%231      ForwardingDirectory.createSync %28package%3Afile%2Fsrc%2Fforwarding%2Fforwarding_directory.dart%3A20%3A16%29%0A%232      ErrorHandlingDirectory.createSync.%3Canonymous closure%3E %28package%3Aflutter_tools%2Fsrc%2Fbase%2Ferror_handling_io.dart%3A428%3A22%29%0A%233      _runSync %28package%3Aflutter_tools%2Fsrc%2Fbase%2Ferror_handling_io.dart%3A590%3A14%29%0A%234      ErrorHandlingDirectory.createSync %28package%3Aflutter_tools%2Fsrc%2Fbase%2Ferror_handling_io.dart%3A427%3A12%29%0A%235      EngineCachedArtifact.updateInner %28package%3Aflutter_tools%2Fsrc%2Fcache.dart%3A916%3A19%29%0A%3Casynchronous suspension%3E%0A%236      CachedArtifact.update %28package%3Aflutter_tools%2Fsrc%2Fcache.dart%3A810%3A5%29%0A%3Casynchronous suspension%3E%0A%237      Cache.updateAll %28package%3Aflutter_tools%2Fsrc%2Fcache.dart%3A677%3A9%29%0A%3Casynchronous suspension%3E%0A%238      FlutterCommand.verifyThenRunCommand %28package%3Aflutter_tools%2Fsrc%2Frunner%2Fflutter_command.dart%3A1518%3A7%29%0A%3Casynchronous suspension%3E%0A%239      FlutterCommand.run.%3Canonymous closure%3E %28package%3Aflutter_tools%2Fsrc%2Frunner%2Fflutter_command.dart%3A1336%3A27%29%0A%3Casynchronous suspension%3E%0A%2310     AppContext.run.%3Canonymous closure%3E %28package%3Aflutter_tools%2Fsrc%2Fbase%2Fcontext.dart%3A150%3A19%29%0A%3Casynchronous suspension%3E%0A%2311     CommandRunner.runCommand %28package%3Aargs%2Fcommand_runner.dart%3A212%3A13%29%0A%3Casynchronous suspension%3E%0A%2312     FlutterCommandRunner.runCommand.%3Canonymous closure%3E %28package%3Aflutter_tools%2Fsrc%2Frunner%2Fflutter_command_runner.dart%3A296%3A9%29%0A%3Casynchronous suspension%3E%0A%2313     AppContext.run.%3Canonymous closure%3E %28package%3Aflutter_tools%2Fsrc%2Fbase%2Fcontext.dart%3A150%3A19%29%0A%3Casynchronous suspension%3E%0A%2314     FlutterCommandRunner.runCommand %28package%3Aflutter_tools%2Fsrc%2Frunner%2Fflutter_command_runner.dart%3A244%3A5%29%0A%3Casynchronous suspension%3E%0A%60%60%60%0A%60%60%60%0A%1B%5B32m%5B%E2%

flutter upgrade crash, fixed by reinstalling flutter.


text:
Target kernel_snapshot failed: Exception   FAILURE: Build failed with an exception.

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce
After upgrading to new Flutter Version Flutter 3.13.1 • channel stable
Expected results
Project not running
Actual results
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01
Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/03 to old ns http://schemas.android.com/sdk/android/repo/addon2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/03 to old ns http://schemas.android.com/sdk/android/repo/repository2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
../../../.pub-cache/hosted/pub.dev/firebase_core-1.24.0/lib/src/firebase_app.dart:18:25: Error: Member not found: 'FirebaseAppPlatform.verifyExtends'.
FirebaseAppPlatform.verifyExtends(_delegate);
^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/stacked_core-1.2.4/lib/src/code_generation/locator/stacked_locator.dart:405:19: Error: The argument type 'Object?' can't be assigned to the parameter type 'T?'.

'Object' is from 'dart:core'.
instance: instance,
^
../../../.pub-cache/hosted/pub.dev/stacked-2.3.15+1/lib/src/state_management/skeleton_loader.dart:106:19: Error: No named parameter with the name 'vsync'.
vsync: this,
^^^^^
../../../flutter/packages/flutter/lib/src/widgets/animated_size.dart:28:9: Context: Found this candidate, but the arguments don't match.
const AnimatedSize({
^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/firebase_auth_platform_interface-6.10.1/lib/src/action_code_info.dart:65:15: Error: The method 'FallThroughError' isn't defined for the class 'ActionCodeInfo'.
'ActionCodeInfo' is from 'package:firebase_auth_platform_interface/src/action_code_info.dart' ('../../../.pub-cache/hosted/pub.dev/firebase_auth_platform_interface-6.10.1/lib/src/action_code_info.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FallThroughError'.
throw FallThroughError();
^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/cloud_firestore_platform_interface-5.7.7/lib/src/platform_interface/utils/load_bundle_task_state.dart:13:13: Error: Method not found: 'FallThroughError'.
throw FallThroughError();
^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:82:55: Error: A value of type 'RenderObject?' can't be assigned to a variable of type 'AbstractNode?'.
'RenderObject' is from 'package:flutter/src/rendering/object.dart' ('../../../flutter/packages/flutter/lib/src/rendering/object.dart').
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('../../../flutter/packages/flutter/lib/src/foundation/node.dart').
final AbstractNode? targetParent = renderObject.parent;
^
../../../.pub-cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:83:58: Error: The method 'markNeedsPlacement' isn't defined for the class 'AbstractNode?'.
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('../../../flutter/packages/flutter/lib/src/foundation/node.dart').
Try correcting the name to the name of an existing method, or defining a method named 'markNeedsPlacement'.
if (targetParent is RenderLayoutGrid) targetParent.markNeedsPlacement();
^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:84:54: Error: The method 'markNeedsLayout' isn't defined for the class 'AbstractNode?'.
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('../../../flutter/packages/flutter/lib/src/foundation/node.dart').
Try correcting the name to the name of an existing method, or defining a method named 'markNeedsLayout'.
if (targetParent is RenderObject) targetParent.markNeedsLayout();
^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:132:55: Error: A value of type 'RenderObject?' can't be assigned to a variable of type 'AbstractNode?'.
'RenderObject' is from 'package:flutter/src/rendering/object.dart' ('../../../flutter/packages/flutter/lib/src/rendering/object.dart').
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('../../../flutter/packages/flutter/lib/src/foundation/node.dart').
final AbstractNode? targetParent = renderObject.parent;
^
../../../.pub-cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:133:58: Error: The method 'markNeedsPlacement' isn't defined for the class 'AbstractNode?'.
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('../../../flutter/packages/flutter/lib/src/foundation/node.dart').
Try correcting the name to the name of an existing method, or defining a method named 'markNeedsPlacement'.
if (targetParent is RenderLayoutGrid) targetParent.markNeedsPlacement();
^^^^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/flutter_layout_grid-1.0.6/lib/src/widgets/placement.dart:134:54: Error: The method 'markNeedsLayout' isn't defined for the class 'AbstractNode?'.
'AbstractNode' is from 'package:flutter/src/foundation/node.dart' ('../../../flutter/packages/flutter/lib/src/foundation/node.dart').
Try correcting the name to the name of an existing method, or defining a method named 'markNeedsLayout'.
if (targetParent is RenderObject) targetParent.markNeedsLayout();
^^^^^^^^^^^^^^^
../../../.pub-cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:186:20: Error: The argument type 'void Function(TapDownDetails)' can't be assigned to the parameter type 'void Function(TapDragDownDetails)?'.
'TapDownDetails' is from 'package:flutter/src/gestures/tap.dart' ('../../../flutter/packages/flutter/lib/src/gestures/tap.dart').
'TapDragDownDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../../flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
onTapDown: onTapDown,
^
../../../.pub-cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:190:24: Error: The argument type 'void Function(TapUpDetails)' can't be assigned to the parameter type 'void Function(TapDragUpDetails)?'.
'TapUpDetails' is from 'package:flutter/src/gestures/tap.dart' ('../../../flutter/packages/flutter/lib/src/gestures/tap.dart').
'TapDragUpDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../../flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
onSingleTapUp: onSingleTapUp,
^
../../../.pub-cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:195:26: Error: The argument type 'void Function(TapDownDetails)' can't be assigned to the parameter type 'void Function(TapDragDownDetails)?'.
'TapDownDetails' is from 'package:flutter/src/gestures/tap.dart' ('../../../flutter/packages/flutter/lib/src/gestures/tap.dart').
'TapDragDownDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../../flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
onDoubleTapDown: onDoubleTapDown,
^
../../../.pub-cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:196:31: Error: The argument type 'void Function(DragStartDetails)' can't be assigned to the parameter type 'void Function(TapDragStartDetails)?'.
'DragStartDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('../../../flutter/packages/flutter/lib/src/gestures/drag_details.dart').
'TapDragStartDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../../flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
onDragSelectionStart: onDragSelectionStart,
^
../../../.pub-cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:197:32: Error: The argument type 'void Function(DragStartDetails, DragUpdateDetails)' can't be assigned to the parameter type 'void Function(TapDragUpdateDetails)?'.
'DragStartDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('../../../flutter/packages/flutter/lib/src/gestures/drag_details.dart').
'DragUpdateDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('../../../flutter/packages/flutter/lib/src/gestures/drag_details.dart').
'TapDragUpdateDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../../flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
onDragSelectionUpdate: onDragSelectionUpdate,
^
../../../.pub-cache/hosted/pub.dev/flutter_math_fork-0.5.0/lib/src/widgets/selection/gesture_detector_builder.dart:198:29: Error: The argument type 'void Function(DragEndDetails)' can't be assigned to the parameter type 'void Function(TapDragEndDetails)?'.
'DragEndDetails' is from 'package:flutter/src/gestures/drag_details.dart' ('../../../flutter/packages/flutter/lib/src/gestures/drag_details.dart').
'TapDragEndDetails' is from 'package:flutter/src/widgets/tap_and_drag_gestures.dart' ('../../../flutter/packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart').
onDragSelectionEnd: onDragSelectionEnd,
^
Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

Where:
Script '/Users/pushpendrasinghrathor/flutter/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy' line: 1297

What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.

Process 'command '/Users/pushpendrasinghrathor/flutter/bin/flutter'' finished with non-zero exit value 1

Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 28s
Running Gradle task 'assembleRelease'...                           28.9s
Gradle task assembleRelease failed with exit code 1
Code sample
Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration
[Upload media here]

Logs
Logs
[Paste your logs here]

Flutter Doctor output
Doctor output
[Paste your output here]

All of those errors are coming from third-party packages; they will need to be reported to the authors of those packages. (Consider running flutter pub upgrade first to see if they are already fixed in the current versions of those packages.)
Closing as this is not a Flutter bug.

authors: srpushpendar stuartmorgan


text:
[Impeller] OpenGLES MSAA Follow-up: Support < OpenGL 3.0

In https://github.com/flutter/engine/pull/47030, we support off-screen MSAA by using glBlitFramebuffer, which is only available in 3.0+.
Most devices that use native Open GL (not ANGLE, etc) are 2.0, so we need another way of accomplishing this. As a hack, we can modify the HAL:
  // Do not use the resolve_texture, and instead use the MSAA texture only.
  // To preview what this would look like (but should not be implemented this
  // way - would impact the HAL):
  //
  //    @@ render_target.cc @@ CreateOffscreenMSAA
  //    - color0.resolve_texture = color0_resolve_tex;
  //    + color0.resolve_texture = color0_msaa_tex;

... but obviously we don't want to check this in, so we should better understand why this works, and what a backend-specific way we could represent it.

We should be able to do this with a draw insead of glBlitFramebuffer. I don't think we'll need the hack :)

authors: jonahwilliams matanlurey


text:
linux-20 is dead due to SSD disk drive pickup errors and inode corrupted.

Type of Request
bug
Infrastructure Environment
LUCI, Github, Cocoon scheduler, Autosubmit, etc...
What is happening?
linux-20 is dead due to SSD disk drive pickup errors and inode corrupted.

Steps to reproduce
Step 1:
Step 2:
..
Step n:
Expected results
I expect to see X when Y is finished.

2/14 - linux-20 is dead again after rebuild and reinstall OS second times.

Reformat the SSD disk drive then reinstall OS Ubuntu and rebuild machine again. Linux-20 is back online and running fine now.


text:
Generated AndroidManifest.xml contains a URL with a hl=en param attached.

Steps to reproduce

Generate project with flutter generate project_name
Inspect android/app/src/main/AndroidManifest.xml
See link to https://developer.android.com/training/package-visibility?hl=en

Expected results
The link should be to https://developer.android.com/training/package-visibility - note no hl parameter.
Actual results
URL with hl param present in generated file
Code sample
N/A
Screenshots or Video
No response
Logs
No response
Flutter Doctor output
Doctor output
$ flutter doctor -v
[✓] Flutter (Channel stable, 3.19.1, on macOS 14.3.1 23D60 darwin-arm64, locale en)
    • Flutter version 3.19.1 on channel stable at /Users/brettmorgan/flutter
    • Upstream repository https://github.com/flutter/flutter
    • Framework revision abb292a07e (7 days ago), 2024-02-20 14:35:05 -0800
    • Engine revision 04817c99c9
    • Dart version 3.3.0
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/brettmorgan/Library/Android/sdk
    • Platform android-34-ext8, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15C500b
    • CocoaPods version 1.15.0

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

[✓] Android Studio (version 2022.3)
    • 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 17.0.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Community Edition (version 2023.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 77.0.1
    • Dart plugin version 233.13135.65

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 14.3.1 23D60 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 122.0.6261.57

[✓] Network resources
    • All expected network resources are available.

• No issues found!

I see the same link the AndroidManifest.xml file.
@domesticmouse I think you might have meant flutter create project_name instead of flutter generate project_name in the steps to reproduce above 😅
cc @bleroux since according to the git blame, this was added by you.
https://github.com/flutter/flutter/blob/82ffde7ddfa265b96b94b16c2bddb1f43d01cb57/packages/flutter_tools/templates/app_shared/android.tmpl/app/src/main/AndroidManifest.xml.tmpl#L34

flutter doctor -v
[✓] Flutter (Channel stable, 3.19.1, on macOS 14.3.1 23D60 darwin-arm64, locale en-GB)
    • Flutter version 3.19.1 on channel stable at /Users/nexus/dev/sdks/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision abb292a07e (7 days ago), 2024-02-20 14:35:05 -0800
    • Engine revision 04817c99c9
    • Dart version 3.3.0
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Users/nexus/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode-15.2.0.app/Contents/Developer
    • Build 15C500b
    • CocoaPods version 1.14.3

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

[✓] Android Studio (version 2023.1)
    • Android Studio at /Users/nexus/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 17.0.7+0-17.0.7b1000.6-10550314)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.5)
    • IntelliJ at /Users/nexus/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 77.2.2
    • Dart plugin version 232.10286

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

[✓] Connected device (4 available)
    • Nexus (mobile)       • 00008020-001875E83A38002E • ios            • iOS 17.3.1 21D61
    • Dean’s iPad (mobile) • 00008103-000825C811E3401E • ios            • iOS 17.3.1 21D61
    • macOS (desktop)      • macos                     • darwin-arm64   • macOS 14.3.1 23D60 darwin-arm64
    • Chrome (web)         • chrome                    • web-javascript • Google Chrome 122.0.6261.69

[✓] Network resources
    • All expected network resources are available.

• No issues found!

[!] Flutter (Channel master, 3.20.0-15.0.pre.24, on macOS 14.3.1 23D60 darwin-arm64, locale en-GB)
    • Flutter version 3.20.0-15.0.pre.24 on channel master at /Users/nexus/dev/sdks/flutters
    ! Warning: `flutter` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/nexus/dev/sdks/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/nexus/dev/sdks/flutters. Consider adding /Users/nexus/dev/sdks/flutters/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 450506868d (3 hours ago), 2024-02-28 05:06:47 +0000
    • Engine revision c79117b706
    • Dart version 3.4.0 (build 3.4.0-183.0.dev)
    • DevTools version 2.33.0-dev.11
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/nexus/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Users/nexus/Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
    • Xcode at /Applications/Xcode-15.2.0.app/Contents/Developer
    • Build 15C500b
    • CocoaPods version 1.14.3

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

[✓] Android Studio (version 2023.1)
    • Android Studio at /Users/nexus/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 17.0.7+0-17.0.7b1000.6-10550314)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.5)
    • IntelliJ at /Users/nexus/Applications/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 77.2.2
    • Dart plugin version 232.10286

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

[✓] Connected device (5 available)
    • Nexus (mobile)                  • 00008020-001875E83A38002E • ios            • iOS 17.3.1 21D61
    • Dean’s iPad (mobile)            • 00008103-000825C811E3401E • ios            • iOS 17.3.1 21D61
    • macOS (desktop)                 • macos                     • darwin-arm64   • macOS 14.3.1 23D60 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad     • darwin         • macOS 14.3.1 23D60 darwin-arm64
    • Chrome (web)                    • chrome                    • web-javascript • Google Chrome 122.0.6261.69

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

authors: danagbemava-nc domesticmouse


text:
[Go Router] Control state of some branches in StatefulShellRoute

Use case
In my app I have followed this guide to built my nested routing: https://codewithandrea.com/articles/flutter-bottom-navigation-bar-nested-routes-gorouter/.
In my app I have 3 tabs, where on the first I do some functions, and in the other 2 I show some data that depends on the one of the first tab, but since I am using StatefulShellRoute.indexedStack, the state is not updated, so the widget is not updated.
Proposal
Would be nice to have a flag in the StatefulShellBranch where I can control if the state should be kept or not, because for example in my app i am fine state the state is kept on the first tab, but I would like to rebuilt the other 2 tabs every time I navigate to them.
If that's not possible, how can I archive this behavior?

I always took it to mean that a StatefulShellRoute should preserve state by definition.  Could a ShellRoute (without the stateful) do what you want?

@giordy16 This is similar to a known issue being tracked at https://github.com/flutter/flutter/issues/142258. Closing this issue as a duplicate, so please follow up on it for further updates.


text:
Range start 4 is out of text of length 1

Steps to reproduce
In short, you initialize the controller with some value and then try to update it, but with the numbers being added from right to left, since it's a field for adding money.
Expected results
Add the values correctly without breaking the exception no IOS
Actual results
I have a Numeric controller class that I extend from TextController, because then I can manipulate the numbers to appear to the user, and when I add the values from right to left it pops this error, considering that there was already a value in the field, because if it's empty it always initializes at 0.00
Code sample
Code sample
  @override
  void clear() => text = '0';

  void _moveCursorToEnd(TextRange range) {
    final textLength = _text.length;
    selection = TextSelection(
      baseOffset: textLength,
      extentOffset: textLength,
    );
  }

  @override
  set text(String newText) {
    _moveCursorToEnd(value.composing);
    if (allowNegativeNumbers && newText.startsWith('-')) isNegative = true;
    if (allowNegativeNumbers && newText.endsWith('-')) isNegative = !isNegative;
    final unformatted = _extractDigitsFromString(newText);
    final formatted = _applyDecimalPoint(unformatted);
    final trimmed = _trimLeadingZeroes(formatted);
    final withThousands = _applyThousandSeparator(trimmed);
    final withSign = _applySign(withThousands);
    _text = withSign;
    if (_text.isEmpty) clear();
  }

Screenshots or Video

Screenshots / Video demonstration
[Upload media here]

Logs
Logs

════════ Exception caught by services library ══════════════════════════════════
Range start 4 is out of text of length 2
'package:flutter/src/services/text_input.dart':
Failed assertion: line 1006 pos 12: 'range.start >= 0 && range.start <= text.length'
════════════════════════════════════════════════════════════════════════════════

Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64, locale en-BR)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.3)
[✓] VS Code (version 1.91.1)
[✓] Connected device (6 available)
[✓] Network resources

! Doctor found issues in 1 category.

@Isra0210
Can you provide complete runnable code sample (ex: main.dart) that triggers the reported error ?


text:
mac-14 lost external connection from phone device.

Type of Request
bug
Infrastructure Environment
LUCI, Github, Cocoon scheduler, Autosubmit, etc...
What is happening?
mac-14 lost external connection from phone device.

Steps to reproduce
Step 1:
Step 2:
..
Step n:
Expected results
I expect to see X when Y is finished.

Rebooting machine to restore connection.


text:
Observatory allocation memory size inconsistent

Steps to Reproduce
Background:
1, My page have many network images. 2, I've changed the max imagecache size from 1000 to 110.
Steps:
1, Open the pages with images.
2. Open the Observatory/allocation profile to see the memory size of "Image"
3. Sometimes the size of Image in the table is very large( 713.2M) but the "external size" in the above summary is normal (158.6M).
What is the size in the table meaning?
I guess they are the to be collected objects. My iPhone used to warn memory, is it relative to this size?

Click "GC" button, and the size in the table becomes normal.

Logs
Flutter Doctor
[✓] Flutter (Channel beta, v0.2.8, on Mac OS X 10.12.6 16G1314, locale zh-Hans-HK)
• Flutter version 0.2.8 at /Users/guoyou/projects/flutter
• Framework revision b397406561 (10 days ago), 2018-04-02 13:53:20 -0700
• Engine revision c903c217a1
• Dart version 2.0.0-dev.43.0.flutter-52afcba357
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /Users/guoyou/Library/Android/sdk
• Android NDK at /Users/guoyou/Library/Android/sdk/ndk-bundle
• Platform android-27, build-tools 27.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-915-b08)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.2, Build version 9C40b
• ios-deploy 1.9.2
• CocoaPods version 1.4.0
[✓] Android Studio (version 3.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[✓] IntelliJ IDEA Community Edition (version 2017.2.3)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin installed
• Dart plugin version 172.3968.27
[✓] Connected devices (2 available)
• vivo X9 • d52bd8b8                                 • android-arm64 • Android 7.1.2 (API 25)
• iPhone  • 0a5bc6e1e20fdf8d930872da08ed8c6e75d364f2 • ios           • iOS 11.2.5
• No issues found!
@mjohnsullivan

I think I've got the answer, thanks to the doc of observatory:
https://dart-lang.github.io/observatory/allocation-profile.html

If any of the recently allocated objects have become garbage, they are still counted until the next garbage collection.


text:
Stepper Icons are too big

Problem
Stepper Icons have no space between Icon itself and the circle.
In my opinion, it looks disturbing, especially for edit icon.

Solution
Changing this
case StepState.editing:
    return new Icon(
        Icons.edit,
        color: isDarkActive ? _kCircleActiveDark : _kCircleActiveLight,
    );
case StepState.complete:
    return new Icon(
        Icons.check,
        color: isDarkActive ? _kCircleActiveDark : _kCircleActiveLight,
    );

Into this:
case StepState.editing:
    return new Icon(
        Icons.edit,
        color: isDarkActive ? _kCircleActiveDark : _kCircleActiveLight,
        size: 18.0,
    );
case StepState.complete:
    return new Icon(
        Icons.check,
        color: isDarkActive ? _kCircleActiveDark : _kCircleActiveLight,
        size: 18.0,
    );

Would result in this:

In Material specs there is no mention of icon size. Only that the circle should be 24dp.
Can we make this change? I can make a pull request.

@MarcinusX Is there a way already defined in stepper implementation, for changing the icon example editing, complete whenever, we are on the step. I am unable to find a way, but your screenshots looks interesting.

I don't think there is such a way. Those code snippets are coming from material library source, so they're not customizable.

The icons honour the sizing from the iconTheme property in the theme. As a workaround, you could override this in the MaterialApp.theme property, but that would affect all icons that also use the same theme, so you can wrap your Stepper in a Theme widget and override the size on the iconTheme:
var theme = Theme.of(context);
Theme(
  data: theme.copyWith(iconTheme: theme.iconTheme.copyWith(size: 18.0),
  child: Stepper(…)
),

authors: MarcinusX Shantanu-Kotambkar dereklakin


text:
Atom awareness of flutter refresh to speed up dev cycles

Not sure if Atom is aware of flutter refresh, but it's a much faster way to iterate if all you are doing is changing code. If you've changed Dart code, run flutter refresh instead of flutter start. Cuts 11 seconds down to 3 seconds.

cc @jason-simmons @devoncarew

I'd like to try and refactor a bit to where start will use the functionality of refresh behind the scenes, if it detects that that's possible (https://github.com/flutter/flutter/issues/1776).

sgtm! Closing in favor of https://github.com/flutter/flutter/issues/1776

authors: devoncarew sethladd


text:
Make raster cache allocate textures from a texture cache.

Instead of allocating a texture eagerly as part of the GPU thread frame workload, textures should be acquired from a texture cache. Textures can be recycled and shared between GrContexts whose underlying OpenGL contexts are in the same sharegroup using the SkImage::MakeBackendTextureFromSkImage API.

Is this still a valid issue today? I'm not sure where to verify that this was implemented or not.

Is this still a valid issue today?

Yes.

I'm not sure where to verify that this was implemented or not.

We still create a bespoke surface (backed by a texture) for each raster cache entry.

The raster cache is a legacy feature at this point (no plans on adding it to impeller) so I'm going to close this.

authors: Hixie chinmaygarde pedromassangocode