-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SizedBox height is ignored when child Image has BoxFit.fill In An AppBar #52945
Labels
a: images
Loading, displaying, rendering images
a: quality
A truly polished experience
f: material design
flutter/packages/flutter/material repository.
found in release: 3.0
Found to occur in 3.0
found in release: 3.1
Found to occur in 3.1
framework
flutter/packages/flutter repository. See also f: labels.
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
team-design
Owned by Design Languages team
triaged-design
Triaged by Design Languages team
Comments
If I set to BoxFit.fill => image will have max height of appbar |
VladyslavBondarenko
changed the title
Image in actions appbar can't set height
SizedBox height is ignored when child Image has BoxFit.fill
Mar 20, 2020
VladyslavBondarenko
added
f: material design
flutter/packages/flutter/material repository.
framework
flutter/packages/flutter repository. See also f: labels.
labels
Mar 20, 2020
Issue still exist Code Sample
flutter doctor -v
flutter doctor -v
|
TahaTesser
added
a: quality
A truly polished experience
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
labels
Apr 9, 2020
TahaTesser
changed the title
SizedBox height is ignored when child Image has BoxFit.fill
SizedBox height is ignored when child Image has BoxFit.fill In An AppBar
Apr 9, 2020
TahaTesser
added
found in release: 1.20
Found to occur in 1.20
found in release: 1.18
Occurs in 1.18
labels
Jul 31, 2020
Still reproducible as of stable 3.0.3 and master 3.1.0 the expected output is the third image in the appbar should be same as the one shown in the center of the screen code sampleimport 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: 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<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('My Favourite'),
centerTitle: true,
actions: <Widget>[
Padding(
padding: const EdgeInsets.only(right: 8.0),
child: Image.asset(
'assets/dash.png',
height: 25,
width: 25,
fit: BoxFit.fitWidth,
),
),
Padding(
padding: const EdgeInsets.only(right: 8.0),
child: Image.asset(
'assets/dash.png',
height: 25,
width: 25,
fit: BoxFit.fitHeight,
),
),
SizedBox(
height: 10,
width: 25,
child: Image.asset(
'assets/dash.png',
height: 1,
width: 25,
fit: BoxFit.fill,
),
),
],
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
SizedBox(
height: 10,
width: 25,
child: Image.asset(
'assets/dash.png',
height: 1,
width: 25,
fit: BoxFit.fill,
),
),
],
),
),
);
}
}
flutter doctor -v (mac)
|
maheshmnj
added
found in release: 3.0
Found to occur in 3.0
found in release: 3.1
Found to occur in 3.1
a: images
Loading, displaying, rendering images
and removed
found in release: 1.18
Occurs in 1.18
found in release: 1.20
Found to occur in 1.20
labels
Jun 30, 2022
flutter-triage-bot
bot
added
multiteam-retriage-candidate
team-design
Owned by Design Languages team
triaged-design
Triaged by Design Languages team
labels
Jul 8, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
a: images
Loading, displaying, rendering images
a: quality
A truly polished experience
f: material design
flutter/packages/flutter/material repository.
found in release: 3.0
Found to occur in 3.0
found in release: 3.1
Found to occur in 3.1
framework
flutter/packages/flutter repository. See also f: labels.
has reproducible steps
The issue has been confirmed reproducible and is ready to work on
team-design
Owned by Design Languages team
triaged-design
Triaged by Design Languages team
I have wrap image by sizedBox and set height = 1 , also set height of image but image still get max height of appbar
my code
The text was updated successfully, but these errors were encountered: