load indicator on image grid
center load indicator on directory load support for trackpads
This commit is contained in:
parent
cc2f9dbb94
commit
9373df296c
@ -107,9 +107,7 @@ class _ImageGridState extends State<ImageGrid> {
|
||||
}
|
||||
}
|
||||
|
||||
return const CircularProgressIndicator(
|
||||
strokeWidth: 3,
|
||||
);
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
},
|
||||
);
|
||||
}
|
||||
|
@ -19,9 +19,9 @@ class ImageTile extends StatelessWidget {
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(3),
|
||||
child: Container(
|
||||
decoration: imageUri == null
|
||||
? BoxDecoration(
|
||||
child: imageUri == null
|
||||
? Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(calcTileMaxWidth() / 30)),
|
||||
@ -30,12 +30,10 @@ class ImageTile extends StatelessWidget {
|
||||
color: Colors.black12,
|
||||
spreadRadius: calcTileMaxWidth() / 150,
|
||||
blurRadius: calcTileMaxWidth() / 60),
|
||||
])
|
||||
: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.cover,
|
||||
image: dtaProvider!.getImageProvider(imageUri!),
|
||||
),
|
||||
]),
|
||||
child: child)
|
||||
: Container(
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(calcTileMaxWidth() / 30)),
|
||||
boxShadow: [
|
||||
@ -44,7 +42,23 @@ class ImageTile extends StatelessWidget {
|
||||
spreadRadius: calcTileMaxWidth() / 150,
|
||||
blurRadius: calcTileMaxWidth() / 60),
|
||||
]),
|
||||
child: child)),
|
||||
);
|
||||
child: ClipRRect(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(calcTileMaxWidth() / 30),
|
||||
),
|
||||
child: Image(
|
||||
fit: BoxFit.cover,
|
||||
frameBuilder:
|
||||
(context, child, frame, wasSynchronouslyLoaded) {
|
||||
return frame == null
|
||||
? const Center(
|
||||
child: CircularProgressIndicator(),
|
||||
)
|
||||
: child;
|
||||
},
|
||||
image: dtaProvider!.getImageProvider(imageUri!),
|
||||
)),
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ class AppScrollBehavior extends MaterialScrollBehavior {
|
||||
Set<PointerDeviceKind> get dragDevices => {
|
||||
PointerDeviceKind.touch,
|
||||
PointerDeviceKind.mouse,
|
||||
PointerDeviceKind.trackpad
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user