60 lines
1.6 KiB
Dart
60 lines
1.6 KiB
Dart
import "package:crab_ui/structs.dart";
|
|
import "package:flutter/material.dart";
|
|
|
|
class AttachmentWidget extends StatelessWidget {
|
|
final AttachmentResponse attachment;
|
|
AttachmentWidget({required this.attachment});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
color: Colors.black38,
|
|
child: Stack(
|
|
// appBar: AppBar(title: Text('New Tab Content')),
|
|
children: <Widget> [
|
|
|
|
Container(
|
|
color: Colors.white,
|
|
child: Padding(
|
|
padding: EdgeInsets.fromLTRB(10, 20, 0, 10),
|
|
child: Row(
|
|
|
|
children: [
|
|
CloseButton(
|
|
onPressed: () => {
|
|
Navigator.pop(context)
|
|
}
|
|
),
|
|
Text(
|
|
attachment.name.toString(), //its alr a string but incase ¯\(ツ)/¯
|
|
style: TextStyle(
|
|
color: Colors.black,
|
|
fontSize: 20,
|
|
decoration: TextDecoration.none
|
|
), //TODO: personalize your fonts
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
SizedBox(
|
|
width: 1000,
|
|
height: 600,
|
|
child: Image.memory(attachment.data),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
|
|
|