espero que nao presisse mudar.
This commit is contained in:
@@ -677,74 +677,73 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
],
|
||||
);
|
||||
|
||||
Widget mainContent = Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () => _showTeamSelector(context),
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(12 * context.sf),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).cardTheme.color,
|
||||
borderRadius:
|
||||
BorderRadius.circular(15 * context.sf),
|
||||
border:
|
||||
Border.all(color: Colors.grey.withOpacity(0.2)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(children: [
|
||||
(_selectedTeamLogo != null &&
|
||||
_selectedTeamLogo!.isNotEmpty)
|
||||
? ClipOval(
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: _selectedTeamLogo!,
|
||||
width: 24 * context.sf,
|
||||
height: 24 * context.sf,
|
||||
fit: BoxFit.cover,
|
||||
placeholder: (context, url) => Icon(
|
||||
Icons.shield,
|
||||
color: AppTheme.primaryRed,
|
||||
size: 24 * context.sf),
|
||||
errorWidget:
|
||||
(context, url, error) => Icon(
|
||||
Icons.shield,
|
||||
color: AppTheme.primaryRed,
|
||||
size: 24 * context.sf),
|
||||
),
|
||||
)
|
||||
: Icon(Icons.shield,
|
||||
color: AppTheme.primaryRed,
|
||||
size: 24 * context.sf),
|
||||
SizedBox(width: 10 * context.sf),
|
||||
Text(_selectedTeamName,
|
||||
style: TextStyle(
|
||||
fontSize: 16 * context.sf,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: textColor)),
|
||||
]),
|
||||
Icon(Icons.arrow_drop_down, color: textColor),
|
||||
],
|
||||
),
|
||||
),
|
||||
final Widget teamSelector = InkWell(
|
||||
onTap: () => _showTeamSelector(context),
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(12 * context.sf),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).cardTheme.color,
|
||||
borderRadius: BorderRadius.circular(15 * context.sf),
|
||||
border: Border.all(color: Colors.grey.withOpacity(0.2)),
|
||||
),
|
||||
SizedBox(height: 20 * context.sf),
|
||||
if (!isWide) ...[
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Row(children: [
|
||||
(_selectedTeamLogo != null && _selectedTeamLogo!.isNotEmpty)
|
||||
? ClipOval(
|
||||
child: CachedNetworkImage(
|
||||
imageUrl: _selectedTeamLogo!,
|
||||
width: 24 * context.sf,
|
||||
height: 24 * context.sf,
|
||||
fit: BoxFit.cover,
|
||||
placeholder: (context, url) => Icon(
|
||||
Icons.shield,
|
||||
color: AppTheme.primaryRed,
|
||||
size: 24 * context.sf),
|
||||
errorWidget: (context, url, error) => Icon(
|
||||
Icons.shield,
|
||||
color: AppTheme.primaryRed,
|
||||
size: 24 * context.sf),
|
||||
),
|
||||
)
|
||||
: Icon(Icons.shield, color: AppTheme.primaryRed, size: 24 * context.sf),
|
||||
SizedBox(width: 10 * context.sf),
|
||||
Text(_selectedTeamName,
|
||||
style: TextStyle(fontSize: 16 * context.sf, fontWeight: FontWeight.bold, color: textColor)),
|
||||
]),
|
||||
Icon(Icons.arrow_drop_down, color: textColor),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Widget mainContent;
|
||||
if (isWide) {
|
||||
mainContent = Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
teamSelector,
|
||||
SizedBox(height: 20 * context.sf),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(flex: 5, child: statsSection),
|
||||
SizedBox(width: 20 * context.sf),
|
||||
Expanded(flex: 6, child: historySection),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
} else {
|
||||
mainContent = Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
teamSelector,
|
||||
SizedBox(height: 20 * context.sf),
|
||||
statsSection,
|
||||
SizedBox(height: 40 * context.sf),
|
||||
historySection,
|
||||
]
|
||||
],
|
||||
);
|
||||
|
||||
if (isWide) {
|
||||
mainContent = Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(flex: 5, child: statsSection),
|
||||
SizedBox(width: 20 * context.sf),
|
||||
Expanded(flex: 6, child: historySection),
|
||||
],
|
||||
);
|
||||
}
|
||||
@@ -1116,4 +1115,4 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user