Skip to content

Commit

Permalink
πŸ› (fix) Display error when adding image in tweeet compose.
Browse files Browse the repository at this point in the history
  • Loading branch information
softdevbx committed Jan 8, 2022
1 parent 63c92dd commit 0dc3d05
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/ui/page/feed/composeTweet/widget/composeTweetImage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import 'package:flutter_twitter_clone/ui/theme/theme.dart';

class ComposeTweetImage extends StatelessWidget {
final File? image;
final Function? onCrossIconPressed;
const ComposeTweetImage({Key? key, this.image, this.onCrossIconPressed})
final VoidCallback onCrossIconPressed;
const ComposeTweetImage(
{Key? key, this.image, required this.onCrossIconPressed})
: super(key: key);
@override
Widget build(BuildContext context) {
Expand Down Expand Up @@ -39,7 +40,7 @@ class ComposeTweetImage extends StatelessWidget {
child: IconButton(
padding: const EdgeInsets.all(0),
iconSize: 20,
onPressed: onCrossIconPressed!(),
onPressed: onCrossIconPressed,
icon: Icon(
Icons.close,
color: Theme.of(context).colorScheme.onPrimary,
Expand Down

0 comments on commit 0dc3d05

Please sign in to comment.