Merge branch 'krille/fix-image-viewer' into 'master'
Fix imageviewer See merge request ChristianPauly/fluffychat-flutter!67
This commit is contained in:
commit
b6fcc32041
|
@ -1,9 +1,11 @@
|
|||
# Version 0.14.0 - 2020-??-??
|
||||
# Version 0.14.0 - 2020-05-20
|
||||
### Features:
|
||||
- Implement image viewer
|
||||
- Implement room pills
|
||||
- New chat appBar showing presences and room avatars
|
||||
- Implement well-known support
|
||||
### Fixes:
|
||||
- Minor fixes, refactoring and performance improvements
|
||||
|
||||
# Version 0.13.2 - 2020-05-13
|
||||
### Fixes:
|
||||
|
|
|
@ -8,11 +8,17 @@ class ImageBubble extends StatefulWidget {
|
|||
final Event event;
|
||||
final bool tapToView;
|
||||
final BoxFit fit;
|
||||
final bool maxSize;
|
||||
final Color backgroundColor;
|
||||
final double radius;
|
||||
|
||||
const ImageBubble(
|
||||
this.event, {
|
||||
this.tapToView = true,
|
||||
this.maxSize = true,
|
||||
this.backgroundColor,
|
||||
this.fit = BoxFit.cover,
|
||||
this.radius = 10.0,
|
||||
Key key,
|
||||
}) : super(key: key);
|
||||
|
||||
|
@ -39,12 +45,12 @@ class _ImageBubbleState extends State<ImageBubble> {
|
|||
Widget build(BuildContext context) {
|
||||
return Bubble(
|
||||
padding: BubbleEdges.all(0),
|
||||
radius: Radius.circular(10),
|
||||
color: Theme.of(context).secondaryHeaderColor,
|
||||
radius: Radius.circular(widget.radius),
|
||||
color: widget.backgroundColor ?? Theme.of(context).secondaryHeaderColor,
|
||||
elevation: 0,
|
||||
child: Container(
|
||||
height: 300,
|
||||
width: 400,
|
||||
height: widget.maxSize ? 300 : null,
|
||||
width: widget.maxSize ? 400 : null,
|
||||
child: Builder(
|
||||
builder: (BuildContext context) {
|
||||
if (_error != null) {
|
||||
|
|
|
@ -19,13 +19,15 @@ class ImageView extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.black,
|
||||
extendBodyBehindAppBar: true,
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.close),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
color: Colors.white,
|
||||
),
|
||||
backgroundColor: Colors.black,
|
||||
backgroundColor: Color(0x44000000),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.reply),
|
||||
|
@ -42,8 +44,14 @@ class ImageView extends StatelessWidget {
|
|||
body: ZoomableWidget(
|
||||
minScale: 1.0,
|
||||
maxScale: 10.0,
|
||||
panLimit: 0.0,
|
||||
child: ImageBubble(event, tapToView: false, fit: BoxFit.contain),
|
||||
child: ImageBubble(
|
||||
event,
|
||||
tapToView: false,
|
||||
fit: BoxFit.contain,
|
||||
backgroundColor: Colors.black,
|
||||
maxSize: false,
|
||||
radius: 0.0,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue