fix : Différentes erreurs
This commit is contained in:
@@ -5,13 +5,12 @@ import 'package:flutter/material.dart';
|
||||
class ReadMoreText extends StatefulWidget {
|
||||
const ReadMoreText(
|
||||
this.text, {
|
||||
Key? key,
|
||||
super.key,
|
||||
this.trimLines = 2,
|
||||
this.collapsedText = '... read more',
|
||||
this.expandedText = ' read less',
|
||||
this.textStyle,
|
||||
}) : assert(text != null),
|
||||
super(key: key);
|
||||
}) : assert(text != null);
|
||||
|
||||
final String text;
|
||||
final int trimLines;
|
||||
@@ -69,7 +68,7 @@ class ReadMoreTextState extends State<ReadMoreText> {
|
||||
textSize.height,
|
||||
));
|
||||
endIndex = textPainter.getOffsetBefore(pos.offset);
|
||||
var textSpan;
|
||||
TextSpan textSpan;
|
||||
if (textPainter.didExceedMaxLines) {
|
||||
textSpan = TextSpan(
|
||||
text: _readMore
|
||||
|
||||
@@ -14,7 +14,7 @@ class AnimatorWidget extends StatefulWidget {
|
||||
final double? aspectRatio; // Nouveau paramètre pour le ratio (largeur/hauteur)
|
||||
|
||||
const AnimatorWidget({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.authorName,
|
||||
required this.authorImageUrl,
|
||||
this.publishDate,
|
||||
@@ -26,7 +26,7 @@ class AnimatorWidget extends StatefulWidget {
|
||||
this.onComment,
|
||||
this.onShare,
|
||||
this.aspectRatio, // null = ratio naturel de l'image, ex: 16/9, 4/3, 1/1
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
State<AnimatorWidget> createState() => _AnimatorWidgetWidgetState();
|
||||
|
||||
@@ -15,7 +15,7 @@ class PostCardWidget extends StatelessWidget {
|
||||
final VoidCallback? onShare;
|
||||
|
||||
const PostCardWidget({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.title,
|
||||
required this.content,
|
||||
required this.authorName,
|
||||
@@ -28,7 +28,7 @@ class PostCardWidget extends StatelessWidget {
|
||||
this.onLike,
|
||||
this.onComment,
|
||||
this.onShare,
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -109,7 +109,7 @@ class PostCardWidget extends StatelessWidget {
|
||||
|
||||
// Images avec boutons d'action si présentes
|
||||
if (imageUrls != null && imageUrls!.isNotEmpty)
|
||||
Container(
|
||||
SizedBox(
|
||||
//margin: const EdgeInsets.symmetric(vertical: 12.0),
|
||||
height: 200,
|
||||
child: Stack(
|
||||
|
||||
@@ -18,7 +18,7 @@ class PostCardWidget extends StatefulWidget {
|
||||
final double? aspectRatio; // Nouveau paramètre pour le ratio (largeur/hauteur)
|
||||
|
||||
const PostCardWidget({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.title,
|
||||
required this.content,
|
||||
required this.authorName,
|
||||
@@ -32,7 +32,7 @@ class PostCardWidget extends StatefulWidget {
|
||||
this.onComment,
|
||||
this.onShare,
|
||||
this.aspectRatio, // null = ratio naturel de l'image, ex: 16/9, 4/3, 1/1
|
||||
}) : super(key: key);
|
||||
});
|
||||
|
||||
@override
|
||||
State<PostCardWidget> createState() => _PostCardWidgetState();
|
||||
@@ -129,7 +129,7 @@ class _PostCardWidgetState extends State<PostCardWidget> {
|
||||
builder: (context, snapshot) {
|
||||
final imageHeight = snapshot.data ?? 200.0; // Hauteur par défaut si pas encore calculée
|
||||
|
||||
return Container(
|
||||
return SizedBox(
|
||||
height: imageHeight,
|
||||
child: Stack(
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user