2020-12-02 09:16:23 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:selfprivacy/config/brand_theme.dart';
|
|
|
|
import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart';
|
|
|
|
import 'package:selfprivacy/ui/components/brand_header/brand_header.dart';
|
2020-12-08 19:26:51 +00:00
|
|
|
import 'package:selfprivacy/ui/components/brand_text/brand_text.dart';
|
2020-12-02 09:16:23 +00:00
|
|
|
import 'package:package_info/package_info.dart';
|
2021-03-18 07:26:54 +00:00
|
|
|
import 'package:easy_localization/easy_localization.dart';
|
2020-12-02 09:16:23 +00:00
|
|
|
|
|
|
|
class InfoPage extends StatelessWidget {
|
2021-03-15 15:39:44 +00:00
|
|
|
const InfoPage({Key? key}) : super(key: key);
|
2020-12-02 09:16:23 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return SafeArea(
|
|
|
|
child: Scaffold(
|
2020-12-03 16:52:53 +00:00
|
|
|
appBar: PreferredSize(
|
2021-03-18 07:26:54 +00:00
|
|
|
child: BrandHeader(title: 'more.about_app'.tr(), hasBackButton: true),
|
2020-12-03 16:52:53 +00:00
|
|
|
preferredSize: Size.fromHeight(52),
|
|
|
|
),
|
2020-12-02 09:16:23 +00:00
|
|
|
body: ListView(
|
2021-05-25 21:53:54 +00:00
|
|
|
padding: paddingH15V0,
|
2020-12-02 09:16:23 +00:00
|
|
|
children: [
|
2020-12-03 16:52:53 +00:00
|
|
|
BrandDivider(),
|
|
|
|
SizedBox(height: 10),
|
|
|
|
FutureBuilder(
|
|
|
|
future: _version(),
|
|
|
|
builder: (context, snapshot) {
|
2021-03-18 07:26:54 +00:00
|
|
|
return BrandText.body1('more.about_app_page.text'
|
|
|
|
.tr(args: [snapshot.data.toString()]));
|
2020-12-03 16:52:53 +00:00
|
|
|
}),
|
2020-12-02 09:16:23 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
Future<String> _version() async {
|
|
|
|
var packageInfo = await PackageInfo.fromPlatform();
|
|
|
|
return packageInfo.version;
|
|
|
|
}
|
|
|
|
}
|