Skip to content

Commit

Permalink
Format example
Browse files Browse the repository at this point in the history
  • Loading branch information
gskinner committed Apr 7, 2022
1 parent 7bef298 commit ea0bfb4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
19 changes: 13 additions & 6 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -95,25 +95,32 @@ class _MyHomePageState extends State<MyHomePage> {
),
alignment: Alignment.center,
fit: BoxFit.cover,
loadingBuilder: (BuildContext context, Widget child, ImageChunkEvent? event) {
loadingBuilder:
(BuildContext context, Widget child, ImageChunkEvent? event) {
if (event == null) {
return child;
}
return Center(
child: CircularProgressIndicator(
value:
event.expectedTotalBytes == null ? 0.0 : event.cumulativeBytesLoaded / event.expectedTotalBytes!),
value: event.expectedTotalBytes == null
? 0.0
: event.cumulativeBytesLoaded /
event.expectedTotalBytes!),
);
},
errorBuilder: (BuildContext context, Widget? child, dynamic exception) {
errorBuilder:
(BuildContext context, Widget? child, dynamic exception) {
return Container(
color: Color(0xFF6F6D6A),
child: Center(child: Icon(Icons.warning, color: Colors.black26, size: 128.0)),
child: Center(
child:
Icon(Icons.warning, color: Colors.black26, size: 128.0)),
);
},
))
]),
floatingActionButton: Row(mainAxisAlignment: MainAxisAlignment.end, children: [
floatingActionButton:
Row(mainAxisAlignment: MainAxisAlignment.end, children: [
FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Next',
Expand Down
1 change: 0 additions & 1 deletion lib/image_fade.dart
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ class _ImageFadeState extends State<ImageFade> with TickerProviderStateMixin {
}

Widget? _buildFade({Widget? child, required Animation<double> opacity}) {
print('is RawImage: ${child is RawImage}');
return child == null
? null
: (child is RawImage)
Expand Down

0 comments on commit ea0bfb4

Please sign in to comment.