-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#42142Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work liste: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.10Found to occur in 3.10Found to occur in 3.10found in release: 3.11Found to occur in 3.11Found to occur in 3.11has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionwaiting for PR to land (fixed)A fix is in flightA fix is in flight
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
- clone this repo https://github.com/junaid1460/flutter_impeller_gradient_shader_bug_example
- run without and with
--no-enable-impeller
Expected results
Should render text with gradient paint
Simulator.Screen.Recording.-.iPhone.14.Pro.Max.-.2023-05-18.at.17.16.28.mp4
Actual results
Rendering with no color at all
Simulator.Screen.Recording.-.iPhone.14.Pro.Max.-.2023-05-18.at.17.11.32.mp4
The issue was earlier reported here #120003 but the fix looks like partial
Code sample
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
var _showRichText = true;
@override
Widget build(BuildContext context) {
return Scaffold(
body: _showRichText ? SafeArea(child: _richText()) : _scrollView(),
floatingActionButton: FloatingActionButton(
onPressed: () => setState(() {
_showRichText = !_showRichText;
}),
child: const Icon(Icons.swap_horiz_rounded),
),
);
}
Widget _scrollView() => CustomScrollView(
physics: BouncingScrollPhysics(parent: AlwaysScrollableScrollPhysics()),
slivers: [
const SliverAppBar(
title: Text('Scroll View'),
),
SliverToBoxAdapter(
child: SingleChildScrollView(
child: Row(
children: [
_richText(),
],
),
)),
],
);
Widget _richText() => RichText(
text: TextSpan(
children: [
const TextSpan(
text: 'Hello, ',
),
TextSpan(
text: 'John',
style: TextStyle(
fontWeight: FontWeight.bold,
foreground: Paint()
..shader = const LinearGradient(
colors: [
Colors.red,
Colors.blue,
],
).createShader(
const Rect.fromLTWH(0.0, 0.0, 500.0, 800.0))),
),
],
style: const TextStyle(
fontSize: 44,
color: Colors.black,
),
),
);
}
Screenshots or Video
Expected (skia)
Simulator.Screen.Recording.-.iPhone.14.Pro.Max.-.2023-05-18.at.17.16.28.mp4
Vs Impeller
Simulator.Screen.Recording.-.iPhone.14.Pro.Max.-.2023-05-18.at.17.11.32.mp4
Logs
No response
Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.1, on macOS 13.1 22C65 darwin-arm64, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] Android Studio (version 2021.3)
[✓] IntelliJ IDEA Community Edition (version 2022.2.1)
[✓] VS Code (version 1.78.1)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!Metadata
Metadata
Assignees
Labels
P1High-priority issues at the top of the work listHigh-priority issues at the top of the work liste: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.found in release: 3.10Found to occur in 3.10Found to occur in 3.10found in release: 3.11Found to occur in 3.11Found to occur in 3.11has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-iosiOS applications specificallyiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionwaiting for PR to land (fixed)A fix is in flightA fix is in flight