-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
in triagePresently being triaged by the triage teamPresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
Description
Steps to reproduce
01) This is a widget with a container displaying a "text" and a "counter":
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class WidCounter extends StatelessWidget {
final String text;
final int counter;
final int mode;
const WidCounter({super.key, required this.counter, required this.text, required this.mode});
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
decoration: BoxDecoration(
color: mode == 1 ? Colors.orange[300] : const Color.fromARGB(255, 169, 239, 252),
borderRadius: BorderRadius.circular(12),
border: Border.all(color: mode == 1 ? Colors.orange[800]! : const Color.fromARGB(255, 38, 23, 253), width: 3),
boxShadow: [
BoxShadow(
color: mode == 1 ? Colors.orange[900]! : const Color.fromARGB(255, 38, 23, 253),
blurRadius: 8,
offset: const Offset(4, 4),
),
const BoxShadow(color: Colors.white70, blurRadius: 4, offset: Offset(-2, -2)),
],
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
text,
style: GoogleFonts.comicNeue(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Colors.white,
shadows: [
Shadow(
color: mode == 1 ? Colors.orange[900]! : const Color.fromARGB(255, 38, 23, 253),
blurRadius: 3,
offset: const Offset(2, 2),
),
],
),
),
Text(
"$counter",
style: GoogleFonts.comicNeue(
fontSize: 22,
fontWeight: FontWeight.bold,
color: Colors.white,
shadows: [
Shadow(
color: mode == 1 ? Colors.orange[900]! : const Color.fromARGB(255, 38, 23, 253),
blurRadius: 3,
offset: const Offset(2, 2),
),
],
),
),
],
),
);
}
}
02) This is where I create 2 instances of the widget "WidCounter":
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: WidToolbar(showMenuButton: false, showBackButton: true, subtitle: "Harden Your Mind Once and for All!"),
body: Column(
children: [
const SizedBox(height: 10),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
WidCounter(text: "Match: ", counter: srvGameControl.matchedPairs, mode: 1),
WidCounter(text: "Fail: ", counter: srvGameControl.failedPairs, mode: 2),
],
),
Expected results
The shadow of the number in the first counter should be always orange and always blue in the second one.
Actual results
When the numbers of the 2 instances of the widget are the same, the shadow of the counters are wrong. They are both orange or both blue. (As if one of the instances were copying the style of the other). Very odd.
Code sample
Code sample
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class WidCounter extends StatelessWidget {
final String text;
final int counter;
final int mode;
const WidCounter({super.key, required this.counter, required this.text, required this.mode});
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
decoration: BoxDecoration(
color: mode == 1 ? Colors.orange[300] : const Color.fromARGB(255, 169, 239, 252),
borderRadius: BorderRadius.circular(12),
border: Border.all(color: mode == 1 ? Colors.orange[800]! : const Color.fromARGB(255, 38, 23, 253), width: 3),
boxShadow: [
BoxShadow(
color: mode == 1 ? Colors.orange[900]! : const Color.fromARGB(255, 38, 23, 253),
blurRadius: 8,
offset: const Offset(4, 4),
),
const BoxShadow(color: Colors.white70, blurRadius: 4, offset: Offset(-2, -2)),
],
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Text(
text,
style: GoogleFonts.comicNeue(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Colors.white,
shadows: [
Shadow(
color: mode == 1 ? Colors.orange[900]! : const Color.fromARGB(255, 38, 23, 253),
blurRadius: 3,
offset: const Offset(2, 2),
),
],
),
),
Text(
"$counter",
style: GoogleFonts.comicNeue(
fontSize: 22,
fontWeight: FontWeight.bold,
color: Colors.white,
shadows: [
Shadow(
color: mode == 1 ? Colors.orange[900]! : const Color.fromARGB(255, 38, 23, 253),
blurRadius: 3,
offset: const Offset(2, 2),
),
],
),
),
],
),
);
}
}
//And creating 2 instances of the widget here:
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: WidToolbar(showMenuButton: false, showBackButton: true, subtitle: "Harden Your Mind Once and for All!"),
body: Column(
children: [
const SizedBox(height: 10),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
WidCounter(text: "Match: ", counter: srvGameControl.matchedPairs, mode: 1),
WidCounter(text: "Fail: ", counter: srvGameControl.failedPairs, mode: 2),
],
),
Screenshots or Video
Note than the 0 in the second counter (Fail) should have a blue shadow but it has an orange one. If the numbers are different they work fine.
Logs
Logs
[Paste your logs here]Flutter Doctor output
Doctor output
Restarted application in 1.576ms.
I/BLASTBufferQueue_Java( 1305): update, w= 1080 h= 2340 mName = VRI[MainActivity]@d892688 mNativeObject= 0xb4000078404129b0 sc.mNativeObject= 0xb400007850393490 format= -3 caller= android.view.ViewRootImpl.updateBlastSurfaceIfNeeded:3379 android.view.ViewRootImpl.relayoutWindow:11331 android.view.ViewRootImpl.performTraversals:4537 android.view.ViewRootImpl.doTraversal:3701 android.view.ViewRootImpl$TraversalRunnable.run:12509 android.view.Choreographer$CallbackRecord.run:1751
I/VRI[MainActivity]@d892688( 1305): Relayout returned: old=(0,0,1080,2340) new=(0,0,1080,2340) relayoutAsync=true req=(1080,2340)0 dur=1 res=0x0 s={true 0xb4000079d0425dd0} ch=false seqId=0
I/VRI[MainActivity]@d892688( 1305): updateBoundsLayer: t=android.view.SurfaceControl$Transaction@182d8df sc=Surface(name=Bounds for - com.tangierdreams.flippy_pairs/com.tangierdreams.flippy_pairs.MainActivity@1)/@0xd9191d6 frame=3
I/VRI[MainActivity]@d892688( 1305): registerCallbackForPendingTransactions
I/VRI[MainActivity]@d892688( 1305): mWNT: t=0xb4000078a03ba0d0 mBlastBufferQueue=0xb4000078404129b0 fn= 3 HdrRenderState mRenderHdrSdrRatio=1.0 caller= android.view.ViewRootImpl$9.onFrameDraw:6269 android.view.ViewRootImpl$3.onFrameDraw:2433 android.view.ThreadedRenderer$1.onFrameDraw:761
I/BLASTBufferQueue_Java( 1305): applyPendingTransactions, mName= VRI[MainActivity]@d892688 mNativeObject= 0xb4000078404129b0 frameNumber= 3 caller= android.view.ViewRootImpl$9.lambda$onFrameDraw$0:6283 android.view.ViewRootImpl$9.$r8$lambda$oslup7xsfmiKu7EQNfqm1RHXE3w:0 android.view.ViewRootImpl$9$$ExternalSyntheticLambda0.onFrameCommit:0 android.view.ThreadedRenderer$1.lambda$onFrameDraw$0:773 android.view.ThreadedRenderer$1$$ExternalSyntheticLambda0.onFrameCommit:0 <bottom of call stack>
I/VRI[MainActivity]@d892688( 1305): call setFrameRateCategory for touch hint category=high hint, reason=touch, vri=VRI[MainActivity]@d892688
V/MediaPlayer-JNI( 1305): native_setup
V/MediaPlayerNative( 1305): constructor
V/MediaPlayerNative( 1305): setListener
V/MediaPlayer-JNI( 1305): get_session_id()
V/MediaPlayer-JNI( 1305): setParameter: key 1400
V/MediaPlayerNative( 1305): MediaPlayer::setParameter(1400)
V/MediaPlayer-JNI( 1305): reset
V/MediaPlayerNative( 1305): reset
V/MediaPlayer( 1305): resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer( 1305): cleanDrmObj: mDrmObj=null mDrmSessionId=null
V/MediaPlayer-JNI( 1305): setDataSourceFD: fd 188
V/MediaPlayerNative( 1305): setDataSource(188, 0, 576460752303423487)
V/MediaPlayer-JNI( 1305): setVolume: left 1.000000 right 1.000000
V/MediaPlayerNative( 1305): MediaPlayer::setVolume(1.000000, 1.000000)
V/MediaPlayer-JNI( 1305): setLooping: 0
V/MediaPlayerNative( 1305): MediaPlayer::setLooping
V/MediaPlayerNative( 1305): setVideoSurfaceTexture
V/MediaPlayerNative( 1305): prepareAsync
V/MediaPlayerNative( 1305): invoke 80
V/MediaPlayerNative( 1305): message received msg=200, ext1=10973, ext2=0
W/MediaPlayerNative( 1305): info/warning (10973, 0)
V/MediaPlayerNative( 1305): message received msg=1, ext1=0, ext2=0
V/MediaPlayerNative( 1305): MediaPlayer::notify() prepared
V/MediaPlayerNative( 1305): invoke 76
V/MediaPlayerNative( 1305): getDuration_l
V/MediaPlayer-JNI( 1305): getDuration: 2088 (msec)
V/MediaPlayer-JNI( 1305): getPlaybackSettings: 1.000000 1.000000 2 0
V/MediaPlayer-JNI( 1305): setPlaybackParams: 1:1.000000 1:1.000000 1:2 1:0
V/MediaPlayerNative( 1305): setPlaybackSettings: 1.000000 1.000000 2 0
V/MediaPlayerNative( 1305): message received msg=6, ext1=0, ext2=0
V/MediaPlayerNative( 1305): Received media started message
2
V/MediaPlayerNative( 1305): message received msg=211, ext1=0, ext2=0
W/WindowOnBackDispatcher( 1305): OnBackInvokedCallback is not enabled for the application.
W/WindowOnBackDispatcher( 1305): Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
V/MediaPlayerNative( 1305): message received msg=2, ext1=0, ext2=0
V/MediaPlayerNative( 1305): playback complete
V/MediaPlayerNative( 1305): message received msg=211, ext1=0, ext2=0
V/MediaPlayer-JNI( 1305): stop
V/MediaPlayerNative( 1305): stop
V/MediaPlayerNative( 1305): message received msg=8, ext1=0, ext2=0
V/MediaPlayer-JNI( 1305): reset
V/MediaPlayerNative( 1305): reset
V/MediaPlayer( 1305): resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer( 1305): cleanDrmObj: mDrmObj=null mDrmSessionId=null
V/MediaPlayer( 1305): resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
V/MediaPlayer( 1305): cleanDrmObj: mDrmObj=null mDrmSessionId=null
V/MediaPlayer-JNI( 1305): release
V/MediaPlayerNative( 1305): setListener
V/MediaPlayerNative( 1305): disconnect
V/MediaPlayerNative( 1305): destructor
V/MediaPlayerNative( 1305): disconnect
I/VRI[MainActivity]@d892688( 1305): call setFrameRateCategory for touch hint category=no preference, reason=boost timeout, vri=VRI[MainActivity]@d892688
I/VRI[MainActivity]@d892688( 1305): ViewPostIme key 0
2
I/VRI[MainActivity]@d892688( 1305): ViewPostIme key 1
D/SmartClipDataCropperImpl( 1305): doExtractSmartClipData : Extraction start! reqId = 24 Cropped area = Rect(540, 1170 - 541, 1171) Package = com.tangierdreams.flippy_pairs
D/SmartClipDataCropperImpl( 1305): addAppMetaTag : package name is com.tangierdreams.flippy_pairs
D/SmartClipDataCropperImpl( 1305): sendExtractionResultToSmartClipService : -- Extracted SmartClip data information --
D/SmartClipDataCropperImpl( 1305): sendExtractionResultToSmartClipService : Request Id : 24
D/SmartClipDataCropperImpl( 1305): sendExtractionResultToSmartClipService : Extraction mode : 1
D/SemSmartClipDataRepository( 1305): ----- Start of SmartClip repository informations -----
D/SemSmartClipDataRepository( 1305): ** Content type : image
D/SemSmartClipDataRepository( 1305): ** Meta area rect : Rect(0, 0 - 0, 0)
D/SemSmartClipDataRepository( 1305): ** Captured image file path : null
D/SemSmartClipDataRepository( 1305): ----- End of SmartClip repository informations -----
D/SmartClipDataCropperImpl( 1305): sendExtractionResultToSmartClipService : Elapsed = 5
I/ImeFocusController( 1305): onPreWindowFocus: skipped hasWindowFocus=false mHasImeFocus=true
I/ImeFocusController( 1305): onPostWindowFocus: skipped hasWindowFocus=false mHasImeFocus=true
D/SmartClipRemoteRequestDispatcher( 1305): dispatchScrollableAreaInfo : windowRect = Rect(0, 0 - 1080, 2340)
D/SmartClipRemoteRequestDispatcher( 1305): dispatchScrollableAreaInfo : Scrollable view count = 1
D/SmartClipRemoteRequestDispatcher( 1305): dispatchScrollableAreaInfo : Unscrollable view count = 0
D/SmartClipRemoteRequestDispatcher( 1305): dispatchScrollableAreaInfo : Pkg=com.tangierdreams.flippy_pairs Activity=null
I/InsetsController( 1305): onStateChanged: host=com.tangierdreams.flippy_pairs/com.tangierdreams.flippy_pairs.MainActivity, from=android.view.ViewRootImpl.handleResized:2782, state=InsetsState: {mDisplayFrame=Rect(0, 0 - 1080, 2340), mDisplayCutout=DisplayCutout{insets=Rect(0, 96 - 0, 0) waterfall=Insets{left=0, top=0, right=0, bottom=0} boundingRect={Bounds=[Rect(0, 0 - 0, 0), Rect(472, 0 - 608, 96), Rect(0, 0 - 0, 0), Rect(0, 0 - 0, 0)]} cutoutPathParserInfo={CutoutPathParserInfo{displayWidth=1080 displayHeight=2340 physicalDisplayWidth=1080 physicalDisplayHeight=2340 density={2.8125} cutoutSpec={M 0,0 H -24.177777778 V 34.13333333333333 H 24.177777778 V 0 H 0 Z @dp} rotation={0} scale={1.0} physicalPixelDisplaySizeRatio={1.0}}} sideOverrides={}}, mRoundedCorners=RoundedCorners{[RoundedCorner{position=TopLeft, radius=113, center=Point(113, 113)}, RoundedCorner{position=TopRight, radius=113, center=Point(967, 113)}, RoundedCorner{position=BottomRight, radius=113, center=Point(967, 2227)}, RoundedCorner{position=BottomLeft, radius=113, center=Point(113, 2227)}]} mRoundedCornerFrame=Rect(0, 0 - 1080, 2340), mPrivacyIndicatorBounds=PrivacyIndicatorBounds {static bounds=Rect(956, 0 - 1080, 96) rotation=0}, mDisplayShape=DisplayShape{ spec=-311912193 displayWidth=1080 displayHeight=2340 physicalPixelDisplaySizeRatio=1.0 rotation=0 offsetX=0 offsetY=0 scale=1.0}, mSources= { InsetsSource: {c3d20001 mType=navigationBars mFrame=[0,2205][1080,2340] mVisible=true mFlags= mSideHint=BOTTOM mBoundingRects=null}, InsetsSource: {c3d20004 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {c3d20005 mType=mandatorySystemGestures mFrame=[0,2205][1080,2340] mVisible=true mFlags= mSideHint=BOTTOM mBoundingRects=null}, InsetsSource: {c3d20006 mType=tappableElement mFrame=[0,2205][1080,2340] mVisible=true mFlags= mSideHint=BOTTOM mBoundingRects=null}, InsetsSource: {c3d20024 mType=systemGestures mFrame=[0,0][0,0] mVisible=true mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {3 mType=ime mFrame=[0,0][0,0] mVisible=false mFlags= mSideHint=NONE mBoundingRects=null}, InsetsSource: {27 mType=displayCutout mFrame=[0,0][1080,96] mVisible=true mFlags= mSideHint=TOP mBoundingRects=null}, InsetsSource: {5f240000 mType=statusBars mFrame=[0,0][1080,96] mVisible=false mFlags= mSideHint=TOP mBoundingRects=null}, InsetsSource: {5f240005 mType=mandatorySystemGestures mFrame=[0,0][1080,130] mVisible=true mFlags= mSideHint=TOP mBoundingRects=null}, InsetsSource: {5f240006 mType=tappableElement mFrame=[0,0][1080,96] mVisible=true mFlags= mSideHint=TOP mBoundingRects=null} }
I/VRI[MainActivity]@d892688( 1305): handleResized, frames=ClientWindowFrames{frame=[0,0][1080,2340] display=[0,0][1080,2340] parentFrame=[0,0][0,0]} displayId=0 dragResizing=false compatScale=1.0 frameChanged=false attachedFrameChanged=false configChanged=false displayChanged=false compatScaleChanged=false dragResizingChanged=false
D/InputTransport( 1305): Input channel destroyed: 'ClientS', fd=181
I/VRI[MainActivity]@d892688( 1305): handleAppVisibility mAppVisible = true visible = false
D/VRI[MainActivity]@d892688( 1305): visibilityChanged oldVisibility=true newVisibility=false
I/SurfaceView@343751f( 1305): onWindowVisibilityChanged(8) false io.flutter.embedding.android.FlutterSurfaceView{343751f V.E...... ........ 0,0-1080,2340} of VRI[MainActivity]@d892688
I/SurfaceView( 1305): 54752543 Changes: creating=false format=false size=false visible=true alpha=false hint=false visible=true left=false top=false z=false attached=true lifecycleStrategy=false
I/SurfaceView( 1305): 54752543 Cur surface: Surface(name=null mNativeObject=-5476376623698097840)/@0x289cda6
I/SurfaceView( 1305): 54752543 surfaceDestroyed
I/SurfaceView@343751f( 1305): surfaceDestroyed callback.size 1 #2 io.flutter.embedding.android.FlutterSurfaceView{343751f V.E...... ........ 0,0-1080,2340}
I/SurfaceView@343751f( 1305): updateSurface: mVisible = false mSurface.isValid() = true
I/SurfaceView@343751f( 1305): releaseSurfaces: viewRoot = VRI[MainActivity]@d892688
V/SurfaceView( 1305): Layout: x=0 y=0 w=1080 h=2340, frame=Rect(0, 0 - 1080, 2340)
D/SurfaceView( 1305): 234348907 windowPositionLost, frameNr = 0
D/HWUI ( 1305): CacheManager::trimMemory(20)
I/VRI[MainActivity]@d892688( 1305): Relayout returned: old=(0,0,1080,2340) new=(0,0,1080,2340) relayoutAsync=false req=(1080,2340)8 dur=19 res=0x2 s={false 0x0} ch=true seqId=0
I/SurfaceView@343751f( 1305): windowStopped(true) false io.flutter.embedding.android.FlutterSurfaceView{343751f V.E...... ........ 0,0-1080,2340} of VRI[MainActivity]@d892688
D/SurfaceView@343751f( 1305): updateSurface: surface is not valid
I/SurfaceView@343751f( 1305): releaseSurfaces: viewRoot = VRI[MainActivity]@d892688
D/VRI[MainActivity]@d892688( 1305): applyTransactionOnDraw applyImmediately
D/SurfaceView@343751f( 1305): updateSurface: surface is not valid
I/SurfaceView@343751f( 1305): releaseSurfaces: viewRoot = VRI[MainActivity]@d892688
D/VRI[MainActivity]@d892688( 1305): applyTransactionOnDraw applyImmediately
D/VRI[MainActivity]@d892688( 1305): Not drawing due to not visible. Reason=!mAppVisible && !mForceDecorViewVisibility
D/VRI[MainActivity]@d892688( 1305): Pending transaction will not be applied in sync with a draw due to view not visible
D/HWUI ( 1305): CacheManager::trimMemory(20)
I/VRI[MainActivity]@d892688( 1305): stopped(true) old = false
D/VRI[MainActivity]@d892688( 1305): WindowStopped on com.tangierdreams.flippy_pairs/com.tangierdreams.flippy_pairs.MainActivity set to true
D/HWUI ( 1305): CacheManager::trimMemory(20)
D/SurfaceView@343751f( 1305): updateSurface: surface is not valid
I/SurfaceView@343751f( 1305): releaseSurfaces: viewRoot = VRI[MainActivity]@d892688
D/VRI[MainActivity]@d892688( 1305): applyTransactionOnDraw applyImmediately
D/SurfaceView@343751f( 1305): updateSurface: surface is not valid
I/SurfaceView@343751f( 1305): releaseSurfaces: viewRoot = VRI[MainActivity]@d892688
D/VRI[MainActivity]@d892688( 1305): applyTransactionOnDraw applyImmediately
D/Choreographer( 1305): CoreRune.SYSPERF_ACTIVE_APP_BBA_ENABLE : stop animation in background states
D/HWUI ( 1305): CacheManager::trimMemory(40)
Lost connection to device.Metadata
Metadata
Assignees
Labels
in triagePresently being triaged by the triage teamPresently being triaged by the triage teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter respondsThe Flutter team cannot make further progress on this issue until the original reporter responds
