2022-04-19 16:06:03 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
2022-05-15 16:59:55 +02:00
|
|
|
import '../lang/lang.dart';
|
|
|
|
|
2022-04-19 16:06:03 +02:00
|
|
|
class AboutPage extends StatefulWidget {
|
|
|
|
const AboutPage({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
State<AboutPage> createState() => _AboutPageState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _AboutPageState extends State<AboutPage> {
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
appBar: AppBar(
|
2022-05-15 16:59:55 +02:00
|
|
|
title: Text(Languages.of(context)!.about),
|
2022-04-19 16:06:03 +02:00
|
|
|
),
|
2022-05-17 18:14:14 +02:00
|
|
|
body: Center(
|
2022-05-02 12:07:47 +02:00
|
|
|
child: SizedBox(
|
|
|
|
height: MediaQuery.of(context).size.height,
|
2022-05-17 18:14:14 +02:00
|
|
|
width: MediaQuery.of(context).size.width - 50,
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(mainAxisSize: MainAxisSize.min, children: [
|
|
|
|
const Text("OpenCanteen", style: TextStyle(fontSize: 30)),
|
|
|
|
Text(Languages.of(context)!.copyright),
|
|
|
|
InkWell(
|
|
|
|
onTap: () => launch(
|
|
|
|
"https://github.com/hernikplays/opencanteen/blob/main/LICENSE"),
|
|
|
|
child: Text(Languages.of(context)!.license)),
|
|
|
|
const SizedBox(height: 15),
|
|
|
|
Text(Languages.of(context)!.usedLibs,
|
|
|
|
style: const TextStyle(fontSize: 19)),
|
|
|
|
const SizedBox(height: 10),
|
|
|
|
cudlik(
|
|
|
|
"Flutter",
|
|
|
|
"Copyright 2014 The Flutter Authors. All rights reserved, licence BSD 3-Clause",
|
|
|
|
"https://github.com/flutter/flutter/blob/master/LICENSE"),
|
|
|
|
const SizedBox(height: 10),
|
|
|
|
cudlik(
|
|
|
|
"Flutter_secure_storage",
|
|
|
|
"Copyright 2017 German Saprykin. All rights reserved, licence BSD 3-Clause",
|
|
|
|
"https://github.com/mogol/flutter_secure_storage/blob/develop/flutter_secure_storage/LICENSE"),
|
|
|
|
const SizedBox(height: 10),
|
|
|
|
cudlik(
|
|
|
|
"connectivity_plus",
|
|
|
|
"Copyright 2017 The Chromium Authors. All rights reserved, licence BSD 3-Clause",
|
|
|
|
"https://github.com/fluttercommunity/plus_plugins/blob/main/packages/connectivity_plus/connectivity_plus/LICENSE"),
|
|
|
|
const SizedBox(height: 10),
|
|
|
|
cudlik(
|
|
|
|
"url_launcher",
|
|
|
|
"Copyright 2013 The Flutter Authors. All rights reserved, licence BSD 3-Clause",
|
|
|
|
"https://github.com/flutter/plugins/blob/main/packages/url_launcher/url_launcher/LICENSE"),
|
|
|
|
const SizedBox(height: 10),
|
|
|
|
cudlik(
|
|
|
|
"canteenlib",
|
|
|
|
"Copyright (c) 2022 Matyáš Caras and contributors, licence MIT",
|
|
|
|
"https://github.com/hernikplays/canteenlib/blob/main/LICENSE"),
|
|
|
|
const SizedBox(height: 10),
|
|
|
|
cudlik(
|
|
|
|
"path_provider",
|
|
|
|
"Copyright 2013 The Flutter Authors. All rights reserved., licence BSD-3-Clause",
|
|
|
|
"https://github.com/flutter/plugins/blob/main/packages/path_provider/path_provider/LICENSE"),
|
|
|
|
const SizedBox(height: 10),
|
|
|
|
cudlik(
|
|
|
|
"shared_preferences",
|
|
|
|
"Copyright 2013 The Flutter Authors. All rights reserved., licence BSD-3-Clause",
|
|
|
|
"https://github.com/flutter/plugins/blob/main/packages/path_provider/path_provider/LICENSE")
|
|
|
|
]),
|
|
|
|
),
|
2022-05-02 12:07:47 +02:00
|
|
|
),
|
2022-04-19 16:06:03 +02:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget cudlik(String nazev, String copyright, String licence) {
|
|
|
|
return InkWell(
|
|
|
|
onTap: () => launch(licence),
|
|
|
|
child: Column(children: [
|
|
|
|
Text(
|
|
|
|
nazev,
|
|
|
|
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 17),
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
copyright,
|
2022-05-17 18:14:14 +02:00
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: const TextStyle(fontSize: 12),
|
2022-04-19 16:06:03 +02:00
|
|
|
),
|
|
|
|
]),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|