Skip to content

flutter_svg rendering issue on iOS in landscape mode #175031

Description

@Abu-Abdullah

Steps to reproduce

  1. run the code
  2. change between normal and landscape orientation.

Expected results

no rendering issue like the attachment

Image

Actual results

the attached

Image

Code sample

Code sample
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: LayoutBuilder(
            builder: (context, constraints) {
              return Container(
                  alignment: Alignment.center,
                  padding: EdgeInsets.zero,
                  child: SingleChildScrollView(
                    child: SvgPicture.network(width: constraints.maxWidth, 'https://haq.app/assets/hafs/117.svg',
                    ),
                  )
              );
            }
        ),
      ),
    );
  }
}

Screenshots or Video

No response

Logs

No response

Flutter Doctor output

Doctor output
[✓] Flutter (Channel beta, 3.36.0-0.5.pre, on macOS 14.3 23D56 darwin-x64, locale en) [804ms]
    • Flutter version 3.36.0-0.5.pre on channel beta at /Users/oracle/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6c79484210 (10 days ago), 2025-08-27 16:02:04 -0700
    • Engine revision 56f64c2647
    • Dart version 3.10.0 (build 3.10.0-75.1.beta)
    • DevTools version 2.49.0
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, enable-lldb-debugging

[✗] Android toolchain - develop for Android devices [610ms]
    ✗ 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/to/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 15.2) [2.6s]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15C500b
    ! CocoaPods 1.15.0 out of date (1.16.2 is recommended).
        CocoaPods is a package manager for iOS or macOS platform code.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/to/platform-plugins
      To update CocoaPods, see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome) [25ms]
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Connected device (2 available) [9.0s]
    • iPhone 15 Pro Max (mobile) • 256FBBFE-FCBE-4D63-8EDA-20C274A3367D • ios        • com.apple.CoreSimulator.SimRuntime.iOS-17-2 (simulator)
    • macOS (desktop)            • macos                                • darwin-x64 • macOS 14.3 23D56 darwin-x64
    ! Error: Browsing on the local area network for Mariam’s iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
    ! Error: Browsing on the local area network for Mariam’s iPad. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources [1,112ms]
    • All expected network resources are available.

! Doctor found issues in 3 categories.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listfound in release: 3.35Found to occur in 3.35found in release: 3.36Found to occur in 3.36has reproducible stepsThe issue has been confirmed reproducible and is ready to work onp: flutter_svgThe Flutter SVG drawing packagespackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions