|
|
|
@ -1,20 +1,24 @@
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_buttons_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class RadiologyReportScreen extends StatelessWidget {
|
|
|
|
class RadiologyReportScreen extends StatelessWidget {
|
|
|
|
final String reportData;
|
|
|
|
final String reportData;
|
|
|
|
|
|
|
|
final String url;
|
|
|
|
|
|
|
|
|
|
|
|
RadiologyReportScreen({Key key, this.reportData});
|
|
|
|
RadiologyReportScreen({Key key, this.reportData, this.url});
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return AppScaffold(
|
|
|
|
return AppScaffold(
|
|
|
|
appBarTitle: TranslationBase.of(context).radiologyReport,
|
|
|
|
appBarTitle: TranslationBase.of(context).radiologyReport,
|
|
|
|
body: Container(
|
|
|
|
body: SingleChildScrollView(
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
@ -32,6 +36,36 @@ class RadiologyReportScreen extends StatelessWidget {
|
|
|
|
fontSize: 2.5 * SizeConfig.textMultiplier,
|
|
|
|
fontSize: 2.5 * SizeConfig.textMultiplier,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
),
|
|
|
|
|
|
|
|
bottomSheet: url == null
|
|
|
|
|
|
|
|
? Container(
|
|
|
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0,
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
: Container(
|
|
|
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.1,
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
FractionallySizedBox(
|
|
|
|
|
|
|
|
widthFactor: 0.9,
|
|
|
|
|
|
|
|
child: Container(
|
|
|
|
|
|
|
|
child: Wrap(
|
|
|
|
|
|
|
|
alignment: WrapAlignment.center,
|
|
|
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
|
|
|
// TODO change it secondary button and add loading
|
|
|
|
|
|
|
|
AppButton(
|
|
|
|
|
|
|
|
title: TranslationBase.of(context).openRad,
|
|
|
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
|
|
|
launch(url);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|