Skip to content
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

[animations]Fix : Card text renderflex overflowed #8399

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/animations/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

* Updates minimum supported SDK version to Flutter 3.22/Dart 3.4.

## 2.0.12

* Fixes `renderflex overflowed` on `example`.

## 2.0.11

* Fixes new lint warnings.
Expand Down
42 changes: 23 additions & 19 deletions packages/animations/example/lib/container_transition.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
import 'package:animations/animations.dart';
import 'package:flutter/material.dart';

const String _loremIpsumParagraph =
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod '
const String _loremIpsumParagraph = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod '
'tempor incididunt ut labore et dolore magna aliqua. Vulputate dignissim '
'suspendisse in est. Ut ornare lectus sit amet. Eget nunc lobortis mattis '
'aliquam faucibus purus in. Hendrerit gravida rutrum quisque non tellus '
Expand Down Expand Up @@ -49,8 +48,7 @@ class OpenContainerTransformDemo extends StatefulWidget {
}
}

class _OpenContainerTransformDemoState
extends State<OpenContainerTransformDemo> {
class _OpenContainerTransformDemoState extends State<OpenContainerTransformDemo> {
ContainerTransitionType _transitionType = ContainerTransitionType.fade;

void _showMarkedAsDoneSnackbar(bool? isMarkedAsDone) {
Expand Down Expand Up @@ -84,9 +82,8 @@ class _OpenContainerTransformDemoState
onPressed: (int index) {
setModalState(() {
setState(() {
_transitionType = index == 0
? ContainerTransitionType.fade
: ContainerTransitionType.fadeThrough;
_transitionType =
index == 0 ? ContainerTransitionType.fade : ContainerTransitionType.fadeThrough;
});
});
},
Expand Down Expand Up @@ -333,12 +330,11 @@ class _ExampleCard extends StatelessWidget {
bottom: 16.0,
),
child: Text(
'Lorem ipsum dolor sit amet, consectetur '
'Lorem ipsum dolor sit amet, consectetsssur '
'adipiscing elit, sed do eiusmod tempor.',
style: Theme.of(context)
.textTheme
.bodyMedium!
.copyWith(color: Colors.black54),
style: Theme.of(context).textTheme.bodyMedium!.copyWith(color: Colors.black54),
maxLines: 4,
overflow: TextOverflow.ellipsis,
),
),
],
Expand Down Expand Up @@ -386,9 +382,13 @@ class _SmallerCard extends StatelessWidget {
style: Theme.of(context).textTheme.titleLarge,
),
const SizedBox(height: 4),
Text(
subtitle,
style: Theme.of(context).textTheme.bodySmall,
Flexible(
child: Text(
subtitle,
style: Theme.of(context).textTheme.bodySmall,
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
),
],
),
Expand Down Expand Up @@ -436,10 +436,14 @@ class _ExampleSingleTile extends StatelessWidget {
style: Theme.of(context).textTheme.titleMedium,
),
const SizedBox(height: 8),
Text(
'Lorem ipsum dolor sit amet, consectetur '
'adipiscing elit,',
style: Theme.of(context).textTheme.bodySmall),
Flexible(
child: Text(
'Lorem ipsum dolor sit amet, consectetur '
'adipiscing elit,',
style: Theme.of(context).textTheme.bodySmall,
maxLines: 2,
overflow: TextOverflow.ellipsis),
),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion packages/animations/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: animations
description: Fancy pre-built animations that can easily be integrated into any Flutter application.
repository: https://github.com/flutter/packages/tree/main/packages/animations
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+animations%22
version: 2.0.11
version: 2.0.15

environment:
sdk: ^3.4.0
Expand Down
Loading