@@ -67,63 +67,62 @@ class ImageDetailsCard extends StatelessWidget {
6767 ),
6868 );
6969
70- Widget _imageDetails (context) => Container (
71- margin: EdgeInsets .symmetric (vertical: 8.0 ),
72- padding: EdgeInsets .only (top: 8.0 , bottom: 8.0 , right: 8.0 ),
73- decoration: BoxDecoration (
74- borderRadius: BorderRadius .horizontal (right: Radius .circular (10.0 )),
75- color: Theme .of (context).cardColor,
76- ),
77- child: Column (
78- crossAxisAlignment: CrossAxisAlignment .stretch,
79- children: [
80- Text (
81- "${image .width }x${image .height } pixels" ,
82- maxLines: 1 ,
83- overflow: TextOverflow .ellipsis,
84- style: Theme .of (context).textTheme.bodySmall,
85- ),
86- Padding (
87- padding: const EdgeInsets .only (top: 4.0 ),
88- child: Row (
89- children: [
90- Flexible (
91- child: Text (
92- image.file.replaceAll ('' , '\u 200B' ).split (path.extension (image.file))[0 ],
93- maxLines: 1 ,
94- overflow: TextOverflow .ellipsis,
95- style: Theme .of (context).textTheme.bodySmall,
96- ),
97- ),
98- Text (
99- path.extension (image.file),
70+ Widget _imageDetails (context) {
71+ return Container (
72+ margin: EdgeInsets .symmetric (vertical: 8.0 ),
73+ padding: EdgeInsets .only (top: 8.0 , bottom: 8.0 , right: 8.0 ),
74+ decoration: BoxDecoration (
75+ borderRadius: BorderRadius .horizontal (right: Radius .circular (10.0 )),
76+ color: Theme .of (context).cardColor,
77+ ),
78+ child: Column (
79+ crossAxisAlignment: CrossAxisAlignment .stretch,
80+ children: [
81+ Text (
82+ "${image .width }x${image .height } pixels" ,
83+ maxLines: 1 ,
84+ overflow: TextOverflow .ellipsis,
85+ style: Theme .of (context).textTheme.bodySmall,
86+ ),
87+ Padding (
88+ padding: const EdgeInsets .only (top: 4.0 ),
89+ child: Row (
90+ children: [
91+ Flexible (
92+ child: Text (
93+ image.file.replaceAll ('' , '\u 200B' ).split (path.extension (image.file))[0 ],
94+ maxLines: 1 ,
10095 overflow: TextOverflow .ellipsis,
10196 style: Theme .of (context).textTheme.bodySmall,
10297 ),
103- ],
104- ),
105- ),
106- if (image.dateAvailable != null )
107- Padding (
108- padding: const EdgeInsets .only (top: 4.0 ),
109- child: Flexible (
110- child: Builder (builder: (context) {
111- LocaleNotifier localeNotifier = Provider .of <LocaleNotifier >(context, listen: false );
112- String date =
113- DateFormat .yMMMMd (localeNotifier.locale.languageCode).format (DateTime .parse (image.dateAvailable! ));
114- String time = DateFormat .Hms (localeNotifier.locale.languageCode).format (DateTime .parse (image.dateAvailable! ));
115- return Text (
116- "$date $time " ,
117- maxLines: 2 ,
118- overflow: TextOverflow .ellipsis,
119- style: Theme .of (context).textTheme.bodySmall,
120- );
121- }),
12298 ),
123- ),
124- ],
125- ),
126- );
99+ Text (
100+ path.extension (image.file),
101+ overflow: TextOverflow .ellipsis,
102+ style: Theme .of (context).textTheme.bodySmall,
103+ ),
104+ ],
105+ ),
106+ ),
107+ if (image.dateAvailable != null )
108+ Padding (
109+ padding: const EdgeInsets .only (top: 4.0 ),
110+ child: Builder (builder: (context) {
111+ LocaleNotifier localeNotifier = Provider .of <LocaleNotifier >(context, listen: false );
112+ String date = DateFormat .yMMMMd (localeNotifier.locale.languageCode).format (DateTime .parse (image.dateAvailable! ));
113+ String time = DateFormat .Hms (localeNotifier.locale.languageCode).format (DateTime .parse (image.dateAvailable! ));
114+ return Text (
115+ "$date $time " ,
116+ maxLines: 2 ,
117+ overflow: TextOverflow .ellipsis,
118+ style: Theme .of (context).textTheme.bodySmall,
119+ );
120+ }),
121+ ),
122+ ],
123+ ),
124+ );
125+ }
127126
128127 Widget _removeButton (context) => Positioned (
129128 bottom: 0.0 ,
0 commit comments