This commit is contained in:
Juan Felipe Duarte
2023-05-10 08:43:40 -05:00
parent eeced3ac66
commit 40ee4f2ab2
30 changed files with 1175 additions and 147 deletions
+83
View File
@@ -0,0 +1,83 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:prosappco/src/components/pop_appbar.dart';
import 'package:prosappco/src/models/setting_model.dart';
import 'package:prosappco/src/screens/web_view.dart';
class AboutScreen extends StatefulWidget {
const AboutScreen({super.key});
@override
State<AboutScreen> createState() => _AboutScreenState();
}
class _AboutScreenState extends State<AboutScreen> {
SettingModel? settings;
@override
void initState() {
super.initState();
if (settings == null) {
SettingModel.getSettings().then(
(SettingModel value) => setState(() {
settings = value;
}),
);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: PopAppbar(
onPressed: () {
Navigator.pop(context);
},
label: 'Acerca de la aplicación'),
body: ListView(
children: [
ListTile(
onTap: () {
Navigator.push(
context,
CupertinoPageRoute(
builder: (BuildContext context) {
return WebViewScreen(
label: 'Políticas de privacidad',
link: settings?.proliticasPrivacidad ?? '',
);
},
),
);
},
title: const Text('Políticas de privacidad'),
trailing:
const Icon(Icons.keyboard_arrow_right, color: Colors.black),
),
ListTile(
onTap: () {
Navigator.push(
context,
CupertinoPageRoute(
builder: (BuildContext context) {
return WebViewScreen(
label: 'Términos y condiciones',
link: settings?.terminosCondiciones ?? '',
);
},
),
);
},
title: const Text('Términos y condiciones'),
trailing:
const Icon(Icons.keyboard_arrow_right, color: Colors.black),
),
ListTile(
title: const Text('Versión de la aplicación'),
subtitle: Text(settings?.version ?? ''),
),
],
),
);
}
}