-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.12Found to occur in 3.12Found to occur in 3.12frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
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
Run the code snippet as it has 2 ExpansionTile
a. ExpansionTile 1 which takes shape from ExpansionTileTheme
b. ExpansionTile 2 where shape is passed directly
Expected results
Both the ExpansionTile on expanded should have red outline.
Actual results
ExpansionTile 1 border color is default color (should have taken shape from ExpansionTileTheme)
ExpansionTile 2 border color is red (which is correct)
Code sample
Code sample
import 'package:flutter/material.dart';
/// Flutter code sample for [ExpansionTile].
void main() => runApp(const ExpansionTileApp());
class ExpansionTileApp extends StatelessWidget {
const ExpansionTileApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(useMaterial3: true),
home: Scaffold(
appBar: AppBar(title: const Text('ExpansionTile Sample')),
body: const ExpansionTileExample(),
),
);
}
}
class ExpansionTileExample extends StatelessWidget {
const ExpansionTileExample({super.key});
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
ExpansionTileTheme(
data: ExpansionTileThemeData(
shape: Border.all(color: Colors.red),
),
child: const ExpansionTile(
title: Text('ExpansionTile 1'),
initiallyExpanded: true,
children: <Widget>[
ListTile(title: Text('This is tile number 1')),
],
),
),
ExpansionTile(
title: const Text('ExpansionTile 2'),
shape: Border.all(color: Colors.red),
initiallyExpanded: true,
children: const <Widget>[
ListTile(title: Text('This is tile number 2')),
],
),
],
);
}
}Screenshots or Video
Screenshots / Video demonstration
Logs
No response
Flutter Doctor output
Ran it on dartpad.dev
Metadata
Metadata
Assignees
Labels
f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.12Found to occur in 3.12Found to occur in 3.12frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team